It is easy to write software that works satisfactory. But it is very hard to write reliable, understandable and maintainable code. One important aspect is using good variable and function names. Variable names must be:
I have created a list of examples that will help you to quickly find variable names.
General spoken, when comments are necessary, the code is not written well. Don't use comments at each line of code; the code should be self documenting. But of course comments are needed for the big picture.
Here is a c++ codefragment where I applied the technique of self documenting code:
int CurveTracer::trace(bool printCurve, int _averaging, int stepTime_ms) for(int i=0; i<=1023; i++) |
msg | message |
dlg | dialog |
cfg | configuration |
err | error |
val | value |
fmt | format |
cnt | count |
tmp | temp |
str | string |
parm | parameters |
arg | argument |
ini | initialization |
cmd | command |