TechBookReport logo

Keywords: Ruby, scripting, object-oriented development

Title: Learning Ruby

Author: Michael Fitzgerald

Publisher: O'Reilly

ISBN: 0596529864

Media: Book

Level: Introductory

Verdict: Fast introduction to Ruby syntax, could do with more depth


For a while it looked as though Ruby was going to take over the world. With prominent Java developers and propagandists jumping ship, there seemed to be no stopping the momentum. For those .Netters feeling left out of the party, there was the promise of IronRuby to look forward to so they could get in on it too. The cause of all of this fuss is a programming language that is best known for driving a web application development framework called Rails. And if this is all news to you then you've obviously not been paying attention for the last couple of years or so.

What is Ruby and why has it grabbed so much attention? Ruby is a dynamic typed object oriented programming language, and partly because it's interpreted is sometimes thought of as a scripting language. Created by Yukihiro Matsumoto (Matz), Ruby shares features with a number of other languages, including Perl, Python and Smalltalk. And 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#, Python etc) or a scripting language (like Perl) to pick it up quickly.

For those 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, including glossary and index), and it skips all of the stuff explaining what a loop or a conditional statement is. This is a book that's designed for developers who've already got at least one language in their armoury. 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 flavour of the language and what it can. There then follow a series of chapters that 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 that you avoid much depth…

Classes aren't introduced until fairly late in the day, which is 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.

Now the standard introduction to Ruby has always been 'Programming Ruby' (aka the Pickaxe book) by Dave Thomas. Does this book match up to the high standard of the 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. 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.

Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2007. Published December 17 2007