3 ms·
here you have one: tired fingers. myReallyLongAnTemporaryVariable could be just t :) Regarding the article, shortening and using a simple name without superflu
by mromanuk 14y ago
here you have one: tired fingers.
myReallyLongAnTemporaryVariable could be just t :)
Regarding the article, shortening and using a simple name without superfluous information is the best approach:
dR = radius
this doesn't make any sense, radius is better.
But
for(i;i<something;i++) {}
everybody knows that i is an iterator.
Context is really important to name your variables.
- aroberge 14y agoPhysicist here. In a scientific program I would most likely not use radius. I definitively would not use dR (type should be clear, no need to use Hungarian notation which I find to be an abomination) and would most likely use either R or r, the choice depending on what symbol was used in the equation(s) written in standard form. I probably would include in a comment the relevant equations using TeX notation and a reference to a scientific article or book from where it was taken.
- mercurial 14y ago> here you have one: tired fingers. myReallyLongAnTemporaryVariable could be just t :) With most editors/IDE, you'll type the variable in full once and autocomplete the rest of time, so not much of an excuse.