When Should I Refactor Code and How to Get Buy-in for Refactoring?

Alex Omeyer
Nerd For Tech
Published in
6 min readAug 3, 2021

--

Let’s take a look at when you should consider refactoring your codebase and how to convince your management to spend time on refactoring and technical debt.

As you push forward to create and ship the next big thing to market, you’ve probably let some things slide that just might now be catching up with you. One of these is refactoring — the process of changing a software system so that it does not alter the code’s external behaviour yet improves its internal structure.

Let’s take a look at when you should consider refactoring your codebase and how to convince your management to spend time on refactoring and technical debt.

What’s your workplace culture when it comes to refactoring?

Deciding when to refactor code depends in the first instance on workplace culture. In an ideal world, code is refactored little and often, meaning that it’s a task that is integrated into everyday work tasks. Having a baseline of regular refactoring means that any deeper code refactoring is typically less onerous.

--

--

Alex Omeyer
Nerd For Tech

Building Stepsize, a SaaS company to measure and manage technical debt.