fear involved in making changes to large code bases is fear of introducing subtle bugs; fear of changing things inadvertently. Without test, you just don’t know whether things are getting better or worse. » — Michael Feathers
your software 01. 02. Without bringing the remaining parts with it 03. Write code that is easy to delete, not easy to extends A natural process that cannot be stopped
it appear? Refactoring helps to keep complexity under control 01. 02. A good software design is critical in the long term 03. Technical debt ≠ legacy software, but it can accelerate the process
to refactor This is the « boy scout rule » 01. 03. When you found a bug, first write a test that triggers it, then fix it. Developing a new feature and refactoring doesn’t mix well! 02. 04. Beware of the broken windows syndrome
The « We’ll fix it later » syndrome 01. 02. The same cause always produces the same effect Instead provide a learning time, so you stop writing legacy code 03.
call directly the Legacy code 01. 02. The Legacy code must not call directly the Greenfield code 03. Even through the persistence system: database or event/message bus
to tackle it? You’ll need to coordinate your actions at the system level 01. 02. Beware of functional debt 03. Optimise your new system for replacement!