Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Some Help for a Report About Perl

by eyepopslikeamosquito (Chancellor)
on Nov 02, 2017 at 08:30 UTC ( #1202582=note: print w/replies, xml ) Need Help??


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:

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

Replies are listed 'Best First'.
Re^2: Some Help for a Report About Perl
by hippo (Abbot) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1202582]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2018-05-26 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?