I'm Jeff-Relf.Me, in Seattle, Mid 2017, born in Seattle, 1960. 

C++ Coding Rules:

1. Use an ArmMounted 4K/UHD IPS Monitor for 380 columns of "Console" text.
   My (Custom) Console, My Editor, Visual Studio Community 2017, Win10.

   "OCR A", "MS Mincho", "Segoe UI Symbol", "DejaVu LGC Sans Mono" 
   and "nSimSun" ( depending on the glyph ) are nice.

2. Create fewer/larger functions.
   Put everything in a single, large .CPP file -- don't create .H files.

   Sadly, I've failed to merge some of my .CPP files/apps
   because the required testing would be too expensive/painful;
   as a result, they're not as fresh/tested as they could be.

3. Minimize comments and WhiteSpace.

   When I see sparse code, with lots of whitespace and comments,
   I _immediately know the programmer is struggling.
   WhenAndOnlyWhen debugging, does lots of comments and WhiteSpace make sense.

4. When it looks nicer, use commas, not semicolons.
     "Cnt = Nibble = 0, Byte = -1, P = B" looks better.

5. A variable's declared type isn't always appropriate; so Type Cast.

     #define  szStr  (int)wcslen  //  Return the length of a Unicode string.

     #define  Zero( X )  memset( & X, 0, sizeof X )  //  Implicit cast to (void*).

     Zero( aStruct );

6. Local, ShortTerm variables are nice.  Like:

     wchar _T[999], *P = _T ;

     { LoopRow(3) { LoopCol(4) 
         P += Str( P, L"( %d, %d )%s", Row, Col, Row == eRow ? L"\n" :  L" " );  } }

     printf( _T );

     Globals:

       #define  LoopRow( N )  int  Row = -1, eRow = ( N ) - 1 ; while ( ++Row <= eRow )
       #define  LoopCol( N )  int  Col = -1, eCol = ( N ) - 1 ; while ( ++Col <= eCol )

       #define  Str  swprintf
       typedef  wchar_t  wchar ;

     Output:

       ( 0, 0 ) ( 1, 0 ) ( 2, 0 ) ( 3, 0 )
       ( 0, 1 ) ( 1, 1 ) ( 2, 1 ) ( 3, 1 )
       ( 0, 2 ) ( 1, 2 ) ( 2, 2 ) ( 3, 2 )

7. If everything ( but the top node ) were local,
   then you'd be spending all your time traversing trees,
   like an ant, instead of doing real work.

   So use Global Variables/Functions early and often.
   This, the common way, is ambiguous:

     if ( HandleEvents(1) ) ...

   Instead, use globals (below), like this:

     WaitForClick = 1, HandleEvents();  if ( Click ) ...

   Globals:

     int WaitForClick, Click ;

     void HandleEvents() { MSG  Msg ;
       GetMsg:   PeekMessage( &Msg, 0, 0, 0, PM_REMOVE );
       Click = Msg.message == WM_LBUTTONDOWN ;
       //  Handle system events, like WM_NCACTIVATE...  Blah Blah.

       //  When WaitForClick == 1, Exit if-and-only-if there's a Click:
       if ( Click || !WaitForClick  ) { WaitForClick = 0 ;  return ;   }

       //  Draw Stuff... Blah Blah.
       goto GetMsg ;  }

8. InLine Conditionals ( Bool ? True() : False() ) are nice and concise.
   For example:

     inline  int  TheSmaller( int X, int Y ) { return X < Y ? X : Y ;  }

     #define  FlagTheNym  \
        Nym.hardRank ? L"Top" : Nym.Dropped ? L"Dropped" : Nym.Mad ?  L"Mad" : Nym.Cool ? L"Cool" : L"Shifty"

9. Simplify Odd system calls, like this:

      wchar  aString[999];
      Str( aString, L"A 32 bit, unsigned Random Integer: %I64d", Rand32 );

      Globals:

        typedef wchar_t  wchar ;
        unsigned int  uiRand ;  
        #define  Rand32 ( rand_s( &uiRand ), uiRand )  //  Seeding is implicit.
        #define  Str  swprintf  //  Print to a Unicode string, "printf" style.

10. With " warnings as errors ", turn off these warnings:

     c4702: UnReachable code.

       A tempory "return" is needed, at times, when debugging.
       With " warnings as errors ", you don't want it to stop the debuging.

     c4100: unreferenced parameter.
     c4101: unreferenced local variable.
     c4189: local variable is initialized but not referenced.

       Variables get commented out, at times, when debugging.
       With " warnings as errors ", you don't want it to stop the debuging.
       UnUsed variables are informative, and might be needed again, later.

     c4430 missing type specifier - int assumed; No C++ support.
     c4508 'Func': function should return a value; 'void' assumed.

       "Func() {}" is cleaner/nicer than "void Func() {}".

     c4456 declaration of 'P' hides previous local declaration.
     c4457 declaration of 'P' hides function parameter.
     c4459 declaration of 'P' hides global declaration.
       
       P ( a ShortTerm, local pointer ) is cleaner/nicer.

     c4996 'sprintf': This function may be unsafe.

       Str( Err, L"0x%x", Enum )  is cleaner/nicer than 
       swprintf_s( Err, 22, L"0x%x", Enum ).
       Global:  #define  Str  swprintf

     c4239 type conversion; No C++ support.
     c4312 conversion from a smaller type to a larger type.
     c4305 truncation from 'double' to 'float'.
     c4302 conversion from a larger type to a smaller type.
     c4244 '=': conversion from 'int' to 'char', possible loss of data.
     c4838 conversion from 'int' to 'wchar' requires a narrowing conversion
     c4311 64-bit pointer truncation ( storing shorts in a pointer ).

       Implicit casting is cleaner/nicer.

     c4127 conditional expression is constant.

       while(1) is OK.
       "if ( ComplexExpression, 1 )" is a good debugging technique.

     c4706 assignment within conditional expression.
     c4709 comma operator within array index expression.

       Often, it's cleaner/nicer to assign stuff in an expression;
       same for array indices, "R_[ i++, i %= 4 ]".

     c4554 check operator precedence for possible error ( Level 3 ? ! )

       Fewer parenthesis is cleaner/nicer; just know the precedence.

     c4474 'swprintf' : too many arguments passed for format string.
       
       A format string, passed to a macro, 
       might have default (unused) arguments.

     c4458 declaration of 'a' hides class member.

       <D2D1helper.H> needs it, don't know why.

     c4238 nonstandard extension used: class rvalue used as lvalue.

       Needed when a simple int is (foolishly) defined as an overly 
       convoluted/Byzantine class ( like ID2D1SolidColorBrush ).