Writing Tests Saves Time

The biggest objection I hear from developers that aren't on the TDD bandwagon is that writing tests takes too much time.

Yes, writing tests takes time. Getting used to the practice requires an investment of time to become proficient, no question. Even with well-versed TDD practitioners, it takes time to write the additional code. It also takes time to run the test suite throughout the day.

However, let's think about this a little more deeply. As Dr Curry, my favorite Applied Mathematics professor from college, used to say, "That's a first level response Alex, you can do better." Sure, it takes more time, initially, then that time repays it self on every change of the software from that point forth. With a trusty test suite, you save time on every new feature by not having to re-check previously working code. You free yourself up to confidently refactor, the point of which is to make future change easier, and save time down the road. The larger the codebase, and the longer that codebase will live, the more dividend you receive by having a worthy test suite.

I don't know of any professional developers who don't test their software. Some simply automate it, and some click around the app manually. Which method sounds like a waste of time?

Do yourself a favor, save your future self a huge amount of time, and invest in your test suite.


Written by Alex Brinkman who lives and works in Denver, but plays in the mountains.