Hacker News new | ask | show | jobs
by claudiusd 3610 days ago
TDD is a technique for accelerating delivery by focusing your coding efforts on only what is necessary to deliver a feature (i.e. pass the tests). You get high test coverage as a result, but having to maintain a large automated test suite has its downsides.

It sounds like the problem has more to do with lowering defect rates, which TDD can certainly help with, but so can pair programming, code reviews, and QA testing.

If TDD is your goal and you know how to use it well, just use TDD to improve your own process and throw away your tests before you deliver (or stash them locally). Seems silly, but you don't want management breathing down your neck for writing all of that "non-valuable code". Wait until they notice how productive you are then show them how you do it. They'll be like, "why the hell aren't you committing those tests?" Maybe you'll get a small slap-on-the-wrist, but from then on you'll have leeway to spread the TDD practice.