By l0gix, August 2, 2007, 9:01 pm o'clock

 

Ruby Books

Antonio Cangiano July 20th, 2007

This page is devoted to recommended books for the reader who wishes to learn how to program in Ruby and/or Ruby on Rails. It is divided into two main sections, one for Ruby and an optional one for the Web framework Ruby on Rails. The Ruby section can be considered preparatory for the second section (i.e. Rails). People who are considering learning the language, and who arrive at this page, will have a variety of skills and technical backgrounds. For this reason, I’ve divided the Ruby section into 4 categories each responding to the needs of a different type of learner, from the absolute beginner to the advanced programmer. Identify where you are and consider building up your skills, by reading the books suggested in your category and those further along the page. If you are interested in pursuing the study of Rails as well, you can pick up the recommended reading in the Rails section, as soon as you have gained enough knowledge, experience and confidence with Ruby on its own.

Ruby

Absolute Beginner

You have never programmed before. You may know how to write some HTML (or not), or how to copy & paste small scripts off the Web, but you haven’t really ever programmed. If words like “algorithm”, “loop”, or “recursion” puzzle you, this is the right definition of you at the moment.

This book is particularly good for absolute beginners because it requires no knowledge whatsoever about programming. It will teach you not only the basics of Ruby, but also the essential concepts of programming. It’s an extremely cheap book (Amazon US sells it for less than $14) and quick to read (about 170 pages).
It is the best short introduction to programming money can buy you, if you intend to go from an absolute beginner to a more reasonable level of confidence when it comes to programming (i.e. Beginner). Pick up this book and work through all the exercises proposed within it.

Beginner

You have a basic understanding of programming and have programmed at a beginner level in other languages such as C, C++, Java, etc… but don’t have any experience in Ruby and don’t have a deep understanding of Object Oriented Programming (OOP). Or you may have successfully completed the “Absolute Beginner” step with Chris Pine’s book or similar material online or offline, and are now ready to get more serious about Ruby.

Despite its title, this is a great book for those interested in programming in Ruby independently from your interest in Rails. That said, it is particularly useful if you are interested in pursuing the study of Rails after having built up a solid Ruby base. You will be a much better programmer thanks to this book and when you’re reading the Rails mailing list, full of people with Ruby (not Rails) questions, you will feel like suggesting this book to them, because most of the answers to their questions can be found in this book. It will teach you, in a comprehensible way, object oriented programming in Ruby and prepare you for the study of Rails (to be pursued through other books) in a very effective manner.

Intermediate

You are an experienced programmer in Python, Perl, Java, C#, or any other objected oriented programming language and want to learn Ruby the way that most successful Ruby programmers have. You are considered ‘Intermediate’ also if you do not program in other programming languages, but have already read about Ruby and Object Oriented Programming through material of a more introductory nature (such as the book in the Beginner track or one at a similar level).

This book is nicknamed “the Pickaxe” and it’s simply considered the Bible of Ruby programming (get the second version, the first version is outdated and available for free online). It’s a beautiful book that will teach you most of what you need to know to be a successful Ruby programmer. I wouldn’t consider it a beginner book though, as you need to have a decent understanding of programming and object orientation before you can get the best out of it. Every Ruby programmer that I know has this book on their shelf.

Advanced

You know Ruby pretty well, and now you are looking for a book that will help you polish your knowledge and acquire a more idiomatic style of programming. If you are a very experienced programmer in other similar OO languages (e.g. Python) you may still want to consider this path.

The Ruby Way (2nd Edition) looks like a cookbook. There are plenty of how-tos for several common tasks. It is therefore a valuable book if treated as a cookbook, but that’s not the main reason behind it. The Ruby Way is about learning how to deal with a variety of programming tasks in an idiomatic manner, it’s about getting your existing knowledge of Ruby and polishing it in order to apply it to simple and complex scenarios. If it’s true that in Ruby there are usually several ways to accomplish something (but to a lesser extent than Perl’s TIMTOWTDI principle), it’s also true that most developers will convey that there is often a best way of doing it. This book is about learning to code that “best way” in Ruby, the Ruby Way.

Rails

In order for you to pursue the study of Rails at its best by following the reading recommendations below, please ensure that you have at least mastered Ruby enough by reading a book from the Beginner level or higher. You may also want to consider reading a Ruby and a Rails book at the same time. But you will probably get the most out of a Rails book, if you understand Ruby first. Get the award winning and most popular tutorial out there. It is the gold standard when it comes to learning Rails, and will serve you well as a guide and tutorial:

Purchase either of these two books if you want to learn the best practices and idioms of Rails usage (the second one is starting to be a bit outdated, but it’s still good learning material, considering also that it is understandably hard for printed books to keep up with the fast paced development of Rails features):

And if you are interested in Ajax (you should be), then both of these books will be very enlightening for you:


One more thing

There are plenty of other valuable books on the subject of programming, Web development, Ruby, and Rails. Depending on your specific requirements you may want to study books on XHTML, Javascript, SQL, Databases, E-Commerce, Semantic Web, OS Scripting, etc… There is no point in me listing them here, but I’d like to point out one last book that is very appreciated among Ruby programmers. This book is an invaluable tome that should have a sweet spot on your desktop:


Fine print (well, not exactly…)
  • The links to Amazon have my referrer id, so when you buy any books through these links, you also indirectly support this site (and for this I respect and thank you).
  • The books mentioned above are some of what I consider to be the best literature available today on the subjects at hand, based on my experience, those of my colleagues and possibly the opinions shared by most of the Ruby and Rails community members. There are plenty of good books published every month though, and if you’ve boughten any of them or intend to buy one, you will probably be very satisfied nevertheless.
  • Books are very helpful and you should definitely read them and keep a few on hand for reference. Remember though that in order to succeed at programming, there is no substitute for gaining experience by coding in practice.

Created: July 2007

Recommended Ruby and Ruby on Rails books

Add your own comment or set a trackback

Currently no comments

  1. No comment yet

Add your own comment

You need to log in to post your own comments.



Follow comments according to this article through a RSS 2.0 feed