|
what? am i going mad? people like this code?! comments are no replacement for readable and concise code, i tried to read this from start to finish - but i don't know where one block ends and the next begins. what the fuck does the variable "pr00gie" contain? yea the comments are half a laugh (as far as 90s "micro$haft" humour goes), but the code that it shamelessly decorates is fucking horrific. /* The DNS spec is officially case-insensitive, but for those times when you
*really* wanna see any and all discrepancies, by all means define this. */
#ifdef ANAL
if (strcmp (poop->name, hp->h_name) != 0) { /* case-sensitive */
#else
if (strcasecmp (poop->name, hp->h_name) != 0) { /* normal */
#endif
so, not only is this by definition entirely superfluous, but the identifiers used are fucking meaningless. if all you see is "cc -DANAL" what the fuck does that mean? ok, so obviously means picky, but in what regard? how the fuck do you know it's got anything to do with domain names?why not something like; //DNS standard is case insensitive, but you can enable case sensitivity
#if defined(DNS_CASE_SENSITIVE)
if (strcmp(poop->name, hp->h_name) != 0) {
#else
if (strcasecmp(poop->name, hp->h_name) != 0) {
#endif
or even better (and get rid of #ifdefs in function code), have this up at the top with the rest of the programmer humour? //DNS standard is case insensitive, but you can enable case sensitivity
#if defined(DNS_CASE_SENSITIVE)
#define dnsstrcmp strcmp
#else
#define dnsstrcmp strcasecmp
#endif
no wonder computers fucking suck, we're not standing on the shoulders of giants, rather the top of an everest-sized mountain of technical debt and hacks. this should not be celebrated. |