Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Syntax explanation required

by sundialsvc4 (Abbot)
on Jan 02, 2013 at 21:29 UTC ( #1011354=note: print w/ replies, xml ) Need Help??

in reply to Syntax explanation required

And I would cordially augment Anathasius’s excellent response by making two observations:

  1. There’s More Than One Way To Do/Say It (TMTOWTDI™) ... and ...
  2. “At the end of the day,” the hands-down winner is:   the one that is the most clear, to the greatest number of human beings who will actually encounter it, either now or in the distant future.

When you are writing source code, it frankly does not matter whether what you have written is “efficient,” much less “clever.”   (And in making that comment, I consciously and respectfully intend to steer the middle-ground against acknowledged valid ... [BrowserUK] ... edge-case exceptions ...)   What (typically) matters is that what you’ve written is drop-dead obvious ... and maintainable.   (You are not at the computational bleeding-edge and never will be.)   Even if the piece of source-code that you encountered works perfectly as-writ (as I presume it does), it triggered a show-stopper question from you that was sufficient to prompt a humble-petition to The Monks.   For that reason alone, it should be judged Insufficient.   It should, at the very least, be prefaced by a comment.

Yeah, there is a “hard dollars” motivation for doing that.   The mere fact that it triggered a public comment titled “Syntax explanation required” classifies it as “very $$costly$$.”   Most of the time, there are many equally-valid ways to express your intentions to the digital computer, and so what really matters is how clear it is to your colleagues.

Comment on Re: Syntax explanation required
Replies are listed 'Best First'.
Re^2: Syntax explanation required
by Anonymous Monk on Jan 02, 2013 at 21:44 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011354]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2015-11-29 00:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls