Slashdot Mirror


Why MS is Not Opening More Source Code

mario_grgic writes "Apparently inappropriate code comments is one of the reasons according to this story. I wonder what kind of things developers put in comments that would be so bad for the rest of us to see?"

59 of 526 comments (clear)

  1. comments? by Anonymous Coward · · Score: 5, Funny

    /* Nothing for you to see here. Please move along. */

    1. Re:comments? by G-funk · · Score: 2, Funny

      I've got comments like that. Before some API code I didn't want other developers using (stupid java's lack of a friends keyword) I had this: /* This code isn't really here *waves hand mysteriously, dates supermodel */ .... nasty sql code .... /* mmmm, supermodel */

      --
      Send lawyers, guns, and money!
  2. Best of the 'inappropiate comments' by rednip · · Score: 5, Funny
    • for a good time call June x12345
    • Linux rules!
    • It's like patching a Damn made of sawdust!
    • Man, this code sucks!
    • ToDo: this looks like a security hole (repeated 4689 times)
    • (got any more!)...
    --
    The force that blew the Big Bang continues to accelerate.
    1. Re:Best of the 'inappropiate comments' by Anonymous Coward · · Score: 5, Funny

      I prefer to think the most inappropriate comment possible would be:

      GNU General Public License, version 2.0

    2. Re:Best of the 'inappropiate comments' by Anonymous Coward · · Score: 5, Funny

      Cmon. UNIX comments are way funnier.

      My personal favorite:

      /* You are not expected to understand this. */

    3. Re:Best of the 'inappropiate comments' by Tehrasha · · Score: 2, Funny

      Im sure there are alot of offensive 'Master' and 'Slave' comments in DOS too..

    4. Re:Best of the 'inappropiate comments' by Anonymous Coward · · Score: 3, Funny

      I wonder if it is the 'inappropriate comments' or the 'inappropriate code'. Replacing the comments in code is easy but replacing the code is hard. Here is an example of what I mean (yes, a colleague actual did this once):

      public class JohnQPublic {
      public void GettinMyHo (int daBooty) { ...
      } ...
      }

      public class PimpDaddy{
      public GettinSome() {
      JohnQPublic johnDoe = new JohnQPublic();
      int inDaAss = 100;
      johnDoe.GettinMyHo(inDaAss); ...
      } ...
      }

      Except "John Doe" was usually people he didn't like. He wrote an entire program like this once. It was hilarious. Eventually he got fired for some other stupid nonsense, but this was a classic piece of code. The funny thing was, the program worked great...just a bit of a pain to maintain after he was gone ;)

    5. Re:Best of the 'inappropiate comments' by mungtor · · Score: 5, Funny

      Probably much more like: /* well, Bill is still a douchebag, so here goes the "extended" standard crap */

      or /* Instead of doing this right, we'll just keep doing it our way */

      and don't forget /* let's see those Open Source assholes figure this one out */

    6. Re:Best of the 'inappropiate comments' by Ba3r · · Score: 3, Funny

      that is usually followed by a:
      // W T F

    7. Re:Best of the 'inappropiate comments' by GordoSlasher · · Score: 4, Funny
      I found my favorite Unix comment while browsing through the Unix sixth edition source (yes this was a loooong time ago). Embedded within reams of commentless code was:

      /* this is a comment */

    8. Re:Best of the 'inappropiate comments' by enyalios · · Score: 3, Funny

      grep -R chainsaw /usr/src/linux

    9. Re:Best of the 'inappropiate comments' by devilspgd · · Score: 3, Funny

      It's too bad no IDEs support search and replace.

      --
      Give a man a fish, he'll eat for a day, but teach a man to phish...
    10. Re:Best of the 'inappropiate comments' by shawn(at)fsu · · Score: 2, Funny

      I've seen
      ToDo: Make this work

      I laughed each time I saw it.

      --
      500 dollar reward for tip(s) leading to the arrest of the person(s) who stole my sig.
    11. Re:Best of the 'inappropiate comments' by Midnight_Blue · · Score: 2, Funny

      My favorite: /* drunk.... fix later */

    12. Re:Best of the 'inappropiate comments' by Brandybuck · · Score: 5, Funny

      I see that one all the time in the proprietary code base at work.

      --
      Don't blame me, I didn't vote for either of them!
    13. Re:Best of the 'inappropiate comments' by Profane+MuthaFucka · · Score: 2, Funny

      My favorites: // Check for Dr. DOS, and exit if true // If this were Linux, lpt1: would be on fire. // Uh oh, somebody's looking. Enable A20. // Copyright 1989 IBM Corp.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    14. Re:Best of the 'inappropiate comments' by jzap · · Score: 4, Funny

      Or the Rene Magritte variant:
      /* This is not a comment. */

    15. Re:Best of the 'inappropiate comments' by ozbird · · Score: 2, Funny

      /* Drunk - fix later */

    16. Re:Best of the 'inappropiate comments' by MadMoses · · Score: 4, Funny

      Best comment I ever saw was an unused char array in some C code, initialised with all '0's, and the comment //here we insert some zeros to keep the code fluffy and airy

      --

      Do not be alarmed. This is only a test.
    17. Re:Best of the 'inappropiate comments' by Ashtead · · Score: 2, Funny
      The scary parts are the error messages from that file (drivers/net/sunhme.c) rather than the comments. Unlike the comments, they can be revealed to the word at large, and, since they are error messages, they will appear in a context of "my bloody network card has stopped and I'm only getting daft jokes about it!", which is probably nowhere near as funny as what was might have been intended. Of course, I have no idea about how likely this is to happen; it could be that this is a rare or obsolete unit whose inclusion might have been mandated by some PHB...

      Some of the funny printk() calls can at least be called informative:

      printk(KERN_ERR "happy meal: Aieee, transceiver MIF read bolixed\n");
      printk(KERN_ERR "happy meal: Aieee, transceiver MIF write bolixed\n");
      printk(KERN_ERR "%s: Aieee, link timer is asleep but we got one anyways!\n");

      Then there are the rather less informative:

      printk(KERN_ERR "happy meal: Transceiver BigMac ATTACK!");
      printk(KERN_ERR "happy meal: Receiver BigMac ATTACK!");
      printk(KERN_ERR "happy meal: Fry guys.");
      printk(KERN_ERR "happy meal: Transceiver and a coke please.");
      printk(KERN_ERR "happy meal: Eieee, rx config register gets greasy fries.\n");
      printk(KERN_ERR "happymeal: Would you like that for here or to go?\n");

      The author's opinion of the Sun hardware aside, it stops just short of telling off the end-user for using such hardware.

      --
      SIGBUS @ NO-07.308
    18. Re:Best of the 'inappropiate comments' by Anonymous Coward · · Score: 2, Funny

      As well as any other comment which implies piracy.

      /* Whoever designed this API should be made to walk the plank. */
    19. Re:Best of the 'inappropiate comments' by MikeBabcock · · Score: 3, Funny
      /* I don't know why, but this seems to fix a bug */
      if (**a[4] > *(b+6))
      return;
      Not that I've ever written such a thing ...
      --
      - Michael T. Babcock (Yes, I blog)
  3. grep by mmkkbb · · Score: 5, Funny

    /* The word 'fuck' is here so you can grep for it */

    --
    -mkb
  4. "Linux Rocks!!!" by jdray · · Score: 4, Funny
    10 REM Linux rocks!!!
    20 Do(stuff);
    --
    The Spoon
    Updated 6/28/2011
  5. I wonder... by PornMaster · · Score: 4, Funny

    // horribly insecure, but we had to meet a ship date...

    1. Re:I wonder... by Anonymous Coward · · Score: 1, Funny

      // Oh CRAP! Oh well, we'll fix it in 3.1^H^H^H3.11^H^H^H^H95^H^H98^H^H98SE^H^H^H^HNTSP1 ^H2^H3^H4^H^H^H^H^H 2000^H^H^H^H XP^H^HLonghorn

  6. Programmers do to comment. by kngthdn · · Score: 5, Funny
    ...

    /* Man I hate this fricking company */
    LineTo(hdc, LOWORD(lParam), HIWORD(lParam));
    ReleaseDC(hwnd, hdc);
    }

    fDraw = NULL;
    return 0L;

    /* Nobody reads this crappy code anyway */
    case WM_MOUSEMOVE:
    if (fDraw)
    {
    hdc = GetDC(hwnd_global);
    MoveToEx(hdc, ptPrevious.x, ptPrevious.y, NULL);
    LineTo(hdc, ptPrevious.x = LOWORD(lParam),

    /* I wish I could stick this at the top of the WndProc... */
    SendMessage(hwnd, WM_DESTROY, 0, 0);

    ...

  7. Well... for starters... by Duncan3 · · Score: 5, Funny

    /* Copyright © 2000 Apple Computer, Inc. All rights reserved. */

    --
    - Adam L. Beberg - The Cosm Project - http://www.mithral.com/
  8. How about this? by mtrisk · · Score: 4, Funny

    /* Taken from the Linux Kernel 2.6 DO NOT RELEASE UNDER ANY CIRCUMSTANCES, VIRAL GPL WILL HARM US */

    /* No one from the Debian Project shall ever see the following, lest you want your head chopped off! */

    /* These Samba guys figured it out, here's what they wrote */

    In all reality though, it's probably littered with expletives, like the Win2000 source code leak was.

    --

    Without a proper flamewar, Anonymous was undecided on what shell to run.
  9. graph of fucks per line in the kernel by tepples · · Score: 5, Funny

    Better yet: The word 'fuck' is here so you can graph for it.

    1. Re:graph of fucks per line in the kernel by cmcguffin · · Score: 3, Funny

      I'm not sure what happened between 2.3.30 and 2.4.14, but apparently that shit is one craptastic penguin-fucking bastard!

  10. Examples by apoch2001 · · Score: 2, Funny

    /** * * This method will cause system to crash and *fustrate users * */ /** * * This section of code will steal personal * information from users and give us blackmail * ability * */

  11. Some suggestions... by mikael · · Score: 4, Funny

    what kind of things developers put in comments that would be so bad for the rest of us to see?"

    // I don't know what this value is for, but it seems to stop the BSOD from appearing

    --
    Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  12. GPL by iMaple · · Score: 2, Funny

    /* This code is licensced under the GPL. Please read * the license carefully. Enjoy. */

    On the other this is impossible. I havent found any GPL code as bad as the MS code (Well of course I havn't looked at too many GPL programs and a single MS program :) )

  13. DCOM! by Anonymous Coward · · Score: 1, Funny

    /* This is a shitty way of doing this. Hopefully someone can fix DCOM when they get a chance... */

  14. Easy... by Epsillon · · Score: 5, Funny

    /* Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. */

    And a little further down...

    /* It's our TCP/IP thingy. We're gonna patent it. We own the Internet and all it's (sic) protocols. Resistance is fu... is fut... is useless */

    ;-)

    --
    Resistance is futile. Reactance buggers it up.
  15. Source Code Comments by Anonymous Coward · · Score: 1, Funny
    I used to work with a guy who put really, um, interesting comments in his code, such as:
    /* We do this because the users are too fucking stupid to figure it out on their own */

    This sort of thing isn't that uncommon amongst coders, especially when they don't think the source is going to be seen by the public.
  16. Examples of Comments MS Don't Want You to See by Nova+Express · · Score: 5, Funny
    ///**This is Security Hole which will force them to upgrade to XP Pro**///

    ///**This is the best I could do ripping off the feature from OS X; it will have to do until the next rev. Damn tricky Apple bastards...**///

    ///**These are not the comments you are looking for.**///

    ///**I pulled this right out of the Linux 2.4 source code! They'll never know!**///

    ///**Adobe incompatability code enabler; see Screwing the Competition, Volume 23 for Documentation**///

    ///**Man, I'd never get away with this shoddy hack if it weren't for our illegal OS Monopoly! Being evil rules!**///

    ///**Hey, wait a minute! THERE'S where that SCO Source Code went to!**///

    --
    Lawrence Person (lawrencepersonh@gmailh.com (remove all "h"s to mail)

    http://www.lawrenceperson.com/

  17. Re:Inappropriate comments.... by Anonymous Coward · · Score: 5, Funny

    Well, if ya look at the performance, it's pretty obviously not C.

  18. Quake III by Neo_Ludite · · Score: 5, Funny

    My favorite from the Quake III source
    i = 0x5f3759df - ( i >> 1 ); // what the fuck?

    1. Re: Quake III by Headcase88 · · Score: 1, Funny

      It was an amazing post; you got modded up just for reccomending it! That's what I like to call 2nd-hand moddage.

      ... hope there's 3rd-hand moddage :P

      --
      "When the atomic bomb goes off there's devastation...but when the atomic bong goes off there's celebraaaaation!"
  19. Too many eggs by agent · · Score: 2, Funny

    http://www.google.com/search?safe=on&q=Office+97+e aster+eggs

  20. Best comment I ever saw by Gildenstern · · Score: 5, Funny
    The best comment I ever saw in a piece of code was from a friend that I was working on a group project with back in college. He sent me some of his work for the project and I was having problems getting it to work like he said it did so I was looking in the code and found

    /*Drunk, Fix this Shit Later*/

  21. We all know the REAL reason... by St.Anne · · Score: 2, Funny

    10 rem this will screw those linux a***oles 20 print "copyright Microsoft 1982-2004" 30 goto 12000 40 rem stolen mac parts 50 for x= 1 to 100000 next 1 60 pause 1000 . . . 1200 goto 40

  22. Same problem at Netscape by mike.newton · · Score: 2, Funny

    Seems Netscape had the same attitude before releasing the future Mozilla code in 1998: http://www.jwz.org/doc/censorzilla.html

  23. Re:Hard habit to break. by jbarket · · Score: 4, Funny

    I had the exact same thought when I read the summary.

    A few years ago I was hired to do web application development because of my skills in one language, but I was hired to write in another. So, since I began doing for-production work in a matter of days, I had a lot of simple errors.

    I used to step through my code by placing either "Fuck yeah!" or "Shit's broke" inside and outside of different condition statements.

    Then one day some idiot on the team decided it would be a good idea to randomly show the clients my incomplete, not live code for whoknowswhy, and in the middle of the page at random was "SHIT!"

    Been trying hard to break that habit since :D

    --

    -----
    jonathan barket
  24. Two examples by kbahey · · Score: 4, Funny

    Two projects I worked on had to deal with 'inappropriate comments':

    The first was when a reference to Black Sabbath (a music band) was in some comments. Normally, source is not given to customers, but in this case, it was a shell script, so it did go to customers.

    Those who asked for that change were from the useability group. The guy who had to fix it was the archtypical anti-social nerd, but had a strange sense of humor. He entered an issue in the bug/change tracking system saying something like 'change Black Sabbath comment as per customer request'. The irony is, source had the CVS $Log$ tag, which caused all the fix comments of CVS to be in the source [no matter that I thought it was a bad idea, and that 'cvs log ....' would get you the same info, a manager said "this is the standard here"], so the issue description got into the log comments, and Black Sabbath was there again! Ha!

    In another case, we had a product that relied on an open source but commerical product. That product was developed by nerds who used programmers' humor all over the help pages, ...etc. The customer was upset by the use of 'conversational English' in the documentation. We had to get someone from the technical writing team to rewrite those pages! Nevermind that the product was geared towards sysadmins and techies! Sigh.

  25. Probably the same as Netscape's code by marmite · · Score: 2, Funny

    Jamie Zawinski has a list of rude words which had to be removed from the Netscape client code before it could be open-sourced. Microsoft's probably looks a bit like this.

    http://www.jwz.org/doc/censorzilla.html

    --
    I do not represent myself.
  26. Re:Hard habit to break. by slashrogue · · Score: 4, Funny

    Been trying hard to break that habit since :D

    I hope you mean breaking that idiot of the habit of showing clients random and incomplete code ;)

  27. Being a consultant breaks you of that. by Anonymous Coward · · Score: 3, Funny
    You only do it once.

    I _do_ recall when a particular demo for a big client was going well, I was actually calming down (big mistake), etc. A weird path through the code was taken and what do I see?

    ***Eat my flaming cock, you hairy scrap of shit clinging to the ass of a decent developer, You should never have hit this exception. Please eat the stack trace, curl up, have massive convusions, and beg me for your life. Bring.a bottle of good scotch. -grs#***

    Printed in big, red letters on the app. (We have custom error handling, if that wasn't clear.) Note, this is in front of the investors who were financing the company I was working for.

    Learning how to sell that to an SVP and MajorCorp client is only the sort of thing you can learn on your feet. I never want to do it again, but it did, um, learn me real good. And I'm not sure what I did, or why they believed me.

    -Coward, guess why.

    #Initials changed to protect the guilty. Not like it matters too much now, but the fuckup, the boss and me all read this. Live and learn.

  28. Re:Hard habit to break. by noidentity · · Score: 4, Funny

    An interesting tidbit, Viaweb (now Y! Store) used to have a program called storef*cker :)

    Must have been a b*tch to invoke from the command line, with an asterisk in the name and all.

  29. True hell by hkb · · Score: 4, Funny

    You know no hell until you use the goatse site as a test url in development and forget to take it out when the code goes live, and a user and then your boss find out before you do.

    --
    /* Moderating all non-anonymous trolls up since 2004 */
  30. Nestled deep inside... by eremitic · · Score: 2, Funny

    /* I hope nobody finds those Tiger Beat photos... */

    --
    Warning: Could be fatal if taken seriously
  31. Re:See the code, be the code by Feztaa · · Score: 2, Funny

    This is, of course, how it should be. Everybody knows that no successful author has ever read a book.

  32. Evil stuff we always suspected... by pleumann · · Score: 4, Funny
    /**
    * The following lines are required to break
    * DR-DOS compatibility. Don't remove!
    */
    and
    /**
    * Make sure our own application loads
    * quicker than all the competitors.
    */
    and
    /**
    * Keep this security leak. Sell antivirus
    * software later.
    */
  33. Wot, no "bodge"? by pommiekiwifruit · · Score: 2, Funny

    Obviously not enuff UKian developers.

  34. The real reason.... by HogynCymraeg · · Score: 2, Funny
    /* This piece of code stolen from SCO */
  35. Or how about... by HogynCymraeg · · Score: 3, Funny
    if(version=="95") delay = 100000;
    if(version=="98") delay = 90000;
    if(version=="ME") delay = 90000;
    if(version=="2000") delay = 80000;
    if(version=="XP") delay = 70000;
    if(version=="LONGHORN") delay = 60000; // more like forever *lol*

    sleep(delay);
  36. We already know by Relyx · · Score: 2, Funny

    This article investigating dubious comments appeared shortly after the Win2k source code was leaked.