Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

91–100 of 221 posts

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

#91
post #13

Earlier quoted context omitted.

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

No, they are saying your argument is baseless and they can do the same.

Can they though? Like sure its pretty easy to idly speculate, but instead of doing that they decided to claim the opposite. My claim, well i wouldn't call it baseless since its based on the study protocol in TFA, certainly might be wrong. But the opposite claim is almost surely wrong, to the point of being absurd. Which is the claim they made.

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

#93
post #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!

I mean i think the article is implying that. However i think the bigger thing is the correlation is misleading due to the sample being the long tail of github projects, which i dont think is representitive of "production" open source projects and certainly not software in general.

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

#94
When we open sourced the Netscape Navigator a major undertaking was code sanitation. This including excising licensed libraries etc (resulting in an initial release that wasn’t able to compile), but also removing enormous amounts of profanity and references to how evil Microsoft was.

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

#95

From the research paper: > we calculate the swear factor as the number of swearwords divided by the lines of code That's what I suspected. Assuming that most swear words will be contained in comments, what this is actually measuring is the ratio of comments to code. In other words, code that is more heavily commented is better. I think we already knew this. That said I would like to see a more critical analysis. Firs…

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 why three and I think the fourth will leave our company after original developer left undocumented and hard to understand code (it's pretty complex and has tons of hacks to work on different OS'es), first year they learn what the hell is that code, how it works and they are not allowed to comment anything (I asked few times why we waste so much time for basic stuff, they said it is unnecessary...ok I guess). Now they hired original developer for tons of money just to consult newest developer and explain him code. Reasonable I guess.

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

#96

Earlier quoted context omitted.

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

https://www.sciencedirect.com/science/article/pii/S187704281... It's really not a big leap, though. People who are afraid of violating a code of conduct because they're "under the watch of language police" are basically experiencing a form of anxiety that may or may not have a basis in reality. Being afraid of being sent to the HR DEI board because you named a process 'Child1' then ran Kill(Child1) ... or any less ob…

[deleted]

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

#98

From the research paper: > we calculate the swear factor as the number of swearwords divided by the lines of code That's what I suspected. Assuming that most swear words will be contained in comments, what this is actually measuring is the ratio of comments to code. In other words, code that is more heavily commented is better. I think we already knew this. That said I would like to see a more critical analysis. Firs…

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.

While I carefully keep others away from my code the notes say I have a complicated relationship with my future self. While comments should be the least useful to me I've tried many formats and found that it is spectacular to have the full elaborate comment above each bite sized nugget of code. I mean that what was solved as a single thing after breaking down the larger problem.

The result is that I don't read any code at all. The whole thing is compiled to the native format that is human language. The code is great for illustration.

If I keep it in separate files as documentation it takes to much effort to find and update. It takes needles extra effort and is less precise.

It is just a personal preference of course but if one had any experience writing code in any language it should be easy to grasp say at 4 am while drunk.

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

#100

From the research paper: > we calculate the swear factor as the number of swearwords divided by the lines of code That's what I suspected. Assuming that most swear words will be contained in comments, what this is actually measuring is the ratio of comments to code. In other words, code that is more heavily commented is better. I think we already knew this. That said I would like to see a more critical analysis. Firs…

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.

No-comments are better than low-effort, low-quality, unmaintained comments, for sure.

You can imagine a world where all the projects that aren't realistically going to spend the effort on high-quality maintained comments makes the correct choice to skip comments unless absolutely necessary. And where projects that are realistically going to put effort into high-quality, maintained comments, do so.

In this world, comment density would correlate highly with code quality per line of code. Profanity might not, I'm not sure. I do think you'd still find profanity in high-effort, high-quality, maintained comments, but it might indicate lower quality surrounding code, not higher.

And it would still be unclear whether the existence of comments are a cause of higher quality code, or just a proxy for amount of effort and care taken per line of code.

Post reply on HN