Chapter 13. Picking the Right Class with a Factory

My high school physics teacher was one of those extraordinary educators who could make even the driest of subjects come alive. It seemed that by about the second month of the school year, all of us in his Introduction to Physics class had forgotten about getting a decent grade and had moved on to a higher goal: We all wanted to do good physics. "Doing good physics" involved a lot of things—I recall careful experiments and a lot of thinking were involved—but there was one thing that a good physics student needed to avoid at all costs. There was to be no "hand waving." Hand waving, as it was defined in my class, involved glossing over some key detail, fudging some equation, or simply assuming ...

Get Design Patterns in Ruby now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.