Slashdot Mirror


Comment Profanity by Language

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.

44 of 263 comments (clear)

  1. Perfect? by SatanicPuppy · · Score: 4, 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.

    --
    ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    1. Re:Perfect? by somersault · · Score: 4, 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..

      --
      which is totally what she said
    2. Re:Perfect? by Dayze!Confused · · Score: 4, Informative

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

      --
      "All tyranny needs to gain a foothold is for people of good conscience to remain silent." [Thomas Jefferson]
    3. Re:Perfect? by TheRaven64 · · Score: 5, Insightful

      In my personal opinion, developers like you are the reason why every single 'working' piece of Python code I've encountered has required me to spend time debugging it before actually using it.

      --
      I am TheRaven on Soylent News
    4. Re:Perfect? by Lord+Ender · · Score: 4, Funny

      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.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    5. Re:Perfect? by eln · · Score: 5, Insightful

      Most people skilled in a language (yes, even perl) can figure out what a piece of code actually does given enough time to look through it. The comments are to tell us what the code is *supposed* to do and *why*, so when we need to debug it we know what you were thinking when you wrote it and what you were trying to accomplish. When you're trying to figure out why a piece of code doesn't do what it's supposed to do, it's very helpful to know what it was supposed to do first.

    6. Re:Perfect? by dkleinsc · · Score: 2

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

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    7. Re:Perfect? by Lije+Baley · · Score: 3, 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?

      --
      Strange things are afoot at the Circle-K.
    8. Re:Perfect? by Ikkyu · · 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.
      Although that way may not be obvious at first unless you're Dutch.
      Now is better than never.
      Although never is often better than *right* now.
      If the implementation is hard to explain, it's a bad idea.
      If the implementation is easy to explain, it may be a good idea.

    9. Re:Perfect? by grcumb · · Score: 3, 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++.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    10. Re:Perfect? by mkiwi · · 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)

    11. Re:Perfect? by Thing+1 · · Score: 2

      I really dislike useless comments.

      And yet you posted that.

      --
      I feel fantastic, and I'm still alive.
    12. Re:Perfect? by slashqwerty · · Score: 2

      Explicit is better than implicit.

      Excellent. When is Python going to add start and stop delimiters for blocks of code?

  2. C++ Templates by Bloodwine77 · · Score: 3, Funny

    C++ Templates will turn the most pious programmer into a curse-slinging, chain-smoking alcoholic.

    1. Re:C++ Templates by maxwell+demon · · 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.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  3. Also a bar chart! by Abstrackt · · Score: 5, Funny

    There's also a bar chart because somebody couldn't interpret the pie chart....

    --
    They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance. - Terry Pratchett
    1. Re:Also a bar chart! by Abstrackt · · Score: 2

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

      --
      They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance. - Terry Pratchett
  4. Isn't profanity a part of C++? by ibsteve2u · · Score: 2, Funny

    Like isn't polymorphism a reference to the ability to fuck anything up - with class?

    --
    Orwell: "In a Time of Universal Deceit, telling the Truth is a Revolutionary Act"
  5. Re:Perfection. by mini+me · · Score: 4, Funny

    Ruby only scored so high because of David Heinemeier Hansson. Source: http://farm1.static.flickr.com/47/127984254_ddd4363d6a.jpg

  6. NOT CODE COMMENTS!! by iYk6 · · 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.

    1. Re:NOT CODE COMMENTS!! by angus77 · · Score: 2

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

    2. Re:NOT CODE COMMENTS!! by amicusNYCL · · Score: 2, 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?

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    3. Re:NOT CODE COMMENTS!! by digitig · · Score: 2

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

      --
      Quidnam Latine loqui modo coepi?
    4. Re:NOT CODE COMMENTS!! by xero314 · · Score: 3, Insightful

      What percentage of people writing commit messages do you think know what source control is?

      Sadly, far less than logic would dictate.

  7. Margin of error by nzap · · 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?).

  8. PHP For The Fucking Win by Anonymous Coward · · 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.

  9. Wholesome AND perfect. by quixote9 · · Score: 2

    PHP users are both. Obviously.

  10. Re:PHP programmers by TheRaven64 · · Score: 5, Funny

    PHP programmers have such a low number of profanities in comments because they have yet to learn to comment their code.

    --
    I am TheRaven on Soylent News
  11. Re:Javascript profanity breakdown. by dmomo · · Score: 2

    I'd throw in CSS too in that case. I'm sure the biggest find would be "fuck" + "IE6"

  12. I remember having to do that once by Cthefuture · · Score: 4, 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.

    --
    The ratio of people to cake is too big
    1. Re:I remember having to do that once by Bill+Dog · · Score: 2

      Gee, thanks a lot. You might as well have posted an ASCII goatse. Now we're all scarred for life too.

      --
      Attention zealots and haters: 00100 00100
  13. No tits ? by Yvanhoe · · Score: 3, Funny

    As expected, no tits showed up in millions of git commits.

    --
    The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
  14. must bring balance to the Force by ChipMonk · · Score: 2

    So how long will it be, before we see an influx of profanities in PHP and Python, just to ruin their squeaky-clean images?

  15. Re:Visual Basic? by sqldr · · Score: 3, Funny

    10 years later.. why DOES this code work? and what the hell was in those cookies?

    --
    I wrote my first program at the age of six, and I still can't work out how this website works.
  16. Visual Basic by confused+one · · Score: 2

    My first thought was, "What no Visual Basic"? Then I realized it was redundant, Visual Basic is profanity.

  17. I love C++ Templates by LordZardoz · · Score: 2

    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

  18. To the uninformed: by failedlogic · · Score: 3

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

    to you too!

  19. Not just the comments by 6Yankee · · Score: 4, 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!

    1. Re:Not just the comments by Terrasque · · Score: 2

      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 of the android SDK :)

      --
      It's The Golden Rule: "He who has the gold makes the rules."
    2. Re:Not just the comments by Burps · · Score: 2

      This happened recently for a French TV : the guy who coded the video player called one of his function, "visible" to the client (at least, for true geeks), is called "piegeacouillons()", which means "dummytrap()".
      Actually it's activated when the user want to see the advertisement...
      article (in french), or google translation

  20. Yuh Huh by Greyfox · · Score: 2

    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.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  21. Re:Perfection. by IBitOBear · · Score: 3, 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!

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  22. Re:Perfection. by maxwell+demon · · 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. :-)

    --
    The Tao of math: The numbers you can count are not the real numbers.
  23. This Comment is not Profane by fast+turtle · · Score: 2

    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

    --
    Mod me up/Mod me down: I wont frown as I've no crown