|
|
|
|
|
by wyqydsyq
1831 days ago
|
|
> I find them useful as I write code because they allow me to state my intention (in plain English), translate it to code, then compare statements and see how well I’ve achieved my goal. IMO this is exactly what unit tests should be used for. Replace these comments with unit tests and you're doing TDD. The practical difference is by stating your intention as unit tests, you not only verify your initial implementation is correct but also that any future changes remain correct. |
|
Do test-driven development, but consider deleting these internal tests once you have scoped out how your initial implementation should work.