More Coding Methods
From the other thread in this forum we got "The One True Brace" as a brace style and another type (I forget the name of that one). What about variables? I name my variables by capping the second word and each word after that such as:
$myVariable
int myVariable
int myVeryLongVariable
I notice people often use different styles or in really bad coding, no styles.
I often see all words capped.
$MyVariable
int MyVariable
and in bad coding
myVariable
int MyVeryLongVariable (notice the first word isn't capped and then capped?)
My question is: What are these styles called and which do you use? Is there a correct way because I've taken several programming classes and read even more books. Each teacher/author will have a different style.
|