-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathNaming_convention.txt
30 lines (22 loc) · 1.54 KB
/
Naming_convention.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Classes
Class names should be nouns in UpperCamelCase, with the first letter of every word capitalised. Use whole words — avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML).
class Raster {}
class ImageSprite {}
Methods
Methods should be verbs in lowerCamelCase or a multi-word name that begins with a verb in lowercase; that is, with the first letter lowercase and the first letters of subsequent words in uppercase.
run();
runFast();
getBackground();
Variables
Local variables, instance variables, and class variables begins with data type identifier and are written in UpperCamelCase. Variable names should not start with underscore (_) or dollar sign ($) characters
Variable names should be short yet meaningful. The choice of a variable name should be mnemonic — that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary "throwaway" variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.
int iVariableName;
uint uiVariableName;
char cVariableName;
float fVariableName;
bool bVariableName;
byte beVariableName;
String sVariableName;
Constants
Constants should be written in uppercase characters separated by underscores. Constant names may also contain digits if appropriate, but not as the first character.
static final int MAX_PARTICIPANTS = 10;