5 ms·
You're essentially in prototyping phase. Inevitably you'll have to discard whole chunks of code, because your understanding of requirements/concept space change
by varjag 6y ago
You're essentially in prototyping phase. Inevitably you'll have to discard whole chunks of code, because your understanding of requirements/concept space changes. Then you have to discard both your code and your fine tests, wasting ~2x more time.
- marcus_holmes 6y agoYes, but writing tests isn't a huge cost if you're used to it. And once I've discarded that huge chunk of code, I immediately know what else I broke, rather than having to find it by testing manually. If I have to write 100 lines of code to implement a feature, it really doesn't take me twice as long to write another 100 to test it. In most cases, writing the test alongside (or even before) the code helps with writing the code. I'd say writing a test adds maybe 25% to the time. Knowing a year later than that code is still good, because that test still runs successfully, is easily worth that 25% Of course I'm not saying 100% code coverage is worth it. Just the critical bits.
- burnthrow 6y agoThoughts of "a year later" and MVP mostly don't mix. Agreed about coverage.