Paul Wallace wrote:I think it is more important to iterate quickly between testing and development that to over engineer the testing up front.
Paul Wallace wrote:Hi Marco
Thanks for your response, I think you nailed it when you said it "depend on how you actually practice TDD". I think it is more important to iterate quickly between testing and development that to over engineer the testing up front.
To me, being LEAN means always striving to find the optimal way of working, striking be balance between preparation and getting things done.
- write the minimum tests required to allow you to develop your solution
- iterate until you have enough test coverage to verify your solution.
Paul Wallace wrote:What if you realize, to be more complete, the isPrime() API had to change to take a radix to interpret the number system being used. Lets say the change to the api would be:
boolean isPrime(int value, int radix)
If you had written an exhaustive set of tests, you have more test refactoring to do that I would have if I'd only written the essential tests.
Obviously I am really stretching the example to make my point. And my point is not that unit testing or TDD are wrong, on the contrary, it's that the emphasis should be on quick iteration of the write test - code - execute -refactor cycle in order to be as LEAN as possible.
Perhaps to summarize, to be LEAN when practicing TDD the emphasis should be on iteration, not completeness of test coverage at the start of development.
Many will say this point is obvious, I've seen otherwise.