4 ms·
I have to agree with this. The reality is that testing everything before you even write it locks you in, emotionally, to a certain design. ("If I clean up thi
by jrockway 16y ago
I have to agree with this.
The reality is that testing everything before you even write it locks you in, emotionally, to a certain design. ("If I clean up this module, the bar goes red! Ahh, fuck it!")
You end up writing the code to make your tests pass, not the code to solve your problem in the best way. Without any iteration during the design phase, you're not going to get the right design. At that point, you don't care if you get the right answer, you care that you have the framework for getting the right answer. Once you like the design, then you can worry about making sure it works (sure, use TDD for that).
Now, the reality is, people that are forced to use TDD weren't going to come up with a good design anyway, so at least they have some idea that their code works and can change it would losing too much sleep. Fine. But when you aim for 75%, you get 75%. I like to set my sights higher.
(I use TDD approximately never, and I have hundreds of thousands of lines of code in production that never give me a headache. They are tested, but they were designed first, not tested first.)
- wlievens 16y agoSo would "design -> test -> implement" work for you?