Tuesday, August 19, 2008

Yu Go Club

I've started a new blog for the Go club here in Pasadena, the Yu Go Club. You can find it here: Yu Go Club Blog In particular, I want to start writing about the future of Human-Computer Go. You can find my first article on the subject here.

Tuesday, July 15, 2008

Advice to a fellow developer

Here's my advice to a fellow Java developer who asked me how to learn Ruby on Rails. Having gone 100% Ruby on Rails since October of last year, I had a lot to say:
Join a local Ruby group if you can find one in your area. I would say definitely get the newest version of the Rails book, but wait a month or two if a new version is about to come out. Older versions aren't useless, but things change every day. Even the newest book will be missing things before ink even touches paper. I highly recommend Rails for Java Developers as the fastest way for you to get up to speed. After slogging through the Ruby and Rails books, I found RfJD wished I had read it first. They build on what you know from Java instead of starting you from ground zero, and that will save you a lot of time. Build a couple of VERY SMALL projects first before you launch yourself on a big project. Your first few projects will be very messy and hard to maintain, despite your best intentions to the contrary. Practice Ruby with simple problems like the ones at Project Euler. Ask a lot of questions. Shun the Rails Wiki pages. The information there is generally a mix of wrong AND out of date. Watch Railscasts videos. Suffer gracefully. Ask more questions.
Got any more advice to share? Post it here!

Wednesday, July 2, 2008

BookMooch vs. PaperbackSwap (Part 1 of 2)

I've been using BookMooch to trade books with people, and it's generally worked pretty well for me. However, I found myself ultimately with a number of points and a big wishlist of books that I wanted that nobody offered. Enter PaperbackSwap. I've been a member for about a week now. What do I think about it? I think they got a bunch of stuff right that BookMooch hasn't. Take a minor example: That's a referral banner that I can include in my blog post. I get points if you sign up through it. If you find this post at all helpful, I hope you'll use that banner to sign up for PaperbackSwap. What's the difference, you're asking? The most compelling reason for me is that they have a bigger catalog than BookMooch. Checking out the "Under the Hood" link earlier today, I found that they have around 4 books posted every minute. Right now the site says 2,280,827 books available. One of the most striking differences, to me, is the fact that BookMooch only gives you 2 points to start with (meaning you can request 2 books), and after that you can only ship books to other members or buy points, as a means of getting more points to request books. BookMooch, on the other hand, awards 0.1 points for every book posted and 0.1 points for every book you receive and provide feedback on. This means that BM is creating points constantly regardless of whether you're posting useful books into the system or not. More points received than spent means that it's easy to mooch books, and you don't even have to post books that anybody wants.

Thursday, May 8, 2008

Surprising findings using Ruby Arrays as Queues

I'm working on an Aho-Corasick implementation in Ruby, and found something interesting about Ruby. Well, something interesting to a relative newbie, I suppose... Arrays are the Ruby object that people use for Queues in Ruby. Which is a little odd, because the performance of Ruby arrays as queues is pretty poor. Worse, in fact, than inserts into a Hash. This is probably due to the fact that pushing objects into an array requires growing the array. Furthermore, I found that the performance of Array#+ is better than Array#push and Array#<<, even though all three methods ostensibly do the same thing. It turns out that Ruby does have a Queue object that performs well. It's intended for producer/consumer operations across multiple threads, but nonetheless it performs much better as a Queue than arrays do. Here it is, the Queue class in all its glory.

Sunday, April 27, 2008

2008 Presidential Election Poll

I've created a 2008 Presidential Election Poll using my Range Voting poll that I wrote about earlier. The polling application is ready for general use, although I do have a few more features I want to add to it. In the meantime, cast your vote for president!

Sunday, April 20, 2008

Range Voting Application

I'm happy to announce my new Range Voting Application, which allows you to set up your own range voting polls. After finding that Approval Voting didn't give my co-workers at the LA Times enough expressiveness, I started looking for a Range Voting system I could use for my weekly polls. When I didn't find a great Range Voting application, I decided to create my own. It's easy to use, both for voters, and for poll administrators. Try it out by voting in one of the example polls on the home page or jump right in by creating your own poll today! If you want to learn more about Range Voting, the folks over at RangeVoting.org have a fantastic site with lots of great information about Range Voting.

Sunday, March 23, 2008

SuperDuperApps.com

After several attempts to get Google to index my server at home on my DSL (using a dyndns.org hostname, of course), I decided I needed to set up a more "legitimate" host. So, I bought a VPS instance at BuyAVPS.com for $9.99 a month so I could mess around with my own Ruby on Rails apps.

I tried to use some of the pointers I got from The Principles of Beautiful Web Design, which I finished reading last week, and ended up with a logo and welcome page that I can actually be proud of! Ok, so it's not much, but now I have a home for StampCalculator so people can actually discover and use it.