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 intimi…
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].
Its worth looking at the scale of the swear count. Linux has about 16629976 lines of code, and I'd estimate from the graph that it has about 370* swear words (excluding penguin). If you look at the second graph, that is less then 1 swear in 300000 lines. I checked this on the source tree for 3.8.0. The numbers appear to be inflated by allowing the swear words to be part of other words. For example, "shit" appears in…
If you want to check the various words in isolation, surrounding spaces might cost you some matches, e.g. at the end of a sentence ("It's a piece of shit.") or when followed by a comma. Also, did you ignore case ("Shit happens.")?
How about trying \b[Ss][Hh][Ii][Tt]\b and the likes?
Its worth looking at the scale of the swear count. Linux has about 16629976 lines of code, and I'd estimate from the graph that it has about 370* swear words (excluding penguin). If you look at the second graph, that is less then 1 swear in 300000 lines. I checked this on the source tree for 3.8.0. The numbers appear to be inflated by allowing the swear words to be part of other words. For example, "shit" appears in…
If you want to check the various words in isolation, surrounding spaces might cost you some matches, e.g. at the end of a sentence ("It's a piece of shit.") or when followed by a comma. Also, did you ignore case ("Shit happens.")? How about trying \b[Ss][Hh][Ii][Tt]\b and the likes?
There were few enough curse words that I manually checked the output of not requiring spaces. Regarding the case sensitivity, it looks like I missed 12 instances of swearing because of that. Also, grep has a "-i" parameter, which makes it case insensitive.
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 intimi…
From a quick grep of the source, it looks like a contributing factor is Matsu shit a 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.
From a quick grep of the source, it looks like a contributing factor is Matsu shit a 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.
If you want to check the various words in isolation, surrounding spaces might cost you some matches, e.g. at the end of a sentence ("It's a piece of shit.") or when followed by a comma. Also, did you ignore case ("Shit happens.")? How about trying \b[Ss][Hh][Ii][Tt]\b and the likes?
There were few enough curse words that I manually checked the output of not requiring spaces. Regarding the case sensitivity, it looks like I missed 12 instances of swearing because of that. Also, grep has a "-i" parameter, which makes it case insensitive.
Also a -w parameter, to match whole words only, which is generally better than adding spaces :)
A casual search of code in Debian [1] shows that this is not limited to the Linux kernel. Thankfully there's no equivalent to the Parents Television Council [2] or Focus on the Family [3] for open source projects.