Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.01 KB

CODING-STYLE.md

File metadata and controls

47 lines (34 loc) · 1.01 KB
  • Use an IDE that respects .editorconfig file (http://editorconfig.org/#download) and you won't have to worry about most of the stuff below 😏

  • 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.

screen shot 2017-10-25 at 2 09 16 pm

Example IDE settings (captured from Xamarin)