Programming Ruby: The Pragmatic Programmers' Guide (Pragmatic Programmers Series) / Edition 2

Paperback (Print)
Buy New
Buy New from
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 95%)
Other sellers (Paperback)
  • All (60) from $1.99   
  • New (8) from $25.77   
  • Used (52) from $1.99   


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 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 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

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

Read More Show Less

Product Details

  • ISBN-13: 9780974514055
  • Publisher: Pragmatic Programmers, LLC, The
  • Publication date: 10/28/2004
  • Series: Pragmatic Programmers Series
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 864
  • Sales rank: 1,499,127
  • Product dimensions: 7.40 (w) x 9.38 (h) x 1.56 (d)

Meet the Author

Dave Thomas, as one of the authors of the Agile Manifesto, understands agility. As the author of "Programming Ruby," he understands Ruby. And, as an active Rails developer, he knows Rails.

Chad Fowler is co-director of Ruby Central, Inc., and remains an active, driving force in the Ruby community.

Andy Hunt is a programmer turned consultant, author and publisher. He co-authored the best-selling book “The Pragmatic Programmer”, was one of the 17 founders of the Agile Alliance, and co-founded the Pragmatic Bookshelf, publishing award-winning and critically acclaimed books for software developers.

Read More Show Less

Table of Contents

1 Getting started 3
2 11
3 Classes, objects, and variables 25
4 Containers, blocks, and iterators 43
5 Standard types 59
6 More about methods 79
7 Expressions 87
8 Exceptions, catch, and throw 107
9 Modules 117
10 Basic input and output 127
11 Threads and processes 135
12 Unit testing 151
13 When trouble strikes 163
14 Ruby and its world 177
15 Interactive Ruby shell 185
16 Documenting Ruby 199
17 Package management with Ruby gems 215
18 Ruby and the Web 235
19 Ruby Tk 255
20 Ruby and Microsoft Windows 267
21 Extending Ruby 275
22 The Ruby language 317
23 Duck typing 365
24 Classes and objects 379
25 Locking Ruby in the safe 397
26 Reflection, ObjectSpace, and distributed Ruby 403
27 Built-in classes and modules 423
28 Standard library 653
29 Socket library 763
30 MKMF reference 779
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 4 Customer Reviews
  • Anonymous

    Posted November 12, 2006

    Excellent Book, if a Little Lacking in Parts

    I found this book to be very well written and concise, though clearly intended for someone with some level of prior programming experience. My only real complaint is that some of the chapters, while covering a wide amount of material, seem to be lacking in depth. Aside from that, however, I found this book to be more than adequate to give a solid a foundation in Ruby, and after it serves as an extremely useful reference for the classes and modules that are built-in to Ruby. All in all, if you're interested in learning Ruby, this book should definitely be in your collection.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 25, 2005

    Great introduction to a language

    When Dave Thomas and Andy Hunt, authors of The Pragmatic Programmer, published the first edition of Programming Ruby in 2000, it was the first English language Ruby book. Ruby documentation was so scant that they had to study the source code to do it, as Ruby's author, Matz, explains in his foreword. For 2005, they revised it to cover Ruby 1.8, the latest major release. Though there are now several other Ruby books, Programming Ruby is still trying to do it all -- language tutorial, language reference, a guide to thinking in Ruby (which includes thinking in objects), and an introduction to the Ruby community's conventions. The book is broader than it is deep, but, given its breadth, that's praising with faint damns. It's not a book for a programming novice, but the language tutorial was thorough and clear. Moderately experienced programmers should have no problems with it. If you've done object-oriented and functional programming before, it'll be easy going. I was impressed by how much the book includes of what you need to actually _develop_ in Ruby -- trying code snippets in the interactive Ruby shell, debugging, watching out for Ruby's gotchas, developing a test suite, documenting (in Rdoc, a Ruby standard), packaging code into a Ruby Gem (RubyGems is Ruby's equivalent to Perl's CPAN), profiling your code to find the slow parts, and how to extend Ruby in C to speed them up. There's a brief survey of using Ruby for Web, Tk, and Win32 programming. The book's emphasis on breadth over depth is most obvious here -- 18 pages on web programming doesn't just cover CGI programming, but touches on cookies, session maintenance, two template systems for HTML generation, eruby (a means of embedding Ruby in HTML, like PHP, Mason, PSP, or the other *SPs), SOAP, WSDL, and the Google API. (Ruby on Rails is mentioned only as a framework 'currently attracting mindshare in the Ruby community.') For all their brevity, these chapters were still useful. They're a starting point for learning available tools for those problem domains. More importantly, they demonstrate the breadth of the standard library and other available packages, and provide a lesson in looking for existing solutions first. That's old hat to people used to the open source world, but it could prove invaluable to someone who wandered in from the outside. Almost half the book is a reference to the built-in classes and modules, and to the standard library. Ruby has dozens of built-in classes, each, typically, with dozens of methods, so it's no surprise that a lot of this information went unmentioned in the language tutorial. In my use of the reference so far, I've found it clear and well-organized. Perl played a part in inspiring Ruby. Likewise, it strikes me that Programming Ruby's authors probably took inspiration from Programming Perl. It's even nicknamed for its cover illustration -- the PickAxe Book. And, like the Camel Book, it goes beyond the language at hand to advance general principles of good programming: code reuse, writing for maintainability, and avoiding reinventing the wheel. And it's all written with an infectious joy in programming. My only complaint about the book is that the index is spotty in its coverage of the language tutorial chapters -- I've felt frustrated trying to find discussions of things because, too often, the index only pointed to the reference section's coverage of them. But the book left me excited about programming in Ruby, and gave me all I needed to begin. That's all I could ask from an introduction to a new language.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 3, 2005

    Good book

    Overall, I like this book. If you are new to Ruby, I would recommend it. The book takes you through a process (like a long tutorial). The last part of the book is strictly reference material. The bad thing is that if you are new to OOP and new to Ruby, you might find it leaves out too many details or just doesn't quite cover them in the depth you might require. I like the book. But, I think I'll have to continue to use Google to supplement it. The previous review critcized the Ruby language. In response to it, I will say that Ruby is the epitomy of OOP (though maybe not quite as much as SmallTalk). I haven't used Java or Perl. So, I'm not qualified to compare those. But, so far, Ruby seems to make alot of sense to me.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 12, 2004

    Worth consideration

    Yet another scripting language. Originating in Japan, its inventor (Y Matsumoto) claims that it is more powerful than Perl and more object oriented than Python. Somehow, I imagine proponents of those languages might vociferously disagree. In any event, Thomas does a nice job of documenting Ruby, for the benefit of a newcomer. A key strength of Ruby seems to be what it calls containers, blocks and iterators. This includes a nice ability to have hash tables. Certainly, you have more to start with than in a bare bones language like C. Veterans of Java will recognise and appreciate this native Ruby functionality. The importance of these functions can be seen in the unusual order in which they appear in the book. Thomas discusses these in a chapter that precedes talking about mundane and simpler things like the standard variable types, operators and loops. Most texts of any language would reverse the order. Overall, I am ambivalent about Ruby. Not so much because I disagree with what Thomas says, as simply because I'm quite comfortable in Java. Nonetheless, if you are casting around for a strong OO scripting language, Ruby might be worth consideration.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 4 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)