I was reading some of the code for Boa [a small-footprint, single-tasking HTTP server] and was amused by the ifdef variable below
#ifdef FASCIST_LOGGING
{
int i;
for (i = 0; i < req->cgi_env_index; ++i)
fprintf(stderr, "%s - environment variable for cgi: \"%s\"\n", __FILE__, req->cgi_env[i]);
}
#endif
The code inside the ifdef isn't inherently funny, it's just the FASCIST_LOGGING flag.
That's a great name for a flag -- easy to remember, easy to grep for, and of obvious intent to the casual code reader [me, natch], or maintainer. It has the added value of being funny.
No comments:
Post a Comment