As Ruby matured and became part of the programming mainstream (at least to a certain extent), publishers got on the bandwagon and supply us with more and more Ruby books, many of which are really good. Alas time is limited and most of us won’t manage to read them all, so I thought I’ll write up my current recommendations.
From zero to hero
For people new to Ruby, there are 3 books I consider absolute must reads:
- The Well-Grounded Rubyist by David A. Black:
This book really lives up to its title and gives the reader a solid grounding that will be a great basis for diving deeper into the language (I wrote a longer review here). Alternatively you might want to consider Programming Ruby by Dave Thomas, with Chad Fowler and Andy Hunt, which is also an excellent book and a standard recommendation for Ruby newbies.
- Eloquent Ruby by Russ Olsen:
This book is a true gem! Mostly written for people coming to Ruby from other programming languages, Russ Olsen doesn’t dwell on banalities, but instead teaches you good, idiomatic Ruby. The presented material is excellent and the writing is witty and clever. If you are new to programming this is probably not the best book for you, but if you have experience in some other language or “just” want to get more fluent in Ruby, “Eloquent Ruby” is hard to beat.
- Ruby Best Practices by Gregory T. Brown:
Once you worked your way to the other two books or have already coded in Ruby for a while, you definitely should check out “Ruby Best Practices”. As the title suggests this is not about learning Ruby, it’s about getting the most out of the language, for yourself as well as for potential collaborators and colleagues. No matter how long you’ve been doing Ruby, I’m almost certain you’ll still pick up a little trick here and there.
Now obviously you can’t just sit down, read those 3 books and become a great Rubyist through reading. Start reading, work with the text, use IRB to experiment and find yourself some challenges to try your hands on (e.g. the Ruby Koans or Code Katas).
- The Ruby Programming Language by David Flanagan, Yukihiro Matsumoto:
I guess this wouldn’t really need to be mentioned, but for completeness’ sake I’ll include it here. While I don’t think it’s a great book for learning the language, it’s something every serious Ruby developer should own as a reference.
- Refactoring: Ruby Edition by Jay Fields:
Granted, this may not sound exciting, but “Refactoring Ruby” is a really good book, that will come in handy once you have to work on a somewhat significant Ruby codebase. Think of it as design patterns for refactoring.
Of course “Ruby Best Practices” also falls in this category, but I already mentioned it in the first section.
What Ruby books do you recommend and why?