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 parenthesis () or braces {}, use mitred braces. For example:

      myFunction({        // starts on the same line
          //something
      });                 // ends on it's own line
    
      if (x) {            // starts on the same line
          //something
      } else {            // notice the brace is on the same line here as well.
          //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:

Application Guidelines

  • Django / URLs? Coming Soon

Git Guidelines

  • Avoid commit messages longer than 80 characters

  • Commit messages should generally follow this format:

      {Present tense verb} one-liner summarizing the commit
      
      - Change 1
      - Change 2
      - ...
    

Code Review

  • Coming Soon

Issue Tracking

  • Coming Soon

Clone this wiki locally