Hacker News new | ask | show | jobs
by DarMontou 4673 days ago
I'm curious about the motivations for coding profanity. I've occasionally included comments like "don't f* with this unless you understand x, y, and z" in an attempt to protect fragile sections of code from careless collaborators. Nearly identical comments without profanity seemed ineffective. Within common conversations I know that profanity often carries an implication of violence, usually for the purpose of intimidation. I also find that profanity is frequently used for comedic relief.

Hopefully these counts don't indicate increasing fragility or violent disagreements within the kernel. Does anyone with kernel experience have any insight into common purposes for kernel profanity?

2 comments

Looking through this, the two biggest categories seem to be complaints about buggy/weird hardware (that driver writers have to work around) and complaints about compiler quirks. I can imagine other projects having similarly-motivated cursing at annoying library weirdnesses.

The motive seems to be to acknowledge to the reader that, yes, this code is ugly, and it's not the writer's fault; it's the product of some bugginess external to the codebase that really isn't possible to fix. Blame "fucking gcc", or Sun for having the nerve to "take such nice parts and fuck up the programming interface" (to quote two examples from the Linux code). The target of the anger is most definitely not the intended audience.

From a quick grep of the source, it looks like a contributing factor is Matsushita Electric Industrial. If you are interested, I posted the output of grep to pastebin [0].

[0]http://pastebin.com/MNZF1Vz0

EDIT: This is against linux-3.8.0 from Mint's repository.

The group's name has change from Matsushita to Panasonic, so this would bring the count down in the future.
I doubt they retroactivly change code/comments because the original organization changed their name. The Matsushita references will probably stay there until they bitrot and get removed/rewritten.