DEV Community

Discussion on: Tell me a coding confession

Collapse
 
andrerpena profile image
André Pena

TDD only comes natural to me when it actually improves my productivity, which happens around 10% of the time.

TDD is helpful when you are writing pure functions which the result is predictable. For example, if you are writing a function that uses Regex to transform a string, it is much easier to TDD it until it works than running your entire system on every change until it works.