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