In general (though not 100% of the time) titles should be the same on HN as they are on the page you're submitting. The goal is to reduce editorializing, and link baiting: https://news.ycombinator.com/newsguidelines.html
The "funniness" is probably subjective. This type of code rant aren't exactly rare. However, these particular complaints about BSD sockets are common and IMO fully deserved. That design isn't exactly brilliant. Another insightful critique (by DJB): http://cr.yp.to/tcpip/twofd.html
The README that Hobbit (author of the original netcat) wrote is a really good read. I learned a lot when I first read it years and years ago.
I especially remember it describing how it is possible to get "in front" of another daemon.
If the daemon has bound a listening socket to 0.0.0.0, as most do, you can bind to a more specific address on the same port and intercept inbound connections. Fun!
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.
I had an f-bomb in shipping source for over a year before I noticed it. (Was a chunk of code that had been object file only then we switch to shipping source.)
Somehow it even got through the lawyers' Bad Words filter.
i only add obscene comments on my personal stuff -- but whenever i'm trying to debug a hard problem, i will add a logger.debug("is this f*ing code reachable?").
i just have to make really really sure i don't commit these kind of changes.
In fact, Windows builds with -DGAPING_SECURITY_HOLE is pretty much the reason why Windows virus scanners detect nc.exe. (The #define enables the -e flag, which starts processes with stdio redirected over the network when the connection succeeds.)
It's also from 1995.