Last month No Starch Press released their second Ruby book ever, The Book of Ruby by Huw Collingbourne. Their first was Ruby by Example, released four years ago in 2007! The Book of Ruby is an introductory book to the Ruby programming language.
The book covers all of the standard programming language basics: strings, classes, arrays, loops, etc. Additionally there are three chapters on more advanced subjects in Ruby: Marshal, Threads, and Dynamic Programming. Ruby on Rails is also quickly introduced in a chapter at the end of the book.
Each chapter includes a Digging Deeper section at the end that goes into more detail, warns about corner cases, or introduces an advanced usage. As someone who already knows Ruby these were the most interesting to read. They are placed inside of their own section to let someone who is just trying to learn Ruby know that they can safely be skipped.
No Starch Press is the publisher behind several fun programming books like Land of Lisp, Learn You a Haskell for Great Good, and the iconic Manga guides. When I picked up The Book of Ruby I wasn’t expecting to encounter the second coming of Why’s (Poignant) Guide to Ruby, but that’s what I was hoping for. Unfortunately, The Book of Ruby does not share any characteristics with that fun intro to programming Ruby and instead reads like an average technical book… dryly. On the positive side, I did find the author’s writing to be clear and easy to follow.
The book contains many examples but they are as contrived as possible. I understand that examples should be as simple as possible so that the reader can easily follow along but there is also a need to make the examples do interesting things to make the book more engaging.
Further, Collingbourne does not make an attempt to explain how Ruby is actually used “in the wild”. This is something that another Ruby author, Russ Olsen, does really well. Ruby has a lot of features so it is important to understand how Ruby programmers actually use Ruby. For instance, even though class variables are available, Ruby programmers try to never use them. This is something I would have liked to know when learning Ruby. However, instead of sharing these tidbits of information from his many years of Ruby experience, Collingbourne stays neutral and presents all of the information without including his opinions.
The one opinion that Collingbourne did share, is that he does not believe code style conventions are very important. This is something I can respect, and actually envy. In my own programming, I consider the time I spend to reformat my code to make it “look pretty” to be a waste. However, I still do it because it drives me crazy not to. If I could flip a switch inside my brain that would cause me to not care about code style anymore I absolutely would.
Overall, I feel like if this had been the first Ruby book I had picked up I would not have fallen in love with Ruby like I did. I am disappointed with No Starch Press for not upholding their unique style. The Book of Ruby does not differentiate itself enough to recommend over the other Ruby titles that are out there.