Maintainability is the nebulous measurement of how easy it is to understand and modify a program.
Write some code. Come back to it in six months (or six days).
How long does it take you to find and fix a bug or add a feature?
Maintainability doesn't measure whether you have to look up the syntax for a builtin or a library function.
It doesn't measure how someone who has never programmed before will or won't read your code.
Assume you're talking to a competent programmer who understands the problem you're trying to solve.
How much work does she have to put in to understand your code? What problems will she face in doing so?
-- chromatic in Modern Perl ("Style and Efficacy" section)
Oh, one more thing.
Don't fall for the old chestnut that "Python is more readable than Perl".
Or that "Perl looks like line noise".
Instead, remind anyone who makes such a claim that Russian is "unreadable" if you don't know Russian.
Then further challenge them to explain how Python's magical powers of readability ensures that they:
- Make sound domain abstractions.
- Decompose their programs wisely into highly cohesive, loosely coupled modules.
- Choose descriptive, explanatory, consistent and regular names.
- Write useful comments.
- Minimize the exposure of implementation details.
- Avoid duplication (DRY).
- Don't use magic numbers in their code.
- Create interfaces that are: consistent; easy to use correctly; hard to use incorrectly; easy to read, maintain and extend; clearly documented; appropriate to audience.
- Write components that are testable in isolation.
- Establish a rational error handling policy and follow it strictly.
That is, "readability" (whatever that means) is far less important than "maintainability" --
so that programmers who know the language can come
to the code later in its life and
understand its construction and intentions
and change it comfortably and confidently.
And writing "maintainable" Perl is just as easy as writing "maintainable" Python.