Programming principles with regard to software (computational) efficiency and the use of variables
I’m classically trained psychologist, not a programmer, so sometimes the more advanced aspects of programming escape me, in particular regarding program efficiency and/or certain best practices, in this case with regard to the use of variables.
Should the variable be named Id or ID? [closed]
Closed 9 years ago.
How to write useful Java programs without using mutable variables
I was reading an article about functional programming where the writer states
Why do some programmers keep values in global variables or member variables but not reused?
I am talking about normal PC applications, memory should be sufficient.
Why do some programmers keep values in global variables or member variables but not reused?
I am talking about normal PC applications, memory should be sufficient.
Is a single object to be preferred over multiple variables?
It was quite hard to put what I meant into a title, but it’s easy to put into code.
“Is” prefix and “On” suffix as reasonable exceptions to a “non-hungarian” naming standard?
First, I believe I’ve seen this question discussed here before, but I cannot find it. My apologies if you do find it.
What are the pros and cons of temporary variables vs multiple returns [duplicate]
This question already has answers here: Where did the notion of “one return only” come from? (14 answers) Closed 11 years ago. Take the following examples: public static String returnOnce() { String resultString = null; if (someCondition) { resultString = “condition is true”; } else { resultString = “condition is false”; } return resultString; } […]
What is the reason for using lowercase for the first word in a local variable (eg, employeeCount, firstName)
I take a good deal of criticism from other programmers due to my use of full proper casing for all my variables. For example, your typical programmer will use employeeCount
for a variable name, but I use EmployeeCount
. I use full proper casing for everything, be it a void method, return method, variable, property, or constant. I even follow this convention in Javascript. That last one really rustles people’s jimmies.
What is the reason for using lowercase for the first word in a local variable (eg, employeeCount, firstName)
I take a good deal of criticism from other programmers due to my use of full proper casing for all my variables. For example, your typical programmer will use employeeCount
for a variable name, but I use EmployeeCount
. I use full proper casing for everything, be it a void method, return method, variable, property, or constant. I even follow this convention in Javascript. That last one really rustles people’s jimmies.