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

5 of 526 comments (clear)

  1. Why use bad language in code? by 1000101 · · Score: 3, Insightful

    After reading some of the comments, I've come to realize that many people apparently use vulgar language and/or ridiculous comments in there code. Am I in the minority when it comes to not doing this? I really don't see the point actually. I don't like to comment anymore than the next guy, but when I do, it's usually there to help me out in the future (even if that's just tomorrow when I come back in to work). I would feel like an idiot reading my own code if it were riddled with comments like 'this fucking sucks!', or 'the front desk girl is so hot and has big tits!'.

  2. Re:Well... for starters... by NanoGator · · Score: 4, Insightful

    "/* Copyright © 2000 Apple Computer, Inc. All rights reserved. */" /* Special thanks to Xerox */

    --
    "Derp de derp."
  3. Re:Innapropriate comments? What the. by BasilBrush · · Score: 3, Insightful
    Yes, but if you are working in a decent OOP language there are very few occasions when you NEED code that is non self-explanatory. Writing legible code without relying on comments is a skill set that most programmers don't have, but it's perfectly possible. Whenever you're tempted to write an explanatory comment, just think about how the code could be written so that it's self explanatory without the comment. It might need more descriptive identifiers. It may need the lines that are being commented to be factored out into a local function with a descriptive name.

    The main exception is code that needs optimisation. But when you remember that isn't always to early to optimise code, and when you do optimise, you only optimise the small fraction of the code that has the most effect, then the ammount of code that needs comments is minimal.

    The other exception is commenting other peoples code that haven't written it in a legible fashion.

    P.S. Like the grandparent post, I'm not talking about function header comments, particularly auto documentation system comments - those are essential. I'm talking about comments mixed in with the code.

  4. Actually, I doubt it by Moraelin · · Score: 4, Insightful

    I doubt that anyone would place comments in code that basically boil down to "I hate my job and my employer." At the next code review, or the next time a bored coleague looks into your code, it's just begging to be used against you.

    If comments about the company or other co-workers are present, they'll more likely be a lot milder and kept to something you can sorta justify as just documenting code behaviour. E.g., "this is a work-around for Bug X in Function Y of the MSFC".

    On the other hand, there is plenty of room for utterly inapropriate comments about other companies and products. Think along the lines of "unlike the utter crap we took from the BSD monkeys, this one is 40 times faster and uses 10 times less memory." Or "this is here only because the monkeys from are too stupid to do their own buffer checking before calling my function."

    Excessive hubris is pretty much part of the job description for nerds. Remember kids, everyone else sucks and is an idiot luser. Only you can possibly know anything at all about computers. And only the skills you have (e.g., pushing the power button or typing "emerge kde") are l33t and cool, the rest is idiot luser stuff.

    But my guess is more like MS is just playing defensively. There are a lot of people and has-been companies that are out for MS's blood. Comments that noone minds in the Linux kernel, if found in MS code would get those people screaming for blood and gathering a proper medieval crowd with pitchforks and torches.

    I mean, look around. Even a comment as benign as "this is a work-around for bug X in function Y" would get half the MS-bashers on /. screaming and waving it around as definitive proof MS can only write bad code.

    Doubly so for those who:

    A) never wrote any productive code in their entire life, but think they're uber-l33t because they can run someone else's scripts (e.g., "emerge kde"), or

    B) wrote a 20 line program in BASIC once, or a 20 line BASH script, so they think they're qualified to pass judgment about 1,000,000 line projects or about whole languages

    (No offense intended to good programmers in either VB or various shell scripts. But there is a _massive_ and _fundamental_ difference between a 100 line program and a 100,000 line program. Stuff that works in the former, like, "bah, I wrote it just as well without all this fancy encapsulation and bogus design", might just cause the latter to never be finished or anywhere near working.)

    --
    A polar bear is a cartesian bear after a coordinate transform.
    1. Re:Actually, I doubt it by Moraelin · · Score: 4, Insightful

      If that's what you think, you might be in for a _very_ nasty surprise at some point.

      That nobody at the workplace cares about you in a good way, that's probably not a bad frame of mind. Cynical, that's true, but most of the time it's accurate.

      But you might be surprised who cares about you in a _bad_ way. Who's out on a personal quest to prove to the boss that your code is utter crap and you should be fired. Or at least he should be promoted before you.

      I've already posted one such true story on Slashdot (I fondly called it "Jack and Jill up corporate hill), where a marketeer-turned-programmer I know (and to my shame, which I've helped get into programming) made it a personal quest to get both female programmers on his floor fired. He succeeded too.

      He'd run with snippets of those programmers code to every single guy in the building, to show everyone what bad code they wrote. Invariably he was wrong, and just showed _massive_ incompetence, and their code was good. He didn't even know the most elementary _basics_ of Java, the language he's paid to program in. But obviously it wasn't obvious to the boss, seein' as he did get them both fired, and he got promoted.

      A more sad case was someone who couldn't program at all. No, not just "not a top programmer." He just couldn't write code that even compiled. At all.

      So a couple of co-workers took pity and started helping him. Well, not as much "helping", as outright writing his modules for him.

      So what does he do? Make it his personal quest to bad-mouth them to the boss behind their backs, and "prove" that they just interfere with his work and he surely would have done better if they hadn't edited his files. (Never mind that he had actually asked for their help to start with.)

      There's one important lesson in corporate cynicism there, grasshopper. The person you helped might be not a friend, and not even indifferent: you might have actually made an _enemy_. You're one of those who know he's incompetent, and that makes you dangerous. Worse yet, you might be seen as a good programmer, and as such in his mind (and usually _only_ in his mind) someone who might get promoted before him. You're an obstacle to be taken out of the way.

      How's that for being even more cynical? :P

      --
      A polar bear is a cartesian bear after a coordinate transform.