Home > Articles > Programming > Ruby

The Ruby Reading List

In the last ten years the Ruby programming language has gone from an obscure open source project to the expansive technology behind some of the world’s most visible web properties. In this article Russ Olsen points out some of the Ruby ‘must reads’, web sites and books that will help the new Ruby programmer get started.

Russ Olsen is a long time Ruby coder, speaker and author of Eloquent Ruby and Design Patterns in Ruby. Russ spends his days crafting solutions as an architect at Relevance and his nights on twitter as @russolsen.

Looking for a different subject? Take a look at a directory of all of our Developer Reading Lists.

Like this article? We recommend

Like this article? We recommend

A couple of weeks ago I had an opportunity to do one of my very favorite things: I got to explain Ruby to a room full of programmers who knew almost nothing about the language. I've been doing these talks for years and you would think that by now I would be bored with it all, but I'm not. The idea that some of my audience will latch onto Ruby, that it will change their coding life, and that some of the credit will rub off on me never gets old.

Still there is a certain comfortable familiarity to these talks, especially with the questions that people ask: Can you really write reliable programs without static typing? (Answer: Sure!) What happens at compile time and what happens at runtime? (Answer: There is no compile time) Why is zero true? (Answer: Because everything except nil and false are true). One of the hardest questions usually comes at the end of the talk: Where do I go from here?

First Stop: The Internet

The obvious answer whenever you want to learn more is your nearest browser and if it’s Ruby that you are trying to learn then the obvious first stop is the main Ruby language website at www.ruby-lang.org. Go there and you will find downloads of Ruby for various platforms, hints about what is coming in the next release  and pointers to other Ruby resources. If you’re a complete Ruby beginner then make sure you have a look at the “Ruby in 20 Minutes” tutorial.

Another great resource for people trying to learn Ruby is the Ruby Koans site. Ruby Koans, which was put together by Jim Weirich and Joe O’Brien, is a series of programming problems designed to get you thinking about the nuances of Ruby coding. The whole thing is done as a mock session with your Ruby Zen master: In the firmly tongue-in-cheek world of Ruby Koans you don’t make your programs work. Instead your code gains enlightenment.

If you are a bit less than a complete beginner or you have  simply grown weary of the quest for enlightenment, then take a look at the Ruby Inside blog. Ruby Inside is a nice mix of reviews – both of software and books – along with news of the comings and goings of the Ruby community.

Books for Beginners

As useful as the Internet is, I’m not sure that surfing is ideal for becoming one with a topic as large and as complex as a new programming language. So along with URLs, I usually suggest that new Ruby programmers start with a book. Which book is, however, a difficult question since the answer depends more on the perspective reader than anything else.

Beginning Ruby: From Novice to Professional, Second Edition For example, if you are a "first things first" kind of person, someone who likes to be very sure of the basics before you move on, then I think that the best book for you is the aptly named Beginning Ruby: From Novice to Professional by Peter Cooper. Cooper starts off with getting Ruby installed on your computer and then takes you through the basics and some not-so-basic aspects of Ruby. Cooper (who is also the evil genius behind the Ruby Inside blog) writes in a pleasant conversational style and he has a good sense of pacing –  not too boringly slow, not too confusingly fast. Do try to get hold of the second edition, since it covers the current version of Ruby (1.9). Also, keep in mind that the aim of this book is to teach you Ruby – it's not a reference. And don't take the "Novice to Professional" part of the title too seriously. Beginning Ruby does a great job of getting the Ruby newcomer off the ground, but "Novice to Professional" is probably more than any one book can manage.

Programming  Ruby 1.9 Alternatively, you could go with the classic: Programming Ruby 1.9 by Thomas, Fowler and Hunt. Known to Ruby programmers as the “pickax” book after the illustration on the cover, Programming Ruby 1.9 is the book that taught the first couple waves of Rails programmers the language. If you were only going to buy a single Ruby book, this would be it. Dave Thomas and his co-authors go about the business of being all things to all Ruby programmers by writing a multi-pass book: The first quarter of Programming Ruby 1.9 is a quick tutorial introduction to Ruby. This is followed by a much more in-depth look at the language and its supporting ecosystem. The final (very large) bit of the book is a class by class, method by method reference to the standard Ruby library. The pickax book tries to do it all, but as a tutorial it just didn’t work for me. There is something about its multi-pass approach to learning that my brain just doesn't like. But that's just me -- many of my fellow Rubyists swear by it. It all comes down to you and your learning style: If you learn better by getting the general idea first and then digging deeper, then Programming Ruby 1.9 just might be the book for you.

