Book review: Programming Ruby <i>by Dave Thomas (with Chad Fowler and Andy Hunt)</i>

Many say that the Ruby language has clearly overtaken both Python and Perl as the popular choice for software development, both for standalone applications and also for web based solutions (through the magic of Ruby on Rails). Programming Ruby, by Dave Thomas was almost certainly instrumental in that process. The first edition of the book has been credited—by Yukihiro Matsumoto, the developer of Ruby—as a key reason for the popularity of the Ruby language outside of Japan.

The book’s cover

It is easy to see why. A quick flick through the book shows three distinct types of content: a teaching guide with some basic examples to help give you the idea, a more detailed guide to programming and developing solutions with Ruby, and finally a large reference section for the language, syntax, modules and other components that make up the Ruby language. Everything you could possibly look for within a Ruby book is right here in the same tome.

The first edition of the book has been credited—by Yukihiro Matsumoto, the developer of Ruby—as a key reason for the popularity of the Ruby language outside of Japan

The contents

As already indicated, the book is divided, although not equally, into three sections. The first section, Facets of Ruby, is a good introduction to learning the Ruby language. The section proceeds through a number of chapters, running from the basic structure of Ruby programs and syntax, through the class and object structure and then on to more complex topics like the build in variable types. Before the section ends it also covers more on Ruby syntax like expressions, methods, modules and the exception system before tackling some of the basic interactions, such as I/O, threads and processes and testing and debugging.

The second section, Ruby in its setting, is a more detailed guide to different areas of Ruby such as package management, documentation, and software development through topics like Tk and web development. The final section makes up the major bulk of the book and consists of a complete guide to the Ruby language from the perspective of syntax, data types and the incredible suite of additional modules and packages, which are covered in detail.

Throughout, the authors have a light and comfortable style, never talking down to the reader or assuming too much or too little. The examples given are across a wide range of different topics. Occasionally you feel as if the code is covered too quickly—although the examples are complete, they are not annotated, but they are often described.

Who’s this book for?

Just about anybody interested in Ruby is going to have an interest in reading this book. Ruby programmers, from beginners to experts, who want a reference guide to the language and its components will want this book.

Relevance to free software

Ruby, and all of the technology that has now been released within the realms of the Ruby language, is free software.

Pros

One of the most detailed books on any topic I’ve seen, and certainly the book that every Ruby programmer should have on their shelf, whether they think they need it or not.

Cons

In terms of the book’s approach to such a large and complex topic, I really can’t find much to fault. There are a few occasions when topics seem to be touched upon too lightly. For example the section on debugging Ruby applications zips by in just a few pages, as does the section on unit testing. Ruby may be an efficient language, but it is not immune to algorithm errors and it would have been nice to get a little more insight into the steps required to debug an application using official tools.

The other two sections—using Ruby and the reference guide are almost impossible to fault. Ruby on Rails, a key part to the success of Ruby as a web development platform, is mentioned only in passing. It’s an odd omission, but given the relative age of the book and the recent meteoric rise of Ruby on Rails perhaps not overly surprising. It is also, of course, a good idea to show readers the basics of how the web works.

Title Programming Ruby
Author Dave Thomas (with Chad Fowler and Andy Hunt)
Publisher The Pragmatic Programmers
ISBN 0974514055
Year 2005
Pages 830
CD included No
FS Oriented 10
Over all score 10

In short

License

This work is licensed under a Creative Commons Attribution 3.0 Unported License.