I don't suppose you'd feel like posting your coding standard here? I'd love to pick it over :)
The trouble with coding standards is that they all too often become sticks for keeping the serfs in line in surrogate fiefdoms. One man decides that his style is the standard and everyone else must adopt it. The assumption being that cos he's the boss, he knows best.
Somethings code standards can mandate are Good Things:
- smallest scopes for local vars;
- contextually meaningful variable names;
$i is fine for a (numeric) loop counter (preferable to $persons_array_index_counter),
but not so good for a instance attribute or global variable.
And yes; there are rare occasions when a global variable makes sense.
- proper (and consistent) indentation;
No flattening of the structure just because one guy grew up with, and never got over, 70 column listing paper and ADM3+ terminals.
- consistent use of whitespace--horizontal as well as vertical;
Spaces around operators vastly improve readability.
No cramming everything together just in order to comply with an antiquated width restriction.
Conversely, I've been subjected to some horrible "standards": 2-char indentation; Hungarian notation; Camel_Case_Plus_Underscores; mandatory 24 line block comments for every function or method; and many more.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
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:
Outside of code tags, you may need to use entities for some characters:
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||