Here is an email I received in response to one of my essays.
Five things came to mind in your Unmaintainable Code essay:
You suggested using #define begi { to make C look less like C. One place I worked for (a large defense contractor with too many imbeciles with too much time on their hands) went one step further. We had:
#define IS_EQUAL == #define LESS_THAN < #define LESS_EQUAL <=
and so on — perhaps to make C look more like COBOL (not that I’ve ever touched COBOL). A simple adjustment of the header file to:
#define LESS_THAN <= #define LESS_EQUAL <
and, well, you get the picture.
int seven = 5;When corporate coding guidelines preclude the use of single letter variables, their phonetic equivalents do nicely:
i becomes eye
h becomes aitch
n becomes en
x becomes eks or eques, empowering you to take advantage of homophones, another
powerful tool.
C++ begs for you to use something like:
char *that;
Insults, such as boob, moron, buffoon and idiot also make nice variable names. A former colleague had a function called ' tzyj'. Best I could figure out, it must have been some sort of Bulgarian expletive.
if (eieio) { eques = seven; wye = six; }becomes
if (eieio) eques = seven, wye = six;Both do the same thing, which is formatting your hard drive, since I overloaded the = operator.
if (rot) splunge ();becomes
(! rot || splunge ());
/******!!!!!! COMPUTER GENERATED CODE SECTION - DO NOT MODIFY !!!!!!******/
Enjoy!
This page is posted |
http://mindprod.com/feedback/unmain/tzyj.html | |
Optional Replicator mirror
|
J:\mindprod\feedback\unmain\tzyj.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.97.9.170] |
| |
Feedback |
You are visitor number | |