in reply to Some Help for a Report About Perl

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? That's maintainability.

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:

That is, "readability" 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.

Update: Computer programming (wikipedia) defines Readability as "the ease with which a human reader can comprehend the purpose, control flow, and operation of source code" and further lists factors that affect it namely: following a consistent programming style (and naming conventions), correct indentation, judicious commenting and wise decomposition. Note that these important code qualities are essentially independent of the programming language being used.


References Added Later

  • Comment on Re: Some Help for a Report About Perl (Readability vs Maintainability)

Replies are listed 'Best First'.
Re^2: Some Help for a Report About Perl
by hippo (Chancellor) on Nov 02, 2017 at 09:36 UTC

    Quite so. It is always worth quoting from Ed Post:

    the determined Real Programmer can write FORTRAN programs in any language.

    I have seen this truism made real in more than one language as no doubt has everyone else who has been in the industry long enough. Thankfully there is not so much Fortranish Perl out there - it's probably the TIMTOWTDI which keeps them away.