image provider

Snafucated Code


Here is an email I received in response to one of my essays.

Snafucated Code : Frank Klemm : pfk@fuchs.offl.uni-jena.de : 2000-09-10

Another examples:

struct/union and typedef struct/union are different name spaces in C (not in C++). Use the same name in both name spaces for structures or unions. Make them, if possible, nearly compatible.

use deep looped conditional compilations. Never handle system specific code in libraries, use #if/elif/else/endif orgies, if possible, deep loop them.

Make functions as long as possible to increase performance. Don’t use functions if the function code can be optimized in place.

Give function variables a slighly wrong name. So name a variable containing the number of channels (1 or 2) the name stereo. Test for mono with with stereo == 1, for stereo with stereo != 1 so no one begins to wonder about the real meaning of this variable. Use if (stereo) { stat; } for a simple { stat; } because stereo is always true.

Cross include include files as much as possible. Make circular dependencies between the include files. Hide the problem by using void* to structures and use typecasts to access this structure.


This page is posted
on the web at:

http://mindprod.com/feedback/unmain/snafucated.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\feedback\unmain\snafucated.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[50.19.31.99]
You are visitor number