Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 659 Bytes

CODING-STYLE.md

File metadata and controls

40 lines (31 loc) · 659 Bytes
  • Use tabs, not spaces, for indentation.

  • Private fields should be prefixed with an underscore (_privateField) and generally avoid this keyword.

  • Use verbose variable names. Do not abbreviate.

  • Braces even for one liners:

    RIGHT

    if(condition) 
    {
        doStuff();
    }

    WRONG

    if(condition)
        doStuff();
  • Braces on a new line:

    RIGHT

    if(condition) 
    {
        doStuff();
    }

    WRONG

    if(condition){
        doStuff();
    }
  • Prefer good variable and method naming over comments. The exception is using comments for documentation purposes or complex algorithms.