What's a really good book on Ruby.
May 21, 2008 6:07 AM   Subscribe

If my favourite reference on C++ is The C++ Programming Language by Stroustrup, what would be my favourite book on Ruby. (And my favourite book on Python.)

I realize both langauges differ from C++ in that they will likely change over the next few years, but is there anything out there yet that you would call the Ruby book?

Go MetaFilter! Go!
posted by chunking express to Computers & Internet (16 answers total) 13 users marked this as a favorite
 
Best answer: The best reference for Python is the online documentation. It is pretty good as a reference, and anything else falls out of date too quickly.

For in-depth learning, you might consider the Python Standard Library and the Python Cookbook.
posted by grouse at 6:23 AM on May 21, 2008


I'd make a case for Why's (Poignant) Guide to Ruby as being the Ruby book, but it's an introduction to the language and not a reference book. For that, the best one right now might be the new The Ruby Programming Language book.

For Python, I would pick Python in a Nutshell.

As grouse mentioned, most people rely on the online documentation for both languages, because Python and Ruby change more quickly than a more stable language like C++.
posted by burnmp3s at 6:31 AM on May 21, 2008


for ruby, you will hear about The Pickaxe a lot. It's pretty good. It's not the official reference, like The Ruby Programming Language and The C++ Programming Language are though, as it isn't written by the creator of the language.
posted by ArgentCorvid at 6:39 AM on May 21, 2008


Response by poster: Thanks for the answers so far.

The Ruby Programming Language book was what prompted this question. Was curious about what else was out there.

I've read the Pickaxe, or part of it anyway, but am not really a fan. It's huge, but doesn't actually seem to say much. I like Stoustrup's C++ book because it's pretty terse, even though it's a huge-ass tome of a book. K&R's book on C is also great in this regard. I've also read Why's (Poignant) Guide to Ruby, which is interesting, but again, not quite what I'm looking for.

Maybe I've asked the wrong question. What would be the book to read if you want to get some real insight into either language? Maybe I should just be looking at other peoples code.
posted by chunking express at 6:54 AM on May 21, 2008


Best answer: Check out The Ruby Way. It's good stuff.
posted by cdmwebs at 6:57 AM on May 21, 2008


Can't help with Ruby, but my favourite Python book is Dive Into Python, which is available online. It's reasonably short, and leads you through a set of small scripts that show you how to do useful things in Python while also showing off cool tricks of the language. And it's written by Mark Pilgrim, which is always a plus.
posted by bent back tulips at 7:00 AM on May 21, 2008


What's interesting about these languages is that they have been developed and continue to be developed in open spaces that you can see on the web. So it is quite easy to see the principles of the designers, and the way they use the language.

Read comp.lang.python, python-dev, and the Python Enhancement Proposals.

And of course, start up Python and type import this.
posted by grouse at 7:02 AM on May 21, 2008


Python's online docs include a pretty decent tutorial, though I've also heard good things about Dive Into Python. Stylistically the online docs are probably closer to the Stroustrop book than any python book I've read, although because the language itself is much simpler than C++ one doesn't tend to need nearly as much in the way of core language documentation. I've also found this Python sidebar to be handy.

(Every beginning pythonista should from __future__ import braces at some point, too.)
posted by whir at 7:25 AM on May 21, 2008


Best answer: Python Essential Reference
posted by breaks the guidelines? at 7:50 AM on May 21, 2008


Seconding the Python Essential Reference; it's what the Python geeks at my old office recommend to people.
posted by fairytale of los angeles at 8:15 AM on May 21, 2008


From what I recall of Stroustrup, you'd probably like The Ruby Way best of the Ruby books I know.
posted by Zed_Lopez at 9:24 AM on May 21, 2008


Nth-ing The Ruby Way.
posted by stungeye at 9:52 AM on May 21, 2008


The online Python Cookbook is also handy.
posted by and for no one at 9:58 AM on May 21, 2008


Another vote for Python Essential Reference.
posted by needled at 10:13 AM on May 21, 2008


docs.python.org is the closest equivalent to the Stroustrup for Python. It's fantastic, especially if you're working with the C implementation, and it's free.

Playing around in the interpreter is a great way to learn the language, actually. Have a look at the dir() and help() functions. dir(object) prints an object's attributes. help(object) prints an object's documentation. Between those functions and the online docs you can get by without a physical book.
posted by amery at 2:20 PM on May 21, 2008


Response by poster: Thanks for the answers. I'll probably check out the Ruby Way and Python Essentials at some point. And Python's online docs seem better than I remember them being.
posted by chunking express at 1:03 PM on May 22, 2008


« Older transportation from bronx to manhattan west side   |   Go west young man... Newer »
This thread is closed to new comments.