Among supporters and detractors of XP, the debate rages whether up-front design or incremental design combined with refactoring is the optimal method of implementing systems. This chapter argues that neither method is clearly better in every circumstance. Instead, the experienced software engineer uses a combination of both methods. This chapter also argues that the "cost of change" curve presented inExtreme Programming Explained[Beck2000] does not replace the classic "cost of fixing errors" curve presented by Barry Boehm in [Boehm1981]. Instead, XP is a method of attacking the costs described by this curve.
XP, as an incremental method of software engineering, is only applicable in circumstances where the cost of implementing functionalities does not grow rapidly as development progresses. Some heuristics and examples for deciding when to use each technique are presented.