DEV Community

Discussion on: Does TDD slow you down or help you go faster?

Collapse
 
spronkey profile image
Keith Humm

TDD in my experience involves a short term time cost as an investment to improve long term time. That is, writing your code with TDD is usually slower (although maybe not as much as one would think, I find TDD tends to suggest code designs reasonably quickly), but maintaining your code becomes faster.

There are some places where TDD doesn't make sense, although in my experience those are almost always limited to places where you are integrating with an existing tool or library that you can't easily test around.

It's also important to write good tests, not too brittle, testing against interfaces and not concrete behaviour, so that the test suite itself doesn't become a source of maintenance headache!