DEV Community

Discussion on: What was your TDD aha moment?

Collapse
 
gypsydave5 profile image
David Wickes

So my 'aha' moment is a bit of an outlier, because I leaned to code using TDD! It's weird for me to think about writing code without there being some sort of expectation about what it's going to do - even if it's just 1 + 1 - I expect that to do something even as I write it.

Tests are those expectations written down, and TDD is writing those expectations first.

I'v written a lot of bad tests, too coupled, too slow, - I'm no expert, but I'll always try and write a test first.