Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

11–20 of 221 posts

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

#11
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 would bet the opposite because I can make a blind assertion.

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

#12
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 written in C or C++ with respect to coding standard adherence. The coding standard adherence is assessed using a set of static and dynamic code analysers such as Lizard (https://github.com/terryyin/lizard) or the Clang address sanitiser (https: //clang.llvm.org/). It returns a score between 0 (low adherence) and 10 (good adherence). In order to simplify our experimental setup, we excluded the compilation warnings, which require a difficult to automate compilation of the assessed software, from the analysis using the --exclude-compilation option.

[0]: https://github.com/adrianzap/softwipe

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

#13
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 would bet the opposite because I can make a blind assertion.

You're beting that people swear in code in order to impress future employers?

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

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

So, you're saying that my code won't improve simply by sprinkling F-Bombs everywhere?

The C code so impressive they had to remove it from K&R:

if (*some_bullshit >= shit_tolerance){

fucks_given = 0;

exit(IM_DONE);

}

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

#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 impressed by this.

Not that I think it's *bad* per se, I'm not clutching pearls or anything. But I never find myself thinking what the code really needs are profanities in the comments. Whereas back then I thought it'd be funny/cool and went out of my way to do so when I could. Which wasn't often.

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

#17

I remember reading that people who swear a lot are statistically smarter. I'm sure there are lots of caveats to that, as with the code. How long will it be before someone who doesn't understand causality starts encouraging developers to write profane comments? It wouldn't be any more absurd than lots of other non-causal behaviors I've seen pushed because somebody successful does them.

Failing to provide the typical social signals seems correlated either with extreme competence - they don't need to use polite language or other signals to boost employability - or with complete incompetence. There's a skill floor that cuts off the latter from this dataset when they can't configure an SSL certificate for their git client; their curses at "unable to get local issuer certificate" or "fatal: repository not found" are not uploaded to the Internet.

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

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

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

#20

I remember reading that people who swear a lot are statistically smarter. I'm sure there are lots of caveats to that, as with the code. How long will it be before someone who doesn't understand causality starts encouraging developers to write profane comments? It wouldn't be any more absurd than lots of other non-causal behaviors I've seen pushed because somebody successful does them.

I believe Nassim Taleb wrote about this in relation to 'virtue signaling' - not swearing being a sign that people are trying to 'signal' professionalism in order to keep their jobs, and therefore are more likely to have less actual professional skills (which if good enough would secure their jobs regardless of profanity) and vice-versa. Same for hoodies over ties, etc. Although all this probably gets flipped now that we have people writing papers like this - context is everything.
Post reply on HN