Re:Unit Testing: Is There Really Any Debate Any Longer?
by arctangent on Wednesday September 12, 2012 @11:38AM
(#4511138)
This is what I was alluding to when I mentioned that it's not obvious when tests should be written. It simply isn't practical to write them as part of a quick prototype (or any other rapid iteration). But writing them at the end of a project may also be difficult due to the need to move on to something else. The same argument holds for things like documentation...
After a few successful demos you're given an tight deadline to "finish things", so you have no choice but to polish up the prototype and ship it.
The moral: code that was written to be thrown away often isn't. You can still write code quickly, and take shortcuts (such as skipping tests), but recognize that you'll probably be working on that code for a very long time and may regret your decisions later.