Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

71–80 of 221 posts

Re: Open source code with profanity in comments is statistically better

#71
post #36

Earlier quoted context omitted.

Alternative explanation in the same vane as your theory: The cognitive and time cost of compliance for language policing takes away from valuable programming and planning involved in developing solutions. (i.e. "banned words" [swear words] and politicalized words [whitelist/blacklist,etc]) Antoher possibility is the people who don't want to deal with that are gone and we're seeing a loss of their contributions.

That’s a pretty big leap IMO. What gives you that impression?

Not that commenter, but with 20 years of experience in open source I share their hypothesis.

Language policing slows down technical progress, very significantly I would wager.

Re: Open source code with profanity in comments is statistically better

#74
post #62

Earlier quoted context omitted.

Isn’t commented code no longer considered a good idea in most companies? I used to work for a bank and the policy is no comments unless absolutely necessary, because comments become out of date. Doxygen is the only real comments allowed.

That's an idiotic policy and definitely not something that is industry standard. Code gets out of date as well, so let's just stop writing it altogether..

Even better, lets triple the work and require UML diagrams, comments, and code to all be in sync at all times!

Re: Open source code with profanity in comments is statistically better

#75
Reminds me of a study. It showed, that swearing enables you to tolerate pain better. It was simple. Two groups, both had to put their hands into ice water. The group that was allowed to swear could do it longer.

I'd hypothesize, that programmers, who actually care about quality, swear more.

Individuals with AD(H)D might have a have a lower tolerance to pain. This, coupled with wide open sensual channels and decreased impulse control, might be a contributing factor.

[Edit] added parenthesis and link

Not correlated to swearing, but AD(H)D:

https://www.youtube.com/watch?v=XdT4DIiX7Nk

Re: Open source code with profanity in comments is statistically better

#77

Correlation is not causality. Swearing in the comments will not magically make your code better, but fixing a hidden bugs that you have been chasing for weeks will certainly make you swear when fixed.

> Correlation is not causality.

I'm fond of pointing out, despite every time I get downvoted, that causation is the thing we have no knowledge of, and therefore correlation is all we have. As Feynman said about gravity, there is no how or why to gravity, as far as we know it's simply a property of matter. But of course, that means we only know that because of the perfect correlation between matter and gravity, including every time we conduct an experiment about it; but still we have no cause to point to.

Re: Open source code with profanity in comments is statistically better

#78

I find it a bit suspect swearing would ever even get though a proper code review. It’s extremely unprofessional, I would tell someone to remove it.

And this is precisely how language policing slows down technical progress.

Re: Open source code with profanity in comments is statistically better

#79
post #59

Earlier quoted context omitted.

Isn’t commented code no longer considered a good idea in most companies? I used to work for a bank and the policy is no comments unless absolutely necessary, because comments become out of date. Doxygen is the only real comments allowed.

I'm not sure the ratio of comments to LoC is a sign of good quality code. Too many comments might actually be a bad thing. It's more lines to maintain, and sometimes the comments just tell what the code is doing where there is no need to.

I find that comments are most valuable when onboarding/understanding an unfamiliar code base. Comments composed of a little bit of “what” some “where” and a lot of “why” seems best for this scenario.

Re: Open source code with profanity in comments is statistically better

#80

I skimmed the paper, and it looks like they are looking for swearing _anywhere_ in the repos' code, not just comments. I would be curious to see the ratio of swearing in comments vs code identifiers. I'd also be curious to see if the repos with swearing in their comments just have more comments in total. Perhaps the correlation is, "code with more comments is more likely to be higher quality".

The jury is still out if I'm a good programmer, but I did one time need to use a hashmap that had to grow to about ~100gb in size. Because of that, I ended up calling it "bigassHashTable".

It makes me happy that it remained being called that for quite awhile.

Post reply on HN