Comment Profanity by Language 263
beret found a nifty little pie chart breaking down
profanity in code comments broken down by language. He used Carlin's Seven Words, and C++ came out on top while PHP users are either wholesome or perfect.
Perfect? (Score:5, Funny)
More like they never fucking comment their motherfucking code.
Perl programmers never put in profane comments, because cursing in Perl itself is much more satisfying.
NOT CODE COMMENTS!! (Score:5, Informative)
Actually, contrary to the summary, this article has nothing to do with code comments, and so the amount of comments per code has no effect on the results. The profanity measured in the article is from git commit messages.
Re: (Score:2)
I am sure that the creator of the Ruby is not happy about the level of profanity.
Re: (Score:2)
It's okay. He is Japanese and in many ways the Japanese don't have swear words...at least not in the same way as English has them. Of course, I am making comments about another person who I do not know so take this with a grain of salt ;-p
Re: (Score:3)
Re: (Score:2)
Which was why I added :-p to the end of my post :-p But thank you for the extra detail.
Re: (Score:2)
Japanese absolutely has swear words you won't hear on TV. They don't have to include them to be bleeped out or worked around cleverly because of the other ways of expressing disgust and frustration that you mentioned... but they definitely have them.
Re: (Score:2)
He's a Mormon too, so yeah.
Re: (Score:2)
I lived in Japan for a while as a kid, so while I won't pretend to even be marginally fluent in the language, I got the impression while living there that Japanese had something at least somewhat similar to American swear words. For example, I once was sitting in a restaurant with a Japanese friend of my family's. In the restaurant was a parrot (myna bird? something like that, anyway) to which restaurant patrons had taught some choice phrases and/or words. Every time the bird was speak, t
Re: (Score:2)
It's not a matter of being offended, just that his goal with Ruby is for programming to be fun and not stressful.
Re: (Score:2)
Probably but I was more making a joke about him being LDS which culturally try to avoid profanity. But I would guess you are right. No one wants to think about someone using profanity about their work.
Re: (Score:2)
Re: (Score:3)
Actually, contrary to the summary, this article has nothing to do with code comments, and so the amount of comments per code has no effect on the results. The profanity measured in the article is from git commit messages.
The irony of that is probably only noted by British readers ("git" is a mild profanity in British English).
Re: (Score:2)
(A cocktail party in Dulwich. Quiet party-type music. Constant chatter.)
Host (Graham Chapman): Ah, John. Allow me to introduce my next-door neighbour. John Stokes, this is A Snivelling Little Rat-Faced Git. Ah!
Mr Git (Terry Jones): Hello, I noticed a slight look of anxiety cross your face for a moment just then, but you needn't worry - I'm used to it. That's the trouble of having a surname like Git.
John (Michael Palin): Oh ... yes, yes.
Mr Git: We did think once of having it changed by deed-poll, yo
Re: (Score:3, Insightful)
The original comment still stands - most PHP "programmers" I know couldn't tell the difference between source control and birth control.
What kind of stupid argument is that? Sure, a lot of people who claim to write PHP code don't know what source control is. But, again, these are commit messages. What percentage of people writing commit messages do you think know what source control is?
Re:NOT CODE COMMENTS!! (Score:4, Insightful)
What percentage of people writing commit messages do you think know what source control is?
Sadly, far less than logic would dictate.
Re:Perfect? (Score:5, Interesting)
More like they never fucking comment their motherfucking code.
My thinking exactly. Anyone who writes in PHP probably is using it because it's the easiest option..
Re: (Score:2)
I ripped an equal amount of commit messages per language
That means that PHP users have a lower incidence of swears per commit, i.e., a lower swear frequency. You may now continue your baseless PHP-bashing...
Re: (Score:2)
I know, right? Come on you lazy php programmers! Get off your asses and choose a harder option! What's the matter? Chicken? Bok bok bok! Oh, look at the little babies go crying home to their mommies!
Re: (Score:2)
Re: (Score:2)
I learned to write web apps in PHP at Uni, but just because it's easy doesn't make it good. I read it encourages poor habits in terms of the security of your apps, so I decided to look at other options. I didn't look very thoroughly as I settled on Perl, which I knew to be a good multi-purpose scripting language.. but I probably should have gone with Python as it seems to be growing while Perl declines.. even Ruby would have been okay, I didn't realise it was meant for more than just web coding when everyon
Re:Perfect? (Score:5, Informative)
Really the title of the /. article is misleading, it is Commit Profanity by Language, which is entirely different.
Re:Perfect? (Score:5, Funny)
I love Perl programs, like I love the Perl stack-traces. I have sampled every language, Perl is my favorite. Fantastic language. Especially to curse with. It's like wiping your ass with unix.''=~('(?{'.('/_)@){'^'_-@.][').'"'.('___[^'^'-*="|').',$/})'). I love it.
Re: (Score:2)
.so Perl programmers watched the other Matrix movies, I knew it.
Re: (Score:3)
All I know is that I'm sick and tired of these motherfuckin' comments on this motherfuckin' server!
Re: (Score:2)
Also, you never know what "$%!!!#$!!()$!$)!" will actually parse...
Re:Perfect? (Score:4, Insightful)
More like they never fucking comment their motherfucking code.
Perl programmers never put in profane comments, because cursing in Perl itself is much more satisfying.
There's a perfectly reasonable explanation for all of this: PHP is a web language, whereas everyone knows that most curses-based programs are written in C or C++.
Re:Perfect? (Score:5, Insightful)
Re:Perfect? (Score:4, Funny)
I agree with parent. Although, since I started coding using Objective-C naming conventions (even in other languages), I've found that many comments are unnecessary. When you have a method called:
putTextPaneFromSearchBoxInMainNSView(TextPane * textPane, NSView * primaryView)
it's pretty clear what it means. I don't think many python programmers have learned that style yet, thus you see the problems with the code. (My experience, YMMV)
Re:Perfect? (Score:5, Insightful)
Re:Perfect? (Score:4, Insightful)
Erm, how did you know it wasn't doing what it was supposed to do if you didn't first know what it was supposed to do?
Re: (Score:2)
Erm, how did you know it wasn't doing what it was supposed to do if you didn't first know what it was supposed to do?
You know what the overarching program is supposed to do, and it's not doing it, so you look at the code. You don't know which part of the code is doing what and what approach is being used to accomplish the task until you look at it. You don't know what the original coder meant to do with that individual section of code unless he has commented it (or you managed to figure it out, but if the code is wrong in the first place, you might have problems doing that).
Re: (Score:2)
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
A
Re: (Score:3)
Excellent. When is Python going to add start and stop delimiters for blocks of code?
Re: (Score:2)
Most people skilled in a language (yes, even perl) can figure out what a piece of code actually does given enough time...
Unfortunately, in the case of perl, human beings do not have a sufficiently long lifespan :D
I kid, I kid (mostly...)! However, even though I'm on the perl side of a perl vs. python debate where I work, I have to admit, I'd much rather try to figure out what someone else's python code did than try to figure out what someone else's perl code did. There are just too many ways to do the same thing in perl, and some of those ways can get pretty darned arcane.
Re: (Score:2)
I generally don't comment my code if it's obvious what it is supposed to do. The question of "why" is usually fairly easy to figure out in those cases, as well, depending on the situation. I really dislike useless comments.
Re: (Score:3)
I really dislike useless comments.
And yet you posted that.
Re: (Score:2)
If you find a comment saying A, and a piece of code that does B, it could be that the implementation of B has a bug, or it could be that the code is supposed to do B and the comment is what's wrong. Unless you really understand a lot, you can't really assume one or the other.
This is why code should be worked out so that it mostly speaks for itself with little need for comment. It's not that comments are bad, it's that, because they have no bearing on the code generated by the compiler, they can easily becom
Re: (Score:2)
I was mad back then, quite, quite mad....
Intercal, now that would have been mad, quite, quite mad.
C++ Templates (Score:3, Funny)
Re: (Score:2)
um...
Re: (Score:3, Insightful)
C++ Templates will turn the most pious programmer into a curse-slinging, chain-smoking alcoholic.
Only those who don't understand them.
Learn a functional programming language, and you'll understand much more about C++ template programming.
I love C++ Templates (Score:3)
I am very comfortable implementing C++ templates.
The only issue I have is when I am trying to debug them, as most debuggers give output that is barely legible for non trivial template code.
END COMMUNICATION
Re: (Score:2)
I'm thinking that more a cowpiler problem than a debugger one...
Re: (Score:2)
The only issue I have is when I am trying to debug them, as most debuggers give output that is barely legible for non trivial template code.
As was already pointed out, C++ template programming is more functional (or declarative, depending how you use it) than imperative. You really don't gain much understanding by single-stepping through it. Same goes for other similar languages. You're trying to think imperatively when that's not really the best mental model.
I don't really have a good suggestion for a de
Re: (Score:2)
Then you're doing it wrong -- at the point you can no longer grok what's going on, you've used too much of the feature (for your current level of ability to work with it).
Well, then, I suggest any C++ newbie stay away from the STL, (esp. <iostream> and <string>).
/cryoscript/src/core-test.cpp: In function ‘int main(int, char**)’:
/cryoscript/src/core-test.cpp:116: error: no match for ‘operator<<’ in ‘std::operator<< [with _Traits = std::char_traits<char>](((std::basic_ostream<char, std::char_traits<char> >&)(& std::cout)), ((const char*)"Mem: ")) << * mm’
/usr/include/c++/4.4/ostream:108: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>& (*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:117: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:127: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:165: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:169: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:173: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/bits/ostream.tcc:91: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:180: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/bits/ostream.tcc:105: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:191: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:200: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:204: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:209: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:213: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:221: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/ostream:225: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.4/bits/ostream.tcc:119: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
make[3]: *** [CMakeFiles/core-test.dir/src/core-test.cpp.o] Error 1
make[2]: *** [CMakeFiles/core-test.dir/all] Error 2
make[1]: *** [CMakeFiles/core-test.dir/rule] Error 2
make: *** [core-test] Error 2
Silly me, It's so obvious that I shouldn't have used cout << mm << endl; instead of cout << *mm << endl;.
Seriously? You should see what happens when you combine a string and cout error... (this is without even using any of my own templates -- I've used template classes inside template classes and the error messages were so ridiculous, I just ignored them and refer to diff).
Of
PHP programmers (Score:2)
are under close observation and medication, any profanity is silently ignored.
Re: (Score:2)
Maybe it's time someone modified the preprocessor to recognize the #if-fucked directive.
Re:PHP programmers (Score:5, Funny)
Re: (Score:2)
Also a bar chart! (Score:5, Funny)
Re: (Score:2)
From an infographics standpoint, bar and pie charts convey different meanings. Pie charts are useful for quickly visually approximating how much of the whole a particular part is (percentage). Bar charts, however, are very good at quickly conveying comparative sizes between the parts.
Sure, if you read into the chart enough you can deduce the same information from both, but at a quick glance you can interprit different types of correlative information from the two different chart styles. In this particular e
Re: (Score:3)
Re: (Score:2)
A pie graph is somewhat inappropriate since the units aren't really related. C++ may have 24% of the swears, but it's more interesting the swears for the language rather than the language for the swears.
Without information on how many words were in each language, the data is pretty useless anyways. There might be only 5 messages in PHP all containing swears and 500,000 in C++ with only 48 swears.
Re: (Score:2)
There might be only 5 messages in PHP all containing swears and 500,000 in C++ with only 48 swears.
According to TFA: "Note that I ripped an equal amount of commit messages per language so the results aren't based on how many projects there are per language."
Isn't profanity a part of C++? (Score:3, Funny)
I'd be curious... (Score:2)
Re: (Score:2)
Not to mention my personal favorites: HACK HACK HACK / WTF / FIXME
To me these are dirtier words in code than any of Carlin's, since they mean the surrounding code is probably broken!
Margin of error (Score:2)
C++ came out on top
Actually, JavaScript, C++, and Ruby came out on top. The difference between them is virtually indistinguishable (error bars anyone?).
PHP For The Fucking Win (Score:5, Funny)
As a goddamn PHP programmer, I am fucking glad that those cocksuckers don't put a lot of profane shit in the fucking comments. Unlike those asshole C++ programmer bastards. Goddamn cunts.
Re: (Score:2)
Fuck! The fucking fucker's fucking fucked!
commit message, not code comment (Score:2)
Re: (Score:2)
These are commit comments, which I can hardly see worth the effort to curse. Maybe C++ and Ruby developers are more rule based than others so they are more dedicated to making entertaining commit messages?
Ruby mostly works by POLA principle of least astonishment so there's little reason to be shocked and swear. C++ seems to be the opposite in how it draws moths to the flame of weird language features (Overload the + operator into actually subtracting, that type of thing). There is no obfuscated C++ code competition because any large C++ project is inherently obfuscated already, so wheres the sport in that?
http://en.wikipedia.org/wiki/Principle_of_least_astonishment [wikipedia.org]
Visual Basic? (Score:2, Funny)
' Mom! Why doesn't this code work? Can I have a cookie and fix it later?
Re:Visual Basic? (Score:4, Funny)
Re: (Score:2)
I wrote my first program at the age of six, and I still can't work out how this website works.
You need more cookies.
Wholesome AND perfect. (Score:3)
Is this more about the languages then the coders? (Score:2)
Re: (Score:2)
It's how you use it (Score:2)
Maybe the PHP people just can't decide if the swears should be nouns or verbs.
I remember having to do that once (Score:5, Interesting)
When I was in high school many moons ago I wanted to get into a programming class but my grades weren't good enough so I had to submit some programming work to the teacher. I gave her the source code for a BBS I had written. I remember having to go through the entire source base looking for profanity I had used in variable names, comments, etc. Being the teenager that I was I would sometimes just use them for no reason.
I remember laughing to myself when I handed her that code. It must have been over 200 pages of printed source and I could tell she probably couldn't even write a sort function. This was back in the 80's when the educational system had almost no computer classes, let alone programming.
It was at that time I realized that sometimes other people look at your code and it can reflect on you. I have never used profanity in source ever again. I also never berate other people's stuff in my code (like poorly written API's I have to use). Clean and professional makes for more readable code and keeps everyone happy, including myself.
Not everyone. (Score:2)
Profanity is a way of life for me. I love seeing profane comments in code—especially when they are someone else's AND relevant.
Clean and professional might be fine for you, but for fucking assholes like myself, it's fucking boring.
(My commits aren't any better.)
Re: (Score:2)
I don't cuss much in comments.
But I do leave threats of bodily harm should some things be done again.
For example. The worst single line of code I have ever seen. In Access VBA.
Global Variant aLocalArray()
Re: (Score:2)
I'm pretty sure the only reason you can comment in CSS is to say thing's like: /* The following section is to make IE unfuck itself. */
No tits ? (Score:4, Funny)
Re: (Score:2)
All the female geeks migrated... http://xkcd.com/624/ [xkcd.com]
Ball's Screw Theory (Score:2)
There has been a revival of screw theory in the study of robots and other machines. The basic idea is that any two rigid body postures can be connected by a helical (screw) motion along a single axis line -- this is attributed to Chasles (as in Chasles' Theorem).
Recently, a keyword search on this topic turned up a paper titled "Jerk Influence Coefficients, via Screw Theory, of Closed
Obligatory comic that's not Penny Arcade or xkcd (Score:2)
Obligatory Leisuretown
http://www.leisuretown.com/library/qac/28.html [leisuretown.com]
Yes, we had someone at work do this, and yes, from that day on we referenced him as F.B. (in polite company).
Re: (Score:2)
Clearly, calling someone "fagbot" is a mature and professional response when someone criticizes your source code. I suppose if they actually found it funny, maybe it's OK, but I can't imagine deciding to call someone this.
Re: (Score:2)
Obligatory Leisuretown
http://www.leisuretown.com/library/qac/28.html [leisuretown.com]
WTF Was that jibberish?
Why is Python so low? (Score:2)
I would have expected a lot more bolorful language from the python bommunity.
Silly bunts!
Re: (Score:2)
It's low because we don't have to waste our lives typing useless semi colons, curly braces and the word end.
must bring balance to the Force (Score:3)
Visual Basic (Score:3)
Re: (Score:2)
Me thinks you're gonna have a hard time finding a VB project on GitHub.
personal explanations (Score:2)
In my experience, Rubyists think profanity is cute ever since the famous DHH "Fuck You" slide.
Misconfigured Apaches dump PHP source code out all over the helpless user. Perhaps PHP developers swear less because they expect more eyes on the code due to this kind of accident.
To the uninformed: (Score:4)
Shit, Piss, Fuck, Cunt, Cocksucker, Motherfucker, Tits
to you too!
I don't curse in comments... (Score:2)
... I curse in the actual code!
int *sh_ttyF_ckingPointer = &gSomeSh_ttyArray[MAGIC_F_CKING_NUMBER_A_SHOLE];
Not just the comments (Score:5, Funny)
On my last project, someone added a third-party Javascript calendar. I was horrified to discover that it had a function called continuationForTheFuckingKHTMLBrowser().
It's one thing if it's server-side code, and I'll occasionally slip up and put "wtf" in a PHP comment (usually in some "never happen" safety block). But don't do it where inquisitive and technical users (of which we had several) can get at it. And certainly not in code that's intended for others to expose to *their* users.
After I'd renamed that function and committed, I searched the entire project for every swear word I could think of. Amusingly, though the rest of the source was clean, buried in the bytecode of our packaged-up WAR file was the sequence upper-case F, lower-case u, c, k, exclamation mark. Even the compiler was at it!
Re: (Score:3)
I'll occasionally slip up and put "wtf" in a PHP comment (usually in some "never happen" safety block).
I think you'll love this part [android.com] of the android SDK :)
Nobody's perfect. (Score:2)
Yuh Huh (Score:3)
frustration (Score:2)
The top 3 are C++, C, and JavaScript, which are pretty much the three most badly designed and most frustrating languages on the list. No wonder they lead the list in profanity.
This Comment is not Profane (Score:3)
The answer is 43
Sorry folks but everyone who thought the answer to Life, The Universe and Everything Else was 42 is incorrect. It's Odd
Re:Perfection. (Score:5, Funny)
Ruby only scored so high because of David Heinemeier Hansson. Source: http://farm1.static.flickr.com/47/127984254_ddd4363d6a.jpg [flickr.com]
Re:Perfection. (Score:4, Insightful)
Php showed up as perfect because it is almost perfectly comment free.
This is an indictment of the language, not the programmers, since well-commented php is drastically slower (like .5% tomg!) than stripped down and nearly obfuscated code. That fraction really adds up when you have all those unnecessarily dynamic web pages to generate.
Now if someone were to do a comparison on the ratio of active code, to code that is commented out but not removed because the author doesn't use version control... In that category PHP would freaking rule!
Re: (Score:3, Funny)
The PHP interpreter tends to get bored with executing the code, and then browses the repositories. The less comments there are in the commit messages, the less time the PHP interpreter spends reading them, and the more time it can use to actually interpret the code. :-)
Re: (Score:2)
Congratulations on being the wrong kind of nerd. A commit message is a message attached to a commit in a version control repository. The commit message is basically your explanation of what you changed and why. This is most often used in software development, but is applicable for almost any cooperative authoring environment.
Re: (Score:3)
I'd throw in CSS too in that case. I'm sure the biggest find would be "fuck" + "IE6"
Re: (Score:2)
Or maybe he was tracking commit messages and this has nothing to do with code comments.