RubyForRails.I just finished my April book from my 2010 developer-oriented book reading list, so I thought I would share some thoughts on Ruby For Rails by David Black.

In my last book review post, I mentioned that I was going to finally tackle functional programming this last month with Real World Functional Programming: With Examples in F# and C#. However, my wife sweet-talked me into doing a bunch of enhancements on her Rails site so I changed plans at the last minute so that my reading topic would mesh better with my programming activities.

Rating - star_sm star_sm 1/2 (out of 5)

Prerequisites – As long as you have a basic grasp of OO programming and web development, you shouldn’t have any trouble understanding the content of this book..

The Good

  1. Explains the “Black Magic” behind Rails – Rails is a high level DSL built on a language that offers some unique dynamic features along with a wide array of syntactic sugar. The result is that it’s usually difficult for most new comers to grok what is going on behind the scenes. By devoting so much space to Ruby, the author answers questions that most Rails-centric books ignore.
  2. Effective book structureThe book is broken up into thirds: An brief intro to the Rails framework; a section on Ruby fundamentals; and an more in-depth exploration of Rails. This conceptual ordering is an effective teaching strategy because it first builds up your interest in the framework, then gives you the tools to parse and grok what is happening, and finally provides you with the chance to dig into some more substantial examples.
  3. In-depth approach to topics – I suspect this book focuses more on subtleties than the average ‘how to’ book. For example, the author concocts a rather convoluted example in the chapter on Modules and Program Organization where methods are redefined in various combinations of derived classes and mixed-in modules in order to demonstrate the precise order of method lookup.

The Bad

  1. Not the fastest way to get started with Rails – This was actually my second attempt at reading this book. I first started reading it a couple of years ago, but then abandoned it after few hundred pages in favor of Agile Web Development with Rails, which was much more geared towards getting you to develop realistic apps in Rails quickly. At that point, I had a Rails project lined up and was anxious to get started, so I found the extensive focus on Ruby and in-depth explanations to be frustrating. This time around I was much more interested in gaining a deeper understanding of the framework, so it wasn’t an issue.
  2. Overly Academic Examples – Although the chapter on meta-programming was informative, I was a little frustrated by the end because it rarely went into any details of exactly how these features were utilized to do cool stuff in Rails. I understand that simple academic type examples are sometimes the best way to illustrate a concept, however without the inspiring examples it’s hard to get excited about a language feature.
  3. Target audience too broad – This book had the potential to be a really good intermediate book, but it fell far short because of all of the introductory material interspersed with the advanced nuggets. As a result, I almost missed some of the key ways in which Ruby is different from C# and Java when it comes to object orientation because I fell into skim mode out of boredom. The author should have targeted just an intermediate audience and focused specifically on how Ruby differed from most other object oriented languages.
  4. Writing style not concise – With the exception of the chapter on Regular Expressions, the book seriously lacked in editorial discipline. This really could have easily been remedied by any editor, so I fault Manning for this one. It definitely knocked a star off of my rating because I was so frustrated with redundant passages that added little value, especially in the intro and summary.

Conclusion – Definitely don’t choose this as your first intro to Rails if your goal is to be productive in the framework quickly. In that case, I suggest picking up a copy of Agile Web Development with Rails.

However, if you’re already somewhat familiar with the framework and are much more interested in figuring out the mechanics behind Rail’s unusual constructs (and don’t mind skimming through some introductory material and wordiness), then this book is definitely a worthwhile read.

Popularity: 1% [?]