index

means: abbreviations


Even adding the word "please" to a dialog, which may seem helpful and polite, will slow people down: the increased bulk of the wording is going to reduce, by some measurable percentage, the number of people who try read the text.
[ UI Design, p.52]


Using strong, system wide conventions and short names can keep code succinct and clarify meaning.

common functions and variables


CB for callback.
inline static void     CB(void*v) {((MyClass*)v)->    cb();} 
inline static void drawCB(void*v) {((MyClass*)v)->drawcb();}

typedefs

typedef uint  unsigned int; 
typedef ulong unsigned long; 
typedef cchar const char; 
typedef doub  double; 

#define iter iterator

conventions

if (!!X)       // instead of: if (X != NULL) 
doub Y = 1.*i; // instead of: Y = doub(i)
(typedef vs macro?)

reading


Reader never admits it, but this is the internal dialog:
!ok;     // "not ok" 
x->y;    // "x's y" 
x->y();  // "x calls y" 

class:      // "business" 
public:     // "showroom" 
protected:  // "authorized use only" 
private:    // "hidden" 
struct:     // "shipment" 
const:      // "structural" 
inline:     // "by the check-out" 
comment:    // "tip" 
static:     // "brand" 
function:   // "employee" 
args:       // "customers" 
return value: // "sells product" (no return: ="provides a service")

for example

Implying reader sees this innocent bit of a css style sheet:
table { 
font-family: Arial, Verdana, sans-serif; 
font-size:     18px; 
color:      #00008B; 
margin-top:     0px; 
margin-right:   0px; 
margin-bottom:  0px; 
margin-left:    0px; 
padding-top:    0px; 
padding-right:  0px; 
padding-bottom: 0px; 
padding-left:   0px; 
}
..and sees this:

"There's a new business in town. It's opened several locations, serving customers looking for ... um, apparently layout information.

"When a customer comes in, the barista calls a friend business for a shipment."


Wow! What's gonna happen next?

"The legislative committee assesses the petition and promulgates an updated policy that arranges for a groundswell of letters to appear on the screen."


We can only hope. Perhaps reader just has an overactive imagination.

nedwaves.com 2017 [171108]