“The longer it takes for a bug to surface, the harder it is to find.”Much of the skill in writing unmaintainable code is the art of camouflage, hiding things, or making things appear to be what they are not. Many depend on the fact the compiler is more capable at making fine distinctions than either the human eye or the text editor. Here are some of the best camouflaging techniques.
~ Roedy (born: 1948-02-04 age: 60)
“We should forget about small efficiencies, say about 97% of the time; premature optimization is the root of all evil.”
~ Donald Ervin Knuth (born: 1938-01-10 age: 70)
“More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason — including blind stupidity.”The safest way to disguise your obfuscation work then is to make it look as if your motive for it is making the program run faster.
~ W. A. Wulf (born: 1939-12-08 age: 69)
for ( j=0; j<array_len; j+ =8 ) { total += array[j+0]; total += array[j+1]; total += array[j+2]; /* Main body of total += array[j+3]; * loop is unrolled total += array[j+4]; * for greater speed. total += array[j+5]; */ total += array[j+6]; total += array[j+7]; }Without the colour coding, would you notice that three lines of code are commented out?
struct snafu {
unsigned cNt
char* pTr;
size_t lEn;
} A;
Variables that resemble others except for capitalization and underlines have the advantage of confounding those who like remembering names by sound or letter-spelling, rather than by exact representations.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.62] | The information on this page is for non-military use only. | ||
| You are visitor number 122,234. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/unmaincamouflage.html | J:\mindprod\jgloss\unmaincamouflage.html | ||