Well-Grounded Rubyist The third candidate for your first Ruby book is David Black's The Well-Grounded Rubyist. In many ways The Well-Grounded Rubyist resembles Beginning Ruby: Both explain Ruby bit by bit in a single pass. The difference is depth. Beginning Ruby does a great job of balancing the level of detail with the need to keep moving. By contrast, The Well-Grounded Rubyist goes for thoroughness. Every time David Black takes the covers off of a new part of Ruby, he is going to explain every last wire and gear before he moves on. If that strikes you as the “right” way to learn, then by all means get yourself a copy of this excellent book.

Just Beyond Beginner

Eloquent Ruby I have to admit that I'm a little biased about which Ruby book you should read second: I would suggest my own Eloquent Ruby. In my defense, let me say that I wrote Eloquent Ruby especially as a second Ruby book. The goal of Eloquent Ruby is to explain how Ruby is used in the real world, to provide recently arrived Ruby immigrants with a guide to how to use the language. I'm not just talking about style here: While there is plenty of advice in Eloquent Ruby about how to indent and where to leave out the parentheses, a lot of the book is devoted to getting the most programming miles out of features like code blocks and metaprogramming. Eloquent Ruby also reflects my view that one of the best ways to get beyond the basics of any programming language is to look at real code from real applications, so mixed in with all the sage advice is lots of examples from the Ruby standard library and Rails.

Ruby  Best Practices I'm also biased about Ruby Best Practices, but not because I wrote it: Gregory Brown did. I just wish that I wrote it. Ruby Best Practices, which is available free at http://rubybestpractices.com, is like that senior developer who sits you down and shows you how to really do things on the project. There are chapters on doing test first development, on internationalization, on building gems and even on debugging. Although some of the details are a bit dated, it is still well worth your time.

The Ruby Programming Language One other book that every advancing Ruby programmer should own comes right from the source: The Ruby Programming Language is by David Flanagan and the man, Ruby inventor Yukihiro Matsumoto. A quick glance at the table of contents might lead you to believe that The Ruby Programming Language is another tutorial along the lines of Beginning Ruby or The Well-Grounded Rubyist. It's not. The Ruby Programming Language is a statement of how Ruby works. There is no coddling of beginners here: The first chapter, entitled "Introduction" is topped off with a six page example program. The rest of the book is a step by step examination of the in's and out's of Ruby. This is the book that I turn to when, for example, I need to know how constant look-up works or what the proc method returns this week.

Way Beyond Beginner

The Ruby Way Congratulations! You've worked your way through the fundamentals and now you're ready to dig deeper. One way to do that is to get hold of a copy of Hal Fulton's The Ruby Way. The Ruby Way pretends to be a cookbook – here's a programming problem, and here's how you deal with it – but in fact it is a step by step manual on how to approach coding the Ruby way. Be aware that the current edition (the second) is getting a bit dated but a third edition is in the pipeline.

Design  Patterns in Ruby If you find you are suffering from the  “all my Ruby code looks just like my Java code” problem let me suggest –  while turning the bias warning light on again – my own Design Patterns in Ruby. Design Patterns in Ruby looks at 14 of the traditional GoF design patterns and recasts them into real Ruby solutions.



Metaprogramming  Ruby: Program Like the Ruby Pros Now a lot of those real ruby solutions involve metaprogramming, so if you have gotten this far and metaprogramming still seems like a black art, you might want to take a look at Paolo Perrotta's Metaprogramming Ruby: Program Like the Ruby Pros. Perrotta has produced a solid book about a topic with which many new Ruby coders struggle. Do be aware that Metaprogramming Ruby relies on a sort of coding soap opera to carry the plot along:

Bill is right there with you, verbalizing precisely what’s going through your head: “This is just the same method again and again, with some minor changes.” You turn to each other and ask simultaneously, as if on cue, “How can we refactor it?”

People tend to either love or hate this sort of thing, so think about which category you fall into before you hit "Buy It Now."

The  RSpec Book Another book to consider as you lose your Ruby amateur status is The RSpec Book by Chelimsky, Astels, Dennis, Hellesøy, Helmkamp, and North. Along with having enough authors to fill out a basketball team (complete with coach), the RSpec Book is actually two books in one. The first third is an explanation of, and a passionate argument for, behavior driven development.  The rest of the book is a detailed explanation of two of the Ruby world's favorite test tools, RSpec and Cucumber. Both bits of The RSpec Book are worth reading and together they are a compelling combination.

And Beyond...

So there you have it:  Ten books and a handful of web sites to get your Ruby career off of “hello world.” Of course many – perhaps most – of you are interested in Ruby because it is the underpinnings of Rails. There are lots of ways to learn about Rails... But that’s an article for another day.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020