1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Eloquent Ruby by Russ Olsen

About.com Rating 4.5 Star Rating

By

Eloquent Ruby by Russ Olsen

The Bottom Line

All spoken languages have idioms, and the same is true for computer languages. This is something many programming books ignore. Eloquent Ruby by Russ Olsen is a guide to programming idiomatic Ruby. It doesn't teach every aspect of the language, it teaches you how Rubyists actually use the language.

Eloquent Ruby is well-organized, an easy read and is a must for any new Ruby programming, whether they're learning programming from the ground up or moving from another language. It's an express elevator to knowledge that most have to get from reading source code and making lots of mistakes over the course of a few months.

Pros

  • A compact book full of useful information.
  • Straight and to the point.
  • Easily digestible chapters.

Cons

  • Doesn't teach Ruby, this is a companion for people learning from other books.

Description

  • Eloquent Ruby by Russ Olsen is organized into 31 chapters, each broaching a topic you'd only learn from reading code.
  • The first section covers the basics: syntax, naming conventions, collection classes symbols and object-oriented programming.
  • Also included in the first section is a chapter on test-driven development with Test::Unit, and the role of TDD in Ruby.
  • The second section covers composing classes in Ruby, including instance variables, modules and mixin modules.
  • The second section also includes the use of blocks in Ruby, another topic that really stumps some newbies.
  • The third section is all about meta-programming, a central theme in Ruby programming.
  • The final section covers Domain-Specific Languages, packaging you code into gems and other Ruby implementations.

Guide Review - Eloquent Ruby by Russ Olsen

When I first started programming in Ruby, I made a lot of newbie "mistakes." I put "mistakes" in quotes because, all though the programs ran and worked just fine, they weren't idiomatic. That is to say, they weren't the way other Ruby programmers would write them. In my case, they were like a C++ programmer would write Ruby code, if he didn't know how to code in idiomatic Ruby. For example, I didn't use snake_case and CamelCase where Rubyists generally use them, and was using for loops instead of the each method. To a Ruby programmer, that's just not how things are done in Ruby.

But, after a few months of coding, reading code, and getting feedback from mailing lists and IRC, I finally had a handle on idiomatic Ruby. If only I had a copy of Eloquent Ruby by Russ Olsen back then, I could have saved myself a lot of time.

Eloquent Ruby by Russ Olsen is a guide to idiomatic Ruby. Its 31 chapters are bite-sized, simple narratives on why you should be doing things a certain way in Ruby. For new programmers, or programmers moving to Ruby from another language, it's a huge time-saver.

But, in the end, Eloquent Ruby by Russ Olsen doesn't teach you Ruby. It assumes you already know, or are currently learning, Ruby. It doesn't go into how to use many of the features, just how Rubyists use them in their own quirky way. So this is by no means a book to learn Ruby from, it's a companion to any other book that teaches Ruby. Though, it's definitely worth the extra cost.

  1. About.com
  2. Technology
  3. Ruby
  4. Reviews
  5. Eloquent Ruby by Russ Olsen

©2014 About.com. All rights reserved.