Posted on by & filed under Content - Highlights and Reviews.

We recently launched a challenge that invites Safari Books Online subscribers to write a book or video review and in exchange for their review, we’ll enter their name into a drawing to win an eReader of their choice. We also invited non-subscribers to sign up for a free trial of Safari Books Online so they could get in on this challenge. The more reviews they write and share, the greater their chances of winning.

The following book was reviewed by Nithin, a Safari Books Online subscriber:


  Title: Eloquent Ruby

By: Russ Olsen

Publisher: Addison-Wesley Professional

Pub. Date: February 11, 2011

Print ISBN-10: 0-321-58410-4

Here’s an overview of the book:

“It’s easy to write “correct” Ruby code. But it’s far harder to gain the fluency needed to write great Ruby code. To do that, you need to go beyond syntax and absorb the “Ruby way” of thinking and problem solving. In Eloquent Ruby, Russ Olsen helps you understand Ruby like true Rubyists do—so you can leverage its immense, surprising power.

Olsen draws on years of experience internalizing the Ruby culture and teaching Ruby to other programmers. He guides you to the “Ah Ha!” moments when it suddenly becomes clear why Ruby works the way it does and how you can take advantage of its unique approach.

Eloquent Ruby starts small, answering tactical questions focused on a single statement, method, test, or bug. You’ll learn how to write code that actually looks like Ruby (not Java); why Ruby has so many control structures; how to use strings, expressions, and symbols; and what dynamic typing is really good for.

Next, Olsen turns to bigger questions related to building methods and classes. You’ll discover why Ruby classes contain so many tiny methods, when to use operator overloading, and when to avoid it. Olsen explains how to write Ruby code that writes its own code—and why you’ll want to. He concludes with powerful project-level features and techniques ranging from gems to Domain Specific Languages.

The newest book in the renowned Addison-Wesley Professional Ruby Series, Eloquent Ruby will help you “put on your Ruby-colored glasses” and get results that make you a true believer.”

 Here is Nithin’s review:

If you are new to Ruby programming, Eloquent Ruby should be the book you read right after you finish your introductory Ruby book. It’s not a beginner’s tutorial, but with a little background on Ruby, it would be easy to follow.

This is one of the better programming books I’ve read. It has plenty of short and clear example code snippets, a very conversational and humorous writing style and most importantly, covers exactly the kind of topics a newbie should understand about Ruby.

The book is divided into 4 parts – (1) The Basics, (2) Classes, Modules and Blocks, (3) Metaprogramming (4) Pulling It All Together.

The firsts section covers the basic Ruby idioms in a way that you wouldn’t normally get to read in most books. It has chapters like “Choosing the Right Control Structure”, “Write Specs”, “Embrace Dynamic Typing”.

The second section — the most useful one, in my opinion — covers classes, modules and blocks with chapters like “Use Class Instance Variables”, “Use Blocks to Iterate” and “Use Modules as Name Spaces”. This section does an excellent job of explaining how to effectively use blocks, which are probably Ruby’s most useful feature.

The third section talks quite a lot about using, and of not misusing, the powerful method_missing method. Other Ruby metaprogramming topics such as monkey-patching are also covered.

The final section talks about one of Ruby’s greatest strengths — building DSLs — and also about creating and packaging gems. The book wraps up with a quick note on the the available ruby implementations.

At the end of each chapter there is a section “In the Wild” where the author points to real world code relevant to that chapter. Knowing where to look for real world examples will be especially useful for newbies who haven’t read a lot of other people’s code.

Another useful section in each chapter is “Staying Out of Trouble”, where the author explains the common pitfalls associated with the topic being discussed.

The examples that are used in the book make it extremely easy to understand. I often find books choosing overly elaborate examples and thereby distracting readers away from the language idiom being discussed. Eloquent Ruby doesn’t have that problem. The author starts with a simple Document class and uses the same example throughout the book, making it easy to focus on the idiom being discussed.

There are no real negatives I can point out, except for the slightly outdated chapter on packaging gems. However, I was reading the Safari’s Rough Cuts edition of the book, and it’s a work in progress, so it might get updated soon enough.

This book is a must read if you are a beginner to intermediate level Ruby programmer. It teaches the Ruby way of writing code, and answers many of the questions that one might have on the effective use of Ruby idioms.
Read this review on Safari Books Online and see what others may have to say about the book Eloquent Ruby.

If you are interested in participating in our WRITE A BOOK OR VIDEO REVIEW challenge, please see below for more details. Deadline for submissions is March 14th.

Tags: addison-wesley, Eloquent Ruby, review book, Russ Olsen, Safari Books Online,


  1.  Book Review: Eloquent Ruby, Author: Russ Olsen, Publisher: Addison … :