The Channel

Learning Ruby

Hot on syntax


Book review To some, Ruby is going to take over the world. With prominent Java developers and propagandists jumping ship, there has seemed to be no stopping its momentum, particularly in web development.

Part of the reason for the popularity with hackers (in the programming sense of the word), is that it's easy for a programmer in an existing object oriented language (like Java, C# or Python) or a scripting language (such as Perl) to pick it up quickly.

For those new to the language who want to get to grips with it quickly, Michael Fitzgerald's Learning Ruby is an obvious place to look.

For starters it's a short book (238 pages), and it skips explanations of what is a loop or a conditional statement. This is a book that's designed for developers who've already got at least one language in their armory. So, if you're looking to learn Ruby as your first programming language this probably isn't the place to start.

For the rest of us the book opens with some scene-setting introductory stuff that gives a flavor of the language and what it can do. The following chapters look in more detail at various aspects of the syntax: Strings, Math, Arrays, Hashes, Files and so on. The treatment is fairly fast and no nonsense, with short snippets of code to illustrate the point - usually with alternate Ruby idioms to chose from.

However, a by-product of being fast is you avoid much depth.

Classes, meanwhile, aren't introduced until fairly late in the day, which some might consider an odd choice. As with most modern programming languages, Ruby comes with a fairly extensive set of libraries and modules, and some of these are explored in chapter 10. The final chapter is devoted to Rails, and provides a brief introduction and tutorial that examines both the philosophy of Rails and some hands on activity.

The standard introduction to Ruby has always been Programming Ruby (aka the Pickaxe book) by Dave Thomas and Co. Does Learning Ruby match up to the high standard of Pickaxe? The answer is "no" it doesn't, in general. The Pickaxe book is more thorough, has greater depth and probably provides more value in the long term.

JavaScript Disabled

Please Enable JavaScript to use this feature.

In contrast this is a very fast introduction to Ruby syntax that is expressly designed for developers picking up a new language, and so long as that's what you're looking for then this suffices.

Learning Ruby

Verdict: A fast introduction to Ruby syntax, though lacking in some depth.®

Author: Michael Fitzgerald

Publisher: O'Reilly

ISBN: 0596529864

Media: Book

List price: £24.99

Current Reg price: £17.74

Buy this book from Register Books at Reg Developer's special discounted price (subject to change).

Biting the hand that feeds IT © 1998–2017