Slashdot Mirror


Inside the OpenSolaris Source Code

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.'"

64 of 338 comments (clear)

  1. Odd Fascination by AKAImBatman · · Score: 4, Interesting

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

    1. Re:Odd Fascination by dawnread · · Score: 2, Insightful

      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.

    2. Re:Odd Fascination by BlogPope · · Score: 5, Funny
      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!

      --
      My other car is a Popemobile
    3. Re:Odd Fascination by Anonymous Coward · · Score: 2, Insightful

      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.

    4. Re:Odd Fascination by Chibi+Merrow · · Score: 4, Interesting

      It's not like the customer will ever see the code

      Famous last words?

      I'm suddenly reminded of !seineew era sreenigne epacsten!

      --
      Maxim: People cannot follow directions.
      Increases in truth directly with the length of time spent explaining them
    5. Re:Odd Fascination by utuk99 · · Score: 5, Interesting

      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.

    6. Re:Odd Fascination by deKernel · · Score: 3, Interesting

      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 based upon what see in the code and how they got it to work. If you see comments like "... I realize that this really sucks and a major hack but I it does work..." you most likely will hold off your comments. Its called venting!!!!

    7. Re:Odd Fascination by 91degrees · · Score: 2, Interesting

      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.

    8. Re:Odd Fascination by AnonymousKev · · Score: 2, Insightful
      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 set, but somehow we're in the think-it's-unlocked section
      My first impression will be much more favorable. The coder has mastered his anger and left me a useful clue to the problem.

      I realize that dozens of "comment f*ckers" will descend and use their rich language skills to correct my misconception. But I've been designing and implementing software for almost three decades now. There are exceptions, but my data points show that profanity never improves the code and leaves an unprofessional appearance. Period.

      I mean, would you hire a carpenter who wrote "F*cking nailgun!" on every 2x4 that gave him a problem? That would be some house.

      --
      Anonymous Kev
      Proudly posting as AC since 1997
      (Finally got a dang account in 2004)
    9. Re:Odd Fascination by Anonymous Coward · · Score: 2, Funny

      c#@!, f$#%

      Are you kidding!?!? Those are my two favorite Perl regex's!

    10. Re:Odd Fascination by IAmTheDave · · Score: 2, Interesting

      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.

      --
      Excuse my speling.
      Making The Bar Project
    11. Re:Odd Fascination by LittLe3Lue · · Score: 5, Interesting

      !seineew era sreenigne epacsten!

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

      Here is the explanation taken from this article:

      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.

    12. Re:Odd Fascination by sconeu · · Score: 3, Funny

      Reminds me of a story my old manager once told me.

      He was writing some artillery control software, and written a Fire Unit Check routine. He didn't even consider the acronym. Needless to say, at the code review, it got changed.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  2. Grub is a bootloader by Dancin_Santa · · Score: 3, Insightful

    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.

    1. Re:Grub is a bootloader by Anonymous Coward · · Score: 5, Informative

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

    2. Re:Grub is a bootloader by arivanov · · Score: 4, Interesting

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

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    3. Re:Grub is a bootloader by stevey · · Score: 2, Informative

      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.

  3. I am vindicated! by ChibiLZ · · Score: 2, Interesting

    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.

    --
    Don't buy WoW Gold! Make it yourself!
  4. Nice humour by moz25 · · Score: 5, Insightful

    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.

    1. Re:Nice humour by dasunt · · Score: 2, Funny

      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 any noticable bugs being discovered.

      In such a situation, I sit back and consider the following: the 'correct' solution takes time, takes energy, and probably will need to be debugged. The "horror-from-the-deep" implimentation is working. Therefore, until I'm ready to extend the code, I'm willing to let the ugly solution stay in the code.

      I know this isn't the "correct" way to code. I should have the right solution the first time (according to certain self-proclaimed experts). There is also the cries from the refactoring crowd, which tell me to rewrite the bad code to "fix" it. But lets be honest -- the hideous code is already debugged. It works. It may not be perfect, but its good enough for now.

      Later, when I go to extend the functionality of bits of code, the ugly hack tends to be written out. In that case, the obscure bits of ugly code that weren't touched after the day it was debugged stays in. The ugly code which needs to be extended and deal with strange and weird cases gets rewritten into something more robust and readable.

      In short: Its often not worth investing time to "fix" working bad code that is infrequently used and/or extended. The current code should be debugged. The new code won't be. Why encourage bugs?

  5. http://cvs.opensolaris.org/source/search?q=fucking by Anonymous Coward · · Score: 5, Informative

    yep, no profanity at all

  6. 10kHz in 1996 by arete · · Score: 4, Insightful

    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.

    --
    Looking for freelance Actionscript (Flash/Flex) or ColdFusion work and/or freelance developers. Email me, put Slashdot
    1. Re:10kHz in 1996 by Nutria · · Score: 2, Funny

      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.

      --
      "I don't know, therefore Aliens" Wafflebox1
    2. Re:10kHz in 1996 by Chirs · · Score: 4, Informative

      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.

    3. Re:10kHz in 1996 by iabervon · · Score: 3, Informative

      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.

    4. Re:10kHz in 1996 by jnik · · Score: 2, Informative
      Surely there are more advances between the PPro and the Pentium-M than there are between the Pentium and the PPro.

      PPro was a complete architecture redesign. After that it's all been incremental (with the exception of the now-abandoned Netburst architecture). So there's a lot of accumulated changes, but the basic structure and execution approach remain based in the P6. The P6 architecture has proven remarkably robust, surviving the addition of four vector instruction sets, a decade, and an order of magnitude clock speed increase.

    5. Re:10kHz in 1996 by jnik · · Score: 2, Informative

      Precision is the number of significant figures in a result. Accuracy is how close it comes to a norm (usually as a multiple of the precision). 23.000+/-.001 hours is a very precise but horribly inaccurate measure of the length of a day on Earth--it's off by 1000 standard deviations. By contrast, 23.5+/-1 is far less precise, but more accurate.

      So a rock-solid 100kHz clock is less precise (broader timeslices) but more accurate than a drifty 1MHz clock.

    6. Re:10kHz in 1996 by Anonymous Coward · · Score: 2, Funny

      My clock runs at 1Hz, thank you very much.

    7. Re:10kHz in 1996 by AKAImBatman · · Score: 2, Interesting
  7. Has anyone found ... by ratta · · Score: 5, Insightful

    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?

    --
    Wondering why i am doing so strange posts? I am trying to get a "+5,Flamebait" or "-1,Insightful" rating.
    1. Re:Has anyone found ... by mrm677 · · Score: 5, Interesting

      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.

    2. Re:Has anyone found ... by hacker · · Score: 2, Interesting
      "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 learn back into my own 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). I don't want to put any of my clients or projects at risk, so I can't look at the code.

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

    3. Re:Has anyone found ... by Myopic · · Score: 3, Insightful

      kudos. you just outgeeked a lot of us.

    4. Re:Has anyone found ... by Paul+Jakma · · Score: 4, Interesting

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

      --
      I use Friend/Foe + mod-point modifiers as a karma/reputation system.
  8. everyone gets burned by micromuncher · · Score: 4, Funny

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

    --
    /\/\icro/\/\uncher
  9. It is quite helpful really by dominux · · Score: 2, Funny

    just search for "sucks" and you get a nice list of places to work to make things suck less.

  10. Hopefully there's none of this by sharpestmarble · · Score: 2, Funny
    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.
    --
    AC's modded -6. I don't see you, I don't mod you, anything you say is lost. Don't like it? Don't be a coward.
  11. Comparison with Linux by HyperBlazer · · Score: 2, Informative
    Linux Kernal Fuck Count

    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.

  12. my favorite comment by k4_pacific · · Score: 4, Funny

    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.

    --
    Unknown host pong.
  13. Re:Is Gord reading Slashdot? by Chmarr · · Score: 3, Informative

    I hear Gord dropped out of the video game store market, and is teaching english in Korea.

  14. Comment should read: by CultFigure · · Score: 2, Funny

    "...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!"

  15. Deal by dawnread · · Score: 2, Funny

    I'll stop using swearwords in my code when my manager stops using ridiculous buzzwords like 'bandwidth' and 'drill down'.

  16. More checking needed by Espectr0 · · Score: 3, Informative
  17. embarrasing code.... by MauMan · · Score: 5, Funny

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

    --
    ------- Code to try when you're bored: qsort( 0, UINT_MAX, sizeof( int* ), IntCompare );
  18. Re:GRUB project?? by Fishstick · · Score: 2

    yeah, the article actually makes this distinction:

    However, the real potty-mouths appeared to be open-source developers whose software made it into the OpenSolaris release in the form of the Perl and GRUB projects.

    The summary does not go out of its way to make this clear.

    --

    There is much cruelty in the universe, John.
    Yeah, we seem to have the tour map.

  19. A better comment... by KingSkippus · · Score: 2, Funny

    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-shirt I have):

    /* Q. What's the difference between dead coders and me? A. 57,004 programmers. */

    Any better suggestions? Reply, because I need something amusing to read this afternoon!

  20. My favourite comment.. by rasilon · · Score: 2, Funny

    From the Solaris 8 code, it may or may not still be there:
    "Inserted for 2.6 testing - remove before shipping."

  21. People by sn0wflake · · Score: 2, Insightful

    Could Gord be http://slashdot.org/~Gord I wonder.

  22. obscure enough for ya?!!! by Thud457 · · Score: 2, Funny

    //
    //
    // SPACE PARANOIDS v 0.9.3
    // Kevin J Flynn
    // June 5, 1982
    //
    //Watch, I bet that weasel Ed Dillinger will like totally rip-off this program.
    //
    //

    --

    the preceding comment is my own and in no way reflects the opinion of the Joint Chiefs of Staff

  23. Another client horror story. by CyricZ · · Score: 4, Funny

    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.

    --
    Cyric Zndovzny at your service.
  24. Re:Wow by Fjornir · · Score: 2

    What do you use to scan your code for naughty bits?

    Ooooh, hurray hurray for the mod bomb. I think I've finally managed to piss someone off enough to have them burn mod points modding me down. Pretty dumb hobby, dude.

    --
    I want a new world. I think this one is broken.
  25. At least Gord's quote was useful... by ArtDent · · Score: 2, Insightful

    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!

  26. Re:http://cvs.opensolaris.org/source/search?q=fuck by happymedium · · Score: 4, Funny
    1782 for (tp = node->tgn_typelist; tp != NULL; tp = tp->tgt_next) {
    1783 if ((kind = mdb_ctf_type_kind(tp->tgt_type)) == CTF_K_UNION) {
    1784 /*
    1785 * Fucking unions...
    1786 */
    1787 found = NULL;
    1788 break;
    1789 }
    Aha! Clearly, Sun programmers oppose organized labor! Such shameless politicking--in code, no less... tsk, tsk...
  27. Re:Who cares? by MynockGuano · · Score: 4, Funny
    In today's modern galaxy there is of course very little still held to be unspeakable. Many words and expressions which only a matter of decades ago were considered so distastefully explicit that were they to be merely breathed in public, the perpetrator would be shunned, barred from polite society, and in extreme case shot through the lungs, are now thought to be very healthy and proper, and their use in everyday speech is seen as evidence of a well-adjusted, relaxed, and totally un****ed up personality.

    So for instance, when in a recent national speech the Financial Minister of the Royal World Estate of Quarlvista actually dared to say that due to one thing and another and the fact that no one had made any food for a while and the king seemed to have died and that most of the population had been on holiday now for over three years, the economy was now in what he called "one whole joojooflop situation," everyone was so pleased he felt able to come out and say it they quite failed to notice that their five thousand year-old civilization had just collapsed overnight.

    But though even words like joojooflop, swut, and turlingdrome are now perfectly acceptable in common usage there is one word that is still beyond the pale. The concept it embodies is so revolting that the publication or broadcast of the word is utterly forbidden in all parts of the galaxy except one where they don't know what it means. That word is 'belgium' and it is only ever used by loose-tongued people like Zaphod Beeblebrox in situations of dire provocation.
  28. In case anyone was wondering... by frankie · · Score: 2, Informative

    ...the Gord in question is almost certainly Gordon Matzigkeit. Make of this what you will.

  29. Don't forget to strip symbols, too! by Dr.+Manhattan · · Score: 3, Funny
    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...

    --
    PHEM - party like it's 1997-2003!
  30. Amusing things that frequently end up in my code: by allanc · · Score: 3, Funny

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

  31. Source browser in the wrong hands by ahl_at_sun · · Score: 3, Insightful
    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...
  32. Error handlers by DavidYaw · · Score: 2, Funny

    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!

  33. Censorzilla by chickenwing · · Score: 3, Interesting

    JWZ has a selection of some of the choice obscenities from Netscape: http://www.jwz.org/doc/censorzilla.html

  34. Re:Wow by mike_the_kid · · Score: 2, Insightful
    I've got my list of red flag words in place, but I've been having some pretty serious problems writing an effective filter ... Has it been solved already? Googling for a comprehensive profanity dictionary at work is... tricky.


    Yes, the solution is:

    Do peer reviews.

    There are other benefits, which you can read about in books by the likes of Kent Beck and Martin Fowler. But I'll bet that if you made it a policy to do reviews, and a policy that profanity would not be tolerated, it would clear up sooner than later.
    --
    Troll Like a Champion Today
  35. Re:Amusing things that frequently end up in my cod by Blakey+Rat · · Score: 2, Funny

    Fucking Slashdot can't figure out that not everything in is a link.

    (Crow breaks through hull of Satellite of Love, air begins rushing out into space)

    Crow: "Whoa, I didn't expect this. Could somebody hand me my notes?"

    (Wind blows Crow's notes onto his face, sticking it there)

    Crow: "Oh, look, there it is. Breach hull, all die... even had it underlined!"

    Haha, funny ass show/movie.

  36. Re:As a self-proclaimed expert by surprise_audit · · Score: 2, Insightful

    Secodn that - shoot for the ideal, knowing full well that the customer will very likely move the goal posts before you're finished, either shortening the deadline and/or insisting on bolt-on extras with no additional time allowed.

  37. Comments are notes... by kaladorn · · Score: 2, Interesting

    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 of using @#$%^%&!!!!! as a replacement.

    But I find people sometimes shy away from identifying poorly architected code, odd inputs our outputs, or places where the approach taken was a kludge that needed to be thrown in but wasn't very good for fear of having an unflattering comment in place. Frankly, I'd rather know about these situations. I'm a big boy... if someone writes that a particular routine is a steaming pile of crap, that won't offend me, as long as the description is technically accurate (the routine actually is) and there is sufficient other data with the comment to tell me WHY this is so.

    A co-worker of mine put in this one recently....
    <ecode>
    ' Quick kludge because of time. Should not rely on global structure
    </ecode>

    Sure, it reveals that we've put a hack in when we should have done it a different way. But at least whoever the next poor bugger that comes along can be 'in the know' and not thinking that we mystically thought this was the 'right' way to solve the problem.

    I also like to put in comment tags I can quickly locate in a search (<i>ANAKIN, WORF, BLAKE, GARTH OF IZAR, etc</i>). Sometimes they get left in. Do they cause any grief? Not really. A friend of mine uses the tag <i>WALLY</i> for all of his temporary patches and now this has infested the code bases at at least 4 companies (and other developers use it). You know if you see a <i>WALLY<i> that there is something to pay attention to and usually the note indicates it is a patch, a kludge, or a less than optimal solution.

    Other sorts of comments that might not look so good might include:

    <ecode>
    ' [initials_deleted] - [date]
    ' THIS IS A FIX - we're holding off on implementing it, despite the fact is is the
    ' correct fix, in order to get the [version] release out the door. Default is [value]. This
    ' means we are writing the wrong thing into the DB. Yet, at the same time, if we fix
    ' it now, it means more work to fix and more risk. So, we want to fix it, we want to
    ' see this change in place, but not right now. So I'm leaving it here, but commented.
    '[line of code commented out]
    </ecode>

    I guess I've written a few comments late at night that I usually excise when the code goes into the repository for the builds. I remember some that crept through. A follow on developer asked me about a comment where I had written "I have no #$%! idea what this value is meant to be so it is utterly arbitrary...." (relating to line discipline for systems we didn't have specs on).
    Similarly, I've seen comments like "If you get here, we're TU" (Tits Up).

    I have seen supposedly benign test data that was never designed for primetime leak out to customer sites. I've seen error messages that said "You should never see this error message. If you do, you're in a very bad state." pop up at client sites. This kind of stuff happens, so beware that any test data you enter should at the very least not be offensive - funny is okay, but humour can be in the eye of the beholder. I'm sure the [deleted] police agency would have been happy if the easter egg we joked with at the office (an avi of a pig squealing) had actually made it into the final release so that every time someone hit request-to-talk, that noise played on the laptop. Some officers we showed it to broke up laughing, but I'm sure others would have been hugely pissed off. So whenever you do something you don't think will get out, keep in mind, it on

    --
    -- Mal: "Well they tell you: never hit a man with a closed fist. But it is, on occasion, hilarious."