Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

21–30 of 221 posts

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

#21

This is an example where correlation does imply causation IMHO

The author of the paper suggests it's because the author of the code cares more, and is more passionate. Do you think it's just random chance there is a correlation, or do you have a better explanation for the results?

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

#22

I'm sure the top comment here will be something like "this is invalid because no way can you assign a numerical value to code quality! wtf?!" I'm withholding my own judgement on that. For anyone curious, the authors are coming up with a code quality score using an open-source tool called SoftWipe[0]. From the paper: > SoftWipe is an open source tool and benchmark to assess, rate, and review scientific software writte…

The obvious question is whether the source code for this tool has profanity in it…

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

#23
post #15
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

I remember there being a startup in the Dotcom era, I forget the name but for people familiar with Cambridge, MA it was where the IDEO is now. They were notorious for a few things, but one of them was writing open source software with a lot of profanity. I thought this was cool, and was talking excitedly about it to my boss and some of the senior devs. They were less amused. Cut 20 years later and I too am less impre…

I wonder if swearing can help "free the mind" in some way, with the "rebellion" opening up more, perhaps non-standard/out of the box, "fucking good" ideas?

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

#24
post #23
post #15

Earlier quoted context omitted.

I remember there being a startup in the Dotcom era, I forget the name but for people familiar with Cambridge, MA it was where the IDEO is now. They were notorious for a few things, but one of them was writing open source software with a lot of profanity. I thought this was cool, and was talking excitedly about it to my boss and some of the senior devs. They were less amused. Cut 20 years later and I too am less impre…

I wonder if swearing can help "free the mind" in some way, with the "rebellion" opening up more, perhaps non-standard/out of the box, "fucking good" ideas?

or express a wide range of subtlety.

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

#25
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

I don’t think anyone is saying it’s causation, the correlation is in and of itself interesting!

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

#26
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 programming at work).

Everyone post your favourite conjecture!

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

#27

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.

Sounds like you're suggesting a causal relationship the other way, though. As per this explanation, putting effort into debugging edge cases will statistically cause the comments to swear more.

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

#28
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.

Possible explanation: The code for the fast inv sqrt is copy pasted everywhere and is skewing the results.

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

#30
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".

Post reply on HN