-
Notifications
You must be signed in to change notification settings - Fork 0
/
CODING_STANDARDS.txt
76 lines (50 loc) · 964 Bytes
/
CODING_STANDARDS.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
VARIABLES
Local variable names:
iNumber
bBoolean
cCharacter
sString
aArray
eEnum
pComplexType (pointer)
member variable names
m_iNumber
m_pComplexType
etc....
PROPERTIES
public string Name { get { return m_sName; } set { m_sName = value; } }
FUNCTIONS
camelCase(string sMyString, MyClass pMyClass)
{
}
names should make sense!!!!!!
EVERY function should have a comment explanation!!
function documentation RULE OF THUMB:
if function is longer than ~8 lines, document inner blocks as needed
---------
ideal:
//explanation of function
public void someFunction()
{
//step one explanation
Type pType = something.getType();
//step two
/* do something else */
//step three
//step four iteration
foreach(string sPart in sParts)
{
//iteration comment
sPart += "hello";
}
}
---------
if ({CONDITION})
doSomething();
CLASS STRUCTURE
//static variables
//member variables
//construction
//properties
//functions
//static functions