4 ms·
TDD is often praised for its documentation effect, vital for teams working on big projects with heavy moving pieces. But I've found TDD to be essential in proje
by danso 13y ago
TDD is often praised for its documentation effect, vital for teams working on big projects with heavy moving pieces. But I've found TDD to be essential in projects in which I'm the main or sole coder. OftenI can't finish every piece of a project in a single day, so I'm switching context and code bases quite frequently. TDD has been the only way I can keep on task, knowing exactly where I left off by running the suite. It also not only forces me to write more modular code, but it abets the reuse of code because if a module works in one project, I can extract it and put it in the others and can use TDD to immediately see if that raises issues.
Even for side projects, TDD has been essential...it's so easy to let side projects die especially if you've forgotten where you left off. With some TDD, I can discipline myself to at least write a few tests today if I can't muster the energy to do real code for the project...and often that little push ends up with lots of code being written....just as you can go on a five mile run as soon as you motivate yourself to get off the couch