Refactor to Support Changeability

Changeability in code does not happen by accident. It has to be intentionally created in new code, or carefully introduced in refactoring legacy code, by following good developer principles and practices.

This is true in any profession. A doctor doesn’t just magically heal her patient. And though sometimes patients heal on their own, software never writes or rewrites itself. You have to make the computer do what you want it to do.

Supporting changeability in code means finding the right abstractions and making sure code is well encapsulated. Ultimately, changeability comes from understanding what you’re modeling and imbuing your model with that understanding—with those distinctions—so it’s accurate and consistent. ...