Preface - The Well-Grounded Rubyist, Second Edition (2014)

The Well-Grounded Rubyist, Second Edition (2014)

Preface

Welcome to the second edition of The Well-Grounded Rubyist. In the five years since the first edition came out, the Ruby language has changed and evolved—most notably with the release, on Ruby’s twentieth birthday (February 24, 2013), of Ruby 2.0. At the end of 2013—Christmas, to be precise—Ruby 2.1 was released; that’s the version covered in this edition.

The Well-Grounded Rubyist has been very well-received. It seemed to hit a sweet spot for a lot of readers, including many who were completely new to Ruby, as well as many who had done some Ruby already but wanted to make a thorough pass through the language and make sure they really understood it. I’ve been particularly pleased by those comments that describe the experience of reading the book as being like working directly with a Ruby teacher. After all, I am a Ruby teacher, and though teaching involves wearing a different hat than writing, the two hats aren’t all that different after all.

Much hasn’t changed in Ruby—but quite a lot has. This second edition includes a lot of new material, along with an extensive review and reworking of the original text. As with the first edition, the book doesn’t pretend to be an exhaustive Ruby and standard library reference (those are available elsewhere), but an in-depth examination and explication of the key aspects of Ruby’s object model, built-in classes, and important programming facilities.

I’d like to extend a warm welcome to all of the book’s readers, including those who read the first edition and those who are entirely new to The Well-Grounded Rubyist. I hope and trust that you’ll find a great deal to interest and excite you here. Enjoy!

Preface to the First Edition

In 2006, Manning published my book Ruby for Rails: Ruby Techniques for Rails Developers. My goal in writing Ruby for Rails—or, as it has come to be known, R4R—was to provide Rails developers with both an understanding of the fact that being a Rails developer means being a Ruby developer, and a solid grasp of Ruby. I chose Ruby topics for inclusion (or exclusion) based on my judgment as to their relative importance for people who wanted to learn Ruby mainly in order to use Rails correctly and effectively.

Critical response to R4R was very good. The book filled a void: it was neither just a Ruby book nor just a Rails book, but a Ruby book “optimized,” so to speak, for the Rails developer. I was pleased by the book’s reception—and particularly by the many people who, after reading it, asked me whether I had any plans to write a whole book just about Ruby, and encouraged me to write one.

And that, to make a long story short, is what I have done.

The Well-Grounded Rubyist is a “just Ruby” book, and it’s written to be read by anyone interested in Ruby. It’s a descendant of R4R but not exactly an update. It’s more of a repurposing. There’s some overlap with R4R, but there’s also a lot of new material (more than I originally anticipated, in fact); and everything, overlap or not, has been oiled and polished and spiffed up to work with Ruby 1.9.1, the newest version of Ruby (and very new) at the time the book went to press.

Mind you, I don’t mean for Rails developers not to read The Well-Grounded Rubyist. On the contrary: I’m optimistic that in the three years since R4R was published, the idea that Rails developers should learn Ruby has become commonplace, and many people who first got into Ruby through Rails have gotten interested in Ruby in its own right. I want this book to be there waiting for them—and for the many people who are discovering Ruby through completely different channels.

So whatever brings you here, I hope you enjoy the book.