News for hackers. Stuff that matters.
Re:Unit Testing: Is There Really Any Debate Any Longer? by bryanlarsen on Wednesday September 12, 2012 @11:22AM (#4511063)
In my experience, a prototype is never just a prototype. You crank out a prototype in an hour to demonstrate something. Then somebody says "add this and then we'll show it to the boss.". Your boss says "that's cool, add this and this and this and then we'll demo it to a potential customer". You do so, then play test the demo a few times, uncovering scenarios that need hardening. You demo to the customer, and they ask a few questions meaning that you add a few more features to the prototype for the next demo. Rinse and repeat.

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.

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...