Live data from Hacker News

Open source code with profanity in comments is statistically better

blog.desdelinux.net

151–160 of 221 posts

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

#151
post #62

Earlier quoted context omitted.

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

the code can't get out of sync with itself. i agree, that's a dumb policy. boilerplate comments are just as bad as boilerplate code-- the policy should be to comment when something is notable, in the manner that's appropriate for the context.

but comments telling you one thing is happening when something else is happening is a problem, and i suppose it couldn't happen if the comments weren't there.

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

#153

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…

That assumes that most comments contain cursing.

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

#154
post #140

Earlier quoted context omitted.

"Why" is a really good way to put it, like you say - doing "What" just repeats something a novice, possibly even a layman, could distinguish. I tend to treat them like a strange hybrid of a story with editor's notes. Here's where we're going... but oh no! Something is in the way. We need this critical, but painful to acquire shovel. If I anticipate even the slightest bit of refactoring around it, I'm noting what devi…

It depends on the domain. I would be cautious about assuming that concise comments explaining what is being done in a block of non-trivial code are unnecessary. I have seen too many people write code they assume to be trivial (after spending days/weeks/months/years developing necessary background knowledge to understand it) when it's not the case at all. Debugging errors in undocumented code that involves several com…

That's completely fair!

There have been cases where very slight changes in methodology completely fall apart - reasons varying. Timing, cache fit, and whatever else you may think of.

Jenkins is something I've been picking up lately, and the 'DSL' has a ridiculous number of quirks

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

#155

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…

That assumes that most comments contain cursing.

No it doesn’t. If any more than 0% of comments contain profanity, then on average code with more profanity will be better.

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

#157

I find it a bit suspect swearing would ever even get though a proper code review. It’s extremely unprofessional, I would tell someone to remove it.

you're from the east coast, aren't you?

At least in New England we swear quite a bit I’m not sure on what basis you are making that accusation

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

#158
post #80

Earlier quoted context omitted.

The jury is still out if I'm a good programmer, but I did one time need to use a hashmap that had to grow to about ~100gb in size. Because of that, I ended up calling it "bigassHashTable". It makes me happy that it remained being called that for quite awhile.

I remember a day at a previous job when our CEO came in and told us we weren't an early stage startup anymore and had to start acting like it. Remove profanity and inside jokes from the code, and no more Quake during lunch breaks. Morale took a big hit that day.

Time to unionize over that crap

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

#159

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…

as long as we’re designing the ideal experiment for someone else to do, let’s throw in the commit messages as well.

I wouldn’t be surprised if code quality goes up with comment curses and down again with commit message curses.

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

#160

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…

This tells me more about the impacts of anxiety writ large than it highlights the problem of “language policing.”
Post reply on HN