The company I work for doesn't have coding standards. And I hope they never will. A few times, people have discussed getting some coding standards - but each time, those discussion quickly goes in the direction I always predict (and this has been true for other companies I worked for as well, whether they code mainly in Perl, C or Java): they forget about the important things and start with trivialities like layout nitpicks.

Personally, I find it far more important to have standards like "any database change should be inside a transaction" and "applications shall deal with signals sensibly" than whether an opening paren should be follow, or be followed by a space (or no space, or spaces on either side). IMO, if you think layout details like that are important to standardize on, you're saying to me that your productiveness is influenced by such details. But I think that if you find it significantly harder to understand code based on how spaces and parens interact, you shouldn't be coding. Go fry French fries instead. For instance, we all agree that indentation is important. But 3 or 4 spaces? Who cares? As long as it's consistent in the same block.

Note that by no means I'm saying people should mess around. Writing clear and correct code is important (the latter obviously being the more important one), but don't waste your time codifying unimportant things. And certainly don't base it on a book that's full of 'rules' which are either obvious, or smell like "it's two weeks to the deadline, I'm way off my target number, what I can come up with now?". Yes, it's PBP I'm talking about.


In reply to Re: Seeking Best Practices - does your company follow a standard? by JavaFan
in thread Seeking Best Practices - does your company follow a standard? by meraxes

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.