You are previewing Practical Object-Oriented Design in Ruby: An Agile Primer.

Practical Object-Oriented Design in Ruby: An Agile Primer

Cover of Practical Object-Oriented Design in Ruby: An Agile Primer by Sandi Metz Published by Addison-Wesley Professional
O'Reilly logo

Chapter 9. Designing Cost-Effective Tests

Writing changeable code is an art whose practice relies on three different skills.

First, you must understand object-oriented design. Poorly designed code is naturally difficult to change. From a practical point of view, changeability is the only design metric that matters; code that’s easy to change is well-designed. Because you have read this far it’s only fair to assume that your efforts will pay off and that you have acquired a foundation from which to begin the practice of designing changeable code.

Second, you must be skilled at refactoring code. Not in the casual sense of “go into the application and fling some things around,” but in the real, grown-up, bulletproof sense defined by Martin Fowler ...

The best content for your career. Discover unlimited learning on demand for around $1/day.