4 ms·
Of course tests costs time. You are often writing twice the amount of code and there is the amount of time it takes for most CI systems to run all of the tests
by threeseed 9y ago
Of course tests costs time. You are often writing twice the amount of code and there is the amount of time it takes for most CI systems to run all of the tests (often tens of minutes, but I've worked on hours).
But the reason we do it is because it increases quality.
- snowwrestler 9y agoI think the theory is that increasing quality will save time in the long run via fewer regressions and bug reports. Making that math work, though, seems to depend on the idea of some sort of future crisis state, where normal development is slowed way down. (You'd need to avoid a big slow down in the future, in order to balance out the continuous extra time given to testing.) Does such a crisis lurk in the future of every development effort? Hard to know. It's certainly not the only way technology projects fail. Plenty of products have passing tests but fail to find customers.
- dangero 9y agoExactly. It’s likely for some projects every line of code you write will in the end be a complete waste. TDD is only worth the trouble assuming any of the project succeeds. If not it may just be more wasted effort. For this reason I think a case can be made to skip TDD on MVP traction tests in some cases. A friend of mine just had his startup acquired, so his startup was an above average success and he told me 80% of what they built ended up getting scrapped.
- virtualized 9y agoThe problem is you don't know which 80% will get scrapped.
- dangero 9y agoI don’t see this as a problem as long as you make time to add tests later once you are convinced the code will be kept active through user traction.