Re: greatest dilemma in the history of mankind
Coming from an old school backround, I voted camelCase.
I think underscores are better suited in constants, purely because in the olden days it was the custom to type constants in all upper case, so if they were two or more words long, it could look a bit unreadable if you didn't use underscores to break them up.
I chose camelCase as the preferred one because I think that it should be clear when scanning through the code that you are looking at a discreet item. Imagine if there is a mathematical formula and you are scanning down quickly, which of the following is more readable (in a very short time):
Code:
//camelCase
netPayThisMonth = (grossAnnualSalary - (incomeTax + nationalInsurance)) / 12;
or
Code:
//camelCase
net_pay_this_month = (gross_annual_salary - (income_tax + national_insurance)) / 12;
(incidentally, the formula is rubbish but it serves to highlight the point).
READ THIS Don't run any commands without understanding what they do, unless they are from a reliable source and have been confirmed by other experts. Serious damage can result from following malicious "advice".
Bookmarks