Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming

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.
This discussion has been archived. No new comments can be posted.

Comment Profanity by Language

Comments Filter:
  • Perfect? (Score:5, Funny)

    by SatanicPuppy ( 611928 ) <Satanicpuppy@nosPAm.gmail.com> on Tuesday February 22, 2011 @05:02PM (#35284460) Journal

    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)

      by iYk6 ( 1425255 ) on Tuesday February 22, 2011 @05:13PM (#35284604)

      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.

      • by LWATCDR ( 28044 )

        I am sure that the creator of the Ruby is not happy about the level of profanity.

        • 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

          • Japanese has just as many ways to express disgust and frustration as any other language. It's just that those words don't have the heavy taboos associated with them which would make them "swear words" (and get bleeped).
            • Which was why I added :-p to the end of my post :-p But thank you for the extra detail.

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

          • He's a Mormon too, so yeah.

          • Ummm...maybe.

            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
          • by sjames ( 1099 )

            It's not a matter of being offended, just that his goal with Ruby is for programming to be fun and not stressful.

            • by LWATCDR ( 28044 )

              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.

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

        • (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:Perfect? (Score:5, Interesting)

      by somersault ( 912633 ) on Tuesday February 22, 2011 @05:17PM (#35284672) Homepage Journal

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

      • by raddan ( 519638 ) *
        Come on guys:

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

      • 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:Perfect? (Score:5, Informative)

      by Dayze!Confused ( 717774 ) <(slashdot.org) (at) (ohyonghao.com)> on Tuesday February 22, 2011 @05:17PM (#35284674) Homepage Journal

      Really the title of the /. article is misleading, it is Commit Profanity by Language, which is entirely different.

    • Re:Perfect? (Score:5, Funny)

      by Lord Ender ( 156273 ) on Tuesday February 22, 2011 @05:23PM (#35284740) Homepage

      Perl programmers never put in profane comments, because cursing in Perl itself is much more satisfying.

      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.

    • All I know is that I'm sick and tired of these motherfuckin' comments on this motherfuckin' server!

    • Also, you never know what "$%!!!#$!!()$!$)!" will actually parse...

    • Re:Perfect? (Score:4, Insightful)

      by grcumb ( 781340 ) on Tuesday February 22, 2011 @07:13PM (#35285818) Homepage Journal

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

  • by Bloodwine77 ( 913355 ) on Tuesday February 22, 2011 @05:06PM (#35284502)
    C++ Templates will turn the most pious programmer into a curse-slinging, chain-smoking alcoholic.
    • by sqldr ( 838964 )
      .../me looks at lit fag.... looks at visual studio... looks at glass of wine... looks back at visual studio...

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

        • by Svartalf ( 2997 )

          I'm thinking that more a cowpiler problem than a debugger one...

        • 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

  • are under close observation and medication, any profanity is silently ignored.

  • by Abstrackt ( 609015 ) on Tuesday February 22, 2011 @05:08PM (#35284528)
    There's also a bar chart because somebody couldn't interpret the pie chart....
    • 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

      • True, but you are still clearly capable of interpreting a pie chart. The exact words used by the person who caused a bar chart were "Pie chart? I have no idea how to interpret this..." leading me to believe they probably won't do much better with a bar chart. ;)
    • by Ksevio ( 865461 )

      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.

      • by Rary ( 566291 )

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

  • by ibsteve2u ( 1184603 ) on Tuesday February 22, 2011 @05:09PM (#35284544)
    Like isn't polymorphism a reference to the ability to fuck anything up - with class?
  • To see the results with a few choice words added to the Carlin's Seven. Offhand "Kill", "Hate", and "Die" would probably show themselves quite a lot.
    • by BillX ( 307153 )

      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!

  • C++ came out on top

    Actually, JavaScript, C++, and Ruby came out on top. The difference between them is virtually indistinguishable (error bars anyone?).

  • by Anonymous Coward on Tuesday February 22, 2011 @05:15PM (#35284632)

    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.

  • 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?
    • by vlm ( 69642 )

      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]

  • by PPH ( 736903 )

    ' Mom! Why doesn't this code work? Can I have a cookie and fix it later?

  • by quixote9 ( 999874 ) on Tuesday February 22, 2011 @05:23PM (#35284748) Homepage
    PHP users are both. Obviously.
  • This could be a crude (pun intended) reflection of how difficult the languages are to use.
  • Maybe the PHP people just can't decide if the swears should be nouns or verbs.

  • by Cthefuture ( 665326 ) on Tuesday February 22, 2011 @05:31PM (#35284852)

    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.

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

    • 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()

  • No tits ? (Score:4, Funny)

    by Yvanhoe ( 564877 ) on Tuesday February 22, 2011 @05:32PM (#35284854) Journal
    As expected, no tits showed up in millions of git commits.
    • All the female geeks migrated... http://xkcd.com/624/ [xkcd.com]

    • There was a British astronomer by the name of Sir Robert Ball, who published his Treatise on Screws in the early 1900's.

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

  • I would have expected a lot more bolorful language from the python bommunity.
    Silly bunts!

    • It's low because we don't have to waste our lives typing useless semi colons, curly braces and the word end.

  • by ChipMonk ( 711367 ) on Tuesday February 22, 2011 @05:46PM (#35285012) Journal
    So how long will it be, before we see an influx of profanities in PHP and Python, just to ruin their squeaky-clean images?
  • by confused one ( 671304 ) on Tuesday February 22, 2011 @06:02PM (#35285170)
    My first thought was, "What no Visual Basic"? Then I realized it was redundant, Visual Basic is profanity.
  • 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.

  • by failedlogic ( 627314 ) on Tuesday February 22, 2011 @06:34PM (#35285488)

    Shit, Piss, Fuck, Cunt, Cocksucker, Motherfucker, Tits

    to you too!

  • ... I curse in the actual code!

    int *sh_ttyF_ckingPointer = &gSomeSh_ttyArray[MAGIC_F_CKING_NUMBER_A_SHOLE];

  • by 6Yankee ( 597075 ) on Tuesday February 22, 2011 @07:19PM (#35285850)

    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!

    • 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 :)

  • Nah. PHP and Python users aren't wholesome, they just can't spell.
  • by Greyfox ( 87712 ) on Tuesday February 22, 2011 @08:16PM (#35286302) Homepage Journal
    Finding out that the H1B Programmer you just replaced on a project that was due a couple of weeks ago didn't understand the concept that C strings are null terminated is worthy of a profanity or two in comments. Having management need MORE than that to justify throwing everything away and starting over is grounds for a few more.
  • 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.

  • by fast turtle ( 1118037 ) on Wednesday February 23, 2011 @10:36AM (#35290478) Journal

    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

Technology is dominated by those who manage what they do not understand.

Working...