Should be titled: Learning Ruby *Fast*
Michael Fitzgerald directs his book "Learning Ruby" to two audiences:
* "experienced programmers who want to learn Ruby"
For this audience, the book excels. The author suggests that experienced programmers "read the code, skim the explanations as needed". Ruby syntax is very readable, so this works very well. An experienced programmer could learn Ruby in about a day using this technique. You won't know every intricacy of the Ruby language, but you'll know enough to start reading and writing in the real world and where to look for more information.
* "new programmers who want to learn to program"
I think most new programmers would be comfortable with more explanation than this book provides. However, the examples are small, and with some hands-on using Ruby's interactive interpreter (irb) it might work for some.
Following the introduction to the Ruby language, the author includes:
More Fun with Ruby - a mixture of topics including sprintf (for formatting strings), XML handling libraries, RubyGems (a package utility for Ruby that provides access to a repository of re-usable libraries), rDoc (the Ruby documentation generator) and a light introduction to some other advanced topics.
A Short Guide to Ruby on Rails - a nice introduction, followed by a short tutorial.
A Ruby Reference.
A glossary of Ruby terms.
Throughout the book, the author points out planned additions to version 1.9 of the Ruby language. Those changes would not make this book obsolete.
not so complete
for some important feature of Ruby, it doesn't even have a complete coverage of it. For example, when it talks about "yield" in an iterator, which is a really important feature in Ruby, it never even mentioned yielding a value to the block. it only talks about yielding but not yielding a value. and then the index of the book doesn't have an entry for "iterator" either...
other examples in the book is not very explanatory either. for example, when it talks about variable length parameter, it cares about formatting the output rather than just showing the plain array structure of the passed in value.
more update: when it talks about inheritance, it doesn't even mention the method super()... it is a very important call to make, yet it doesn't talk about it. in its brief example, it says Address can inherit from Name. Now, Name is a class that has first name and last name property. Address doesn't. Is an Address object supposed to have last name and first name values? It is a mix up of classes' properties. It is more accurate that Name and Address can both inherit from the String class, but not one from the other. Otherwise, what about when you have phone number? Have a PhoneNumber class that inherits from the Name again?
Waste of time (and moola)
If you looking for a nice quick intro like 'Learning Perl' - forget it! The book is clearly mistitled. Should be called 'Ruby beginner hacks'. I don't need to know thousand of ways to print something or learn 'another cool Ruby hack'! Please! Beginner needs to know only essentials to get the job done, the rest will come from practice. Questions at the end are really odd, I was expecting at least a couple of good coding exercises.
THIS IN NOT THE BOOK TO LEARN RUBY
Learning Ruby should be high on your `must avoid' list of Ruby texts. This book is a tree-killer and a money-maker for the author and the publisher. The most noteworthy feature of the entire book is in the colophon detailing the sexual habits of the giraffe; you'll just have to get the book to find out what I'm alluding to.
For the most part, the book could easily have been condensed to no more than 10 pages of lists of elements of the Ruby lexicon. The seasoned developer will be extremely frustrated after having invested time and money with very little to show for his/her expenditure. For the novice, general confusion is the best that can be expected.
I am just climbing the Ruby learning curve and cannot make a recommendation as to a better text for a Ruby neophyte; what I can say is `Learning Ruby' is definitely NOT the text. Save your money and look elsewhere.
A great Ruby learning tool
Having never been exposed to Ruby I decided on this book to begin learning the language. At first glance this book isn't a big overwhelming manual as is obvious from the number of pages, but rather a very achievable read that covers the necessary topics of learning a language.
The author starts out by discussing some basic commands, and an overview of the book. This first chapter also includes information on how to get and install Ruby on various operation systems.
By the second chapter the author is giving an overview of the Ruby language that gives the reader some idea of what to expect. And then its off to learning the syntax much as you would expect when learning any language.
For the curious the chapter subjects continue as follows. Conditional statements, strings, math, arrays, hashes, files, classes, more fun with Ruby (covers things like XML, Tk, RubyGems and Rdoc), and finishes up with a brief introduction to Ruby on Rails. The author also includes a great Ruby Reference as an appendix.
CONCLUSION
--
This is a simple book that does a great job of explaining to the reader the basics about Ruby. I liked this book and would recommend this book to those looking to learn Ruby or as a reference.