This is my personal opinion on coding convetions.
In all my professional jobs the majority of coding conventions I've seen can be broken down into two categories:
- Ego driven - do it the way the author of the convention does it
- Micro management - place a space after a comma, indent braces two spaces, put case labels over there, use these hungarian notation prefixes (followed by huge table), etc.
which misses the point, in my opinion, of what a coding convention should be and generally doesn't aid productivity. How the code is capitalised and laid out is not relevant (apart from public APIs where it should be consistent throughout the library).
The really important stuff (which I've rarely seen) are things like:
- Documentation - ensure code is designed and documented
- Testing - ensuring code follows testing specification
- Maintainability - ensure variables and types have sensible names that describe their function
- Code review - the process of doing code reviews
- Source Control - details of source control system, who's responsible for maintaining the repository and so on
- Daily builds - who's responsible for maintaining it, what to do if it breaks
Code layout should be along the lines of "Stong Opinion, Weakly Held", that is, write the code the way you feel most comfortable with but adapt your style based on code you see others write (i.e. take the best ideas from other people's code).
Skizz