View Single Post
  #296   Report Post  
Posted to alt.home.repair
Don Y[_3_] Don Y[_3_] is offline
external usenet poster
 
Posts: 2,879
Default off topic: new car advice for senior

On 10/3/2015 2:28 PM, rbowman wrote:
On 10/02/2015 10:28 PM, Don Y wrote:
I eschew single letter identifiers preferring, instead, more informative
names: iterator, index, row, column, etc. I find it makes it easier to
"read" (subvocalize) the code and impart meaning to it in the reading.


One of my learning experiences was working with C code written by a non-English
speaking programmer. It was well constructed code and all the key words were
English, but none of the variable or function names had any apparent meaning to
me. It really brought home how much the readability of code depends on
meaningful naming.


I've thought of making a generic "obfuscator" that simply walks
through the parse tree replacing identifiers with *other*
(pseudorandom) identifiers -- and stripping comments. Don't
even bother with whitespace mangling or bizzare operator
rewrites. Just change the names of things (which could be
verbs describing actions -- replaced with *nouns* describing
nonsense *things*, etc.)

When reverse engineering something (from bare metal), the first thing
you start doing is replacing "numbers" (addresses) with ANYTHING that
imparts even the tiniest amount of meaning to those numbers. Make
a few good initial guesses and things move along pretty quickly!