How to Improve a Legacy Codebase
&gt; Do not fall into the trap of improving both the maintainability of the code or the platform it runs on at the same time as adding new features or fixing bugs.<p>I don&#x27;t disagree at all, but I think the more valuable advice would be to explain how this can be done at a typical company.<p>In my experience, &quot;feature freeze&quot; is unacceptable to the business stakeholders, even if it only has to last for a few weeks. And for larger-sized codebases, it will usually be months. So the problem becomes explaining why you have to do the freeze, and you usually end up &quot;compromising&quot; and allowing only really important, high-priority changes to be made (i.e. all of them).<p>I have found that focusing on bugs and performance is a good way to sell a &quot;freeze&quot;. So you want feature X added to system Y? Well, system Y has had 20 bugs in the past 6 months, and logging in to that system takes 10+ seconds. So if we implement feature X we can predict it will be slow and full of bugs. What we should do is spend one month refactoring the parts of the system which will surround feature X, and then we can build the feature.<p>In this way you avoid ever &quot;freezing&quot; anything. Instead you are explicitly elongating project estimates in order to account for refactoring. Refactor the parts around X, implement X. Refactor the parts around Z, implement Z. The only thing the stakeholders notice is that development pace slows down, which you told them would happen and explained the reason for.<p>And frankly, if you can&#x27;t point to bugs or performance issues, it&#x27;s likely you don&#x27;t need to be refactoring in the first place!