Comment by Terr_

5 hours ago

Over many years I've tried to (unsuccessfully) coin the phrase "Design for deletion."

The code in front of you works today, but will become unfit for purpose and un-salvageable, and we want to ensure that when that inevitable end happens, there is a sane and safe way to systematically chop it out and replace it with something else, something you are not capable of predicting.

There's substantial overlap with general principles like loose-coupling and modularity, but the framing changes how people apply them: Instead of trying to create durable Amazing-Thing which will be used for many years by people amazed at your foresight making it "flexible" and "modular" and "customizable", you focus on creating Inoffensive-Thing which can be easily killed off or dismantled for useful parts.

This is one of the pragmatic reasons that microservices can be a useful tool in a complex system. The enforced boundaries at every level - build, deployment, API, and team responsibility - make it easier to swap out, deprecate, or eliminate microservices than tends to be the case when the code is embedded in some larger context.