TJR Forum

Home arrow Book reviews arrow Learning Ruby book review
Learning Ruby book review PDF Print E-mail
Written by Jem Matzan   
Aug 31, 2007 at 01:34 PM

Among modern programming languages, Ruby is relatively easy to learn and use. Given that fact, a book designed to introduce Ruby to experienced programmers should be a fairly straightforward endeavor. O'Reilly's Learning Ruby succeeds in this regard, but unfortunately tries to teach people new to programming as well. If you ignore the oversimplified (to the point of inaccurate) explanations of programming theory and just concentrate on translating your current programming knowledge to Ruby, you'll find this book an excellent resource.

Writing analysis

At 238 pages, Learning Ruby is among the shortest programming books I've yet read. I wish I could say that the reduced length means that it's superbly written, using fewer words with more powerful and specific meanings, but I can't. Were this book brilliantly written, it would probably be about 3/4 of its length, and would be maximally functional. As it is in this edition, Learning Ruby is difficult to read -- the language is cluttered, non-specific, and meandering.

The author is obviously a fruithead, and over-covers the Apple platform while predictably over-generalizing instructions and advice for Linux. Fortunately, very little of the book focuses on platform-specific technical instructions.

Each of the eleven chapters focuses on a particular programming topic, and each section narrows the topic down to specific methods and processes for doing work in Ruby. Since Ruby is versatile and offers a number of different problem-solving approaches, the author shows as many of them as possible in each section. Every chapter ends with review questions that pertain to the preceding material; some readers may find these helpful to retain the information they've just read.

There are no programming exercises in Learning Ruby, and the code samples are small and only functional as an example of how a particular function or process is used.

Putting the book to the test

I can't stress enough how difficult it is to read Learning Ruby. Here's an example of what I mean, taken from a warning box in chapter 1:

"If you get a permission denied message when running matz.rb, and you aren't sure what to do about it, I'd like to offer you a hand. Go to the section 'Permission Denied' near the end of this chapter to find out what to do."

Language like this makes my liver itch. Teach me -- tell me what to do. Don't tell me the story of what I should do. In the same number of words, the author could have told us how to fix the problem, rather than bluster on about how we might feel and what he would like to do for us, and then tell us where else to go to find a solution. Learning Ruby is one scatterbrained abomination of a sentence after another, which makes it difficult to learn from.

The technical discussions are equally substandard. The explanation of object-oriented programming is particularly terrible. Learning Ruby's author took what should be a simple overview of classes, methods, and objects, and turned it into something that, after reading it ten times, I still could not accurately decipher.

The only good part about Learning Ruby is that it excellently imparts the mechanics of the Ruby language. If you already know data types, object-oriented design, and other programming essentials, the author brilliantly shows you how they are all applied in Ruby. He shows not just one approach, but several that you might know from a variety of different programming languages. So if you have, for instance, an existing C++, Pascal, or Java program that you would like to re-code into Ruby, Learning Ruby will be a great help to you.

Conclusions

Learning Ruby claims to be aimed at both beginning programmers and experienced software developers. In that, there are explanations of programming principles as well as examples and commentary that show you how to write Ruby programs. Unfortunately, the elementary explanations are insufficient at best, and vague to the point of incomprehensible at worst. If you intend to learn how to program by following this book, you will be badly misguided in the elements of software development.

On the other hand, if you're an experienced programmer, Learning Ruby is an efficient (if difficult to read) guide to translating your current knowledge into Ruby-friendly terms.

Title Learning Ruby
Publisher O'Reilly
Author Michael Fitzgerald
ISBN 0596529864
Pages Paperback, 238 pages
Rating 5 out of 10
Tag line The language that powers Rails.
Price (retail) U.S. $23 (Buy it from Amazon.com)

Discuss this article or get technical support on our forum.

Copyright 2007 JEM Electronic Media, Inc. No reprints without written permission.

<Previous   Next>

The Jem Report is part of the JEM Electronic Media network of information technology Web sites.
Spammers can email us here