3 ms·
I have committed professional suicide on more than one occasion by voicing my doubts about the whole TDD and worshipping at the alter of "unit testing school".
by kops 13y ago
I have committed professional suicide on more than one occasion by voicing my doubts about the whole TDD and worshipping at the alter of "unit testing school".
TDD works when problem is well defined but complicated e.g. a datetime library. TDD is a tool to get the grunt work out of way and take care of occasional forgetfullness/regression, but beyond that it is a pile of code that becomes more and more unmaintainable with each passing day. I have seen unit testing code which grows into a snowball over a period of time and people wasting their time to maintain tests that they don't know a thing about. IMHO you shouldn't write a single line of code if you can get away with it e.g. if you need to write unit tests for your add(int i, int j) then I guess you have bigger problems to solve.
I always take comfort in something a colleague said long time ago while coming to my rescue in one such outburst "are there any unit tests for *nix, vi, emacs etc, the kind of software I dont see crash very often"
Disclaimer: My TDD worshipping friends seem to do better in their professional lives, which I will shamelessly put down to industry trends/religion rather than the true merits of the methodology ;-) It suits me better...
- ratsbane 13y agoI think I've had the same experiences and made the same observations as you. Also, +1 to this: "...you shouldn't write a single line of code if you can get away with it."