Maintainable code is code that exhibits high cohesion and low coupling.
Maintainability is itself a measure of the ease to modify code, higher maintainability means less time to make a change. Coding standards are a way to achieve high maintainability and are developed as a result of previous experiences, they aren't universal and are dependent on developer preferences.
|
However, the acid test of maintainability is attempting to change the code. To the extent that the code resists, or doesn't resist, your interaction with it defines it's maintainability.
Maintainability has "abilities". Including, but not limited to
Through application of all those software principles and guidelines you've ever or maybe never heard of.
For example:
Maintainability has "abilities". Including, but not limited to
- readability
- understand ability
- changeability
- testability
- reliability
Through application of all those software principles and guidelines you've ever or maybe never heard of.
For example:
- Good comments
- descriptive variable, method, class names
- Limit methods to no more that a page in length
- Maximize cohesion and minimize coupling
- encapsulate that which stays the same
- encapsulate that which changes
- code layout/formatting guidelines applied consistently
- One entry point only, and one exit point only.
No comments:
Post a Comment