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:
$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.
No flattening of the structure just because one guy grew up with, and never got over, 70 column listing paper and ADM3+ terminals.
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.
In reply to Re: Why Create Coding Standards and Perform Code Reviews?
by BrowserUk
in thread Why Create Coding Standards and Perform Code Reviews?
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |