Best Coding Practices
From Coder Merlin
Revision as of 08:22, 5 April 2019 by Chukwuemeka-tinashe (talk | contribs) (Created page with "* No global variables * Appropriate and descriptive variable names * Appropriate and descriptive function names * Appropriate use of functions ** DRY: Do Not Repeat Yourself *...")
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
- No global variables
- Appropriate and descriptive variable names
- Appropriate and descriptive function names
- Appropriate use of functions
- DRY: Do Not Repeat Yourself
- DIE: Duplication is Evil
- Appropriate indentation
- Helpful whitespace
- Appropriate placement of closing braces and parentheses
- Appropriate use of preconditions
- Deliberate and helpful comments
- Avoid deep nesting
- Limit line length
- Appropriate file organization
- Generally one class per file
- Avoid "obvious" comments