← Blog

Refactoring Is Procrastination in a Lab Coat

42% of dev time goes to technical debt. Most refactoring doesn't reduce that. It just moves it around while delaying real work.

42% — Developer time spent on technical debt rather than new features
42% Developer time spent on technical debt rather than new features CAST Research Labs, 2021

Refactoring has a good reputation. It sits comfortably alongside 'clean code' and 'best practices', phrases that nobody argues against in a meeting. The problem is that reputation hides a real cost: time spent restructuring existing code is time not spent on new features or fixing bugs that users actually encounter. CAST Research found that developers spend around 42% of their time dealing with technical debt. That number does not go down automatically when you refactor. It goes down when you focus the refactoring on the right things. Refactoring can create an illusion of progress, introduce regressions if tests are incomplete, delay work that directly affects customers, and produce over-engineered abstractions that increase complexity without increasing capability. The test for any proposed refactoring is two questions:

  • Will it measurably increase development speed?
  • Will it reduce the number of critical bugs that currently have no workaround?

If the answer is yes to either, the work is likely justified. If the answer is no on both counts, meaning the codebase will feel cleaner but ship at the same rate with the same failure modes, then what is being proposed is not delivery. It is comfort.

Myth: Refactoring is always a good investment in the codebase — Reality: Refactoring that doesn't measurably speed up development or eliminate critical bugs is an illusion of progress. It feels like work but ships nothing.
Myth: Refactoring is always a good investment in the codebaseCAST Research Labs, 2021

Before you start any refactoring, write down two things: how it will increase development speed and how it will reduce critical bugs with no workaround. If you cannot fill in either blank, it is not delivery.

Post on X

Discussion

Is your team spending time refactoring without measurably shipping faster or reducing bugs?

Post on X
Anders N. Stockholm, Sweden

Yes. We just spent a quarter on a refactor that 'cleaned up the auth layer' and our deploy frequency is identical. Critical bug count is identical. The two-question test would have killed it on day one.

Sophie W.

Guilty. I refactor when I don't know what to build next. It feels like work because the diff is huge, but the changelog for users is empty.

Julien Reszka Paris, France

That's the pattern to watch. Refactoring as a substitute for a roadmap decision.

Marek J.

Counterpoint: sometimes the 'refactor' is what finally exposes the real bug. Once spent two weeks 'cleaning up' a payments module and the cleanup is what surfaced a rounding error that had been quietly losing us money.

All comments are manually moderated by the author.

Subscribe to get new posts by email →