Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

41–50 of 221 posts

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

#41
> Next, Strehmel and his team quantified the compliance of these two different sets of open source code with coding standards. The results were presented as an indicator of the quality of the source code through the SoftWipe tool.

I would read that study as coding standards lead to profanity. (Not sure wether or not coding standards should be correlated with code quality, I just think it is obvious that the measure is correlated with the conclusion in an obvious way.)

[Post posting:] Also looking at the plots, it seems that the two distributions are different, first the swear word distribution seems to be wider and second it has a clear outlier at "software quality" 8, so if anything it is an indication that something much more complex is going on.

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

#42
post #5

I'd bet a lot of the non-profanity code is people open sourcing code just to be impressive on resumes or for school, where the profanity code is probably real code. Sounds likely to be a classic case of correlation != causation

Rorschach test for programmers: give your confident gut feeling explanation for this phenomenon. I'll do mine: there's likely a correlation between needing to maintain a professional conduct which includes forgoing foul language (you're programming at work) and writing code under time pressure where getting a product ready for release is more important than strict adherence to clean programming practice (you're progr…

> Everyone post your favourite conjecture!

Places uptight enough that developers never swear in comments are uptight in other ways that lead to poor team dynamics which hinders quality.

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

#43
post #18

Possible explanation: swearing is more likely to be committed into code by people who either (1) own the code, or (2) know they're too valuable to be punished. So it self-selects. I personally have very different commenting styles between my work and personal projects. Not that any of it's good.

Imo, it's because swearing indicates frustration, and frustration indicates effort.

So I need to use more profanity at work, then ask for a raise?

(But I concede that effort and productivity are not the same thing.)

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

#44
post #36
post #18

Possible explanation: swearing is more likely to be committed into code by people who either (1) own the code, or (2) know they're too valuable to be punished. So it self-selects. I personally have very different commenting styles between my work and personal projects. Not that any of it's good.

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?

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

#45
One rule I live by is I never ever swear in comments or commits, just not worth it. Even in personal projects.

But one of my favorite projects to ctrl-f for "fuck" is in the jedi outcast source code. Since it is proprietary and was a good game: https://github.com/search?q=repo%3Agrayj%2FJedi-Outcast+fuck...

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

#47
post #5

I'd bet a lot of the non-profanity code is people open sourcing code just to be impressive on resumes or for school, where the profanity code is probably real code. Sounds likely to be a classic case of correlation != causation

Rorschach test for programmers: give your confident gut feeling explanation for this phenomenon. I'll do mine: there's likely a correlation between needing to maintain a professional conduct which includes forgoing foul language (you're programming at work) and writing code under time pressure where getting a product ready for release is more important than strict adherence to clean programming practice (you're progr…

Everything is correlated: https://gwern.net/everything

Take almost any two things like this and you're actually virtually guaranteed to draw out some weak, but quite likely statistically significant, correlation.

What lies behind that correlation is probably a entropic mishmash of so many factors that it defies human explanation, and also, defies any attempt to try to "harness" the forces that seem to appear. It could be that all the siblings to the comment are right all at once.

I'll cop to just glancing at the graphs, but they don't look out of line for this effect to me intuitively.

Also backing this is that more-or-less the same article/thesis could easily have been written for the opposite correlation.

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

#48
post #5

I'd bet a lot of the non-profanity code is people open sourcing code just to be impressive on resumes or for school, where the profanity code is probably real code. Sounds likely to be a classic case of correlation != causation

Rorschach test for programmers: give your confident gut feeling explanation for this phenomenon. I'll do mine: there's likely a correlation between needing to maintain a professional conduct which includes forgoing foul language (you're programming at work) and writing code under time pressure where getting a product ready for release is more important than strict adherence to clean programming practice (you're progr…

The developer who knows what they're doing is also more likely to be 1) overworked because they do much of the useful stuff and 2) cognizant of bureaucracy which gets in the way of them doing useful stuff.

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

#49
in other words, it increases the chance that the programmer is in a specific locale (like the US?) such that the location has less bad programmers than other locations.

And probably, increases the chance that the person is fed up with fixing someone else's code - hence the anger

Post reply on HN