Book Review – Head First Ruby
This book is a fun primer of the Ruby programming language.
Overview
Head First Ruby by Jay McGavren teaches how to write Ruby.
The book follows the O'Reilly Head First formula: be entertaining. The start of every Head First explains their reasoning in detail.
Obviously, the book discusses the Ruby syntax, and what features Ruby has. Experienced programmers will benefit from the latter—once you know what an array is, you can bypass the three pages describing and illustrating an array. The up-and-coming programmer will need to go through the whole book at a slower pace.
Additionally, the book touches on other topics. One chapter on programming errors involving objects and references. Two chapters on building a web application. Another chapter on unit testing. And a chapter on reading Ruby's online documentation.
My Take
Within the Head First series, this is one of the good ones. McGavren chose adequate (and amusing) coding projects: extracting fictitious movie reviews, building an oven simulator, and modeling different cuts of steak as objects.
McGavren doesn't attempt to trip you up with trick questions, or force you to make errors in order to illustrate the "wrong" way to do something. An entire chapter discusses bugs encountered by the fictitious cast introduced throughout the book.
Unexpectedly, the book spends a chapter on testing and unit tests. I was surprised, because ...back in my day... programming books and classes glossed over testing. You were simply taught syntax and concepts.
For being a primer, the book illustrates both the "textbook" way and the "Ruby community" way. This exposure to how Ruby is actually written aids in transitioning past novice skill. (Much like learning a new language: books will teach you the rigid/polite way to talk, which will sounds stuffy to natives.)
Why you should read this book
Are you an experienced non-Ruby developer? This book will give an enjoyable tour of the syntax and the concepts unique to Ruby.
Interested in web development? The last two chapters will prime you on how a web application works. You can ignore the Ruby-specific parts of the chapter, and read about web applications in general.
Novice Ruby developer? Scattered throughout the book are tips and techniques that will move you past novice a little quicker.
Borrow or Buy?
Borrow. This book is an excellent primer. The book teaches plenty of day-to-day topics that a Ruby programmer will constantly use, which means the book won't get much use as a reference.