3 ms·
The "design up front" in TDD is hidden in the write code / refactor steps. The pure TDD framework is bogo-sort for code: start with no code, bang randomly on ke
by JulianMorrison 13y ago
The "design up front" in TDD is hidden in the write code / refactor steps. The pure TDD framework is bogo-sort for code: start with no code, bang randomly on keyboard, test if it passes, if not then repeat. Obviously something sensible has to go in that gap.
What it usefully replaces is bikeshedding. It lets you try out the design you have in your head, in bite size pieces.
- mattvanhorn 13y agoIf "the design in your head" involves classes or functions, or any programming language dependent ideas, then it you are not doing TDD. I call this style test-first, or pseudo TDD. But if the design in your head is an algorithm that can be expressed in natural language, then TDD will let you take that and make a loosely coupled, maintainable program out of it. Good post on the difference here: http://cumulative-hypotheses.org/2011/08/30/tdd-as-if-you-meant-it/ http://cumulative-hypotheses.org/2011/08/30/tdd-as-if-you-me...