Take Martin D. for example.  He brings us a tale of woe about a utility called Rv_133 that sets environment variables on a database server (running Oracle 5, which I've heard Alex was a big fan of), which he describes as being loosely similar to regedit.

One day, he ran a function that displays all possible variables that can be changed.  He was curious as to where the data came from, so logically he started in the database.  Finding nothing significant, he traced the code back and found this in a 7,300 line file:

static const TYP_R133ENVPROJ    astProjEnvVar[] =
{
{"MED ALLG",    {"Med Allg",
                        NULL},
                        ""},

{"MEDNET",      {"Medical Net",
                        NULL},
                        "02-05-1995"},

{"MED_NO_DOC",  {"RK-1/RK-2/RK-3 Canon Autorefrakto/Keratometer",
                        NULL},
                        ""},

/** SNIP (6200 lines) **/

{NULL,                                  {       NULL
                        },
                        NULL }
};

I imagine it goes without saying that there were no good comments or worthwhile documentation for the system.

I imagine it doesn't go without saying that without knowing when Oracle 5 was released, Martin checked a file timestamp that was 1988.

He adds, "Back then, the term 'modular programming' meant: 'Create a module by copying existing functions into a new file, alter a few lines, and do the rest by changing some of the 73 global variables and structures. And because you'll run out of module names pretty soon, name them like 'Fb_421', 'Cx_117', 'Cm_515' etc.'"

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!