What is Maintanable Code?
Maintainable code has several characteristics. In general, code is said to be maintainable when it is all of the following:
- Understandable – Someone else can pick up the code and figure out its purpose and general approach without a walkthrough by the original developer.
- Intuitive – in the code just seem to make sense, no matter how complex the operation.
- Adaptable – The code is written in such a way that variances in data don’t require a complete rewrite.
- Extendable – Care has been given in the code architecture to allow extension of the core functionality in the future.
- Debuggable – When something goes wrong, the code gives you enough information to identify the issues as directly as possible.
Very well said, Mr. Zakas!
Being able to write maintainable code is what distinguishes you as a programmer. It’s a difference between a craftsman and an apprentice.