Robert's Rules of Coders

A list of good programming practices for programmers of most any language.

Novice programmers, casual coders, and code-writing power users are the primary target audience of these rules. Most experienced developers follow these rules intuitively and understand that the rules contained here are really more like guidelines.

  1. Write Subroutines Profusely
  2. Avoid Global Variables
  3. Use Good, Meaningful Names
  4. Make Functions Short
  5. Organize Your Code
  6. Don't Use Magic Numbers
  7. Use Constants For Values That Don't Change
  8. Avoid Negative Conditionals
  9. Eliminate Deep Nesting by Using Switch Statements and Functions
  10. Scope Minimally, Scope Private
  11. Separate User Interface Logic from Business Logic
  12. Isolate Dependencies with Functions of Inversion of Control and Dependency Injection

Robert Kraft has been slinging code since 1981. See his profile on LinkedIn


You might also be interested in The Programmer's Pledge