Quantcast

Ruby on Rails, Io, Lisp, JavaScript, Dynamic Languages, Prototype-based programming and more...

Technoblog reader special: $10 off web hosting by FatCow!

Friday, March 07, 2008

Book Review- The Ruby Programming Language

David Flanagan, Matz, and _why teamed up to write The Ruby Programming Language. This book is in kind of an interesting purgatory right now. This book covers Ruby 1.8 and 1.9 which is both an asset and a problem. It is hard to recommend this book to a beginner because Ruby 1.9 will not be in mainstream use for quite some time now and learning about the new features can be more confusing than useful, but it is also hard to recommend this book for people who know Ruby well since there is no clear differentiation of 1.9 code, thus you can't use it as a reference for what's new.

The obvious comparison for this book is the seminal pickaxe v2 book. Although the Ruby Programming Language is well written and enjoyable, it does not cover Ruby as thoroughly as pickaxe. I could see the Ruby Programming Langauge v2 with a full reference section of 1.9 (or even 1.8+1.9 with some clever way of showing the differences) taking over my recommendation for #1 most important book for any Ruby programmer in a few years, but until then pickaxe is still required reading.

One thing that I found interesting was the decision not to cover many of the common standard libraries like CGI, logger, test/unit, or net/* (there is 1/2 page out of 400 dedicated to net/http). These are some of the oversights I hope will be fixed in v2, though the authors may choose to keep the discussion more pure and keep the book focused on blocks and operators. Personally, I think that would be a shame not to get into more detail.

Overall, I like this book, but feel like the only person that would benefit from it right now are those who know Ruby at a somewhat higher than beginner level already, but want to deepen their knowledge to a more advanced level and stay ahead of the curve with 1.9 at the same time. 

Adding a comprehensive reference section with clear differentiation between 1.8 and 1.9, and more _why illustrations (one per chapter is way too meager) could make this book invaluable.

You should follow me on twitter here.

Technoblog reader special: click here to get $10 off web hosting by FatCow!

Book Review- Ruby on Rails: Enterprise Application Development

I was just sent a copy of Ruby on Rails: Enterprise Application Development from Packt Publishing. I had never read a Packt book before, but I must say, this one impresses me. The tag line of this book states:

"Building a complete Ruby on Rails business application from start to finish"

This book delivers. One of the reasons I like this book so much is that it talks about using Rails in one of the best types of situations: internal-facing utility apps. These are the type of applications I first started building using Rails professionally and one of the places Rails shines brightest. Rails lets you quickly throw together utility applications that adds value to a business, yet maintain a clean codebase, and this book shows you how.

The book covers everything from source control, Rails basics, choosing a CGI implementation, choosing a database, AJAX development, and does a very good job of showing you both the OS X and Windows side of Rails development. It is centered around a story that is familiar to many small businesses: sharing a dynamic contact list within a sales team. It teaches you how to think about the problem in a structured way, including deciding on a database architecture and key format.

The thing I like best about this book is that it is terribly pragmatic. It steps you through a common situation and brings up the complexities just as they would show up in the real world and the best practices to handle those complexities.

I think the target audience for this book is anyone who is tired of spaghetti code but intimidated by seemingly scary terms like MVC. For years I have been begging some of my friends to try Rails instead of PHP, but for various reasons they don't get out of their comfort zone. If a friend has kept begging you to try Rails and it seems like too much effort, pick up this book.

As with most Rails books, this one does suffer from a few deprecations since publication and a few detail oversights. For example, pagination is now a plugin, so a newbie hitting that chapter could get confused quickly. In the book's coverage of various reverse proxies, it does not mention one of the key reverse proxies for Rails environments under high load: HAProxy, which can hide concurrent requests from Mongrel. A finer point is that in the example on uploading files, there is no note that when the file being uploaded is a certain small size, it is instantiated as a StringIO object, not a Tempfile object, which means that the File.basename will raise an error.

Overall, I would definitely recommend this book for people new to Rails.

You should follow me on twitter here.

Technoblog reader special: click here to get $10 off web hosting by FatCow!

 

If you like this blog, you might also like top photography schools.