DEV Community

Discussion on: The best time to write tests

brburzon profile image
Brandon Burzon

Thanks for sharing!

I have been bit by trying to force my new functionality into strongly coupled code before which caused me to introduce a non trivial bug when trying to save time (thankfully, it wasn't deployed to Production).

After reverting the commit, I restarted by refactoring the code first to make it easy to introduce my change and then adding my feature.

It turned out to be faster than my first attempt since TDD allowed me to catch potential bugs early and avoid spending most of my time debugging 😅

siddharthkp profile image
Sid Author