TechBookReport logo



Keywords: Programming languages, scripting, object-oriented development

Title: Programming Ruby

Author: Dave Thomas, with Chad Fowler and Andy Hunt

Publisher: Pragmatic Bookshelf

ISBN: 0974514055

Media: Book

Level: Introductory Ruby

Verdict: Highly recommended

One of the many happy consequences of the rise of the internet has been a proliferation of computer programming languages. Where one a new language might languish in academia for many years, now a new language can be announced, a community appear and the language seep out into the wider world in the space of a few months. This is a golden age?

Ruby is no longer one of the new kids on the block, but it has made that transition from merely interesting to core language for a sizeable community of developers. While it may not have the momentum of Python, for example, it's now well established and steadily evolving. If you're not familiar with Ruby it's described as an open-source object-oriented scripting language, which tells you everything and nothing really. As a language it takes object-orientation seriously. In Ruby everything is an object. There are no primitive types, everything is an object, including blocks of code that can be passed to methods. This alone makes Ruby worth investigating.

For those people looking to learn the language 'Programming Ruby' is a one-stop shop that provides everything. A language tutorial, an introduction to the Ruby environment and programming tools, a language reference and documentation of the built-in classes, modules and methods and a description of all of the standard libraries. It's a complete resource that is designed to be of long term value rather than a simple introduction with a limited shelf-life. This edition of the book, (the second), covers Ruby 1.8, and includes around 200 pages of new material compared to the first edition.

The book opens with a tutorial, which, in the space of 170 pages manages to introduce the language and to get the reader all fired up and raring to go. The tone is easy going but adult, this is a book that's aimed primarily at programmers rather than complete newbies. While there's no good reason why someone wanting to learn about programming shouldn't start with Ruby, this isn't the book for them. For someone who can already cut code then the tone of the book is pitched just right. That's not to say that the writing is either incredibly technical or incredibly dry, there's more than enough humour to keep it interesting, it's just that the reader is assumed to know how to program.

The tutorial is structured around the idea of coding a juke box, which is a simple idea on which the authors can hang a great deal. It enables them to discuss object orientation in a clear way that is entirely natural to the project, and which also enables them to high-light areas of similarity and difference with other languages, particularly Java, C++ and Perl. As you would expect from a tutorial all of the major areas are covered, from data structures to looping to IO to exceptions to unit testing (yes, unit testing in an introductory tutorial!) and more.

Aside from the tutorial the rest of the book provides much useful information to make the point that this is a language that has applications in all areas of computing. Aside from covering Ruby as a tool from web development, the book looks at Ruby and the Win32 API, GUI programming using TK and even writing extensions in C.

As has been said already, this is a fantastic resource for Rubyists. There can be no better introduction to the language than this. It deserves it's already classic status. Recommended.


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

Return to home page

Contents © TechBookReport 2004. Published November 26 2004