An Observation about TDD
To me, developers that are not applying TDD practices during their day-to-day job always seem more in a hurry than developers that do apply red-green-refactor. In their hurry, they’re the first to cut corners and start making messes while they rush to their goal. A while ago it dawned to me why that is. They subconsciously want to get feedback as soon as possible about the code they’re writing. They cut corners and generally mess up their code in order to prevent spending those extra hours and days to keep things clean. Constantly refactoring and cleaning up their code is restraining them from having the feedback they so desperately want.
Humans are in fact feedback junkies. We constantly want to know how we’re doing what we’re doing. I actually wrote a blog post about this a couple of years ago.
Since I adopted TDD as a discipline, I tend to feel less pressured which results in me taking the time to continuously refactor the code I’m working on, trying to keep everything clean. Why? Because I known that the code I wrote a minute ago works. The tests I write constantly give me a shot of feedback so that I’m constantly hooked.
Just an observation …