Skip to content

Development Guidelines

nt3rp edited this page Oct 19, 2012 · 19 revisions

Developers spend 3 times more time understanding code than modifying it, and 5 times more time modifying code than writing new code. For this reason, it's important that we make our code as easy to understand as possible by following certain company guidelines.

Code Guidelines

  • Use spaces, not tabs. Specifically, use 4 spaces instead of a tab.

  • Avoid lines longer than 79 characters

  • When using braces (e.g. {}), use mitred braces. For example:

      myFunction({
          //something
      });
    
      if (x) {
          //something
      } else {
          //something
      }
    
  • Constants tend to be IN_ALL_CAPS

  • Don't leave commented out code in your commit if the code is already in version control:

    • Comments are for explanations / design decisions
  • Otherwise, we defer to various language standards:

Clone this wiki locally