Serious quality improvements require investments right now, while promised benefits wait somewhere far in the future.
Cleaning a messy code base will allow your team to speed up, but first, its velocity will drop, consumed by all the refactoring work needed. Implementing TDD will make adding new features a breeze, but first, time must be spent to configure necessary tools and to learn.
This makes people uneasy.
To justify such up-front costs, management often demands the hard numbers. The questions are being asked:
- how much faster you’ll become after 3 months of refactoring?
- how much refactoring do you need to become 50% faster?
- how much time will it take to fully clean-up your code?
Unfortunately, although it’s hard to disagree that clean code and good engineering practices are essential for high productivity, it’s almost impossible to give precise answers to such questions.
But are these answers really necessary?
Let’s compare it to exercising. It’s hard to disagree that to become more fit you need to exercise regularly – and that it’s good for your health. But consider the following questions:
- how much faster will you become after 3 months of jogging?
- how much do you need to jog to become 50% faster?
- how much jogging do you need to become fully healthy?
Can you answer any of these questions? Don’t they sound ridiculous to you? What does it even mean to be “fully healthy”?
Is your inability to answer these questions precisely a valid reason to not exercise?
For many people it is. Exercise takes a lot of time and effort, and the exact gains are impossible to estimate. What’s even worse, the gains (or the bad consequences of not exercising) wait somewhere far in the future, while the “costs” are right here and right now.
Therefore, a lot of people do not exercise at all.
Do you really want to be one of them?