6th out of 19 books
—
19 voters
Metaprogramming Ruby: Program Like the Ruby Pros
Everyone in the Ruby world seems to be talking about metaprogramming--how you can use it to remove duplication in your code and write elegant, beautiful programs. Now you can get in on the action as well.
This book describes metaprogramming as an essential component of Ruby. Once you understand the principles of Ruby, including the object model, scopes, and eigenclasses, y...more
This book describes metaprogramming as an essential component of Ruby. Once you understand the principles of Ruby, including the object model, scopes, and eigenclasses, y...more
Paperback, 296 pages
Published
February 22nd 2010
by Pragmatic Bookshelf
(first published 2010)
Friend Reviews
To see what your friends thought of this book,
please sign up.
Community Reviews
(showing
1-30
of
537)
Paolo Perrotta's Metaprogramming Ruby: Program Like the Ruby Pros is a tour de force on Ruby's Object Model. The book goes into considerable depth on how it works, and presents many examples of manipulating the object model to good use. The format of first section of the book goes through a week of a pair of Ruby programmers as they try to fix and refactor an existing application, and how they use various metaprogramming "spells" (techniques, idioms, etc). The second section is a set of essays t...more
The author creates a continuing story as a framework around which to present the material. I found the narrative annoying, and therefore distracting, so much so that I had to abandon reading it after the second chapter.
However, material presented is sound, if you can get past the cutesy presentation. Otherwise Russ Olsen covers metaprogramming in ruby well in Eloquent Ruby - highly recommended.
However, material presented is sound, if you can get past the cutesy presentation. Otherwise Russ Olsen covers metaprogramming in ruby well in Eloquent Ruby - highly recommended.
Before anything else, I have to say I really didn't like the style the author chose for the first part of the book. In the chapters named "Monday" to "Friday", you go through your first week in a new job, doing pair programming with your colleague "Bill". While this is fun for about half a page, sentences like "Bill walks over to the whiteboard and starts drawing a blablabla" get old fast. Very fast. I'm not exactly sure why the author decided on this style, since in my opinion it doesn't add an...more
This is a book fills a long-standing whole in the Ruby community by laying out a cohesive explanation of the Dark Art we call "meta-programming". So much of Ruby metaprogramming is tribal knowledge and it can be difficult to acquire. Even more difficult is understanding the underlying rationale for various bits of meta-magic. This book does a good job of boiling down Ruby metaprogramming into a list of "spells", then explains each one in the context of a running narrative.
For any Ruby programmin...more
For any Ruby programmin...more
Every Ruby developer should read this book, if only to learn some of the depths of what is possible in the language, and how the ideas from different paradigms (OO, message-passing, FP) can come together with such power.
The book is conversational in tone, and the idea of "spells" discussed throughout provide helpful mnemonics to recognize the concepts in the wild later.
I read this after attempting to write Rails plugins; a lot of what seemed quite unusual to me (or sensible, if a bit quirky) now...more
The book is conversational in tone, and the idea of "spells" discussed throughout provide helpful mnemonics to recognize the concepts in the wild later.
I read this after attempting to write Rails plugins; a lot of what seemed quite unusual to me (or sensible, if a bit quirky) now...more
'Metaprogramming Ruby' is one of the books that has been taking the ruby programming community by force, and it is easy to see why. Metaprogramming has been espoused for quite some time as one of the most compelling features of the language, and for a lot of newcomers to the language it seems a complicated and arcane subject reserved for those who really know the hows and whys of programming in Ruby. A book that provides insights into this subject is destined for the bookshelves of rubyists ever...more
Metaprogramming Ruby is by far my favorite Ruby book. First, it does not treat the reader as a brand new programmer. The basics of Ruby are obvious to anyone that has programmed before, and can be picked up as examples are given. Thankfully this is not included in this book. What is included are the main differences between Ruby and other object-oriented languages such as Java, Python, and C++. This is an area which most other Ruby books completely lack.
If you are curious how Ruby pulls off it'...more
If you are curious how Ruby pulls off it'...more
It's an impressive book that can turn an advanced programming topic like metaprogramming--which is often considered the black magic of programming--into something accessible and even easy. This book mostly pulled that off, but the way it did so was annoying: it's written as a stupid, contrived conversation between two programmers, as they learn metaprogramming.
The bizarre thing is that the second part of this book simply dumps you into the dark depths of Rails code, though accompanied by readabl...more
The bizarre thing is that the second part of this book simply dumps you into the dark depths of Rails code, though accompanied by readabl...more
The first half of the book employs a 2nd-person narrative point of view that takes some getting used to. I would have disliked it more has I not been forewarned by other reviewers. Though tedious at first, ultimately I think it worked well to present concepts that are then studied in real world applications in the second half of the book.
I didn't read this book, I actually studied it!
If you consider yourself Senior on Ruby this book should be a recap on what you already know and some new tricks will get to you.
If you are a Ruby newcomer then meta-programming is a must know if you want to become a decent rubyist and this book is an easy way to start getting there.
I compiled a few quizzes mostly out of this book like i usually do:
https://gist.github.com/4221679
If you consider yourself Senior on Ruby this book should be a recap on what you already know and some new tricks will get to you.
If you are a Ruby newcomer then meta-programming is a must know if you want to become a decent rubyist and this book is an easy way to start getting there.
I compiled a few quizzes mostly out of this book like i usually do:
https://gist.github.com/4221679
Feb 09, 2011
Joshua Baker
rated it
5 of 5 stars
Recommends it for:
ruby programmers
Shelves:
productivity-related
High-level and conceptual, but also idiomatic and filled with examples. Exactly the way I like my programming books. This was an excellent read because you're dealing with hands-on Ruby code on just about every page, so you never lose sight of the engineering, but the lesson is all science.
Good book on meta programming. The writing style starts of kind of quirky as a dialogue between an old experienced programmer and his apprentice. This quickly got old for me though, whilst it reads easily it is a longhand form of getting ideas across, and makes it harder to skim content.
The second part of the book, examines portions of the rails source code, namely activerecord.
The second part of the book, examines portions of the rails source code, namely activerecord.
(4.0) Pretty good resource
Most valuable part for me was just walking through the ruby object model in a structured way (rather than just poking at it to learn in irb). Then the metaprogramming concepts build well on top of that. I definitely learned a lot. Though I think it should be emphasized more that metaprogramming can create more problems than it solves and should be looked as an option (vs. writing a bunch more code that's more clear). I'll probably refer back to it when developing gems a...more
Most valuable part for me was just walking through the ruby object model in a structured way (rather than just poking at it to learn in irb). Then the metaprogramming concepts build well on top of that. I definitely learned a lot. Though I think it should be emphasized more that metaprogramming can create more problems than it solves and should be looked as an option (vs. writing a bunch more code that's more clear). I'll probably refer back to it when developing gems a...more
Really good introduction to the metaprogramming capabilities of Ruby. It's quite an easy read as the author wrote the book as a conversation between two developers (this is taken a bit to the extreme in a few places of the book).
I think this is an excellent book for someone who doesn't have any background on the metaprogramming features of ruby.
I think this is an excellent book for someone who doesn't have any background on the metaprogramming features of ruby.
There are no discussion topics on this book yet.
Be the first to start one »
Goodreads is hiring!
Share This Book
No trivia or quizzes yet. Add some now »
“Don't you just love self-referential logic?”
—
1 person liked it
More quotes…

Loading...
















view 1 comment










