Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

51–60 of 221 posts

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

#54

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

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.

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

#55

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.

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

#56

Isn't there a study that shows that people can tolerate pain better when they swear? This doesn't really surprise me. I'll swear in my code if I really feel like it but commits and everything else I keep more presentable.

It's just that you've evolved biological filters that "block" the swearing from getting voiced out as being presentable takes the priority? The way our society is progressing right now, such evolution seems to be the direction that we all will take eventually.

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

#57

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

> But one of my favorite projects to ctrl-f for "fuck" is in the jedi outcast source code.

https://www.youtube.com/watch?v=R_b2B5tKBUM

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

#58

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 language feature for swearing.

I think swearing in comments indicates you are unburdened by bureaucracy and pointy haired bosses (because they prohibit such things), which would certainly lead to better code.

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

#59

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.

I'm not sure the ratio of comments to LoC is a sign of good quality code.

Too many comments might actually be a bad thing. It's more lines to maintain, and sometimes the comments just tell what the code is doing where there is no need to.

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

#60

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.

Wow, that seems strange to me. Seems like the policy should be to make comments when needed, and keep them up to date.
Post reply on HN