3 ms·
TDD doesn't preclude one from doing whiteboard design and thinking things through. It just asks that you write a test case before you write your code. It's s
by parasubvert 13y ago
TDD doesn't preclude one from doing whiteboard design and thinking things through. It just asks that you write a test case before you write your code.
It's sort of like enabling the feedback of a REPL to any language. Why wouldn't you write a test case to test the O() access time of a function ahead of time? Or test the memory layout of a data structure?
Seems to me those are great examples of tests I would write to help me flesh out the results I want, before I go and implement it. They help one specify _exactly_ what they want.
- dragonwriter 13y ago> Why wouldn't you write a test case to test the O() access time of a function ahead of time? Because asymptotic limits are a lot easier to verify analytically than empirically. You can, of course, easily test the actual performance characteristics under specific conditions, but that's different than testing the asysmptotic limit. Of course, TDD doesn't preclude analytically verifying those things that can be analytically verified.