Skip to main content

Relocate for Reuse

Article

Relocate for Reuse

Code Craft

Article by Mike Clark | Comments: (0) | Fri, 10/14/2005 - 12:00am
Summary:

All code is not created equal. Learn from a master of the craft how to spot bad code and mold it into good. This month, Mike Clark explains how moving code from one class to another to make it reusable can save you time in the long run.

When we last left our code, it was trying to tell us a secret. This isn't that uncommon. Code wants to be responsive to change, and when it doesn't get its way it tries to warn us. But often we aren't listening because it's too easy to plow ahead to the next feature. Unfortunately, in our haste we miss a golden opportunity to improve the code, which is actually the design. And although the consequence of ignoring the code isn't immediately noticeable, it quickly starts to drive up the cost of change.

About The Author: Mike Clark

Mike Clark is the author of Pragmatic Project Automation (published in 2004) by The Pragmatic Bookshelf, editor of PragmaticAutomation.com, and the creator of several popular open source tools. Mike helps teams build better software faster through his company, Clarkware Consulting Inc.