SimpleDesign

Implement the current requirements in the simplest way possible

Definition

Implement the current requirements in the simplest way possible.  The XP practice has three specific guidelines or directives toward this end. 

1)    Consider the simplest thing that could possibly work.  Incorrect assumptions on what technology is necessary can change a 3 day task into a 3 month project.

2)    YouAren’tGoingToNeedIt

3)    Once and Only Once.  Do not duplicate code.  If the same code is needed in two places, put it somewhere (e.g. a function or base class) that it can be accessed from both places.  If two things are similar, there should be some abstraction that unifies them.

Source

 

Discussion

This description is of the XP practice, and assumes cost of change is minimized, that ConstantRefactoring is used.  However, one should still consider the simplest thing that could possibly work, and strive as far as possible not to allow duplicate code in areas where modifying the code is permitted.

Contra-Indications

Simple Design requires a capability for ConstantRefactoring or some alternative approach so that changes are cheap and easy to make.  There needs to be some overall vision such as that provided by SystemMetaphor or possibly a Domain Model so that design converges.  There should be a close review such as that provided by DevelopingInPairs in order that the design is simple rather than stupid.