Hacker News new | ask | show | jobs
by joeldidit 4432 days ago
I strongly believe software needs to be tested, and that tests need to be written to avoid repeating yourself (or screwing yourself over) later on, but trying to write such tests using a TDD approach absolutely destroys my ability to think laterally and creatively and come up with new effective approaches to problems.

If I'm working on something that I've already done, then TDD may work alright, but if I'm doing that rather than searching for some library or code I've already written, then I'm failing already. If it's something simple, then TDD is also not a problem, but at that point I'm really wasting my time.

TDD stunts design, thinking, and refinement ability, and only works when there is nothing left but execution. In my mind, as long as the tests get written (and obviously makes sense to write them at around the time the function/method/class is written), then I'm alright. Also, I usually don't know what a class will look like until I've written it, used it for a little bit, tested it manually, etc. If I were to write a test for it prior to this, then I'd be wasting time. I don't know how people are able to write these tests, and separate everything out beforehand. I'm not comfortable or satisfied with what I've written, until I see it, play with it, test it manually, then use that data to go back and smooth out and refine what needs to be.

I'm wondering if this is an MBTI judger/perceiver issue, with judgers being more able to wire their minds into that of a TDD'er, while perceivers see it as fundamentally problematic.