Book Description
Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer's Guide. Now in its Second Edition, author Dave Thomas has expanded the famous Pickaxe book with over 200 pages of new content, covering all the new and improved language features of Ruby 1.8 and standard library modules. The Pickaxe contains four major sections:
An acclaimed tutorial on using Ruby.
The definitive reference to the language.
Complete documentation on all built-in classes, modules, and methods
Complete descriptions of all 98 standard libraries.
If you enjoyed the First Edition, you'll appreciate the new and expanded content, including: enhanced coverage of installation, packaging, documenting Ruby source code, threading and synchronization, and enhancing Ruby's capabilities using C-language extensions. Programming for the world-wide web is easy in Ruby, with new chapters on XML/RPC, SOAP, distributed Ruby, templating systems and other web services. There's even a new chapter on unit testing. This is the definitive reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including more than 250 significant changes since the First Edition). Coverage of other features has grown tremendously, including details on how to harness the sophisticated capabilities of irb, so you can dynamically examine and experiment with your running code. "Ruby is a wonderfully powerful and useful language, and whenever I'm working with it this book is at my side" --Martin Fowler, Chief Scientist, ThoughtWorks
A recommendation: once you've used the PickAxe to master Ruby, you might want to use it to write code for your company. A few years ago, that would have been a bold move. Now, I honestly believe that in many cases it's both prudent and strategic. Writing enterprise applications in Ruby means they get written faster, and the resulting code is more flexible and easier to maintain.
But you might need some help: how do you get Ruby applications to work with enterprises databases, and services such as LDAP and SOAP?
It turns out that Maik Schmidt has written a great book that covers all these details, and more. It you want to write Ruby code in your company, I'd strongly recommend looking at it.
I admit it: I'm a language nut. I'm aways trying out new programming languages, looking for novel ideas and better ways of doing things.
Back in 1998 I probably tried a new language every week. Most didn't survive more than 30 minutes of playing: they were clearly derivative, or just plain boring. But when I came across an obscure language from Japan called Ruby, I totally lost track of time. At the end of the day, I called Andy Hunt and told him he just had to try it too.
Having just finished writing The Pragmatic Programmer, the last thing Andy and I wanted to do was write another book. But the little tutorial on Ruby we'd decided to write just kept growing and growing until, a year later, we delivered the first edition of Programming Ruby (or the PickAxe as it's known). I was really pleased with the result: that book basically helped Ruby become an international language.
This new edition was produced to reflect the release of Ruby 1.8. It's a major update on the first, with hundreds of new pages and significant changes in every chapter. You can find supporting information (including errata, code to download, and information of getting PDF versions of the book) on the book's home page.
I hope you enjoy The Pickaxe. More, I hope you start using Ruby when you program. I think you'll find that it brings the joy back to our craft.
If you are like me, a busy programmer, I know you are wondering when you hear about Ruby, "Do I really have to learn yet another programming language?" I mean, Java, C#, Python? When will it ever end?
Well, it ends when you die, and yes, you do have to learn another programming language :-) But you'll like Ruby, I promise. Things I like about Ruby:
0. As easy to write scripts in as Perl, but it really scales.
1. Exceedingly self-consistent. Ruby has fewer syntactic warts than any programming language I'm familier with. All the features hang together very nicely.
2. Duck Typing: If you use a variable like a string, its a string. If you use it like a float, its a float. If you are familier with Haskell or or similarly typed languages, you get the idea. Ruby gives you about 80% of what Haskell gives you here.
3. Nice module system. This implements a nice mix-in facility--which gives you the power of C++ templates, with more structure. Also eliminates the need for multiple inheritance.
4. Wacky features like call/cc for the true language freaks.
Oh, so you want to know about the book too? Well, I agree with some of the reviewers here who describe the book as less of a tutorial/visionary screed/inspiring gospel and more of a reference manual. But I don't think this is a fair critique of the book. Back in the 60's, before the internet, a language needed a book to do for it what K&R did for C, or what Clocksin & Mellish did for prolog.
But today, you learn about a language by surfing the web. Instead of just duplicating what is available on the internet, this book complements the web, by supplying in a nice portable package what you need to know about Ruby which _can't_ be (easily) gotten from the web. Its a "post-internet" volume in this fashion.
Really the only critique of the book I can offer is that its description of Ruby/TK, the default GUI programming library for Ruby, is a bit abrieviated. It gives you the basics and the refers you a book about Perl/TK for the details. Please guys, in the next edition expand on this!
Ruby is a language which is as object-oriented as smallTalk, as flexible as Scheme, has the scriptibility of Perl, and a nice C-ish syntax. What's not to like? This book is the book to buy if you decide to learn Ruby.
Dave has done it again. Taking what was already an excellent first edition and growing it by 50%. He has updated all of the original chapters, the language walkthrough and the library reference.
Like most language books Programming Ruby starts with installing Ruby and then goes into a language reference; strings, classes, blocks, regular expressions, etc. It's all covered step by step with examples. The second part, Ruby and It's World, is a grab bag of chapters on more complex Ruby topics like graphical user interfaces, Ruby GEMs, and embedding Ruby.
Part III is a concise reference for Ruby that is handy when you already know the language but need a refresher. And the final part is a library reference with examples of using each method. This is the invaluable reference that you will use in every Ruby project.
This is the book to buy to learn Ruby, and to use as a desk reference. There is no question about that.
I finally decided to review this book, having read it quite some time ago. The reason I waited this long is that I feared I wouldn't have been able to provide a fair assessment of the merits of this book. My problem is that, nowadays, I get easily bored reading yet another programming book. And a book entirely dedicated to a single programming language was bound to bore me infinitely.
That's what happened, actually. I got so bored that it took me a really long time to finish it, even after skipping entire chapters. I managed to finish it only because I forced myself to do it.
I know Ruby is cute, and has lots of nice and innovative features, but I just can't stand anymore reading operator precedence tables, variations on the basic control structures and core libraries. Last time I got excited by a programming language was with Java, and that was circa 1995. I'm too old for that.
But I must try to stay objective and think how useful "Programming Ruby" could be to a young programmer and I have to admit the answer would be: a lot! As is customary with titles from The Pragmatic Programmers, quality is very high, both from a content point of view and from a presentation one as well. Well written, it even manages to inject a bit of humor into a dry subject. If you want a one stop shop reference for all Ruby, that's it! Not much more to say, except that I'd have liked, at times, the code samples to be longer, more structured and less contrived, but it's a minor nit.
I suggest that you read it in bits and pieces, not cover-to-cover and if boredom gets you, you can always get a little of why's (poignant) guide to Ruby as an antidote.
you've got to get used to this new type of language. (I'm a PHP, C#, VB, Lisp, RPG, COBOL, FORTRAN, another couple dozen languages developer) Every inch of code in Ruby is packed with consequences. I don't paticularly like this way of coding, I prefer a language with simpler syntax. Easier to write and debug, lower learning curve. But then there's the argument, even using good OO techniques, with all the gyrations needed to duplicate the inch of Ruby you'd have something worse. Besides, rather than the language being hard, I might just be too old to learn. Anyway I'm about 1/3 the way through the book, it's a decent tutorial style, not one of those follow the reference manual books, but I keep putting it down to learn something else, more immediate. I got drawn in to it with great Rails MVC Framework. I Bought the Ruby book first thinking language knowledge would help understand Rails. Am questioning now if Rails should have gone 1st. I have to give the book 5 stars though because it is so well written and it may well be the difinitive book on the subject. (The correct rating would be 97/100.) If you're doing Ruby though, you need this book.
plain and simple: this is one of the best written language references i have ever had the pleasure of owning. ruby is a facinating language and dave thomas knows how to write a really good book.
I'm just beginning to learn about programming. This book looks like a very powerful resource if you already know a programming language, but I definitely need a "For Dummies" version.