DEV Community

Discussion on: A note from a TDD zealot

Collapse
 
mbjelac profile image
Marko Bjelac • Edited

Writing tests before the code its just one of the steps. In many ways the third step and the mostly un-mentioned zeroth step are crucial to a working TDD process:

  • 0 - think - what is it that I want?
  • 1 - write a failing test
  • 2 - make it pass
  • 3 - refactor - how to make this code (and tests!) more readable?

The trouble is, IMHO both steps 0 & 3 require a solid knowledge of software design - SOLID, DRY, YAGNI, 4 rules of simple design, etc. Having a grasp of those before trying TDD is a big help (like it was in my case).