4 ms·
I feel this comes from a frustrating kind of purism, like xp, which is a nice thought experiment but is completely unworkable in the real world. The real-world
by eterm 8y ago
I feel this comes from a frustrating kind of purism, like xp, which is a nice thought experiment but is completely unworkable in the real world.
The real-world consequence of this would be people not writing tests until after they are feature-complete so they don't risk losing work.
- ryanisnan 8y agoErm, what about test coverage? You could prevent committing untested code.
- henryfjordan 8y agoYou could couple this with code-coverage requirements, like coverage must always increase or stay level with every commit. That can still be gamed but at least it's harder and more obvious to other devs
- groestl 8y agoPeople would just write tests which can never fail, and (in the best case) add the assertions in the end, one by one.
- was_boring 8y agoSpeaking of tests that never fail... I've seen contractors hand over code exclaiming they've met the 75% test coverage required by SalesForce's platform but never actually asserting anything.
- Ace17 8y agoThis can backfire in unexpected ways. Don't forget that deduplicating tested code decreases the coverage ratio. You don't want to forbid this, though.
- nostrademons 8y agoThe author founded XP. Anyway, I suspect he's proposing it not as a serious methodology, but as a thought experiment to spur you into how you can make your changes smaller, simpler, and more atomic.
- superfrank 8y agoYou are correct, he's not proposing it as a serious methodology. He ends the article by saying > I don’t suggest you try “test && commit || revert” because it’s better than what you do now. I suggest you try it because: > - It’s cheap. > - You’re bound to learn something.
- jdlshore 8y agoDisagree about XP being unworkable in the real world; I've done it on multiple projects at multiple companies. People's preconceptions about what XP is are unworkable, sure, but that's on them.
- NeedMoreTea 8y agoThe times I found XP unworkable in the real world all fit the scenario of "We're doing XP, but not pair programming because that's silly, we don't do x and y either because those are impractical." The few projects that fully embraced it worked surprisingly well.