Book Review: The Ruby Programming Language

For a long time now Dave Thomas Programming Ruby (aka. The Pickaxe) has been the standard in the Ruby community as the book to learn Ruby from. Unfortunately the Pickaxe is not the best programming book ever written. In fact, its bulk and slowness almost killed my inspiration to learn Ruby. I respect Dave Thomas a lot for what he does for the Ruby community but the Pickaxe and I just did not click.

Since I didn’t find the Pickaxe to be excellent reading material, I had been eagerly anticipating David Flanagan’s The Ruby Programming Language to come out and unseat The Pickaxe as the de facto book to recommend to newcomers to Ruby.

I am happy to say that The Ruby Programming Language did not disappoint. I picked up this book solely expecting to just review it since I already comfortable programming in Ruby. However, once I started reading the book I found myself frequently learning things about Ruby that I didn’t know before. Not like little things either like, “oh that’s interesting”. I’m talking significant things like “holy crap that’s sweet”.

This book covers both Ruby 1.8 and Ruby 1.9. Initially this concerned me because as impressive as it is, it must have been quite a headache for the authors and was not sure how they were going to pull it off. It turns out to be pretty much a non-issue. The authors make a note of what is 1.8 or 1.9 only and it does not disturb the flow of the book since it doesn’t come up too frequently. I do hope though that after Ruby 1.9 stable is released they upgrade the book and tear out all the 1.8 specific material. Since I currently use 1.8 on a daily basis I don’t mind having 1.8 material in there but after everything has shifted to 1.9 it would be rather irksome.

The style of the book is fairly straightforward. It starts with an introduction to how Ruby programs work and then goes into an explanation of Ruby datatypes and objects. The later chapters cover advanced topics like reflection and metaprogramming. The authors opted not to go the tutorial route, which I think, was a good approach since the book is not designed to be an “intro to programming” text.

In the preface of the book, the authors state:

[The Ruby Programming Language] is loosely modeled after the classic The C Programming Language by Kernighan and Ritchie and aims to document the Ruby language comprehensively but without the formality of a language specification. It is written for experienced programmers who are new to Ruby, and for current Ruby programmers who want to take their understanding and mastery of the language to the next level.

O’Reilly is hoping that The Ruby Programming Language becomes the equivalent of K&R’s The C Programming Language for Ruby and I hope it succeeds. I think that every language needs their own K&R book for people to turn to as the definitive authority. That’s something that I feel like the Java programming language never had and it creates something of a hurdle when browsing for a Java book.

The third edition of the Pickaxe is in beta and will be coming out soon. I really hope it makes a strong showing when it hits the press because after the bang-up job Flanagan and Matz did with The Ruby Programming Language, there is no reason to look at the Pickaxe till then.

Computer Science Trivia Questions

Today we threw the first annual ICS day at UC Irvine. For the event I helped prepare a bunch of computer science trivia questions for a family feud style game. Since it is kind of an interesting list I am going to make it available to everyone here incase someone else is looking for a huge list of CS trivia questions.

Some of the questions were given to me by a classmate and I don’t know where she got them from. The rest I wrote myself. I dumbed down the questions as much as I could because I wanted to make sure people would get them right. Having a trivia game with questions that no one knew that answer to would not have been much fun.

Read more

Camino buying advertising? How and why?

Today I was surprised to see an advertisement for the Camino web browser while surfing the web. This struck me as odd because Camino is an open source project that is available for free. Camino exists under the Mozilla Foundation which I know has a good chunk of money but I’m certain that they aren’t giving any of it to Camino for advertising. So how are they paying for it?

According to Samuel Sidler, Team Coordinator of the Camino Project, the money came from the generosity of various people. First of all, kudos to the various people. I really respect people who donate to open source projects, but is advertising really what Camino needs?

Camino certainly deserves more attention. Camino is currently my favorite web browser on OS X and I would like to see it be more widely adopted. Firefox 2 is slow and fugly and Safari does not have some of the features I demand like quick searches. I’m expecting Firefox 3 to give Camino a good run at being my default browser on OS X. I would certainly love to go back to using extensions without having to open another browser.

I remember when Firefox was making a big push to build up their user base. They did a great job of getting their users to promote Firefox in a zillion different ways including homemade commercials, a crop circle, and a New York Times ad. The Firefox marketing team always got their users involved and never “just bought ad space” to my knowledge. Why isn’t Camino doing the same?

Ditching Monaco

This month marks the one year since I purchased my 13″ Macbook and I have to say I’ve had fewer problems when my Mac than any other computer I’ve owned.

That also means I’ve been using TextMate as my primary editor for a year which has also been great. I can’t say that I like its functionality that any more than ViM’s but it sure does look better.

I’ve been using OS X’s default fixed width font Monaco up till now which is gorgeous but its been a year now and I’m ready to see what else is out there.

For reference this is a look at what TextMate looks like using Monaco. I’m using the Twilight theme.

Monaco

The font I ultimately decided on is Inconsolata. It looks great at 14pt.

Inconsolata

Note! I did a poor job with the screenshots and its hard to notice a difference but it’s there! Try switching your own terminal to Inconsolata 14pt to see the difference more clearly.

The way Monaco letters are very close together feels a little sloppy in places and while thats certainly part of its appeal, I’m ready to try something a little more defined. Inconsolata feels great so far. I’ve also switched Terminal.app to use Inconsolata and it looks great there as well.

Read more

Git Presentation

Last week I gave a presentation on the Git version control system at the OC Ruby Users Group. The presentation went very well and I felt it was the most lively presentation that I’ve ever given, even if questions did push the length over an hour.

The slides I used for the presentation are available for download below. The zip contains a pdf of the presentation and the keynote files. The original version of the slides was provided by Ryan Felton. I expanded and modified them for my presentation.

git-presentation.zip Git Presentation Files
Released on April 27, 2008.

← Previous PageNext Page →