4 ms·
I think there is a middle ground. I absolutely agree with the author that test driven development sucks when learning. But that's not to say never write tests
by rauljara 15y ago
I think there is a middle ground. I absolutely agree with the author that test driven development sucks when learning. But that's not to say never write tests while learning. There's a huge different between writing some tests and test driven development.
When learning, I often find it's most helpful to just plunge in, then when something isn't working, go back and write tests to try and hone in on the problem. Then more tests to make sure my solution works for edge cases. I find this is helpful even when I'm not learning a new language, and just when I'm trying to do something new enough that I can't see the outline in my head when I start.
It's odd how sometimes TDD helps you break down complexity into manageable chunks, and sometimes it front loads complexity, and forces you to solve problems you aren't capable of handling quite yet. Whenever TDD is making me bang my head, I tend to skip it for the moment and come back to it when it's helpful again.
- Argorak 15y agoI have the following rule of thumb: I write the test in the moment when I know for sure how an Interface/Feature should behave. If i know it before the implementation, I write the test first. Most of the time, I start programming and write tests for everything that gets nailed down. If I am in completely new ground, I start playing and do not test beyond "run and see".