-
Use tabs, not spaces, for indentation.
-
Private fields should be prefixed with an underscore (
_privateField
) and generally avoidthis
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.
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.