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

23 of 526 comments (clear)

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

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

  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 Zocalo · · Score: 5, Informative

      Well that's a little out of context, but there is a short page about "odd" comments in UNIX which includes an explaination of the abovehere.

      --
      UNIX? They're not even circumcised! Savages!
    4. 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 */

    5. 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!
    6. Re:Best of the 'inappropiate comments' by Aeiri · · Score: 5, Interesting

      My favorites are the ones from the "drivers/net/sunhme.c" file of the Linux Kernel:

      /* Welcome to Sun Microsystems, can I take your order please? */ ... /* Would you like fries with that? */ ... /* Anything else? */ ... /* Fifty-two cents is your change, have a nice day. */

      /* We have a special on GNU/Viking hardware bugs today. */ ... /* Will that be all? */ ... /* Don't forget your vik_1137125_wa. Have a nice day. */

      /* foo on you */

      /* Lettuce, tomato, buggy hardware (no extra charge)? */

      /* We're consolidating our STB products, it's your lucky day. */ ... /* Come back next week when we are "Sun Microelectronics". */ ... /* Remember: "Different name, same old buggy as shit hardware." */

      /* Only Sun can take such nice parts and fuck up the programming interface
      * like this. Good job guys...
      */

    7. Re:Best of the 'inappropiate comments' by igb · · Score: 5, Informative

      For those missing the joke, the hme ethernet
      interface gets its name from the `Happy Meal'
      ethernet/SCSI combo card, so named because
      you get both interfaces as a discount deal.
      The same chipset went onboard some machines, too.
      The PCI version (Happy Meal was SBus) I think
      was named Fresh Choice (two trips to the ASIC
      salad bar) after the valley eateries, but I
      might be misremembering.

      ian

  3. grep by mmkkbb · · Score: 5, Funny

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

    --
    -mkb
  4. ha by momerath2003 · · Score: 5, Interesting

    Heh, no surprises here. I mean, from what we've seen from the leaked windows source...

    --
    I had but a simple dream, to destroy all humans.
  5. 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);

    ...

  6. 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/
  7. Hard habit to break. by shotgunefx · · Score: 5, Interesting

    I used to pepper my code with vulgarities. Then clients wanted copies on their own hosts. It's a hard habit to break.

    Particularly when debugging scripts. "F*CKING C*NT" and the like weren't to uncommon.

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

    --

    -William Shatner can be neither created nor destroyed.
  8. 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.

  9. 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.
  10. 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/

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

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

  12. 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 Vengie · · Score: 5, Informative

      that line is used to compute a "fast inverse square root" -- google for 0x5f3759df and you'll learn a little math. [you see that number once and you remember it forever] the result is a rough hack of what the exponent should be.

      -b

      --
      When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi. (Larry Wall)
  13. 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*/

  14. Re:How about this? by lakeland · · Score: 5, Interesting

    Yeah yeah, YHBT and all that...

    Notice how the code snippet you pasted is inside #if? That means the preprocessor will strip it out at compile time, not run time... got that? Next you note that htons performs the same check. That would be the htons function right? There's this thing about functions... Every time you call them you have to push your state onto the stack, wasting cycles. That means your version will waste a processor cycles every single time it is called, but the linux one won't. We call this optimisation.

    What's that? Cycles don't matter? How frequently do you think the function above is called? Can you be certain it won't be called when performance is key? Lets be clear, there is some ugly code in the linux kernel, most of it is stuff written years ago that could be refactored if anybody bothered. But pointing to an optimisation and saying: look, that's redundant! is just foolish.

  15. More Sun-related Linux kernel gems by DragonHawk · · Score: 5, Interesting

    These all from 2.6:

    arch/sparc/kernel/ptrace.c:/* Fuck me gently with a chainsaw... */

    arch/sparc/kernel/head.S: /* XXX Fucking Cypress... */

    arch/sparc/kernel/sunos_ioctl.c: /* Binary compatibility is good American knowhow fuckin' up. */

    arch/sparc64/mm/init.c: /* Fucking losing PROM has more mappings in the TLB, but

    arch/sparc64/kernel/traps.c: /* Why the fuck did they have to change this? */

    Even better is this from 2.4:

    arch/sparc/mm/srmmu.c: Are you now convinced that the Swift is one of the
    biggest VLSI abortions of all time? Bravo Fujitsu!
    Fujitsu, the !#?!%$'d up processor people. I bet if
    you examined the microcode of the Swift you'd find
    XXX's all over the place.

    --

    dragonhawk@iname.microsoft.com
    I do not like Microsoft. Remove them from my email address.