He said: “I asked all my friends, and none of them likes TDD”.
This one I haven’t heard before, although I suspect I should have at some point. Like any practice, TDD has a social side.
I told him to find new friends, which he conveniently ignored. He then continued: “We ,developers, want to move forward, build software. TDD slows us down”.
That’s true, TDD slows us down, because it forces us to think, which is important in software.
Why is that something that needs explaining? Over and over again?
Wash Your Hands
Uncle Bob uses the “doctors washing their hands” metaphor for explainin TDD. Today it’s common place for doctors to do wash hands before handling patients, but was that always the case? It’s not like all doctors, all over the world, one day switched to washing their hands. It was a continuous process, that probably reached a critical point, when doctors realized that it’s good for their patients.
Of course, there was opposition to the idea. You’d probably hear “I need to take care of my patients, this hand-washing thing just slows me down”.
Yet hand-washing has crossed the chasm.
What would it take TDD get to a “washing hands” status? Thou must count to three.
Three shall be the number of the counting
When people die, that’s a big impact. When people are saved, and live, and catch fewer diseases that too is a big impact. When we see the corrolation (or let’s say, we’re convinced that there is one), we see motivation to change. However, we don’t always see the impact of getting quality software out the door. So we need to be educated.
It’s leadership’s job to relate this correlation. Not only that, management needs to understand the business impact of technical debt, so developers make sure the code provides the needed business benefits. Those benefits also translate to regular working expectations.
Next is regulaton. I’m sure hand-washing opponents wouldn’t just jump on the ship without proper external incentives. As in, “you do it, or you won’t work here again”.
What’s the chance of that happening with software practices? Pretty low. As I’ve written before, I believe the software business is going to be regulated at some point, and badly at that. I don’t see how regulating software development techniques will actually make them work. For example, regulated TDD? First the regulator needs to understand it, then it needs way to see developers are confirming to it. Coverage you say? Good. And then the gaming is on. I don’t see that’s happening soon, though but we’re getting close.
Regardless, external forces saying “do this or you don’t work again”, can have that affect.
- Social pressure
That means swaying the crowds toward good development practices. It is taking place, although at a glacial speed, that is really hard to see. Without proper education and/or regulation, developers are incentivized to build quickly, regardless of quality. Without proper training that quality is part of the work, this ain’t gonna happen. Developers will continue to say “TDD slows them down”. The more people saying that, the less people will pick it up and run with it.
So the happy path to “TDD taking over the world of software” requires internal, external and social incentives.
Aligning stars is easier. Or maybe it will just takes a very long time. And we need to work at it, doing the hard work, day in, day out.
Actual hard work.
Nah, nobody likes that.