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

 



Forgot your password?
typodupeerror
×
Programming Sun Microsystems IT Technology

Inside the OpenSolaris Source Code 338

An anonymous reader writes "Ten million lines of code and not a single profanity? Is that really possible? Apparently, yes, says OpenSolaris community manager Jim Grisanzio. He said even before Sun filtered the code, it was relatively free of profanity. 'They went through the code for a great many things,' he said, 'and I'm sure they cleaned a word or two. Or three.' But a careful look through the code will reveal some programmers' frustration." From the article: "The most embarassing comment came from a developer of the GRUB project who went only by the name of 'Gord'. 'This function is truly horrid,' he wrote. 'We try opening the device, then severely abuse the GEOMETRY->flags field to pass a file descriptor to biosdisk. Thank God nobody's looking at this comment, or my reputation would be ruined.'"
This discussion has been archived. No new comments can be posted.

Inside the OpenSolaris Source Code

Comments Filter:
  • Odd Fascination (Score:4, Interesting)

    by AKAImBatman ( 238306 ) * <akaimbatman@gmaYEATSil.com minus poet> on Thursday June 16, 2005 @11:46AM (#12832677) Homepage Journal
    What's this fascination with dirty words in the code? I can't say that I've even considered writing such a thing in commercial code that I write. Unlike OSS code, other coworkers *will* be reading my comments and may not think they're that funny. (Although I love messing with test data. Batman, Picard, Superman, Professor X, Dylan Hunt, etc. are all game. Unfortunately, they all share a phone number with Jenny. Must be one of those antiquated shared lines. ;-))

    Perhaps the most telling part of the article is that it's the Open Source code that has the foul language. Which isn't too surprising. If there are no repercussions for such behavior, why wouldn't developers engage in it? But in a straight-laced commerical environment? Unlikely. (Or at least uncommon.)
    • Re:Odd Fascination (Score:2, Insightful)

      by dawnread ( 851254 )
      Agreed. In my work placements at University I was putting 'funny' comments and debug output in code. I got pulled aside by the manager and told it was definately not on. I thought he was being a bit boring at the time but now looking back I can see it was a geat piece of advice.
    • by BlogPope ( 886961 ) on Thursday June 16, 2005 @11:49AM (#12832699)
      What's this fascination with dirty words in the code?

      The code might be compiled and run on some unsuspecting souls computer. Once the computer learns that kind of language, the next thing you know it will be downloading porn!

      I should know, that how it got on my computer!

    • But in a straight-laced commerical environment?

      I'd like to hear more from commercial developers. Personally, I'm a bit...loose...with my language in my code. If a comment I write helps me understand what I am trying to do and helps other's see what I was up to, I don't really care how it reads.

      It's not like the customer will ever see the code, so it may be something that businesses don't really concern themselves with.
      • Re:Odd Fascination (Score:2, Insightful)

        by Anonymous Coward
        It's not like the customer will ever see the code, so it may be something that businesses don't really concern themselves with.

        I wonder how many Solaris developers thought that.
      • Re:Odd Fascination (Score:5, Interesting)

        by Chibi Merrow ( 226057 ) <mrmerrow AT monkeyinfinity DOT net> on Thursday June 16, 2005 @11:55AM (#12832766) Homepage Journal
        It's not like the customer will ever see the code

        Famous last words?

        I'm suddenly reminded of !seineew era sreenigne epacsten!
        • Re:Odd Fascination (Score:5, Interesting)

          by LittLe3Lue ( 819978 ) on Thursday June 16, 2005 @02:38PM (#12834417)
          !seineew era sreenigne epacsten!

          Translates to (when read backwards): Netscape engineers are weenies!

          Here is the explanation taken from this article [siliconvalley.com]:

          Don Rickles apparently writing code at Microsoft:: In the aftermath of Microsoft's admission Friday that its engineers had included a secret password in some of the Web site authoring software shipped with Microsoft's Windows NT operating system -- which The Wall Street Journal claimed could be used to gain unauthorized access to Web sites -- the editor of the Microsoft-software security site NTBugTraq came forward to offer some clarification on the matter. In a message posted to the NTBugTraq mailing list Cooper wrote, "This is a hole that could allow information to be manipulated by others. However, it's limited to 'others' who already have Web authoring permissions on the same box." Cooper added that the secret password in question--"!seineew era sreenigne epacsteN" IE: "Netscape engineers are weenies!" -- wasn't a password at all, but a cypher key which only allows access to the security breach, not the security breach itself. However, over the weekend, two programmers revealed that they were able to disrupt Web servers by exploiting a different vulnerability in the same file. Microsoft confirmed that assertion, indicating that the pair had discovered "a new, separate vulnerability that significantly increases the threat to users of these products" and that "could be used to cause an affected server to crash." (Wall Street Journal story; paid registration required). In any event, when Microsoft issues a patch for this, as it inevitably will, you'll find it here.
      • Re:Odd Fascination (Score:5, Interesting)

        by utuk99 ( 656026 ) on Thursday June 16, 2005 @12:01PM (#12832802)
        My favorite is I had to write about 50 different modules for a program. So I put a George Carlin quote at the begining of each module from brain droppings. No one except the small group of developers I work with would ever see it right. Unfortunately all of our code got subpoena. They obviously had no idea what the code was doing because out of 10 boxes of printed code, what do you think they had questions about? You guessed it the Carlin Quotes. There were a few sections with things like "Fear ye who enter here!" at the beginning of some really ugly subroutines. Ever since then I have had very innocuous comments in my code. Ok, I at least make them look innocuous to the casual observer.
        • That's pretty benign too (the quotes).

          While my cone has never been subpoena'd it is seen by my end customers. My quotes are rather bland and sparse, though some have a ref# that goes back to my little black book. #F33 is: This is a fucking mess. Don't touch it cause it can only break worse.
          -nB
        • So I put a George Carlin quote at the begining of each module from brain droppings. No one except the small group of developers I work with would ever see it right. Unfortunately all of our code got subpoena.

          You are lucky you weren't bankrupted.

          That was a copyright violation and lawyers actually got to look at it. I'm surprised they didn't extend a "little professional curtesy" to Sony's lawyers, or whoever owns of all Carlin's work and inform them of your heinous crime so that they could begin pro$ecut
      • I agree totally with the gp, I have my team regularly review each others code and profanity, derogatory comments etc are totally, and I mean totally unacceptable. Its not something then comes up often, as I think most commercial developers are conscious of the fact that its not actually their code to do with as they please and there will be reviews.

        Professionalism aside though its something which can't be tollerated in a commercial environment as very often other depts see the code as well so putting stu
      • 'd like to hear more from commercial developers.

        grep -rn "shit\|fuck" ./* | awk 'FS="\t" {print $NF}'

        // we're in deep shit now... the least we can do is note it in the error details
        // the array format returned from [function name] is fucked up. let's put it in a [variable name] like we want it
        // it's fucking magic!

        variable and function names removed to protect the innocent, guilty and neutral.

      • Re:Odd Fascination (Score:3, Interesting)

        by deKernel ( 65640 )
        Well, I have been writing software for more years than I want to admit, but here is my take.

        Other than using some terms that are really bad (c#@!, f$#% and such), there is nothing wrong with the developer putting his thoughts in the code. Somethings it will help the next person understand what the developer was thinking.
        I will give you an example. Ugly hacks are bad but sometime necessary. Fact of life. If you have to support someone elses code, you might feel the need to say something bad about the person
        • I agree. Amusingly, here's a comment in one of my scripts recently:
          # Oh, but here's fun:
          # Due to some sort of gmtime thing, if you specify the last day
          # of the quarter as the expiration for kelpie, you'll end up
          # with 5pm on the day before as the expiration date. We'll
          # tolerate this because ... well, it's the easiest thing to deal
          # with and ,well, one day won't make a big difference. some
          # day, I suspect someone will read this comment and wa
      • CRINGE. The comments in the code are:
        obscene (Okay [name deleted] we'll do it your fuckin' way,)
        reflect frustration (I have NO idea what this piece of code is supposed to do or what other events are being kicked inside this 'black box' All I know is that performance sucks.) and (I am deeply ashamed about the structure of this algorithm but the data is coming in this way.) OR
        just plain wrong/outdated/unmaintained.

        One commment left to me on a piece of unraveled recursive code by a guy I was replacing w
      • Re:Odd Fascination (Score:2, Interesting)

        by 91degrees ( 207121 )
        I will be informal, but never obscene. You will occasionally see comments like "Sorry fellas, but [explanation as to why I was forced to do it the way I did]" or maybe make a reference to a well known joke occasionally ("the wonderful thing about standards is there are so many to choose from"), and nobody cares about these. I think it would be considered unprofessional and really a little childish to add expletives.
      • by kaladorn ( 514293 )
        And sometimes they are also the place you express the frustration you feel at the particularly dismal piece of architecture someone handed you, that was a poor architecture in the first place and has subsequently been further bastardized into something whose design logic no longer exists in any coherent form, and in which any time you touch the code, there is a decent chance of side effects.

        I try not to be profane. If I really want to imply some sort of upset or exclamation, I'll got the old cartoon route
    • Linux Kernal Fuck Count [durak.org]

      I'm not going to say whether Linux or Solaris is a better OS. But it seems like the Linux code might be a bit more entertaining to read.

    • It sounds boring, and it easy to make fun of, but I think (in general) the comments reflect the ability and maturity of the programmer.

      If I'm trying to fix a mess of code and the comment says
      // We're fucked, this shouldn't happen
      My first impression is the coder was an idiot practicing stream of conciousness coding (which is more like typing, really). He's vented and that made him feel better, but it really hasn't helped me at all.

      If the comment over that same code says
      // Bad news. The lock was se

    • Re:Odd Fascination (Score:3, Interesting)

      by IAmTheDave ( 746256 )
      What's this fascination with dirty words in the code?

      It's kinship. It's a way for programmers to be able to relate to one and other through shared frustrations. It also allows us to get more personal with the code, understand the thinking that went into it, and understand where and why certain features were programmed in certain ways.

      And finally, it's about support. "Ok, I'm not the only one who is frustrated." Misery loves company, and sometimes it's nice to know that you're not alone.
  • by Dancin_Santa ( 265275 ) <DancinSanta@gmail.com> on Thursday June 16, 2005 @11:48AM (#12832694) Journal
    Hardly part of the actual OS.

    Sounds like Sun did a bang-up job with their software, reining in the developers under pretty solid coding guidlines. It's the Open Source people who have gone off and sullied the code with their silliness.

    Humor in comments is sometimes good. Just not on Slashdot where it only risks your karma.
    • by Anonymous Coward on Thursday June 16, 2005 @11:52AM (#12832729)
      Grub is an official GNU project and thus, GPL. Gords comment was intended to be humourous. I'm not surprised the ZDNet hack missed it though. After all, understanding what GRUB is might require that they're are familiar with their subject, and that's just too much to ask these days..
    • How do you install it? Do you think they're going to use Linux or the Hurd to install GRUB on a pure Solaris system?
    • by arivanov ( 12034 ) on Thursday June 16, 2005 @12:30PM (#12833017) Homepage
      Silliness???

      As far as the kernel is concerned the number of profanities is a clear reflection of the quality of the underlying hardware. One of the things I do before buying new hardware is look at the comments in the linux kernel code. If they are like the ones you meet in the sun** architecture bit (it is the most profane part of the linux kernel) it may be a good idea to stay away.

      For example just read the sunhme.c under drives/net. It is an absolute ROFL. Or arch/sparc/mm/ptrace.c ...
    • by stevey ( 64018 )

      And this coming from the people who gave the world the HME ("Happy Meal Ethernet") network devices?

      I guess you're not being too serious.

    • Yes, the article considers GRUB only in the context of Open Source code imported into Solaris. Of course, that got lost in the edit summary...

  • I am vindicated! (Score:3, Interesting)

    by ChibiLZ ( 697816 ) * <john AT easygoldguide DOT com> on Thursday June 16, 2005 @11:49AM (#12832698) Homepage Journal
    I write very similar things into my code. My coworker and mentor yells at me about it. I think they're great little bits of levity when your code gets you down.
    • Sad story is that both of you are right, at least I can't help but agree with both of you.

      I often make such comments in my source. But mostly they are without spaces or tabs at first character (not indented).

      It is more like letting my frustration out and pointing out the badly written or hacked out parts which need redo on a first possible ocassion.

      When you browse trough the code the next time you just can't help your self but to notice this.
      • Well, I don't go as far as to use profanity in my code, but I will insult myself and my code... for example:

        ' This code obviously written by monkeys at keyboards. It sucks, it's slow, fix it.

        ' I wrote this sub in this way because I hate myself. I like build errors, memory leaks, and random crashes.
  • Nice humour (Score:5, Insightful)

    by moz25 ( 262020 ) on Thursday June 16, 2005 @11:49AM (#12832702) Homepage
    I like the guy's humour. Either that or he is not smart for putting a reputation-ruining 'bomb' in the source code :-) But anyway... good programmers are supposed to be very critical of their code so even functionally correct code can be commented as though it were horrible.
    • ...the Gord in question is almost certainly Gordon Matzigkeit [google.com]. Make of this what you will.
    • by dasunt ( 249686 )

      I'm not a professional programmer (far from it), and I'm not trying to pass off the impression that I'm speaking from an expert's point of view.

      However, a nice quote that I've heard is "Perfect is the enemy of 'good enough'", which has more than a bit of truth to it. I've painted myself into coding corners before, and I've had ugly hacks to get out of it. I've included a fair number of comments such as "/* TODO: this is unmaintainable */". But the code, while ugly, works. Moreso, it works without an

  • by Anonymous Coward on Thursday June 16, 2005 @11:49AM (#12832706)
    yep, no profanity at all
  • 10kHz in 1996 (Score:5, Insightful)

    by arete ( 170676 ) <xigarete+slashdo ... il.com minus cat> on Thursday June 16, 2005 @11:53AM (#12832736) Homepage
    ZDnet seems to want us to think "clock speeds" are at 3 Ghz regarding the following quote:

    'Another tried his hand at predicting the future of system speeds. "As of this writing (1996) a clock rate of more than about 10 kHz seems utterly ridiculous, although this observation will no doubt seem quaintly amusing one day," he wrote.'

    But in 1996 you had roughly 100Mhz 486s and Pentiums, so clearly it's not that clock, it's some other clock.
    • Either they misquoted or, as you say, he was talking about some other clock. Perhaps the timeslicing clock?
    • so clearly it's not that clock, it's some other clock.

      The sad problem is that you are expecting Ziff-Davis writers to have a clue.
    • Re:10kHz in 1996 (Score:5, Informative)

      by Chirs ( 87576 ) on Thursday June 16, 2005 @12:13PM (#12832889)
      Most likely this refers to the system tick. On linux this was 100Hz for most architectures in 2.4, although with 2.6 most architectures have moved to 1KHz.
    • Actually I had a 200MHz Pentium Pro in 1996, the first of the i686 platform, which is still in production today as the Pentium 4.

      -molo
    • FYI, the comment is in param.c [opensolaris.org], and is quite explicitly referring to the performance of the system clock, not the CPU clock. The amusing part about his statement is that modern OS X machines actually produce a hires clock signal in the nanosecond range, although I'm unsure about the actual precision of that clock. It's quite possible that Macs use a capacitor sub-clock to produce a more accurate (but less precise) signal.
    • Re:10kHz in 1996 (Score:4, Informative)

      by iabervon ( 1971 ) on Thursday June 16, 2005 @12:45PM (#12833144) Homepage Journal
      That's almost certainly the clock interrupt, which, at the time, was generally 100 Hz on Linux, and is now generally 1 kHz. In fact, the thing that's likely to seem quaint before too long is having a constant value, not expecting the value to be less than 10 kHz. This clock is related to system speed, in that it's basically the rate at which housekeeping tasks get done, and it's enough slower than the processor speed that a useful amount of work gets done between ticks, and fast enough that the delay isn't too noticeable when you have to wait for it to tick.
  • by ratta ( 760424 ) on Thursday June 16, 2005 @11:53AM (#12832742)
    something really interesting in the code, now that Solaris is open? People has been saying "Sun will never open Solaris" for month, now that it is open all that they do is to grep "fuck" or "shit", or look for frustrated comments?
    • by mrm677 ( 456727 ) on Thursday June 16, 2005 @12:09PM (#12832859)
      Yes, the locking code in mutex.c is fascinating. They dynamically switch between spin-locks and adaptive backoff locks based on who is running and who is locking what. This is the stuff that makes Solaris scale to dozens of processors out-of-the-box.

    • by hacker ( 14635 )

      "Has anyone found something really interesting in the code, now that Solaris is open?"

      Unfortunately, I can't. As a Open Source/Free Software author, the CDDL specifically prohibits me from learning anything from looking at the OpenSolaris code.

      Because its covered by a "file-based" license, I can either take files in full, or not at all. I am not covered by the CDDL (and would be in violation of it) by taking snippets of code from any of the files, including viewing them and "paraphrasing" what I le

      • by Paul Jakma ( 2677 ) on Thursday June 16, 2005 @07:10PM (#12836965) Homepage Journal
        the CDDL specifically prohibits me from learning anything from looking at the OpenSolaris code.

        This is untrue and absurd.

        Because its covered by a "file-based" license, I can either take files in full, or not at all.

        This is again untrue.

        The CDDL licence allows you to modify CDDL code, as long as the resulting file is CDDL licenced. So you can take a file, strip out stuff you're not interested in and use that (under the CDDL licence).

        I am not covered by the CDDL (and would be in violation of it) by taking snippets of code from any of the files,

        This is untrue.

        You may take CDDL code and use it as you wish, provided the resulting file is also CDDL licenced. You can have your code link to this CDDL code, and your code can be under whatever licence you like.

        including viewing them and "paraphrasing" what I learn back into my own code.

        Untrue.

        You are allowed to do this, provided that the files which were modifications of CDDL code stay under the CDDL. Your own code you may licence as you wish. If rather you mean that you want to "steal" CDDL code, modify it and bury it in your own proprietary licenced application well, sorry, no, you can't do that - no more than you could with MPL or GPL licenced code.

        Also, there ARE patented concepts in the OpenSolaris code, which you are welcome to use, as long as you use entire files (i.e. covered by the "file-based" license).

        Correct, and you may also modify those files, provided the modified files are made available under the terms of the CDDL.

        I don't want to put any of my clients or projects at risk, so I can't look at the code.

        At risk of what exactly? Your tendencies to want to take other people's code and relicence it? Your email address says '@gnu-designs.com', but I wonder if actually you're a BSD licence fan. :) Note that patents are applicable regardless of whether you have looked at the code implementing them. Even if you don't know about the patent, they still apply. (However, willfully breaking a patent tends to result in higher damages).

        So nope, I haven't even looked at the code, because frankly, I can't, without contaminating my own code and ideas.

        Looking at CDDL code is not going to do that.

        Note that copyright does not disallow you to look and reimplement. Note further that not looking does not protect you against patent claims.

        If you truly were concerned about protecting your clients from patent risks in your own code, then your safest bet would be to take the CDDL code and link to it: with your own code under whatever licence you want, the CDDL code implementing the patent and providing you and your users with a grant to use the patent.

        You havn't fallen for the FUD put about by a certain libc hacker have you? (Who just happens to work for a competitor of Sun's? Pure coincidence of course..).
  • by micromuncher ( 171881 ) on Thursday June 16, 2005 @11:54AM (#12832747) Homepage
    Hasn't everyone been burned by this? And why is it a big deal? It's not like professional developers never curse or get frustrated.

    It is worse when questionable things get present to end users and/or clients. In a UI demonstration of an accounting project, I had a button called "Do Me". It didn't go over so well. But somehow it came out that one of the underlying combo boxes was called "ViagraComboBox" because it outperformed... that didn't go so well. So now all my code is antiseptic, just because its not good to show "unprofessionalism" infront of the client.

    The worst thing I've ever heard was a friend gave a demo of a pipeline monitoring application to a client. During the course of a demo, a pumping station turned red to show an alarm, followed by a small mushroom cloud animation... suffices to say the client walked out of the meeting. (But hey, he now works at Microsoft.)
    • I was at a client site once, looking at some code that wasn't working, with a lady looking over my shoulder. I opened up the source and the first thing was a comment from another developer saying "This fucking shit does not work". She wasn't impressed at all.
  • by dominux ( 731134 ) on Thursday June 16, 2005 @11:54AM (#12832750) Homepage
    just search for "sucks" and you get a nice list of places to work to make things suck less.
  • Here we retrieve the configuration of the ConfigurationManager. In its configuration, it will find which ConfigurationAgent is defined along with the requiered parameters are requiered to initialize it. The Configurationmanager it self actualy retrieves its configuration by using directely the XMLConfigurationAgent.
  • by k4_pacific ( 736911 ) <`moc.oohay' `ta' `cificap_4k'> on Thursday June 16, 2005 @11:57AM (#12832777) Homepage Journal
    In a piece of C code where I work that has Unicode support, I saw this comment, by itself, within a routine that did some string manipulation: // I'm hot for TCHAR.
  • "...thank God this code isn't open sourced and linked to slashdot so that every geek can see what a horrible wretch of a coder I am!"
  • Deal (Score:2, Funny)

    by dawnread ( 851254 )
    I'll stop using swearwords in my code when my manager stops using ridiculous buzzwords like 'bandwidth' and 'drill down'.
  • More checking needed (Score:4, Informative)

    by Espectr0 ( 577637 ) on Thursday June 16, 2005 @12:02PM (#12832814) Journal
    shit! [opensolaris.org]
  • by MauMan ( 252382 ) on Thursday June 16, 2005 @12:02PM (#12832818) Homepage
    I remember once when I was was trying to track down a bug I wrote some debugging code which I then commneted out with: #ifdef _SEX_WITH_FARM_ANIMALS_ ...Debugging code... #endif Later, someone wanted to integrate with my code so I saved it off to the interim repository and a few minutes later I got a visit from my co-worker.

    Boy he had some fun at my expense...
  • If I coded closed source software, I think I would probably deliberately load my code up with funnier comments. Something like:

    /* I'm feeling lazy today, so I'll just kludge this for now and let the smart open source people figure out a better way to do it in a few years when it's released. Good luck, guys. */

    or...

    /* This is probably a HUGE security hole, but since the software is closed source, security doesn't matter much. */

    or even something corny (a blatant ripoff of a ThinkGeek t-shir [thinkgeek.com]

    • This reminds me of a heredoc in PHP.

      $something = HOOLAPALOOZA_WAS_HERE
      (html stuff)
      HOOLAPALOOZA_WAS_HERE;

      When my boss saw it, he demanded me to change it to the usually boring EOD. Bummer.
  • One Perl developer cursed Microsoft... while another inexplicably chose to quote from JRR Tolkien's classic The Lord of the Rings .

    That crazy Larry Wall, always inexplicably quoting Tolkien!
  • From the Solaris 8 code, it may or may not still be there:
    "Inserted for 2.6 testing - remove before shipping."
  • People (Score:2, Insightful)

    by sn0wflake ( 592745 )
    Could Gord be http://slashdot.org/~Gord [slashdot.org] I wonder.
  • From proc.h, of all places:
    #define SRPC 0x40000000 /* Forgive me for this hack to overcome */
    /* sunview window locking problems */
  • ...you insensitive clod.
  • by CyricZ ( 887944 ) on Thursday June 16, 2005 @12:30PM (#12833018)
    I worked at a pretty laid back development firm developing various applications in VB. Well, one of the projects was a school library management system. One of my coworkers was, well, a bit of a freak. He had a strange obsession with penises and boners.

    One of his jokes was to attach code to a button that would make an animation of a penis erecting and ejaculating appear, but only after every 7 or 8 clicks of that button. Normally he would only keep such code in for a day or so, until somebody in QA ran across it.

    Anyway, at one point we were at a conference of school librarians demoing our product to them. Things were going well, until we clicked on a button, and up on the large screen came an animation of an erect penis ejaculating. Needless to say, we were quite embarrassed! I don't think he was with the company much after that.
  • Is always worth a search.... my favourite was this one

    ip_ftp_pxy.c [opensolaris.org]

    Do not change this to sprintf

    Anyone think that some "smart" bloke broke this code at some stage :)
  • by ArtDent ( 83554 ) on Thursday June 16, 2005 @12:43PM (#12833118)

    At least Gord's comment gave some indication of what the code was doing.

    My pet peeve is a block of utterly inscrutable code, with nothing but the following comment:

    // This is an ugly hack.

    Seriously, commenting effectively is *so* simple. If a brief comment neatly sums many lines of code, it's useful. If it explains a subtle interraction with some other bit of code somewhere else, it's useful.

    If it points out the blatantly obvious -- yes, ugly hacks are very easy to spot -- don't bother! I don't care that you realize your code is ugly, I just want to start understanding it without reading every line in the project!

  • At my last job a guy told me the story of a programmer forced to implement some stupid feature due to a customer demand. He made the behavior dependent on a conditional variable named "CustomerIsAnIdiot".

    Then the customer hooked up a debugger...

  • Thank God nobody's looking at this comment, or my reputation would be ruined.

    Your rep wasn't that good to begin with. Ha ha!
  • printk("ufs_read_super: fucking Sun blows me\n");

    kernel: 2.0.38

    file: /usr/src/linux/fs/ufs/ufs_super.c

    wow...
  • by allanc ( 25681 ) on Thursday June 16, 2005 @01:02PM (#12833360) Homepage
    1. BHAD ('Breach Hull, All Die'). When I'm writing code that I don't expect other people to use, this is the name I give to error-handling stuff.

    2. "OH MY GOD BEAR IS DRIVING CAR!" is how I tend to label code that should Never Happen. I was working as a contractor at my current company and this ended up in some of my code. After they decided to hire me on as a full time employee, my boss mentioned that this comment was one of the primary factors in that decision. It's good to work for a company with a good sense of humor. :)
  • I used to write documentation for APIs, years ago, which meant that to explain what a given hook was doing or to offer some insight as to why something behaved the way it did, I would have to reach back into a heap of very old legacy code.

    There were a couple developers who were no longer at the company who left somewhat monstrous comment blocks of 100 lines or so in the more important sources. These guys had built the framework from the bottom-up and had clearly been asked to explain what was going on to

  • by ahl_at_sun ( 853337 ) on Thursday June 16, 2005 @01:14PM (#12833489) Homepage
    This article has all the sophistication of a 5-year old looking up 'anus' in the OED. Someone already pointed out the confusion between the processor clock and the system clock -- a confusion that would have been avoided if the author had read the code or even the rest of the comments.

    More ludicrous is the author's supposed identification of a Mark Felt lurking in the shadows of the DTrace code:
    The much-vaunted dynamic tracing (dtrace) feature of Sun's system may not be as safe to use as most people think.
    That's based on what? The two ASSERTs that follow the cited comment? This one doesn't go all the way to the top...
  • by DavidYaw ( 447706 ) on Thursday June 16, 2005 @01:47PM (#12833905) Homepage
    There's one thing I love about Visual Basic: "On Error GoTo Hell" is not only valid syntax, but if you make "hell" your error handler everywhere, then "On Error GoTo Hell" becomes a coding standard!
  • Censorzilla (Score:4, Interesting)

    by chickenwing ( 28429 ) on Thursday June 16, 2005 @02:02PM (#12834046) Homepage
    JWZ has a selection of some of the choice obscenities from Netscape: http://www.jwz.org/doc/censorzilla.html [jwz.org]

Real Programmers don't eat quiche. They eat Twinkies and Szechwan food.

Working...