Learning Ruby
Reviewed by Robert Pritchett
![](LearningRuby_files/image003.png)
Authors: Michael
Fitzgerald
http://oreilly.com/catalog/9780596529864/index.html
Released: May 2007
$35 USD
Pages: 255
ISDN 13: 9780596529864
Strengths: Typical
excellent O'Reilly Reference book. Grownup parent of the Ruby Pocket
Reference
Weaknesses: None
found.
|
![](LearningRuby_files/image006.png)
![](LearningRuby_files/image007.jpg)
|
Introduction
You don't have to know
everything about a car to drive one, and you don't need to know everything
about Ruby to start programming with it. Written for both experienced and new
programmers alike, Learning Ruby is a
just-get-in-and-drive book -- a hands-on tutorial that offers lots of Ruby
programs and lets you know how and why they work, just enough to get you rolling
down the road.
Interest in Ruby stems
from the popularity of Rails, the web development framework that's attracting
new devotees and refugees from Java and PHP. But there are plenty of other uses
for this versatile language. The best way to learn is to just try the code!
You'll find examples on nearly every page of this book that you can imitate and
hack. Briefly, this book:
á
Outlines many of the most
important features of Ruby
á
Demonstrates how to use
conditionals, and how to manipulate strings in Ruby. Includes a section on
regular expressions
á
Describes how to use
operators, basic math, functions from the Math module, rational numbers, etc.
á
Talks you through Ruby
arrays, and demonstrates hashes in detail
á
Explains how to process
files with Ruby
á
Discusses Ruby classes and
modules (mixins) in detail, including a brief introduction to object-oriented
programming (OOP)
á
Introduces processing XML,
the Tk toolkit, RubyGems, reflection, RDoc, embedded Ruby, metaprogramming,
exception handling, and other topics
á
Acquaints you with some of
the essentials of Rails, and includes a short Rails tutorial.
Each
chapter concludes with a set of review questions, and appendices provide you
with a glossary of terms related to Ruby programming, plus reference material
from the book in one convenient location. If you want to take Ruby out for a
drive, Learning Ruby holds the keys.
What I Learned
I dog-eared this book, it's that good. Page 15 begins on how
to add Ruby to Mac OS X Tiger, but it is the same for Mac OS X Leopard. To
learn Ruby on Rails, go to http://www.rubyonrails.org/screencasts.
Conclusions
This is the first of many books on Ruby, but it probably
ought to be one of the first you read on the subject.