Relevance Review #10: Programming Ruby (the Pickaxe)

Full disclosure: I have written a book for Dave, and consider him a good friend.

Like a lot of technical folk of my generation, The Pragmatic Programmer is a shining city on a hill. After reading that book, I was never the same, as a programmer, and in some ways, as a person. Dave and Andy wrote a classic.

When moving from a general-purpose, philosophical book like PragProg to a more directly technical tome like Programming Ruby, you might think that something could get lost. The great conversational style, the ability to get to the heart of problems and not get lost in the wilderness of meaningless details, the brevity, might all fall away. As the wise man said, two out of three ain't bad. Coming in at 787 pages without counting the index, the book can be called many things, but brief is near the bottom of the list.

As for the rest, I can say that this book is one of the most engaging technical books you'll ever have the pleasure to read. The Pragmatic style, wit, and insight are all on dramatic display throughout the book. In fact, they pulled off one of the greatest tricks in the biz: they made this giant technical reference book almost feel narrative. No mean feat.

When I read a technical book, there are usually two important reactions I have to the text as I read through it. "Why in the world are they covering this?" and "How could they not talk about that?" The Pickaxe simply never makes me ask the first question; everything covered in the book is easily placed in context and never feels out of place or too esoteric to be useful. There are certainly times when I asked the latter question (and still do) but it is impossible to fully document any technology, let alone a 10-year-old language and community, in a single volume. It is therefore difficult to find this to be much of a problem.

The book is broken into three primary sections. The first is the narrative portion. This is what most people will read when they site down with the book the first time. It takes up at least half of the total space, and is laden with fact and opinion. I find myself turning to it time and again to remind myself of not just how a given piece of Ruby works, but how I ought to be using (or not using) it.

The second part of the book is the standard library guide. This collects into one place every method of every class that makes up the Ruby core. This is enormously useful in a world where very few of us have IDEs with code completion for Ruby. However, I almost never use the book for this purpose, using the online version of the previous edition instead, since that gives me online search and copy/paste.

The third part is the only really flawed portion of the book. It is a reference describing all of the non-core Ruby libraries. Each library gets a page which is often barely enough to tell you what it is for let alone how to use it. On the plus side, most of the pages have a piece of example code that lets you try to get started. I understand the underlying problem; if they'd done each library full justice, the book would be another 200 pages and only 8% of the readers would have reaped any benefit. However, if you are looking for an example of how to use OpenSSL with Ruby, the page in this section isn't terribly useful.

For my money, the Pickaxe goes down as one of the finest technical reference books ever published. Its combination of wit, wisdom, style and efficiency should (and do) serve as a model for how other technical books should be written. If you write (or want to write) Ruby code, it should be laying open on your desk at all times.