Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

61–70 of 221 posts

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

#61
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?

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 obvious scenario similar to that ... is not going to do great things to your ability to work.

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

#62

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

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

#63

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.

It really depends on the comments. Best practice is to comment “why” something was done, not “what” is being done, or “how”. Every programmer can read code, most code should be pretty self-explanatory. But in any sufficiently complex routine, there are going to be some things that a programmer struggled to get working the first time, that they had to work around, or that was simply unintuitive. These should be commented. Generally I’ve found uncommented code bases to be thrown together haphazardly and to be of lower quality. Same with those that only trivially leave comment breadcrumbs about what is being done, duplicating the code itself.

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

#64

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…

I never write comments, and I think they typically have a negative correlation to quality (this code is so f**ed up, plain english is, of all things, more clear and precise than code!). Unless you are releasing code publicly, and you are documenting the public API, I've never seen a valuable comment. I've seen plenty of harmful comments. However I wholeheartedly endorse using this otherwise useless but common languag…

[flagged]

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

#65

Earlier quoted context omitted.

Swearing in the comments is for goodie goodies. Bad assed programmers swear in public apis like class names, functions, variables, and documentation!

The best programmers I've worked with swore at their coworkers regularly, but never in their code. They were not great people, and I'd happily kick them in the face if I would encounter no legal or professional repercussions, but, there definitely does seem to be some correlation (in my experience) between being abrasive and being a skilled programmer.

apotheosis in terry davis

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

#67

Earlier quoted context omitted.

Swearing in the comments is for goodie goodies. Bad assed programmers swear in public apis like class names, functions, variables, and documentation!

The best programmers I've worked with swore at their coworkers regularly, but never in their code. They were not great people, and I'd happily kick them in the face if I would encounter no legal or professional repercussions, but, there definitely does seem to be some correlation (in my experience) between being abrasive and being a skilled programmer.

Coworkers who swear are just more memorable. Plenty of great ones quietly get the job done without a fuss and without seeking to always cause a scene.

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

#69

> Much of the community considers profanity as a vulgar display of lack of intelligence and education, because why use profanity when you have a rich vocabulary? Why not use the full range of one's vocabulary?

Ten thousand bilious blue blistering barnacles that's a tremendous idea!

Or by "full range" did you mean "limit it to a few well-worn cliches"?

Post reply on HN