I’m thinking of picking up these two books and was wondering if anyone
here had any experience with these. If so how would you rate these
two publications? Do you have other preferred books that deal with
these topics in depth?
I’m thinking of picking up these two books and was wondering if anyone
here had any experience with these. If so how would you rate these
two publications? Do you have other preferred books that deal with
these topics in depth?
I’m thinking of picking up these two books and was wondering if anyone
here had any experience with these. If so how would you rate these
two publications? Do you have other preferred books that deal with
these topics in depth?
I’ve read Metaprogramming Ruby. I’d probably give it 3.5 stars. It was
good,
but didn’t need to be as long as it was, and I didn’t feel that the
“story”
added anything (in fact, I was often annoyed by the snarky coworker). I
didn’t think it did a good enough job making the object model clear (I
later
went back to look at the diagrams, and couldn’t really make sense of
them),
but I did have several moments of clarity while reading it, and at one
point
realized “oh, it’s so simple”.
The code examples are pretty good, and it does a good job of covering a
topic that can be confusing to the uninitiated. If you’ve found yourself
evaling code written in a string, after giving up on trying to do it all
in
Ruby, then you are probably in a good place to learn a lot from this
book.
If you don’t know what a singleton class is, or don’t feel comfortable
with
it, then you’ll probably get a lot out of this book.
The original question was about “preferred books” about “these topics”,
by which I suspect you mean exceptions and metaprogramming. I have found
that, perhaps surprisingly, Eloquent Ruby is actually a stellar
introduction to metaprogramming in Ruby – so stellar, in fact, that even
after doing some metaprogramming in Ruby from time to time it should
still be a great (re)introduction to the subject. I’d add it to your
list of choices for metaprogramming in Ruby, along with Metaprogramming
Ruby and (to a notably lesser extent) Ruby Best Practices.
The Pickaxe, which is honestly the best Ruby book that exists (despite
its
formidable size), also has a chapter about metaprogramming. As it’s less
than 50 pages long, you might start there.
The Pickaxe, which is honestly the best Ruby book that exists (despite its
formidable size), also has a chapter about metaprogramming. As it’s less
than 50 pages long, you might start there.
The pickaxe, I has it. I’m reading it straight through now in fact.
Like Ian and Andrew, I really liked Metaprogramming Ruby and have not
read Exceptional Ruby. As Ian mentioned, Ruby Best Practices is also
excellent.
The original question was about “preferred books” about “these topics”,
by which I suspect you mean exceptions and metaprogramming. I have
found
that, perhaps surprisingly, Eloquent Ruby is actually a stellar
introduction to metaprogramming in Ruby – so stellar, in fact, that
even
after doing some metaprogramming in Ruby from time to time it should
still be a great (re)introduction to the subject. I’d add it to your
list of choices for metaprogramming in Ruby, along with Metaprogramming
Ruby and (to a notably lesser extent) Ruby Best Practices.
I
didn’t think it did a good enough job making the object model clear (I
later
went back to look at the diagrams, and couldn’t really make sense of
them),
Opposite opinion here. If you can’t understand the author’s
descriptions and diagrams, then I don’t see how you could ever
understand ruby’s object model. In my opinion, it’s one of the best
books in any
language.
I got a lot more out of reading this blog post ( http://carboni.ca/blog/p/Modules-How-Do-They-Work) and doing a few
experiments to cover what isn’t in it’s domain than I did trying to
decipher
the Metaprogramming Ruby diagrams.
On Tue, Aug 09, 2011 at 03:55:26PM +0900, 7stud – wrote:
Josh C. wrote in post #1015615:
I didn’t think it did a good enough job making the object model clear
(I later went back to look at the diagrams, and couldn’t really make
sense of them),
Opposite opinion here. If you didn’t understand the authors
description’s and diagrams, I don’t see how you could ever understand
ruby’s object model.
Some people just don’t do well with diagrams in cases like this, I
think.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.