[ Go back to normal view ]

BW2 :: the bitwise supplement :: http://www.bitwisemag.com/2

The Ruby Programming Language
Ruby Reference Book

9 May 2008

by Huw Collingbourne

The Ruby Programming Language - $39.99 (£24.99)
by David Flanagan and Yukihiro Matsumoto
O’Reilly http://www.oreilly.com/
444 pp.
ISBN 10: 0-596-51617-7
ISBN 13: 9780596516178



There has been a glut of Ruby programming books in recent months. However, The Ruby Programming Language is different. It is co-authored by Yukihiro Matsumoto (‘Matz’) the creator of the Ruby language itself. So, if you want to get the lowdown on the language from the really authoritative source, this is the place to look.

By the standards of programming books, The Ruby Programming Language is reasonably slim. It is divided into just 10 chapters spanning around 400 pages of actual text. It admits to being modelled on the well-known book, The C Programming Language by Kernighan and Ritchie - which many people still believe to be one of the best language references ever written. It is, accordingly, not a beginner’s tutorial. It assumes either a moderate knowledge of the Ruby language itself or a reasonable degree of competence at some other programming language.

Table of Contents:
- 1) Introduction
- 2) The Structure and execution of Ruby Programs
- 3) Datatypes and Objects
- 4) Expressions and operators
- 5) Statements and Control Structures
- 6) Methods, Procs, Lambdas and Closures
- 7) Classes and Modules
- 8) Reflection and Metaprogramming
- 9) The Ruby Platform
- 1) The Ruby Environment

See also: Detailed Table Of Contents on the O’Reilly web site

It gets into its subject quickly - diving straight into fundamental features such as blocks, iterators, classes, methods and modules within the first few pages. This is followed by a useful summary of Ruby - everything from a list of keywords and object methods to descriptions of method invocation and parallel assignment. Throughout, there are lots of small (and sometimes quite big) code samples to illustrate specific points.

Let me say again that this is not a book for complete beginners. Inexperienced programmers would have a pretty hard time getting to know Ruby with the help of this book alone. I have reviewed other Ruby books elseswhere, some which are more suitable as tutorials. Experienced programmers with a good knowledge of some other object oriented language might find it more approachable , particularly if you are happy to learn a language by ‘dipping in’ and trying things out.

The real strength of this book is as a reference, however. I’m not sure it is quite of the standard of the Kernighan and Ritchie book but it’s a pretty good stab at it. At any rate, the plain fact of the matter is that if you really want to know what is in Ruby and how the language works, a copy of this book should be on your shelf!