How Much Does It Really Cost to Do a Major Code Refactor?

Discover the unexpected consequences and hidden costs associated with a major refactoring of your programming project.

David Rodenas PhD
9 min readSep 30, 2023
Major Code Refactor. Prompted by the Author.

In the world of software development, the term “refactoring” often evokes crisis. It’s a word many of us would rather not hear. However, we’ve often seen large projects, with grand plans, that over time become increasingly difficult to manage. The cost of change keeps increasing to the point of becoming utterly unmanageable. With an unstoppable increasing cost of change and bugs appearing in more and more unexpected places, there comes a time when “refactoring” seems like the only way out. This last step is the major refactor, the rewriting of almost all the code, and we know it has an incredibly high cost. But its cost goes beyond just developer time.

“Truth can only be found in one place: the code.” — Robert C. Martin

The cost in time

The resources needed for the rewrite are already part of the cost. Usually estimated to be lower than the cost of writing the software in the first place.

The worst-case scenario is rewriting everything. If you talk to a developer, they’ll often say that rewriting…

--

--

David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.