index

means: conventions



Using short functions and const allows briefer variable names, as distance from definition to use is small, and meaning is more constrained.
void complicated_calculation() { 
  doub radius = 3; 
  //...many lines of branching logic 
  //.. 
  drawCircle(x,y,radius); // radius still 3?  who knows? 
}

Reader: You puzzle me with your branching logic.

void complicated_calculation() { 
  const doub radius = 3;  //<<<< NOW CONST. 
  //...many lines of branching logic 
  //.. 
  drawCircle(x,y,radius); //<<<< radius still 3. 
}
Using similar naming and format conventions system wide allows abbreviations to become a form of shorthand, free of superfluous clarification or comments.

see also: abbreviations, self documenting.

Examples:
typedef iterator iter
i,j,k for iterator names.

xyz,dx,dy,dz for geometry.

CAPS to make things stand out.

1,0 instead of true/false, especially if the boolean declaration is nearby.

For active code:
#if 1 
//..  code under development 
#endif
Qualified namespaces in code files (as opposed to header files) can clarify, especially if names are short.

Possible exception: stl, unless you really think you'll replace it someday.
#include "myfile.h" 
using std;

Reader: Don't type so much.
Bim: It's just so fun.



nedwaves.com 2017 [171108]