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. ...

Get Beyond Legacy Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.