by Liz Sedley


Recommended Reading

Rough Upfront Design

XP recommends that you don't do too much upfront design. Instead it suggests three practices which allow a rough idea of how a story will be implemented to be turned into elegant code.

  1. YAGNI (You ain't going to need it) means just design / code / test for today. Don't worry about the future. This is counter intuitive and against what a lot of people have been taught. To introduce this way of working perhaps encourage the team not to look further ahead than the end of the iteration. As they have more success and grow more confident encourage them to shorten their look ahead horizon.
  2. Do the simplest thing that could possibly work. Typically developers love designing and coming up with powerful elegant solutions. But keep reminding them to do the simplest thing and the team will make far more progress. TDD can help here.
  3. Emergent design. This is one of the more controversial practices. But like the previous two it is very effective at improving team effectiveness. What a lot of people miss about emergent design is how much refactoring it requires. Continual refactoring to remove duplication creates elegant and powerful designs. Critics of this practice often think of refactoring is something that is a lot of work and done at the end of a feature. That style of refactoring won't work with emergent design. It needs to be done frequently throughout the day. Write a failing test. Fix the failing test. Refactor. It is this cycle happening many many times a day which causes the design to emerge.