My Coding Conventions

When I run my own company or lead a brand new team, everyone will follow coding conventions. My Coding Conventions!

Here they are, to the best of my current knowledge and by probable order of importance.

  1. Every method will be documented! That includes purpose, parameters, proper usage, etc…
  2. Every property will be documented! Yes. Exactly the same.
  3. Every class will be documented! Especially about recommended uses and where it is suppose to go.
  4. Every public field which is not incredibly obvious will also be documented!
  5. Every conditional block will be an actual block, with parentheses. Even if it’s one line!
  6. Starting parentheses always get a new line! Exception: if it’s a conditional or property and it fits in one line.
  7. Every method shall appear in full before its first use. This makes the code more readable! Do It!
  8. Design for any part of the program should be ironed out ahead of time and with as much detail as reasonableness allows.
  9. To be continued… (Suggestion welcome)

Posted in IT, Practice, Programming, Thinking Out Loud by with 6 comments.

Pingbacks & Trackbacks