
This is one of my favorite Ruby booksPeople in the Ruby development community know me because I started several of the most popular open source Ruby projects (I have been active in Ruby since 2001). If you are serious programming in Ruby then there are two must-have books to keep within reach as you program: Dave Thomas' Programming Ruby; and this book: Hal Fulton's The Ruby Way.
This is really two books in the guise of one. One the surface, The Ruby Way appears to be a cookbook of Ruby recipes, and a very thorough one at that. But The Ruby Way also manages to capture the gestalt of Ruby, that intangible, indefinable philosophy behind the Ruby idioms that old-timers now take for granted.
Every programming language has its own "way" of doing things. You don't want to write Java code in Ruby, or VB code in Ruby, you should be writing *real* Ruby code. If you want to see Ruby code the way it was "meant" to be written, this is your book.
Ruby: Too many waysI'm reading the first chapter "Ruby in Review" and it is chock full of typos and mis-usages. This is particularly disconcerting pertaining to the very first sample program; e.g. it contains the statement "str.chomp!" but then the the ensuing explanation alternately refers to "chomp" as well as the previously un-discussed "chop". I'm an experienced Perl programmer and know the difference, but this must be confusing to other readers not lucky enough to have such background. Furthermore, referring to the same "chomp!" operation, the exclamation point is referred to as a prefix. This is incorrect: it's a suffix.
Computer language interpreters including Ruby itself would balk at such imprecision in code instuctions, and therefore I balk at such imprecision in English. It makes me wary that code samples later in the book will contain typos, though I give the book one star more than the minimum because the first sample program as entered in the book does run properly. Still though the editors should be ashamed.
I see this over and over with technical books: the first chapter(s) are flawed with such typos, probably because they get written and reviewed first, several months before the rest of the volume is finished. Further indication of this is the author's comment near the end of the first chapter that he is unaware of other languages with the "===" operator. Perhaps he wrote this for the first edition; by the time he wrote the second edition, particularly with the explosion of Ruby on Rails and Ajax, he should know that Javascript also provides the "===" operator (as does PHP).
In addition, the title of this volume is misleading and pretentious. Ruby suffers from the same "there's MORE than one WAY to do it" approach as Perl (e.g. "poetry mode" that dispenses with parentheses around method arguments). Perl has proven this sort of thing is a drawback, not a benefit. It's derisively referred to as a "write-only" language, and I predict Ruby will be considered likewise after 3-5 years when a sufficient base of Ruby code exists such that Ruby "maintenance" programmers will be in demand.
Furthermore, the author frequently notes how some of these multiple ways to accomplish things in Ruby can "confuse the parser"; there's no arguing this is a drawback. It can only further slow down a language already slow due to its interpreted, dynamically-typed, object-oriented nature.
Tech authors, do yourself a favor, and have somebody (re)edit your initial introductory chapter(s) at the tail end of the process, otherwise risk making a bad first impression. Programmers, do yourself a favor, and don't just blindly jump on the Ruby bandwagon.
A good choice for a second Ruby book...This is a book I could see being really helpful for someone who's done the Ruby tutorial and now needs to actually *use* the language to do something... The Ruby Way (2nd Edition) by Hal Fulton.
Contents: Ruby in Review; Working with Strings; Working with Regular Expressions; Internationalization in Ruby; Performing Numerical Calculations; Symbols and Ranges; Working with Times and Dates; Arrays, Hashes, and Other Enumerables; More Advanced Data Structures; I/O and Data Storage; OOP and Dynamic Features in Ruby; Graphical Interfaces for Ruby; Threads in Ruby; Scripting and System Administration; Ruby and Data Formats; Testing and Debugging; Packaging and Distributing Code; Network Programming; Ruby and Web Applications; Distributed Ruby; Ruby Development Tools; The Ruby Community; Index
Fulton states in the introduction that this book is not designed to be a "teach yourself Ruby" title. Instead, it's meant to explore the power and utility of the language by means of examples. Think of it as a *really* large cookbook-style volume. In each chapter, there are a series of how-to sections that are practical examinations of a particular technique. For instance, in the regular expressions chapter, you'll see sections such as using anchors, positive and negative lookahead, recursions in regular expressions, and detecting doubled words in text. This solutions-based approach to Ruby is perfect for someone who has covered the basics via a tutorial or some other book, but now has to actually use the language to do something. Personally, I find having a book like this is extremely valuable in making the jump from rank novice to functional developer. I know good code when I steal it... :)
random access for someone already knowing RubyYes, there are some typos in Fulton's book. But the vast bulk (and it is indeed a big text) can be profitably read. Either by someone wanting to learn Ruby from scratch or by a Ruby programmer searching for a solution to some common problem. For the former, the book may be too long. If you want to come up to speed on Ruby, ab initio, perhaps you might consider a slimmer text.
The book is best suited as a random access resource, for a Ruby programmer. As implied by the title. The 400 odd examples demonstrate a good diversity of usages of the language. Grouped according to broad topics like threads, user interfaces and networks. This helps you focus on finding a possible solution. However, suppose you can't find an exact match. The numerous examples may have one close enough to suggest an easy mod.
Granted, if a relevant example has typos, so that it won't run, that's a drag. But only a minor one. If you already know Ruby, fixing this should be a low level detail.
As far as comparing with other scripting languages, well the book does not do this. No mention at all of Perl or PHP. Probably the author regards this as outside the book's remit. The decision of whether you should use Ruby over those alternatives is something that cannot be answered by this book alone.
Not for everyoneIf you want to learn or expand your knowledge and/or proficiency in Ruby as quickly as possible, this is NOT the book for you! Hal Fulton's "The Ruby Way" is an excellent example of a miserably poor technical literature. It presents us Ruby as if it were a rather obscure poorly defined powerful beast whose many features could never be seen completely at one time, leaving the reader in a suspense and waiting for missing information to appear in the following paragraphs, which may indeed never show up.
That is not to say that there aren't many interesting things to be found in the book, however, the question is weather they are worth the time you have to spent searching for them as if you were a desperate cowboy sifting through the river sands of the wild west to find few grains of gold. If you are not seeking adventure and useless wandering around and about, do not bother reading this pedagogically unsound concoction. Perhaps best use of this book is on the book shelf - for occasional picking up at random times to check out the most obscure and weak areas of your Ruby proficiency, providing that such indeed is the case.
Let me give you an example for instance, on page 425 you will find the following conclusion after arguably too trivial treatment of the pertinent subject: "You can nest a class within a module, a module within a class, and so on. If you find an interesting and creative uses for these technique, please let us all know about it." This statement tells us very much about the mindset you ought to have in order to appreciate this book. This suites a description of a pioneer, an explorer in a research institute, or indeed an adventurer. Continuing on the same page, author is discussing Ruby peculiarity - "class instance variables" in the shadow of commonly known "class variables", failing to explain the most important mechanics behind the example he presents, which makes this paragraph interesting only for someone very well versed in Ruby intricacies.
However, if you are a Ruby novice, perhaps even proficient in C++, Java or in something similar, unless you have tones of spare time and are just trying to test your understanding of Ruby and explore someone else's take on the subject, I then recommend instead to read a much less voluminous an far superior book on Ruby by D. Flanagan and Y. Matsumoto entitled "The Ruby Programming Language". If you feel after reading Flanagan's and Matz's book you may be ready for something like "The Ruby Way", I believe a second or even a third reading of "The Ruby Programming Language" is a far better choice.
A great book for Ruby beginnersI haven't done much with Ruby and decided it was time to dive in. I opened this enormous text and started. The book is broken down nicely into several beginners "howto" sections and then into more of reference and advanced learning portion.
Coming from a Perl programming background I found several things (mostly syntax) in Ruby quite odd and am very happy to have this reference on hand.
The GTK section of the book is very nice as I haven't seen it covered elsewhere. The additional coverage of Rails adds to the completeness of the material and helps the book win some popularity on a current hot topic.
This is a very well-rounded text for Ruby programmers. I would recommend it to anyone interested in learning Ruby, regardless of programming experience.
Best ruby book yetJust to say I have almost every Ruby and every Rails book out here,
To me, his one is by far the best.
The writing style is very good, and even if the author says it's not intended as a tutorial, you could definitively use it to learn Ruby from scratch too.
Fantastic book! A MUST-HAVE for the serious Ruby coderWell, as the headline of my review says; It's a MUST-HAVE for the serious Ruby coder.
Whatever the question, you'll find a very compentent answer and a very good explanation in this book.
The author knows his stuff hands down.
It's a pleasure to read the example code and see how elegantly written Ruby can be.
It's a book that should be used by anyone who has doubts about Ruby's power and elegance.
The first edition was already an amazing book, but the second edition really tops it.
Great work!
I wish other computer science book were this concise...
Deep Knowledge of RubyThis is a solid Ruby language manual. It has more breadth than the Pickaxe Book, covering more libraries and advanced topics. It also provides more detailed, accurate descriptions of language basics, like exactly how the "case" statement works. I'm still working my through it: it is deepening my knowledge of Ruby.
An excellent language reference.This book is an excellent reference on the Ruby language. I have this book, the pickaxe, and the cookbook. But the book I always turn to first is the ruby way. The style is excellent- slightly informative with some gems of quotes, like "brother, can you paradigm? -Grafiti seen at IBM Austin, 1989"
I wish all language references were written like this, although I am not sure if it is accessible as a first book on Ruby.
Nothing to Complain About!(Full Disclosure: Long time computer geek)
I bought this book hoping to learn the basics of the Ruby language to keep my skills current. This book surpassed my expectations.
Not only did this book provide me with a solid understanding of key Ruby principles, it made me excited about using Ruby.
My first reference for Ruby coding tasksRdoc is great, and deeper than this book, but The Ruby Way is better in terms of examples. O'Reilly books really don't do it for me with Ruby, and I don't even know if they have a Ruby Cookbook, but it doesn't even matter.
This is the only Ruby book I have that isn't from the Pragmatic Programmer's publishing company. I recommend starting with this book, then working your way through the Pragmatic series if you want to get your black belt in Ruby.
Best Ruby book currently availableThis is a very thorough companion to just about everything in Ruby, starting with the core language features, and then moving onto some of the more important libraries. As such, it has a reasonable overlap with Ruby Cookbook. In most languages, you'd expect the O'Reilly's mighty Cookbook series to come off best, but The Ruby Way edges it in this case. It's that good.
The Ruby Way not only covers more than Ruby Cookbook, it also manages to be a little more cohesive, dispensing best-practices and general wisdom amidst its well-chosen examples. If you already know another programming language, you could probably learn Ruby from this book (in particular, the first chapter contains a great set of reminders and idioms), and it might even be the only Ruby book you'd need.
Apart from its comprehensive coverage of Ruby itself, there's also coverage of important Ruby projects like Rake, gems and Rinda. It even covers more than Rails in its chapter on web frameworks, although it must be admitted that you don't get too much sense of how these really work given the space allotted to them.
One notable characteristic of TRW is that in places, it has a slightly fuddyish writing style, for example, it refers to the use of 'threequals' for the case equality operator as "hip and trendy" (with scare quotes included). I quite enjoyed this. Yes, there are some typos and mistakes in the book, but I didn't find it was a big problem, you can normally work out the correct syntax with the minimum amount of experimentation in irb.
A mighty combination of cookbook and best practices (akin to Effective C++ and Effective Java, although Rubyists probably don't like the comparison to those languages), The Ruby Way is the Must Read of the Ruby literature.
This and "The Rails Way": Always-On-Your-Desk BooksIt's a good book for learning the Ruby language, and at almost 800 pages it's one of those books that will usually be sitting nearby (next to the Pickaxe book).
One of the best books I ever readThis book has a very good design. In each chapter, one aspect of Ruby is explained in great detail. The examples also help a lot on comprehending the language.
A great way to explore RubyThis book can serve as a cookbook and also can double up as a ruby tutorial. Whenever i read a recipe, i'm pulled into at least 2 or 3 of the neighboring recipes too. There's a lot to know about Ruby and this book simplifies the learning, teaching/illustrating one concept at a time.
One of the best Ruby books out thereIt is written well and in a simple style so readers can understand easily. And it is very complete -- I searched online for Iconv info but this book provided the best and correct information. If only the author can write about Relativity as well, then I am sure it will be more understandable.
Bulky but comprehensiveQuite good as reference, even if sometimes you can get the information faster by just googling it, often the book gives you a more reasoned explanation and better pointers to related topics.
Wow, what an incredible book and so many angles not usually covered!I am thrilled by this book. So many books cover things like sockets without going into detail on important things like non-blocking I/O... which is what you usually need. There's enough detail and especially sensible code to make it an excellent reference even thougn it covers many topics.
A real treasure, and very readable as well as insightful. I've still got a lot of material to cover, and I'm looking forward to every minute of it.
A great reference point throughout your Ruby development lifetimeThe Ruby Way
Ruby is best described as an object-oriented language, and is very similar to Smalltalk. Overall, the book is well written and contains useful examples throughout.
However, I feel the first point worth stating is that if you're new to Ruby then this book is not for you. Whilst it does cover Ruby in depth, it is aimed at the developer who has already mastered the basics of the Ruby language. Although readers who are familiar with Object orientated development may be able to grasp the concepts described in the first chapter, there are a number of alternative books that better suit the beginner.
That said, this is a highly comprehensive book. Each section is broken down into logical sections with detailed explanation and code examples, allowing the reader to develop code while they make their way through the book. Each chapter breaks down the core libraries into manageable sections starting with strings, regular expressions, time functions and progressing on to other, more complex areas such as threads, socket programming and distribution of code.
The book seems to lack depth in the basic areas of Ruby development, my main complaint being that structure and syntax are not covered sufficiently for the beginner. Some readers may be able to "read around" this subject, using tutorials or another beginner's guide, however, this defeats the point of buying a book that suggests it is suitable for beginners.
Section 1.5 (training your intuition) is, without a doubt, the section most readers will find beneficial. Providing an easy layout covering syntax issues, case conditions and a useful section relating to "rubyisms", such as differences between subclasses / inheritance and the "singleton" classes and iteration within Ruby. This section includes a vast amount of code examples allowing the user to flick straight to it in order to get real world examples.
Overall rating
I would recommend this book only if you were planning to purchase 2 or 3 beginner books. As an insight into the various libraries and books the book works very well, helping the user quickly grasp the concepts. Rating of this book needs to be performed from two perspectives: The "Ruby newbie" and "Ruby beginner".
Ruby Newbies
5/10: whilst most OOP developers would be able to pick up this book and use it to learn, newcomers would definitely find this hard going. I would recommend "Programming Ruby: The Pragmatic Programmer's Guide, Second Edition" for new developers and OOP developers with no Ruby exposure.
Ruby beginner
8/10: This book will serve as a good reference point throughout your Ruby development lifetime, and you will find yourself referring to it time and time again. Teaching you Ruby one concept at a time helps the beginner grasp the basics without having to delve into chapters of "Hello World" based applications.
ExcellentThis book is very thorough and a pleasure to read- there are great code examples in it as well.
Good Book for beginnersIt is an excellent book for people new to Ruby, or having previous background in ObjectOriented languages. It provides detailed write ups with working examples.
All you need to know about RUBY!As the title says it ... don't look any further ...
