4 ms·
This, unfortunately and hilariously, rings quite true. Not to open the test-driven development can of worms, either, which seems to be part of the OP's dispiri
by zebraflask 6y ago
This, unfortunately and hilariously, rings quite true.
Not to open the test-driven development can of worms, either, which seems to be part of the OP's dispiritment ... but I've yet to see any scenario where TDD was not a massive waste of time.
- baggachipz 6y agoThank you, it feels like heresy whenever I say that... like it's one of those grim realities you're not allowed to point out. I'm all for automated testing in a sane manner, but TDD is so rigid and over-engineered. "Can't fail your TDD tests..." taps forehead "If there's no code to test"
- p_l 6y agoDepends. Is it the crazy religious TDD where you somehow are supposed to write tests before writing any code, despite the fact that you're making exploratory code? TDD works best when you have figured out what to test for, unfortunately more than once I encountered people who wanted to write tests for exploratory code, in rigid TDD like environment. (sidenote: It's possible to do kind-of TDD with exploratory code in certain environments - essentially, you start writing code from top to bottom and fill in missing bits using debugger all the time)
- rileymat2 6y agoI have only toyed with it on personal projects. But that is kind of a misrepresentation from what a lot of them propose. You typically will not be writing more than a part of a test, just enough to get it to fail, before writing the code. It can work good as a built in driver to exercise the code you are trying to write as you go. It also gives you a chance to test the interfaces to the code you are making as you go for usability, because you are coding to it. There are actually some really interesting videos demonstrating the RED/GREEN/REFACTOR cycle they propose.
- p_l 6y agoThat's why I mentioned "crazy religious". I've seen it got that far in real world, which warps TDD to the point where a good technique is thrown away by people disgusted with the pushed purity message. It doesn't help that often, even otherwise good material about TDD, didn't really talk about cases like exploratory coding - working from messing around in a REPL, formalizing the code into TDD skeletons, is pretty powerful method, but isn't (wasn't?) mentioned often when I learnt the most about TDD (granted, that was 2005-2015)
- UK-Al05 6y agoTDD excels at messing around with the design of an API. As your basically exercising the API through the tests, your seeing how nice it is use.