logo

 

     
 
Home
Site Map
Search
 
:: Bitwise Courses ::
 
Bitwise Dusty Archives
 
 
 

rss

 
 

ruby in steel

learn aikido in north devon

Learn Aikido in North Devon

 


Section :: books

- Format For Printing...

Ruby by Example: Concepts and Code

Book Review
Wednesday 13 June 2007.
 

Ruby by Example: Concepts and Code - $29.95
by Kevin C. Baird
No Starch Press http://www.nostarch.com/
312 pp.
ISBN-10 1-59327-148-4
ISBN-13 978-1-59327-148-0

I am all in favour of learning a language by hands-on coding - so, if I were on the upward slope of learning Ruby, Ruby By Example is exactly the kind of book that would appeal to me. In 13 chapters (plus an introductory section and appendix), Kevin C. Baird moves rapidly through a broad range of topics ranging from the very fundamentals of Ruby to specific areas of interest such as CGI, RubyGems and a gentle introduction to developing web apps with Ruby On Rails.

In the early chapters, the author assumes no (or, anyway, very little) prior programming knowledge). So if you don’t know what a variable or constant is, all will be revealed. In spite of this, the book is not intended solely for programming novices. On the contrary, it rather rapidly gets down to the nitty-gritty details of Ruby such as metaprogramming (introduced as early as chapter three!) and simple regular expressions (chapter four).

I’ve been reviewing a PDF version (not currently for sale) so can’t comment on the physical characteristics of the book. On the basis of the PDF, it appears to be nicely laid out, with lots of useful code fragments, many of which are ‘annotated’ with numbered lines which are explained in detail in the text that follows.

The code can all be downloaded as a single zip file from the publisher’s web site. The code sample are generally short and well documented (which I like) but frequently implement classes or code fragments which produce no output (which I like less). While there are some ‘ready-to-run’, programs, it would have been nice to have more of them so that you could simply run some code, let it do something interesting and look at the results. This relative lack of ’complete’ programs is, perhaps, explained by the author’s apparent assumption that the reader will be using the IRB (Interactive Ruby shell) - something which, I must confess, I never do.

So where does ‘Ruby By Example’ fit in among the plethora of Ruby and Rails books that have been launched over the last year or so? If you want a comprehensive guide to Ruby, the book to get is the so-called ‘Pickaxe Book’, (Programming Ruby: The Pragmatic Programmer’s Guide by Dave Thomas, with Chad Fowler and Andy Hunt), though Hal Fulton’s The Ruby Way is, is also a very strong contender; if you want to master Ruby On Rails, Agile Web Development With Rails by Dave Thomas and David Heinemeier Hansson is clearly the one truly essential book. For programmers who want a simple ‘way in’ to Ruby, the book I’d recommend is Peter Cooper’s Beginning Ruby: From Novice To Professional.

Ruby by Example is addressed at a similar readership to the Peter Cooper book. The main difference is that Cooper’s book attempts to be more all-embracing, covering most of the essential facets of Ruby in a logical progression, whereas Baird’s ‘Ruby By Example’ tends to dip into specific topics in a somewhat more arbitrary manner. I personally prefer Cooper’s more methodical Beginning Ruby. However, there is something to be said for Baird’s ‘let’s dive in and try it out’ approach. If you want to get quickly started with some hands-on Ruby coding, Ruby By Example is the way to go...

For an overview of other Ruby and Rails books, see Ruby (and Rails) Books - the essential reading list
AddThis Social Bookmark Button


Home