Metaprogramming Ruby: Program Like the Ruby Pros and over one million other books are available for Amazon Kindle. Learn more

Vous voulez voir cette page en français ? Cliquez ici.


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Start reading Metaprogramming Ruby: Program Like the Ruby Pros on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Metaprogramming Ruby: Program Like the Ruby Pros [Paperback]

Paolo Perrotta

List Price: CDN$ 41.95
Price: CDN$ 26.43 & FREE Shipping. Details
You Save: CDN$ 15.52 (37%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 3 left in stock (more on the way).
Ships from and sold by Amazon.ca. Gift-wrap available.
Want it delivered Tuesday, July 15? Choose One-Day Shipping at checkout.

Formats

Amazon Price New from Used from
Kindle Edition CDN $15.94  
Paperback CDN $26.43  

Book Description

Feb. 25 2010 1934356476 978-1934356470 1

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, you're on your way to applying metaprogramming both in your daily work and in your fun, after-hours projects.

Learning metaprogramming doesn't have to be difficult or boring. By taking you on a Monday-through-Friday workweek adventure with a pair of programmers, Paolo Perrotta helps make mastering the art of metaprogramming both straightforward and entertaining.

The book is packed with:

  • Pragmatic examples of metaprogramming in action, many of which come straight from popular libraries or frameworks, such as Rails.
  • Programming challenges that let you experiment and play with some of the most fun, "out-there" metaprogramming concepts.
  • Metaprogramming spells--34 practical recipes and idioms that you can study and apply right now, to write code that is sure to impress.

    Whether you're a Ruby apprentice on the path to mastering the language or a Ruby wiz in search of new tips, this book is for you.

  • Frequently Bought Together

    Customers buy this book with JavaScript: The Good Parts CDN$ 18.80

    Metaprogramming Ruby: Program Like the Ruby Pros + JavaScript: The Good Parts
    Price For Both: CDN$ 45.23

    Show availability and shipping details

    • This item: Metaprogramming Ruby: Program Like the Ruby Pros

      In Stock.
      Ships from and sold by Amazon.ca.
      FREE Shipping. Details

    • JavaScript: The Good Parts

      In Stock.
      Ships from and sold by Amazon.ca.
      FREE Shipping on orders over CDN$ CDN$ 25. Details


    Customers Who Bought This Item Also Bought


    Product Details

    • Paperback: 296 pages
    • Publisher: Pragmatic Bookshelf; 1 edition (Feb. 25 2010)
    • Language: English
    • ISBN-10: 1934356476
    • ISBN-13: 978-1934356470
    • Product Dimensions: 22.9 x 19 x 2.5 cm
    • Shipping Weight: 522 g
    • Amazon Bestsellers Rank: #212,155 in Books (See Top 100 in Books)

    Product Description

    Review

    ""If you program in Ruby, buy this book. Twice. Ruby isn't magic anymore, just great.""--Joe Alba""In Ruby, the practitioners of metaprogramming have found a language where they are only constrained by their imagination. To reach mastery is hard, and even harder is to apply it tastefully. This book gives a grounding in the fundamentals of metaprogramming Ruby in such a way that anyone can pick it up and then immediately start using it. Paolo brings out the core of how simple metaprogramming can be in this book, and that is no easy task.""--Ola Bini, ThoughtWorks

    About the Author

    Paolo Perrotta has more than ten years of experience as a developer and writer. He worked for domains ranging from embedded to enterprise software, computer games, and web applications. These days, Paolo coaches agile teams for Yoox, a large Internet fashion shop, and teaches Java to developers throughout Europe. He lives in Bologna, Italy, with his girlfriend and a cat. He loves Ruby.


    What Other Items Do Customers Buy After Viewing This Item?


    Customer Reviews

    There are no customer reviews yet on Amazon.ca
    5 star
    4 star
    3 star
    2 star
    1 star
    Most Helpful Customer Reviews on Amazon.com (beta)
    Amazon.com: 4.6 out of 5 stars  36 reviews
    53 of 54 people found the following review helpful
    5.0 out of 5 stars Should really be titled "Thinking in Ruby" April 8 2010
    By Peter M. Goldstein - Published on Amazon.com
    Format:Paperback|Verified Purchase
    I've read quite a few Ruby books and this is one of the best. The author very effectively does a number of things in this book:

    i) Highlights the conceptual differences between Ruby and other currently popular languages

    ii) Shows how those conceptual differences are expressed in programming constructs by walking the reader through a number of small but realistic example problems

    iii) Reviews internal details of a number of pieces of real-world software (most notably Rails) to show how the authors of these packages use the techniques he describes to solve their problems

    iv) Provides a number of helpful and applicable guidelines on how to 'think in Ruby'

    v) Generates a GoF style catalog of implementation patterns

    vi) Skewers the notion that 'metaprogramming' is any different than regular programming

    After finishing this book I have a real appreciation of the techniques the author describes, and how they can be used to write flexible, powerful, and maintainable software. Before reading this book I was aware of a number of these techniques, but I didn't necessarily understand how they could be effectively used to solve real problems. Now I do. The book truly covers how to think in Ruby - how to naturally solve problems in Ruby, as opposed to adapting techniques commonly used in languages from the C/C++/Java lineage.

    The one major criticism I had of Metaprogramming Ruby was the 'fanboy' tone that permeates a lot of the text. Frequently the author seems more interested in getting you to agree with him that Ruby is great than in conveying the concepts being discussed. There are a lot of gratuitous slams of other languages (especially Java) that were frankly unnecessary and distracted from the book. Had the tone of those comparisons been a little more highbrow and a little less schoolyard, this would have been a better book.

    Overall rating: 4.5 stars
    22 of 23 people found the following review helpful
    3.0 out of 5 stars I have a love-hate relationship with this book. Dec 18 2011
    By Katrina Owen - Published on Amazon.com
    Format:Paperback
    Metaprogramming Ruby puts non-obvious and non-trivial content together into a coherent whole.

    The technical content of this book is very, very good. The book explains much of the basic structure of ruby (object model, class definitions, blocks, method lookup, etc) in such a way that common idioms that I have previously used without understanding their underlying mechanisms now make complete sense, and my understanding and command of some of the more powerful features of ruby have greatly improved.

    Real-world code examples drawn mostly from ruby gems are included, and these are excellent illustrations of ideas presented.

    As with many technical books, many of the non-real-world code examples are extremely simple and contrived. For the most part, this is acceptable, but there are instances where the tests/sample output provided for exercises were incomplete -- in the sense that you can come up with a flawed and incomplete piece of code which will still make the test pass.

    The thing about this book that drove me up the wall is the insipid story line: You have started a new job, and you have an incredibly chirpy and annoying coworker with whom you must pair program, and who lectures you about the ruby object model, etc. The dialogues are awful; Bill The Asinine Coworker "exclaims" and "shouts" much like characters in bad romance novels supposedly do. The text is littered with irrelevant and distracting details about sipping coffee and grabbing keyboards and ignoring whiteboards in favor of napkins.

    This is possibly the best exposition of the ruby object model available, however, so if you are frustrated by the piecemeal information available on the web and you don't have a chirpy co-worker by the name of Bill to mentor you, I would highly recommend reading this book.
    28 of 31 people found the following review helpful
    5.0 out of 5 stars Short and sweet March 3 2010
    By Matt Darby - Published on Amazon.com
    Format:Paperback
    I have a BS and MS in Computer Science, and worked with Ruby professionally for two years. I've read every major Ruby book on the market. This book brought me to the next level. If you dig Ruby or Rails and are a programmer looking for the next step, this is it.
    14 of 14 people found the following review helpful
    5.0 out of 5 stars Essential to Appreciate Ruby's Power April 8 2010
    A Kid's Review - Published on Amazon.com
    Format:Paperback
    I have been programming in Ruby for almost two years, and I have done some Ruby on Rails. With this book I finally begin to understand what Ruby was doing for me all along -- especially when it's running on Rails. Ruby was easy to use like I've used many other languages, but now I understand how unique and powerful Ruby really is. And I'm sure that I will begin to take advantage of that extra power.

    Also: the book is well written and organized. I especially like that whenever a particular topic is mentioned a page reference also appears. This makes it easy to do a quick review of the topic before going further, like "Hook Methods (181)."

    This book will not sit idly on my shelf. I'll be going back to it again and again for review and further mastery of the topics.
    16 of 19 people found the following review helpful
    5.0 out of 5 stars Fascinating adventure into the world of Ruby, Friendship, and Tragedy April 5 2011
    By jgoggles - Published on Amazon.com
    Format:Paperback
    This book offers an amazing look into the beauty and power of Ruby. It has made me a better Rubyist. It is accessible and entertaining. Not only is the use of a second-person narrative throughout astonishingly well executed, but the character development is pristine as well, Bill's in particular. In the course of one week we see Bill evolve from strange, overbearing know-it-all coworker to mentor, friend, and even intrigued learner. But that's when things get interesting and take quite a turn in the story. I don't want to give anything major away but Bill sleeps with your wife at the end.

    Look for similar items by category


    Feedback