Chapter 5 . Unnecessary Complexity


Chapter 5. Unnecessary Complexity

Exercise 12. Today versus Tomorrow

FORCES THAT MAKE IT BETTER TO DESIGN FOR ONLY TODAY'S REQUIREMENTS TODAY

FORCES THAT MAKE IT BETTER TO DESIGN FOR TOMORROW'S REQUIREMENTS TODAY

It's cheaper for now to do only today's design.

We're not committed to requirements evolving in a particular direction (so we don't have to backtrack).

We're not required to maintain tomorrow's code today.

Code is easier to understand when it does as little as it needs to.

It may be easier to fully flesh out the class while it's still fresh in our minds today.

Developing for tomorrow's needs may help us understand today's needs better.

It all comes down to a bet: on average, will it be cheaper to do only today's design and deal with tomorrow when it comes, or do the generalized designs pay for themselves by being right often enough?

Gordon Bell, one of the great hardware designers, once said, "The cheapest, fastest , and most reliable components of a computer system are those that aren't there." (Quoted in Bentley, More Programming Pearls , p. 62.)




Refactoring Workbook
Refactoring Workbook
ISBN: 0321109295
EAN: 2147483647
Year: 2003
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net