Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Style being de-facto standards: yes, wholeheartedly. As for "community standards", I'll leave that as a philosophical question on what "community" is ;-)

Items to pay attention to:

  • Use of & in function calls.
  • Any failure to use strict and warnings, or any use of no strict without a comment explaining why this is necessary.
  • A for/foreach loop whose sole job is to push values (whether they're the loop variable or converted from it) onto an array - cf. @array = map {...} @list;
  • Using backticks in void context. Or any other construct that returns a list, e.g., map.

More comfortable: Using lots of modules. It means that the author understands his/her tools, and is using stable modules to do work rather than reinventing bugs in new wheels.

Experience level: If you are willing to agree that experience level and amount of experience are not tightly bound, sure. I know a number of people who have been writing perl for longer than I've been in the field who I'd say are extremely low-leveled. They just never progressed past perl4-style programming. So, to a point, yes - bad style shows a lack of time writing and maintaining code - many good styles should be obvious once you have to maintain code. Anyone with a modicum of experience should have learned good style, whether exposed to it from others or not. From the other direction, I do think it's completely possible for someone with no experience in writing code to quickly be high-level programmers if they are good at learning and applying what others before them have encountered. I think the bottom line to the question is relating to how comfortable you feel in maintaining someone else's code - and that really does come down to style. Mostly.

Yes, my style has changed. I'm not sure it's always an improvement ;-). How it has changed? As I learn more about perl idioms, I tend to use them. They make my programs more robust as these are general-purpose ideas that have been around for a long time, well-tested, and probably even have optimisations put into the perl interpreter to help speed them up.

Your final question: I think style and maintainability are nearly interchangeable terms. They are tightly intertwined. And, in my personal arrogance ;-), I think that's why I'm an advanced programmer.


In reply to Re: Commonly accepted style guide? by Tanktalus
in thread Commonly accepted style guide? by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (12)
    As of 2014-08-01 14:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Who would be the most fun to work for?















      Results (25 votes), past polls