Sunday, October 16, 2011

Book Review - The Well Grounded Rubyist

October 16, 2011 Posted by Jason Irwin No comments

Disclosure: I recently received review copies of two books in Manning’s Ruby series. The first, and the subject of today’s review is The Well Grounded Rubyist by David A. Black.


These days it feels as though one couldn’t throw a rock in a major metropolitan area without hitting a ruby developer. Worse still, each appears more enthused than the last. This enthusiasm is either infectious or annoying, depending on the individual, but as a .NET developer by day I’m admittedly intrigued to see what all the fuss is about. While I enjoy the .NET stack and will be using it professionally for the foreseeable future, it’s time to balance my skill set somewhat and Ruby (on Rails) may be just the tonic - hence my request to review this title. Expect some future Ruby/Rails/VIM related posts!

I haven’t yet found a good reference explaining the different naming conventions employed by Manning in their series’ titles (let me know if one exists and I’ll post a link). The term “Well Grounded” had a similar effect to a realtor describing a property as “rustic”, and I I was originally skeptical, taking the title to imply something a little more basic and less thorough than this book actually is. I was completely mistaken - light and fluffy this title is not. Instead it is an enjoyable and detailed introduction to programming with Ruby, valuable to polyglot programmers and novices alike. I’ve read the title cover to cover (with many highlights along the way) and it will undoubtedly remain on my bookshelf long term as a useful reference to the Ruby language.

The author, David A Black, focuses solely on the core Ruby programming language, purposefully avoiding libraries and frameworks (no rails here) in favor of getting deep into the language itself - a wise move that allows a consistent focus and detail oriented approach. The book begins with an overview of the Ruby installation and command line tools which clarified much for me - a novice Ruby programmer. The remainder of the book iteratively builds knowledge of the Ruby language, explaining core mechanisms common to other languages (objects/classes/scope/etc.), moving onto Ruby’s myriad of in-built classes and finally delving into dynamic programming and introspection.

The book is well written, code samples are often simple but always effective and after reading the book I feel very comfortable getting started and writing some code of my own. What I enjoyed most about this title was David A Black’s insight into the Ruby programming language. Throughout the book he provides commentary on why things are they way they are. He doesn’t simply (as is often the case with similar titles) describe a construct and then move forward - he goes to great length to rationalize the usage of constructs and advises the reader when and why they should be used. Similarly he touches on the evolution of the language, citing mechanisms that have changed from one revision to the next - describing the problem and the fix - and also warning the reader when mechanisms he is describing are likely to change in the future. I find this type of insight extremely interesting and beneficial in my education on the language. I’ll be looking out for more titles by the author in the future.

If there are two things that I would have liked to have seen it is some coverage on debugging and testability. As I mentioned earlier, the book focuses on only the core language itself and perhaps these are not core language constructs, so to speak. However, for me, knowing how the language facilitates debugging and (automated) testing are key concerns and I was a little disappointed to reach the final chapter with little being said on either.

At the end of the day this is a great book, full of useful advice and worthy as an introduction to Ruby or a reference for seasoned developers. It covers Ruby 1.9.1 so is up to date and very relevant. I heartily recommend it!