Build, Maintain, Renovate, Demolish
Having done a renovation on my home, I spent some time thinking about the lifecycle of homes in general, and how people decide whether to remodel or start anew. I found that they all go through the same four operations over their lifetimes and owners continuously make decisions about which ones to apply. When I diagrammed it out and stepped back, I found it was even more general in nature; these 4 activities are applicable to a wide range of investments, including codebases.
Build where nothing exists but a need is present.
Maintain to preserve value and usefulness. Clean out the gutters, remove dead code, replace filters, repoint the brick, refactor, fix bugs, mow the lawn, tighten page performance, etc. This is the bulk of the activity for most things over their useful lifespan.
Renovate to increase the value of existing structure. Over time, better solutions emerge that you can integrate into your existing system. You can modernize a kitchen or swap in new windows with superior thermal resistance, just as you can overhaul a confusing UI or refactor a subsystem that has grown hard to debug or extend. The aesthetics are dated and need to be redesigned. Sometimes you must tear a house down to the studs and gut remodel, or replace an entire library or framework. We do all of these things from time to time (on the order of every 10-20 years for a house, perhaps every 3-5 years for software) in order to turn low-value or outdated things into higher-performing and more relevant things, extending the life of an investment so that you don’t have to take extreme actions: razing to the ground and rebuilding it.
Demolish where a neglected structure is so far gone that the only economical option is to start over again. This usually applies where it is at end-of-life, is functionally obsolete (by shifted technological context, e.g. horse stables in the age of automobiles), or excessively damaged by a disaster.
There is one key consequence to notice here: neglect is the same as destruction. What you fail to maintain is inevitably what you choose to demolish.
Are you investing enough maintenance into extending the life of your system? Are you renovating, replacing, extending enough parts to keep it relevant?