The highest praise I can give a piece of code isn’t that it’s elegant. It’s that someone could delete it in an afternoon without fear, because its boundaries are honest about what it depends on and what depends on it.
Most codebases don’t rot because the code is badly written. They rot because nothing in them is safe to remove — every function has an unknown number of silent callers, so everyone keeps adding and nobody ever subtracts.
Optimizing for deletability, not cleverness, is the closest thing I’ve found to a durable engineering principle.