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

338 comments

  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 grasshoppa · · Score: 1

      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.

      --
      Mod me down with all of your hatred and your journey towards the dark side will be complete!
    4. 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.

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

    7. Re:Odd Fascination by Timesprout · · Score: 1

      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 stuff like 'this steaming heap of shite method is only here cos those fucktards in marketing spend more time wanking than thinking' is really only asking for trouble in a corporate environment.

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    8. Re:Odd Fascination by Anonymous Coward · · Score: 0
      " Thank God nobody's looking at this comment, or my reputation would be ruined. " -- Gord

      Sucks that your fifteen minutes of fame is gonna be for this, mate!

    9. Re:Odd Fascination by Anonymous Coward · · Score: 0

      I don't know about the swearing bit, but....

      There can be _vast_ differences in the level of quality of developers within a team. Sometimes these types of comments are necessary to point out bad behavior by another coder or to help, i.e. /* this is unusable */ /* completely un-necessary */ /* initialize your variables */ /* memory leak */ /* unsafe pointer ops */
      Half of the time going to the project manager won't make a bit of difference; the developer will still continue on with the bad behavior. More often than not the person who found the problem then becomes responsible for fixing it rathar than the person who caused it in the first place. This can be VERY frustrating having to clean up for someone else constantly; hence some people will take their frustrations out using the comments.

    10. Re:Odd Fascination by Frymaster · · Score: 1
      '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.

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

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

    13. Re:Odd Fascination by Anonymous Coward · · Score: 0

      What makes you think commecial code is exempt.

      Funniest thing I ever saw was a diatribe that went on for several screens by a programmer (who no longer worked there) about how a particular manager (who no longer worked there) was an idiot.

      The funny thing was that the comment had been there for years, and no one did anything about it. My theory is that it was protected by a somebody-else's-problem-field.

      GSWAIIV

    14. Re:Odd Fascination by orderb13 · · Score: 1

      I've been known to leave some pretty nasty comments in the code about the state of things, such as "This function sucks and is extremely wasteful. [Insert Name here] can't code his way out a wet paper bag.", and the like but I've never left any actual instances of cursing in the comments since I got out of college. It isn't professional and depending on your company can get you fired nice and quick.

    15. Re:Odd Fascination by pegr · · Score: 1

      I dunno... Why don't you ask this guy?

    16. Re:Odd Fascination by networkBoy · · Score: 1

      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

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    17. Re:Odd Fascination by Anonymous Coward · · Score: 0

      I once had to explain to the QA department who this "chobbes" fellow was whose name kept appearing in the change history comments.

      Total lack of humor...

    18. Re:Odd Fascination by Flower · · Score: 0, Offtopic
      While my cone has never been subpoena'd it is seen by my end customers.

      I'm sorry. Life without sensor rings must be pretty lonely. Consume mass quantities and it'll be all right.

      --
      I don't want knowledge. I want certainty. - Law, David Bowie
    19. Re:Odd Fascination by Jah-Wren+Ryel · · Score: 1

      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$ecution against you.

      (I'm only half joking.)

      --
      When information is power, privacy is freedom.
    20. Re:Odd Fascination by Anonymous Coward · · Score: 0

      not a facination, just an exposure of the programmer's maturity level.

      People that use profanity all the time show that they are really very immature.

    21. Re:Odd Fascination by elmegil · · Score: 1
      Batman, Picard, Superman, Professor X, Dylan Hunt

      That's a pretty good list of who you can turn to though....

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    22. Re:Odd Fascination by CrankyFool · · Score: 1

      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 want to
      # shoot me.

    23. Re:Odd Fascination by 91degrees · · Score: 1

      Many people may be bad at adding comments, but everyone is even worse at removing them.

    24. 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)
    25. Re:Odd Fascination by Titusdot+Groan · · Score: 1
      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$ecution against you.

      Well, except for the fact that the quotes were never distributed to anybody so no copyright violation could have occured.

    26. Re:Odd Fascination by Anonymous Coward · · Score: 0

      Copyright law covers the making of copies, not just the distribution of them. There's a reason it's called "copyright", not "publicationright".

      You don't own the rights to copy George Carlin's words into your program; unless you happen to be doing so under a specific set of exemptions called "fair use".

      The degree to which to publish merely determines the degree of punishement; the more you publish, the more punishment you'll get. The act itself isn't legal; regardless of whether you publish or not.

    27. Re:Odd Fascination by ShieldW0lf · · Score: 1

      He's not writing it there to help you. He's writing it there to get it off his chest so he can focus.

      The solution is a 5 minute Quake session or a punching bag or something like that.... although personally, I like the "go out for a cigarette and bitch to someone who has no clue what you're talking about" approach.

      --
      -1 Uncomfortable Truth
    28. Re:Odd Fascination by Anonymous Coward · · Score: 2, Funny

      c#@!, f$#%

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

    29. Re:Odd Fascination by NitsujTPU · · Score: 1

      When I was in high school, I wrote a small game playing AI for a science fair that ran a search algorithm.

      I made it to regional. At the regional fair, I placed a hard copy of my source code next to the computer running the game.

      I really should have read the source code first. One of the judges commented on how I had a fiew interestingly named variables... most of which were profane.

    30. Re:Odd Fascination by Anonymous Coward · · Score: 0

      remeber the win2k source leak? From what i heard, that was pretty profane.

    31. 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
    32. Re:Odd Fascination by coolGuyZak · · Score: 1

      Question: What if it does both?

      // We're fucked... this shouldn't happen.
      // The lock was set, but somehow we're in the think-it's-unlocked section.

      Both informative and you get to use fuck^H^H^H^H the "F-Word".

      Granted, this isn't necessarily the best way to operate, but I try to make my comments both informative and funny. e.g:

      // I always thought side effects were a bad thing...
      // mult_add(*a, *b, *c, *d): a= (b * c) + d

      And so on. The object is not to be less informative, it's to add some flavor to the code.

    33. Re:Odd Fascination by AnonymousKev · · Score: 1
      >He's not writing it there to help you.
      Then I say he doesn't understand what a comment is for. :)

      >He's writing it there to get it off his chest so he can focus.
      I can understand the feeling, but agree with you that some other outlet is better for getting things off your chest.

      Then again, I work with a guy who's preferred method of letting off steam is to pound his desk and scream "Why are you doing this to me?", or "<Insert Profanity-Laden Rant Here>". It is discomforting, but it does help me plan ahead for when he finally starts his shooting spree.

      --
      Anonymous Kev
      Proudly posting as AC since 1997
      (Finally got a dang account in 2004)
    34. Re:Odd Fascination by sakshale · · Score: 1

      Fascinating;

      You somehow managed to write an AI game without reading the code? No wonder you made it to regional!

      --
      For every problem there is a solution that is simple, obvious and wrong.
    35. Re:Odd Fascination by Anonymous Coward · · Score: 0

      Jeff is that you?

    36. Re:Odd Fascination by SocietyoftheFist · · Score: 1

      It shows a certain amount of professionalism and respect for those in the future that might work with your creation? You don't have to change your personal ways, I certainly don't. When I'm around those who are more sensitive to some of my ways or deeds, I tone it down out of respect of their beliefs.

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

    38. 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.
    39. Re:Odd Fascination by njcoder · · Score: 1

      No, what'as REALLY fascinating is that Renai LeMay is an uncreative fuck who writes a story based on a slashdot thread i started and doesn't even mention me. :-p

    40. Re:Odd Fascination by Anonymous Coward · · Score: 0

      >> The coder has mastered his anger and left me a useful clue to the problem.

      The revenge of dark side coders will come!

    41. Re:Odd Fascination by Anonymous Coward · · Score: 0

      Eh, quotes, especially in this context, are likely fair use. Let's look at the factors: 1. Purpose: maybe commercial, maybe not. 2. Nature of work: very creative. 3. Amount: not much at all. This is a big one. 4. Effect on the market: positive if any.

      So, I think they've got a case.

    42. Re:Odd Fascination by slipstick · · Score: 1

      Bullshit! :-)

      --
      Sure information wants to be free, but how much are you willing to pay for the packaging?
    43. Re:Odd Fascination by NitsujTPU · · Score: 1

      I had a version on my computer, in which I had changed the names of all profane variables.

      I accidentally printed the original.

    44. Re:Odd Fascination by Sj0 · · Score: 1

      No, you simply infer that they are really very immature. In reality, using swears is nothing more than a habit borne from a persons environment. You can be a wisened 90 year old man and swear like a sailor(possibly because you were a sailor at some point), or you can be an ignorant 12 year old who steadfastly refuses to swear. Frankly, using it as a measure is pure ignorance.

      --
      It's been a long time.
    45. Re:Odd Fascination by Sj0 · · Score: 1

      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.

      Actually, it wouldn't be writing, but that pretty much sounds like most of the tradespeople I know.

      --
      It's been a long time.
    46. Re:Odd Fascination by Anonymous Coward · · Score: 0

      While my cone has never been subpoena'd...

      Oblio, is that you?

    47. Re:Odd Fascination by Anonymous Coward · · Score: 0

      You are lucky you weren't bankrupted.

      and

      (I'm only half joking.)

      But you are a full moron. Someone with more mental capacity (everyone else) would examine that thought, realize it is moronic, and reject it.

      From your leaping to conclusions ("That was a copyright violation..." which makes me hope you are never on a jury) to your having no understanding of the legal system anywhere (hint, prosecute is something prosecuters do, when you are sued by a company there is no prosecuter involved) to your lack of understanding of the ways of the world (puny humans aren't sued when there is a company that can be sued) it is clear you are a Grade-A moron.

      Of course, I could be unusually cranky today and you are really more of a simpleton.

      Yeah, it's probably me.

    48. Re:Odd Fascination by Urchlay · · Score: 1
      > 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...

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

      But what if the comment says

      We're fucked. The lock was set, but somehow we're in the think-it's-unlocked section

      There are some of us who just use profanity as punctuation... though not, I confess, at work :)

    49. Re:Odd Fascination by syynnapse · · Score: 1
      you can get steam off your chest as well as be informative:

      else
      {
      /*these are things IE can't stomach because its a piece of crap */

      --

      System.out.println(syynnapse.getSig());

    50. Re:Odd Fascination by Anonymous Coward · · Score: 0

      ""That was a copyright violation..." which makes me hope you are never on a jury"

      Guess what!

      Copyright infringement is a civil case, and thus there is no jury.

      STFUKTHXBYE

    51. Re:Odd Fascination by jericho4.0 · · Score: 1

      You say tomato, I say fuck you!

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    52. Re:Odd Fascination by Anonymous Coward · · Score: 0
      Or follow your steam-relieving comment with an informative error or assertion:
      // Someone didn't read the damn instructions
      NSAssert([weebl isFallen] == false, @"Weebl wobbled and then fell down. This should not occur.");
    53. Re:Odd Fascination by Anonymous Coward · · Score: 0

      I know of someone who was making a battleship-type thing, and made a variable to store the number of ships hit. He didn't realize that the variable name could be read in two ways until someone asked why he had made it so profane :)

    54. Re:Odd Fascination by glenebob · · Score: 1

      I got the idea that the parent poster isn't really too impressed with such things as flavor or humor... Probably not real fun to work for.

    55. Re:Odd Fascination by Anonymous Coward · · Score: 0
      !seineew era sreenigne epacsten!

      Translates to (when read backwards): Netscape engineers are weenies!
      HOLY SHIT!! Thanks for clearing that up, I've been trying to figure it out for hours!
    56. Re:Odd Fascination by AnonymousKev · · Score: 1

      If "We're f*cked" is your idea of flavor and humor, then you're absolutely right Bob -- I wouldn't want you working for me.

      --
      Anonymous Kev
      Proudly posting as AC since 1997
      (Finally got a dang account in 2004)
    57. Re:Odd Fascination by wreeder · · Score: 1

      In the Republic of Texas, civil cases have juries. I suspect that it is the same in the United States. Other countries may have different rules.

    58. Re:Odd Fascination by Chibi+Merrow · · Score: 1

      And see, the worst I ever did was leave Japanese comments and debug messages in one of my freshman assignments...

      if (argc < 2)
      //Baka no gaijin!

      ...

      while (int i = 0; i < MAX_ROW; i++) {
      cout << endl << "Nani? " << i << endl;
      while (int j = 0; j < MAX_COL; j++) {
      ...
      cout << " ITAI! " << j << endl;
      }
      }

      etc...

      Needless to say my Indian grader was a little confused... ^_^

      --
      Maxim: People cannot follow directions.
      Increases in truth directly with the length of time spent explaining them
    59. Re:Odd Fascination by mink · · Score: 1

      Oh come off it, thatls not offtopic, it's funny. Best thing I've read in a week.

      --
      Well I've wrestled with reality for thirty five years doctor, and I'm happy to say I finally won out over it.
    60. Re:Odd Fascination by mink · · Score: 1

      "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$ecution against you."

      I would hope Carlin owns his works.

      --
      Well I've wrestled with reality for thirty five years doctor, and I'm happy to say I finally won out over it.
  2. GRUB project?? by Anonymous Coward · · Score: 0, Informative

    I believe that has nothing to do with the Solaris code.

    1. Re:GRUB project?? by Anonymous Coward · · Score: 0, Funny

      And I believe that you didn't RTFA. GRUB is included in OpenSolaris.

      I wonder if it's this Gord.

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

    3. Re:GRUB project?? by Anonymous Coward · · Score: 0

      I worship that gord and want him to have my babies.

  3. 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 Anonymous Coward · · Score: 0

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

      That's it! For all their cursing, all those OSS developers are FIRED!

      Oh wait...

      You know, if Sun really cared about that aspect, they're more than free to not use those nasty, vile, rude OSS components, that were lovingly developed for them for abso-fucking-lutely nothing.

      When the developers are getting paid, then I can understand getting the code swear-free and presentable to clients. Otherwise, fuck 'em. Don't like my comments, don't use my code. It's that simple.

    3. 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/
    4. 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.

    5. Re:Grub is a bootloader by jdavidb · · Score: 1

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

    6. Re:Grub is a bootloader by Anonymous Coward · · Score: 1, Funny

      196 /* NOTE: In the descriptor writes one _must_ write the address
      197 * member _first_. The card must not be allowed to see
      198 * the updated descriptor flags until the address is
      199 * correct. I've added a write memory barrier between
      200 * the two stores so that I can sleep well at night... -DaveM

      528 /* Welcome to Sun Microsystems, can I take your order please? */

      532 /* Would you like fries with that? */

      882 /* Can't happens.... */
      883 printk(KERN_ERR "%s: Aieee, link timer is asleep but we got one anyways!\n",

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

      917 printk(KERN_ERR "happy meal: Transceiver BigMac ATTACK!");

      930 /* We have a special on GNU/Viking hardware bugs today. */

      935 /* Will that be all? */

      937 printk(KERN_ERR "happy meal: Receiver BigMac ATTACK!");

      939 /* Don't forget your vik_1137125_wa. Have a nice day. */

      952 /* We're consolidating our STB products, it's your lucky day. */

      957 /* Come back next week when we are "Sun Microelectronics". */

      961 /* Remember: "Different name, same old buggy as shit hardware." */

      1000 /* Shut up the MIF. */

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

      1733 static void happy_meal_set_initial_advertisement(struct happy_meal *hp)

      1793 static int happy_meal_is_not_so_happy(struct happy_meal *hp, u32 status)

      2001 /* Originally I used to handle the allocation failure by just giving back just
      2002 * that one ring buffer to the happy meal. Problem is that usually when that
      2003 * condition is triggered, the happy meal expects you to do something reasonable
      2004 * with all of the packets it has DMA'd in. So now I just drop the entire
      2005 * ring when we cannot get a new skb and give them all back to the happy meal,
      2006 * maybe things will be "happier" now.

      2215 printk(KERN_ERR "happy_meal(SBUS): Can't order irq %s to go.\n",

    7. Re:Grub is a bootloader by hacker · · Score: 1
      "Or arch/sparc/mm/ptrace.c ..."
      Have you seen arch/sparc/kernel/traps.c? Do a search for "Amuse" in that file and laugh...
    8. Re:Grub is a bootloader by farnsworth · · Score: 1
      937 printk(KERN_ERR "happy meal: Receiver BigMac ATTACK!");

      There's nothing unusual about that. The author is using the widely-known Hungry Notation, whereby prefixes and variable names are descriptive of the various food items that the author is currently preoccupied with.

      --

      There aint no pancake so thin it doesn't have two sides.

    9. Re:Grub is a bootloader by ray-auch · · Score: 1

      Oh FFS - _Sun_ _don't_ care. If they did, they'd have removed the comments from their dist (it's open source code after all).

      That they (it seems) left them intact even if they (alledgedly according to TFA) might not have met the standards for _Sun_ code actually (to me) shows that they have some respect for the authors and OSS.

      The only people making a fuss about it are in the media. Must be a slow week for IT stories, either that or MS is paying for "see what happens when you use OSS" articles.

    10. Re:Grub is a bootloader by Anonymous Coward · · Score: 0

      damn. I never have mod points when I want them. Someone understands something!

    11. Re:Grub is a bootloader by Paul+Jakma · · Score: 1

      Or could it just be that code under a certain arch/ tends to have been written by a specific subset of kernel hackers?

      Eg, if arch/ppc64 is profanity free and arch/sparc is a swamp of cursewords-in-comments, then maybe the correct conclusion to take from it is that the SPARC hackers simply tend to swear more than the IBM hackers? (Ie, the Linux SPARC hackers, ie mainly David S Miller, never did that work under corporate auspices. While the IBM PPC64 hackers are all posting their diffs from @XX.ibm.com email addresses - seems to me that could be a big factor ;) ).

      Any other conclusions seem unsafe to me. I don't think the swearing, or lack of it, says much about the hardware.

      --
      I use Friend/Foe + mod-point modifiers as a karma/reputation system.
    12. Re:Grub is a bootloader by arivanov · · Score: 1

      If you are referring to the fact that Miller used to call his machines with different obsceneties in Russian like pizda (vagina), huy (dick), so on, I am well aware of that. None the less, sparc tree remains indicative of "quirky" hardware compared to ppc even after Millerisms have been cleaned out.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    13. Re:Grub is a bootloader by Paul+Jakma · · Score: 1

      No, I'm referrring to the fact that the hackers on arch/foo tend to be a different set of hackers than those who work on arch/foo. Hence "FOO must be worse than BAR because arch/foo has more swearing about the quality of the hardware" is simply not a safe conclusion. That's all..

      --
      I use Friend/Foe + mod-point modifiers as a karma/reputation system.
  4. 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!
    1. Re:I am vindicated! by justsomebody · · Score: 1

      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.

      --
      Signature Pro version 1.13.2-3 release 83.5 beta3try7 after-breakfast edition
    2. Re:I am vindicated! by ChibiLZ · · Score: 1

      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.

      --
      Don't buy WoW Gold! Make it yourself!
    3. Re:I am vindicated! by torpor · · Score: 1

      sheesh... the days of "can't turn other peoples' annoying comments on or off" are over, dude.

      you both should be using better editors, and comment-tags..

      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  5. haha score one to open source by Anonymous Coward · · Score: 0, Interesting

    Code is so much better when your reputation is on the line amongst your peers.

    I always think that peer esteem is one of the biggest contributing factors to the quality of open source code.

    1. Re:haha score one to open source by Anonymous Coward · · Score: 1, Insightful

      Did you RTFA? They're saying OSS is WORSE for profanity and unprofessionalism.

    2. Re:haha score one to open source by radish · · Score: 1

      It's the fact that all my code has to pass review with my peers that prevents me writing junk comments. In (decent) commercial dev environment peer review is mandatory, in O/S it's a possibility (i.e. if anyone can be bothered to read it).

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

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

    2. Re:Nice humour by eyeye · · Score: 1

      Therefore, until I'm ready to extend the code, I'm willing to let the ugly solution stay in the code.


      Or more likely the next coder who comes along will have to spend the time you saved (and more) dealing with your shit.
      --
      Bush and Blair ate my sig!
    3. Re:Nice humour by Anonymous Coward · · Score: 0

      No, the good is the enemy of the great.

    4. Re:Nice humour by tlmatters · · Score: 1

      Yes, if that next coder is an idiot.....

    5. Re:Nice humour by bluGill · · Score: 1

      Maybe, maybe not. The next coder shouldn't be touching that code until there is a bug or a new feature. The former is unlikely, or I would have cleaned it up already. The latter means they would spend a lot of time changing that code anyway, with no reason to believe their changes can easily fit into the clean code I come up with, so they might have to re-write it all anyway.

      In any case, the next coder at least has an example that works. They also have admission by the author that this code sucks and should be cleaned up. More than once I've spent a long time looking at ugly code only to suddenly realize that it wasn't ugly, it was good, clean, fast code - that couldn't be made easier to understand without an order of magnitude more lines (and thus that many more bugs) It is really hard for a programmer to see that code is good at a glance. (though as I get better I have learned many things that are good that look bad at first sight)

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

    yep, no profanity at all

  8. oooo look what I found! by Anonymous Coward · · Score: 0

    "Ten million lines of code and not a single profanity? Is that really possible?

    Option Explicit

    Private Declare Function SetForegroundWindow Lib "SHITHEAD" (ByVal hWnd As _
    Long) As Long
    Private Declare Function Shell_AssfaceIcon Lib "shell32.dll" Alias _
    "Shell_AssfaceIconA" (ByVal dwMessage As Long, lpData As _
    NOTIFYICONDATA) As Long

  9. Who cares? by phocutus · · Score: 0

    Comments are just that 'comments' who gives a crap if there's curse words or odd stuff? As long as it works and the developer wants to give in insight screw it! If the comments make sense and have some comical/curse words so be it. I rather see code with personality then someone who was straight chalk board.

    1. Re:Who cares? by Anonymous Coward · · Score: 1, Insightful

      Us professional programmers care.

      When you are doing a bid do having a conference after winnign one do you sit down and say,

      Yeah, we can code that fucking system no problem. I mean shit man it may be hard as shit but we can meet that deadline. What we need to know is why the fuck did you want that in there. Can't we just get rid of this shit and move this over here. Fuck man, it makes more sense.

      I don't think so. Being a professional means acting like a professional and only adding comments to code that help explain the program.

      Having outsourced HUGE amounts of programming in my life, I can say that finding a comment like "Fuck this a hack." would not be a plus for the vendor in question.

    2. 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.
    3. Re:Who cares? by JudicatorX · · Score: 1

      Anonymous Coward a professional... beautiful.

      Anyways, doing s/(\w*)/\1 fuck/g on all your commments (or conversation sentences, whichever) is going to make you look like an idiot, or at least a backwater hick.

      --
      "It is a good divine that follows his own instructions" - Portia, The Merchant of Venice
    4. Re:Who cares? by Anonymous Coward · · Score: 0

      JudicatorX sounds very professional as well.

    5. Re:Who cares? by fireboy1919 · · Score: 1

      Nice sig. Did you think it up independantly, or get it from somewhere else?

      (I've been a bit gratified to know that since I thought it up, it's been slowly spreading through the web, and I keep seeing it more and more places).

      --
      Mod me down and I will become more powerful than you can possibly imagine!
    6. Re:Who cares? by MynockGuano · · Score: 1

      >8D No, thought it up myself independently. I thought it was rather witty and original!

      Guess I'll have to settle for witty and semi-original.

    7. Re:Who cares? by drsquare · · Score: 0, Flamebait

      When you are doing a bid do having a conference after winnign one do you sit down and say,

      Yeah, we can code that fucking system no problem. I mean shit man it may be hard as shit but we can meet that deadline. What we need to know is why the fuck did you want that in there. Can't we just get rid of this shit and move this over here. Fuck man, it makes more sense.

      I don't think so.


      Er, yes? Why wouldn't you say that, other than the grammatical errors which are probably because you can't speak English properly.

  10. Actual comment is here: by baldmaggots · · Score: 1

    Line 759 at this link: http://cvs.opensolaris.org/source/xref/usr/src/gru b/grub-0.95/grub/asmstub.c#759 However, it's just GRUB code, so not really part of solaris, just something they've picked up...

  11. Misquote... by rel4x · · Score: 0

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

    I believe there is a misquote in there. I coulda sworn he said his reputation would be "gored"..

    *ducks*

    --

    Before you mod me funny, think, perhaps I was insightfully funny?
  12. 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 b1t+r0t · · Score: 1

      Either they misquoted or, as you say, he was talking about some other clock. Perhaps the timeslicing clock?

      --

      --
      "Open source is good." - Steve Jobs
      "Open source is evil." - Microsoft
    2. 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
    3. 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.

    4. Re:10kHz in 1996 by molo · · Score: 1

      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

      --
      Using your sig line to advertise for friends is lame.
    5. Re:10kHz in 1996 by charlieo88 · · Score: 0

      Woudn't a Pentium 4 be an i986?

    6. Re:10kHz in 1996 by Billy+the+Impaler · · Score: 0


      Perhaps he just intended to say 10Ghz or something along those lines (a typo). Perhaps he said it as a joke (in that the number seemed like a low speed to him at the time).

      More importantly, who cares?

    7. Re:10kHz in 1996 by farnz · · Score: 1

      Strictly, it's the Pentium-M which is still an i686, as the Pentium 4 is the NetBurst platform (a complete redesign for high clock speeds at the expense of all else). Pentium-M however, is an evolution of the P3, which is an evolution of the P2, which is a PPro with better 16-bit code support and MMX.

    8. Re:10kHz in 1996 by AKAImBatman · · Score: 1

      FYI, the comment is in param.c, 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.

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

    10. Re:10kHz in 1996 by 91degrees · · Score: 1

      Any idea how intel decide what is an isn't a new revision. Surely there are more advances between the PPro and the Pentium-M than there are between the Pentium and the PPro.

    11. Re:10kHz in 1996 by Anonymous Coward · · Score: 0

      how the heck can you be more accurate, but less precise??

      i think you meant more frequent but less precise...

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

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

    14. Re:10kHz in 1996 by corvair2k1 · · Score: 1

      If I say that a day has 24 hours, I'm pretty precise. (Only about .23 days off) This is not precise.

      If I say a day has 138.38284827480284 hours... That's EXTREMELY precise, but entirely inaccurate.

    15. Re:10kHz in 1996 by Anonymous Coward · · Score: 0

      You actually can, accurate is closer to the true value whereas precise means you have less variation.

      Example: if you have an experiment timing something, run it 10 trials, and all your times are the same, then you are very precise. The times could be completely wrong compared to what the actual time period was (due an error in how you set up the experiement/timing system) and thus you could have bad accuracy at the same time.

    16. Re:10kHz in 1996 by sconeu · · Score: 1

      If I say that a day has 24 hours, I'm pretty precise. (Only about .23 days off)

      So 24 hours per day is off by almost one quarter of a day?

      So does a day have 29.52 or 18.48 hours?

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    17. Re:10kHz in 1996 by Anonymous Coward · · Score: 2, Funny

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

    18. Re:10kHz in 1996 by uyguremre · · Score: 1
      My clock runs at 1Hz, thank you very much.
      C'mon guys score:0 for this comment? This one of the funniest comments i have read! Moderators in need of a little overclocking?
    19. Re:10kHz in 1996 by Anonymous Coward · · Score: 0
      So 24 hours per day is off by almost one quarter of a day?
      I believe it's off by around 2.5 seconds per day, which adds up to a quarter day per year. That's why we have leap years.
    20. Re:10kHz in 1996 by corvair2k1 · · Score: 1

      Oops. :-P

      This, children, was inaccurate AND imprecise. :-P

    21. Re:10kHz in 1996 by illumin8 · · Score: 1

      It's quite possible that Macs use a capacitor sub-clock to produce a more accurate (but less precise) signal.

      Interesting comment, but how exactly does something become more accurate and less precise at the same time?

      --
      "When the president does it, that means it's not illegal." - Richard M. Nixon
    22. Re:10kHz in 1996 by be-fan · · Score: 1

      Not really. The backend execution core is the exact same between the two processors. There are significant differences: the P-M uses the P4's branch predictor, the P4's bus, and his some microarchitectural improvements (deeper buffers, improved decoder, longer pipelines, improved reorder buffer, more optimized circuits), but they re all incremental improvements.

      Indeed, it's fair to say that the differences between the P-M and the PPro aren't significantly bigger than the differences between the Athlon and the Athlon64. Meanwhile, the Pentium and the PPro are completely different architectures, and indeed, completely different in their principle of operation. The Pentium is an in-order CISC processor, while the PPro is an out-of-order RISC chip with an x86 frontend.

      It's pretty incredible how capable the PPro architecture has proven to be. The original PPro, introduced 10 years ago, ran at less than 200Mhz and was built on a 600nm process. In comparison, the Yonah processors coming out next year will run at 2GHz+ and be built on a 65nm process.

      --
      A deep unwavering belief is a sure sign you're missing something...
    23. Re:10kHz in 1996 by AKAImBatman · · Score: 2, Interesting
  13. Is Gord reading Slashdot? by October_30th · · Score: 1

    So won't the real Gord please stand up, please stand up, please stand up...

    --
    The owls are not what they seem
    1. 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.

    2. Re:Is Gord reading Slashdot? by Moredhel · · Score: 1

      Cue a crowd of "I'm Gordicus!" replies?

    3. Re:Is Gord reading Slashdot? by Anonymous Coward · · Score: 0

      Its me, i confess

      robert bison, 13493 Westchester Bldv, Akron, OH

    4. Re:Is Gord reading Slashdot? by Stanistani · · Score: 1

      From the source...
      Gordon Matzigkeit , 2000-07-25
      ...and of course, his website

  14. 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 Anonymous Coward · · Score: 0

      Have you even seen the linux lock code?

      Its not like you COULD port this type of locking over, simply because the linux locking system, spin-locks and stuff are SO different, you would end up re-writing the stuff.

    3. Re:Has anyone found ... by SpinyNorman · · Score: 1

      What's an adaptive backoff lock?

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

    5. Re:Has anyone found ... by mrm677 · · Score: 1

      From the comment:

      #pragma ident "@(#)mutex.c 1.28 05/06/08 SMI" /*
      * Big Theory Statement for mutual exclusion locking primitives.
      *
      * A mutex serializes multiple threads so that only one thread
      * (the "owner" of the mutex) is active at a time. See mutex(9F)
      * for a full description of the interfaces and programming model.
      * The rest of this comment describes the implementation.
      *
      * Mutexes come in two flavors: adaptive and spin. mutex_init(9F)
      * determines the type based solely on the iblock cookie (PIL) argument.
      * PIL > LOCK_LEVEL implies a spin lock; everything else is adaptive.
      *
      * Spin mutexes block interrupts and spin until the lock becomes available.
      * A thread may not sleep, or call any function that might sleep, while
      * holding a spin mutex. With few exceptions, spin mutexes should only
      * be used to synchronize with interrupt handlers.
      *
      * Adaptive mutexes (the default type) spin if the owner is running on
      * another CPU and block otherwise. This policy is based on the assumption
      * that mutex hold times are typically short enough that the time spent
      * spinning is less than the time it takes to block. If you need mutual
      * exclusion semantics with long hold times, consider an rwlock(9F) as
      * RW_WRITER. Better still, reconsider the algorithm: if it requires
      * mutual exclusion for long periods of time, it's probably not scalable.
      *
      * Adaptive mutexes are overwhelmingly more common than spin mutexes,
      * so mutex_enter() assumes that the lock is adaptive. We get away
      * with this by structuring mutexes so that an attempt to acquire a
      * spin mutex as adaptive always fails. When mutex_enter() fails
      * it punts to mutex_vector_enter(), which does all the hard stuff.
      *

    6. Re:Has anyone found ... by donuthole · · Score: 1

      in a nutshell, a spin-lock will cause the thread waiting for the lock to spin and keep checking to see if the lock becomes available. whereas, the adaptive lock will spin if the holder of the lock is running on another CPU; otherwise they block for a short time instead of spinning, thus yielding the CPU it's running on so some other thread can utilise the CPU time instead. the idea being that if the holder is running somewhere else, then it should be finishing up soon - so we can spin on it since it should be done soon. but if it's not, then we'll block since we can't do anything until it becomes active and gives up the lock anyway.

    7. Re:Has anyone found ... by Anonymous Coward · · Score: 0

      Yes, you should probably be carefull, or this plucker documentation of yours will be severely contaminated.

    8. Re:Has anyone found ... by Anonymous Coward · · Score: 0

      He just said the code was interesting, he didn't talk about porting it to linux, stop drinking coffee...

    9. Re:Has anyone found ... by Anonymous Coward · · Score: 0

      > Yes, the locking code in mutex.c is fascinating...

      Well, make sure the Linux kernel developers
      incorporate the idea into the kernel, wait six
      months, and then the community can make claims
      about how advanced Linux is. That's what usually
      happens. If not with the kernel, then with some
      other part of the system.

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

      kudos. you just outgeeked a lot of us.

    11. 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.
    12. Re:Has anyone found ... by Anonymous Coward · · Score: 0

      Whoa. That's a big-assed nutshell.

    13. Re:Has anyone found ... by Anonymous Coward · · Score: 0

      [snip]...and then the community can make claims about how advanced Linux is. That's what usually happens. If not with the kernel, then with some other part of the system

      Linux is just a kernel

  15. 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
    1. Re:everyone gets burned by QuestorTapes · · Score: 1

      > So now all my code is antiseptic, just because its not good to show "unprofessionalism" infront of the client. ...
      > During the course of a demo, a pumping station turned red to show an alarm, followed by a small
      > mushroom cloud animation

      That's the main reason I changed my commenting policies. I never used 'cute' comments (Start Trek characters, Tolkein references, game references), but I used to occasionally use 'indelicate' variable names, that occasionally showed up in error messages.

      Comments don't need to be antiseptic; but if the comments have a lot of profanity, it often indicates a level of programmer frustration that may lead one to conclude that there are problems either in the code or the company that owns the code.

      And often the decision is made to take some code or documentation that -used to be- for internal use only and make it public. That can be a bit embarassing, if the coders don't know ahead of time.

    2. Re:everyone gets burned by gmletzkojr · · Score: 1

      I took over a project from a guy who felt it necessary to 'personalize' his code.

      The function to send data was called SendTheDamnThang(). A debug message box also got out to an end user site, proclaiming "In the function SendTheDamnThang()!" Once the client saw it, it become SendTheThang().

      During printing, in order to get text extents, he used the phrase "Noah loves Kimmy". That managed to remain.

      Noah, if you are reading this, send me a msg.

      --
      I for one welcome our new [insert main topic] overlords.
    3. Re:everyone gets burned by dchamp · · Score: 1

      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.

    4. Re:everyone gets burned by Anonymous Coward · · Score: 0

      I once wrote a function called JustDrawTheDamnLine(X1,Y1,X2,Y2) that simply called the Line(X1,Y1)-(X2,Y2) function of Visual Basic.

      If you ever used the built in Line function of Visual Basic you know that changing the parameters while debugging would make Visual Studio insist the damn program had to be recompiled.

      Hence the JustDrawTheDamnLine function. I could change the parameters on that as often as I liked while debugging with nary a peep from Visual Studio.

    5. Re:everyone gets burned by Anonymous Coward · · Score: 0


      "Comments don't need to be antiseptic; but if the comments have a lot of profanity, it often indicates a level of programmer frustration that may lead one to conclude that there are problems either in the code or the company that owns the code."

      And perhaps it should. Maybe it's a cry for help, but maybe it's a warning.

    6. Re:everyone gets burned by macboygrey · · Score: 1

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

      And he went on to code Clippy, the annoying office assistant?

    7. Re:everyone gets burned by micromuncher · · Score: 1

      I believe he is lead on Studio.NET, but you didn't hear it from me.

      --
      /\/\icro/\/\uncher
    8. Re:everyone gets burned by corngrower · · Score: 1
      Once for a system test, I put in a statement to indicate the progression of the test that printed the message

      Forking 50 users.


      Later on in the test, another message was printed that stated something like

      Spawning.


      I hadn't realized what those statements might mean to someone not familiar to some system calls. It was humorous to the customer, but a bit embarassing for me.

    9. Re:everyone gets burned by Apotsy · · Score: 1

      Okay, now that one is funny.

    10. Re:everyone gets burned by kaffiene · · Score: 1

      Hehe.

      My favourite easter egg was this: We had a tester who complained about "ok" buttons. She used to complain that you'd get a dialog mentioning some error had occured and a button saying "ok", but of course, you weren't okay, you were pissed off!

      So... I made a dialog that came up with the error text and a button that read "bugger!" But! Knowing that this would get me in trouble, I coded it so that the button would revert to saying "ok" within a couple of seconds, and that it would never repeat the behaviour in a single session. that way, when the tester went to show someone else, the button would be polite and not repeat the behaviour. I also coded in a check for the IP address of the tester's machine so it wouldn't have that behaviour on anyone else's machine.

      Oh, that was fun!

      I also hid the code simply by placing it mainly on one line and well past the 120 character mark. None of the other coders could find it even when they wen't looking for it (a simple deception, but sometimes the simple things work)

      The tester nailed me for it, but it was worth it!

    11. Re:everyone gets burned by LadyLucky · · Score: 1
      The company I work for is in New Zealand. One of our products was made nicely internationalizable. To test it out, we made a translation file for our friendly neighbours across the Tasman. If you entered the wrong password, you would get

      "Streuth mate, looks like you've entered a dodgy password."

      And so forth. All throughout the application. Needless to say, we never removed it. Then a sales guy did a demo to an Australian customer :-) heh.

      --
      dominionrd.blogspot.com - Restaurants on
    12. Re:everyone gets burned by micromuncher · · Score: 1

      I think all software should get localized.

      Here OK would be "Right on b'y, eh!"

      --
      /\/\icro/\/\uncher
  16. what's the problem? never got to do some crap just by ranjix · · Score: 1

    because of some "insightful" managers? of course you'll appologize to the future generations for the hack... this is what I was tought at least, at JayLeno's Fruitcake Lady (I'm not sure which one is the first name)...

    --
    I had another sig before, but this one is better
  17. 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.

    1. Re:It is quite helpful really by Anonymous Coward · · Score: 0

      Ok, was that grep for sucks and pipe to less or grep less for sucks? Shouldn't that be strings less | grep sucks

  18. Will Linux benefit from this? by Anonymous Coward · · Score: 0

    How long until we start seeing features being ported over from OpenSolaris to Linux? Will it happen?

    ---

    European zine about guns, hacking, paranoia
    #eurohacker@irc.freenode.org

  19. 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.
    1. Re:Hopefully there's none of this by game+kid · · Score: 1

      if you all think comments are bad... how about output?

      --
      You can hold down the "B" button for continuous firing.
  20. 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.

    1. Re:Comparison with Linux by imr · · Score: 1, Funny

      What's a kernal fuck?

    2. Re:Comparison with Linux by HyperBlazer · · Score: 0

      Usually, a typo... Unless it's some really kinky act no one has told me about.

    3. Re:Comparison with Linux by Profane+MuthaFucka · · Score: 1

      Kernel fuck: that's the goal
      Kernel oops: Hmmm, I think the condom broke
      kernel panic: Oh shit, the condom did indeed break.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    4. Re:Comparison with Linux by Mold · · Score: 1

      The birth of a new distribution!

  21. 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.
    1. Re:my favorite comment by CodeArtisan · · Score: 1

      I had to maintain some C code and came across the comment:

      /* I don't know why this works, but it does */

      Turns out the guy went on a C training course, but missed the last day. Didn't stop him from cutting and pasting code he didn't understand, though.

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

    1. Re:Comment should read: by m50d · · Score: 1

      I wonder if that's the same Gord who wrote the Gord's synth soundfont. Because if so, we now know who he is!

      --
      I am trolling
    2. Re:Comment should read: by ZosX · · Score: 1

      You mispelled Gort.

      Go Google it. I just did.

    3. Re:Comment should read: by Sj0 · · Score: 1

      Ironically, slashdot is composed primarily of industry insiders(read: managers and marketers) these days, so if he hadn't left that comment, nobody would have known. :P

      --
      It's been a long time.
  23. 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'.

    1. Re:Deal by chrish · · Score: 1

      I think he'll need to "open the kimono" first.

      --
      - chrish
    2. Re:Deal by Pinefresh · · Score: 1

      ah a userfriendly reader

    3. Re:Deal by dawnread · · Score: 0

      Mock if you want but our manager was saying bandwidth for a looooong time before todays Dilbert arrived. We've now stuck today's up on the project board.

    4. Re:Deal by Sentry21 · · Score: 1

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

      We'll have to touch base to talk about this interesting paradigm.

  24. More checking needed by Espectr0 · · Score: 3, Informative
    1. Re:More checking needed by loconet · · Score: 1

      indeed

      But I think the best comment comes from their website itself : "Our lawyer is making us say that OpenSolaris is a trademark of Sun Microsystems, Inc."

      --
      [alk]
  25. MOD PARENT UP! by alphakappa · · Score: 0, Offtopic

    I wish I had mod points right now, but parent has the truth about Grub.

    --
    "When the only tool you own is a hammer, every problem begins to resemble a nail." - Abraham Maslow (1908-1970)
  26. 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 );
    1. Re:embarrasing code.... by MauMan · · Score: 1

      Happily that code is yet to execute...

      --
      ------- Code to try when you're bored: qsort( 0, UINT_MAX, sizeof( int* ), IntCompare );
  27. http://cvs.opensolaris.org/source/search?q=shit&am by 3.5+stripes · · Score: 1, Informative

    Good job guys...

    --


    He tried to kill me with a forklift!
  28. Oh noes! by Anonymous Coward · · Score: 0
    1. Re:Oh noes! by ettlz · · Score: 1

      I didn't know Snoop Dogg was a coder! Maybe they ran the code through the Shizzolator.

    2. Re:Oh noes! by Rahga · · Score: 1

      History says that file is only 2 days old.

  29. This commercial developper see shit that makes him by crovira · · Score: 1

    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 was: (If you get to debug this piece of shit, good luck. I'm gone now. Guess why?)

    Documentation by osmosis is common in all in-house development efforts, as is profanity.

    --
    MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
  30. 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!

    1. Re:A better comment... by Spy+der+Mann · · Score: 1

      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.

    2. Re:A better comment... by a+gash · · Score: 1

      /* Q. What's the difference between dead coders and me? A. 57,004 programmers. */ ^I'm thinking I should get this, but I don't. little help?

    3. Re:A better comment... by Anonymous Coward · · Score: 0



      not all words are english.

    4. Re:A better comment... by Anonymous Coward · · Score: 0

      0xDEAD hex = 57005 decimal.

    5. Re:A better comment... by KingSkippus · · Score: 1

      Ah, sorry, DEAD is hexadecimal for 57,005 in decimal, so the difference between 57,005 coders and me (presumably all by my lonesome) is 57,004 programmers. It explains the t-shirt, too. Like I said, it's corny, but for some reason, it strikes me as really funny. :-)

    6. Re:A better comment... by Sj0 · · Score: 1

      Maybe if it was 0xdead or &Hdead. :P

      If you don't define dead as hex, it's just a nonsensical sentence. :P

      --
      It's been a long time.
    7. Re:A better comment... by multi+io · · Score: 1
      ThinkGeek t-shirt

      This is lame. Why doesn't the backside read "deae"?

    8. Re:A better comment... by surprise_audit · · Score: 1

      How about humour in other languages?? For example, the famous Latin quote in Multics: http://www.multicians.org/hodie-natus-est.html

  31. Ha, some crazy Perl developers! by That's+Unpossible! · · Score: 1, Funny

    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!

    --
    Ironically, the word ironically is often used incorrectly.
  32. Wow by Fjornir · · Score: 0, Redundant
    Synchronicity strikes again. Profanity in our source code is a huge problem at my company -- and a lot of it we do ship to customers. I've got my list of red flag words in place, but I've been having some pretty serious problems writing an effective filter.

    It comes down to: inflected forms and naughty words in other words. For instance if I search for "ass" then I can either have it match too strictly and it will catch "class" and "passed" -- or too loosely and it will not catch "dumbass" and "jackass". Then think of all the -ed and -ing formations and it starts to become more and more of a tricky problem.

    Has it been solved already? Googling for a comprehensive profanity dictionary at work is... tricky.

    --
    I want a new world. I think this one is broken.
    1. Re:Wow by d99-sbr · · Score: 1

      For instance if I search for "ass" then I can either have it match too strictly and it will catch "class" and "passed" -- or too loosely and it will not catch "dumbass" and "jackass". Then think of all the -ed and -ing formations and it starts to become more and more of a tricky problem.

      Assed I can see, but assing?

      I guess you could say "This is quite an assing way to do this, but..."

    2. 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.
    3. Re:Wow by ettlz · · Score: 1

      This is why "arse" is clearly superior. One "cannot be arsed"; equally, one can be accused of "arsing around".

    4. Re:Wow by Fjornir · · Score: 1

      fuckING, shitTY, ... There are a lot of inflected forms of naughty words, DUMBass. ;)

      --
      I want a new world. I think this one is broken.
    5. 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
    6. Re:Wow by Fjornir · · Score: 1

      Cute idea. Naive, but cute.

      --
      I want a new world. I think this one is broken.
    7. Re:Wow by mike_the_kid · · Score: 1

      So what is it about this situation that you can't do code reviews? I think its absolutely one of the best ways to crank up the quality of your output.

      After a surprisingly short time, people just start writing the kind of code that the team agrees is the right kind.

      Don't knock it till you try it.

      --
      Troll Like a Champion Today
    8. Re:Wow by Fjornir · · Score: 1

      Uhm. I've never worked anywhere that didn't have code reviews. The specific instance I'm talking about went right past code review. And it's by no means isolated to this instance or this company.

      --
      I want a new world. I think this one is broken.
  33. 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."

  34. Grub loads the OS, but... by ChipMonk · · Score: 1

    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?

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

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

    1. Re:People by sn0wflake · · Score: 1

      ...or Gord Bowman?

  36. My favorite solaris comment by GGardner · · Score: 1
    From proc.h, of all places:
    #define SRPC 0x40000000 /* Forgive me for this hack to overcome */
    /* sunview window locking problems */
  37. Comments are for cowards, anyway by Anonymous Coward · · Score: 1, Funny

    "If it was hard to write, it should be hard to read."
    My co-workers are lucky I even bother to use descriptive variable names. That's a huge improvement over my last reviewing quarter, when I started with variable a and worked to z, then started with aa, ab, ac, etc.

    Occassionaly I'll put a comment like this in the header:
    "If you're reading this, you have failed in some way to get the code I wrote to do what you wanted it to. Obviously, this is your failure, not mine, so close your editor and figure out what you did wrong."

    1. Re:Comments are for cowards, anyway by PitaBred · · Score: 1

      One of the guys here has code like that... it's a 10 year old code base, and he wasn't trained as a programmer in any real facility, so has absolutely no concept of maintainability or even commenting his code. Thousands of lines of spaghetti logic, and nary a useful comment, but tons of them like this:

      // set time value
      ProjectBase->Interactive->SetActiveTime(CurTime);


      It's horrible trying to figure out where he's getting data from in some structures and why he puts stuff where he does. There's usually a reason, it's just never documented and always very arcane. As in, he can't even figure it out half the time. And then he tells me to just "look at the code" when I have questions about what I'm doing... it's enough to drive ya batty.

    2. Re:Comments are for cowards, anyway by sylvandb · · Score: 1

      My co-workers are lucky I even bother to use descriptive variable names. That's a huge improvement over my last reviewing quarter, when I started with variable a and worked to z, then started with aa, ab, ac, etc.

      Not so anonymous... I've seen that code!

      sdb

    3. Re:Comments are for cowards, anyway by Anonymous Coward · · Score: 0

      Back in Computer Science, we really didn't like the teacher of our class of five, so we made things as hard as possible.

      We started simply, with the a-z variable/function naming. When this started making him mad, he said he'd dock for one letter variable names. So, we upped it a bit.

      Variable names now became strings of M and N characters, or 1 and l, or 0 and O characters. This was even worse. So, now all variable/function names now had to be words. So, as a class, we'd each do theme programming. The girl of the class I remember did a great one called CandyLand2000. for(snickers){reeses_pieces(skittles)} type of statements were common.

      When he threatened to dock for "themed variable" programming (which did whatever the assignment was perfectly) we started using variable names that were system calls or reserved words just a shade off. Like primtf would be a function and all..

      Ahh, the good ol' days of harassing a midget-like computer science teacher.

  38. Gordon Matzigkeit? by njchick · · Score: 1

    I believe it's Gordon Matzigkeit. He worked on GNU Hurd, and the only bootloader supporting GNU Hurd is GNU Grub.

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

    1. Re:obscure enough for ya?!!! by agrounds · · Score: 1

      TRON!!

      Now report to the game grid!

  40. http://cvs.opensolaris.org/source/search?q=redmond by Anonymous Coward · · Score: 0

    well, entertained me.

  41. Re:This commercial developper see shit that makes by Jim_Maryland · · Score: 1

    I had to debug some code from another developer who must have been watching the Scooby Doo movies at the time of development. Most of the comments/errors started as "Ruh Roh Shaggy" + an error statement. Not a profanity by any means, but still not something you'd want a potential customer to see during a demo.

  42. Prudism by Anonymous Coward · · Score: 0

    The only reason anybody complains about foul language is to send a message to other ppl that "Well, /I/ would never say such a thing..."
    It just doesn't go over well to constantly go around reminding everybody what a considerate wonderful person your are so ppl become creative. It's like the bitches that always loudly complain about being hit on, because nobody wants to listen to them bragging about how beautiful and desirable they are so they have to find another way.

    Personally, I could give a fuck less how anal retentive ppl are or how much they like to suck up to non-coders standards.

  43. SOLARIS acronym. by jgacad · · Score: 1

    I was just reminded of the time not too long ago when we were upgrading our systems from (then) SUNOS to SOLARIS. A mildly frustrating experience! We came up with the acronym: Sh*t Out of Luck And Rational Intelligent Solutions.

    --
    ...the right of the people to keep and arm bears shall not be infringed.
  44. I'm Gord... by glMatrixMode · · Score: 1

    ...you insensitive clod.

    --
    War doesn't prove who's right, just who's left.
  45. 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.
  46. is it reasonably complete now? by cahiha · · Score: 0

    Rather than information about the frequency of profanities in the source code, I'd like to know whether the Solaris release is reasonably complete and open now. Has anybody actually succeeded in downloading, compiling, and running it? What's the FSF's take on the license?

  47. Re:This commercial developper see shit that makes by Pfhreakaz0id · · Score: 1

    yeah, to make something jump out I either use:

    HERE BE DRAGONS: xxxx

    or:

    BITCHES: xxxx

  48. MEMO: Re: Update to coding standards by Dancin_Santa · · Score: 1

    To: MCP Engineering Team

    Please be aware that the MCP coding standards have been updated to reflect appropriate actions regarding recent customer complaints of run-on output. Any output strings that are also final clauses shall be terminated with "EOL".

    Please update all existing clauses and as well as apply to any new code.

    END OF LINE

  49. Do not change this... by MosesJones · · Score: 1

    Is always worth a search.... my favourite was this one

    ip_ftp_pxy.c

    Do not change this to sprintf

    Anyone think that some "smart" bloke broke this code at some stage :)

    --
    An Eye for an Eye will make the whole world blind - Gandhi
    1. Re:Do not change this... by Anonymous Coward · · Score: 0

      Do not change this to snprintf !

    2. Re:Do not change this... by Anonymous Coward · · Score: 0

      snprintf, not sprintf...

      It seems, though, that if __hpux and _KERNEL are defined, sprintf is actually really snprintf...

      I wonder... Why is he saying it shouldn't be changed to snprintf?

      I understand that you don't _NEED_ snprintf() here, because the format string is a constant string plus a bunch of %u s. You can have some assurance that %u will never exceed a given size and set the buffer size accordingly.

      But why not use snprintf() anyway? Is it because some platform wouldn't have it? And why does he bother casting it to void? Hmm...

  50. Two reasons for mentioning profanity... by Anonymous Coward · · Score: 0

    1. Linux has profanity and Open Solaris is considered a 'competitor'. By not having profanity in it, Open Solaris may be seen as 'more professional'.

    2. Any profanity in the source at the time Sun opened it reflects on Sun the company.

    Personally, I could give a rat's ass.

  51. Remember, these are SPARC chips. by Anonymous Coward · · Score: 0

    Chips from Sun were ... and remain ... s l o w.

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

    1. Re:At least Gord's quote was useful... by Anonymous Coward · · Score: 0

      In my experience "a brief comment neatly sums many lines of code" is often wrong. It was probably right at one point, but the code has been modified and the comments haven't. After all, the compiler doesn't care about them. There is some hope in things like Literate Programming, but that has been around since '79 the closest thing I have seen in production code during my ten year career is Perl's pod, but even it isn't required and can get out of sync with the code it decribes.

  53. 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...
  54. Try "crap" by Anonymous Coward · · Score: 0

    while not exactly a profanity, still good for a laugh. specially the "security crap" remark.

  55. Grub is not Sun's project by Anonymous Coward · · Score: 0

    Well, Sun is not the primary sponsor of Grub.

    Because of this, if the Grub source has profanity in it, it should not matter. Grub is the boot loader and was not used in previous closed source versions of Solaris.

    (Grub, btw, rocks.)

  56. how 'bout in French?? by Anonymous Coward · · Score: 0

    I work for a French company and we see this alot in the code:
    "putain de merde"
    which means,
    "shitty whore"...

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

  58. ASSERT ((ey3 == R0X0R) && (J00 == T3H_5UX0 by Anonymous Coward · · Score: 0
    FIRSTUS POSTSUS, beeeotchae!!!!

    Looks like your input has triggered some long dormant debugging code...
    Bow down and worship my 'l33t unpr0f35510n41 c0mm3nt1n9 5tyl3!!!



    pleeeeeeease?!!!!!

  59. Embarassing or just sarcasm? by chowells · · Score: 1

    "The most embarassing comment came from a developer of the GRUB project who went only by the name of "Gord"."

    It didn't strike me as being embarassing. Just sarcastic.

  60. 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!
    1. Re:Don't forget to strip symbols, too! by emurphy42 · · Score: 1

      I would suggest "CustomerHasSpecialNeeds", based on a similar phrase apparently used by some hotels (particularly as a codeword for racism. Hello, GNAA trolls, you can go somewhere else now.)

  61. Sorry Gord by east+coast · · Score: 1

    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!

    --
    Dedicated Cthulhu Cultist since 4523 BC.
  62. from an old linux kernel by TheGratefulNet · · Score: 1

    printk("ufs_read_super: fucking Sun blows me\n");

    kernel: 2.0.38

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

    wow...

    --

    --
    "It is now safe to switch off your computer."
  63. But there is profanity! by UseTheSource · · Score: 1

    As I've mentioned here and here!

    --
    "Ein Volk, ein Reich, ein Führer." -Adolf Hitler
    "We are one Nation, we are one People." -The One 'leader'
  64. FUBAR by micromuncher · · Score: 1

    I think this is my favorite function name.

    --
    /\/\icro/\/\uncher
  65. 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. :)

  66. ... recollections ... by ninjagin · · Score: 1
    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 a great many newcomers.

    The comments read like fairy tales, featuring the exploits of the data structures and objects in anthropomorphic terms. (One was something like "Ten Little Endians and their Big Brothers".) It actually helped me a great deal in understanding what was going on. I felt as if I had uncovered a marvelous little secret. (Gosh, I wish I'd made copies of some of them, because they were wildly entertaining.)

    Every now and again I'd ask some of the longtime pros about these guys who left the great narrative comments behind, figuring that they must have been very outgoing and lighthearted guys. More often than not, I'd find out that these were the quiet unassuming old-guy types that didn't suffer fools lightly. The comments gave an entirely different impression.

    None of it was especially dirty or nasty or foul, but I've never seen anything like it since, which leads me to believe that the lengthy amusing and informative comment block has become unpopular, or maybe just squashed in code review.

    --
    .. pa-ra-bo-la, pa-ra-bo-la, 2 pi R, 2 pi R, where's your latus rectum, where's your latus rectum, 2 pi R
  67. http://cvs.opensolaris.org/source/search?q=damn by Eternal_Flame · · Score: 1

    GREAT job...

    --
    ~You laugh because I'm different, I laugh because I'm insane~
  68. Interesting variable names. by UseTheSource · · Score: 1

    I particularly like the variable defined as "int n_pissed_on;" in usr/src/cmd/sgs/error/common/errortouch.c, which is apparently a counter for the number of files touched. ;)

    --
    "Ein Volk, ein Reich, ein Führer." -Adolf Hitler
    "We are one Nation, we are one People." -The One 'leader'
  69. 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...
  70. Nope by Anonymous Coward · · Score: 1, Informative

    That would be SunOS, the predecessor to Solaris. Some of the original BSD authors wrote SunOS (and were among the founders of Sun?), so it is not a ripoff.

    1. Re:Nope by Anonymous Coward · · Score: 0

      Solaris is a tasty blend of BSD and System V, with cleanup and 'enhancements' from Sun. So yeah, it is tied like a boat anchor to BSD and SCO. Whoo hoo! Whoo hoo! Of course, Sun has permanent rights to all the SYS V parts since they collaborated on it prior to Unix being spun off to Novell. Take that, SCO.

      And yes, the BSD authors were among the founders...

    2. Re:Nope by rubycodez · · Score: 1

      Bill Joy indeed was a co-founder of Sun and prior to that one of the authors of BSD. SunOS and many other commercial Unix(tm) were first BSD derivatives, and then becamse the were modified over time to be BSD with Sys V extensions, then usually licensed pure Sys V from AT&T and added BSD extensions (like current Solaris, HP/UX, IRIX, SCO Unixware, etc.). Heck, even FreeBSD, OpenBSD and NetBSD all have some Sys V API in them, and Linux of course has both flavors in it too.

    3. Re:Nope by rubycodez · · Score: 1

      heh, by that I mean Linux has API for system calls from both, and also has or had legitimate "old Unix" code. Not infringing code such as lying stock fraudster Darl McBride and co. claim.

  71. And how many monkey butlers will they have? by mandrake*rpgdx · · Score: 1

    I remember when I was doing some temp coding at this one place, and we had to basically create a whole bunch of GUI stuff by overloading this base class for buttons that the main guy had wrote. Now, if you didn't change the label on the button it said "Click on me".

    Being the rascally weasel I am, I opened up the main source tree and changed the default text to "Click on the Monkey Butler" and recompiled it. Needless to say, someone forgot to change the default text....and hilarity ensued. I tried not to laugh too hard, fearing it would give me away. But, damn, that was funny.

  72. kind of like a profanitiy by blahnameblahname · · Score: 1

    maybe not have profanities, but try this search of solaris code: http://cvs.opensolaris.org/source/search?q=%22micr osoft+corporation%22&defs=&refs=&path=&hist=

  73. Graduated: August 1993 by Anonymous Coward · · Score: 0

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

    Ok, so you were programming for what 10-15 years .. what's the point ? Do you really think it's a long run compared to others .. hehe ..

  74. Personified code by grahamsz · · Score: 1

    When i worked at a large corporate we used to personify pieces of code. Our principle engineer would supply a set of cartoon characters to go along with the particularly nasty bits.

    This would lead to comments like //Cleanup in case BPF came in here and shat all over the floor

    I've always been fairly reserved in my comments, but it's always nice to add things like //Just because i did this doesn't mean it's not a bad idea

    Actually in a small laid back company i'm more careful than in the straight-laced commerical environment since i know that my bosses can and do actually look at code.

  75. Re:What is this fascination with "obscenity?" by Anonymous Coward · · Score: 0
    Our society's continual fascination with "obscenity" is proof positive that 50% of the population is of below average intelligence


    But more than 50% of moderators it would appear.
  76. Well... by Breakfast+Pants · · Score: 1

    I guess Sun will stay on good terms with Profanity Blacklist, unlike me.

    --

    --

    WHO ATE MY BREAKFAST PANTS?
  77. No by Anonymous Coward · · Score: 0

    I'm Gord!

    1. Re:No by Anonymous Coward · · Score: 0

      No, I am Spartacus!

      Oh, wait...

  78. BST's need lovin' too! by mr_luc · · Score: 1


    But they gotta pay. Giggity giggity!

    311 Debug.info("HELP: Looking for a");
    312 BST result = bst.find_tree("a", false);
    313 result.traverse_find("a");
    314
    315 Debug.info("HELP: Looking for as");
    316 result = result.find_tree("as", false);
    317 result.traverse_find("as");
    318
    319 Debug.info("HELP: Looking for ass");
    320 result = result.find_tree("ass", false);
    321 result.traverse_find("ass");

    http://cvs.opensolaris.org/source/search?q=ass&def s=&refs=&path=&hist=

  79. Boring.... by Anonymous Coward · · Score: 0

    I don't see how any of the comments mentioned are worth an article at all. I mean comments are interesting pretty much only to other programmers, who can empathise or criticise, or otherwise get in the head-space of the original writer. As a study of a cultural niche, they might be interesting.

    But the article's example comments are not even worth commenting on.

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

  81. Windows NT by Anonymous Coward · · Score: 0

    No, wait, that's a fucked kernel.

    Sorry, my bad

  82. Re:Amusing things that frequently end up in my cod by thuh+Freak · · Score: 1

    I usually put "Reactor exploded. Core melt down imminent. Repent your sins." as the description for errors that should never ever come up. And I name variables that most people won't see as concatenations of cursewords (why use one, when two can be twice as effective?). crapfuck is my current fav.
    infact i swear and use naughty imagery in my variable and function names and comments pretty often. QA doesn't compain so much. but coworkers think that someday, somewhere, someone might be offended. i say fuck em. fuck em with a big rubber dildo. break it off inside their ass and beat em with the end of it.

    --
    I wish that I was a catfish.
  83. 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

  84. Re:What is this fascination with "obscenity?" by Anonymous Coward · · Score: 0

    50% of the population is below average

    well, duh....

    Thanks for letting us know which side of the average you are on.

  85. All time best bug reports by sysadmn · · Score: 1

    Well, remember, for the most part these are the same developers who wrote the all time best bug reports ever:
    4256482 Banging on keyboard like a wild monkey during cde startup causes dtwm hang
    4338420 cron is vulnerable to murder by its children
    and my personal favorite
    4110503 as_setprot heuristic gave my process a wedgie.

    --
    Envy my 5 digit Slashdot User ID!
  86. In God we trust! by aLEczapKA · · Score: 0
    --
    -- All Gods were immortal.
    -- S. Lem
    1. Re:In God we trust! by njcoder · · Score: 1
      759 /* FIXME: this function is truly horrid. We try opening the device,
      760 then severely abuse the GEOMETRY->flags field to pass a file
      761 descriptor to biosdisk. Thank God nobody's looking at this comment,
      762 or my reputation would be ruined. --Gord */

      Haha... I guess that supposed to be funny since it came from a GRUB file. Considering GRUB is GPL licensed and all.

  87. As a self-proclaimed expert by jd · · Score: 1
    I can say that whilst any programmer "should" have the right solution the first time, assuming a clean specification, a clean design and a clean implementation, with sufficient time, energy and money to do all three satisfactory, it is next to impossible to achieve this in practice.


    This is no insult to the programmer, however, as only an idiot penalized a person for not doing more than they physically could.


    Nor is it an insult on perfection, however, as the ideal is to have a solid design that won't crumble in the event of the unexpected.


    Since we're using quotes, I'll use this one: "If you shoot for the moon and miss, you'll still end up amongst the stars." In other words, provided you approach "perfection" with the understanding that you may not reach it and therefore take that into account, you will end up with a "good enough" solution.


    The problem is when people aim for "good enough" and miss. They don't have any leeway available to them, and there's no fallback they can use.


    Perfection is near-enough unattainable. I once worked out how much it would cost to "clean" the Linux kernel to the point where it could be mathematically proven to be bug-free. It's somewhere in the region of a billion US dollars, at current pay rates, assuming that code can be proven significantly faster than it can be developed, and I would guess a team of about eight thousand programmers a year to complete.


    This is a finite quantity, so it is clearly "possible". Personally, I wouldn't want to be the CEO of a company that actually tried to do this. I'd be lynched.


    The sensible course, then, is to shoot for the ideal in the knowledge that missing is not merely possible but actually a near-certainty. Specify as best you can, design as best you can, implement as best you can. Flaws will exist, but they can be localized. They don't have to seriously screw everything up.


    The other element is to use copious trapping. Check return codes, catch signals, trap exceptions, do anything the language allows you o do to gracefully handle conditions that should not arise. That way, when bugs do creep in, you can prevent them from unduly impacting the rest of the code. This can be in the form of debugging, but it can equally well be in the form of workarounds and data massaging. All it has to do is turn an invalid state into a valid one.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. 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.

    2. Re:As a self-proclaimed expert by Anonymous Coward · · Score: 0

      I agree with you except for your statement that:

      "The other element is to use copious trapping. Check return codes, catch signals, trap exceptions, do anything the language allows you o do to gracefully handle conditions that should not arise."

      In my opinion, if you're using an API that can return well-defined return codes etc. then I agree that you should by all means check for them and handle gracefully. But these errors I would view as errors that might occur. However, the errors that shouldn't be able to occur (such as your program ending up in some state that - from your interpretation of how the program works shouldn't be posssible) shouldn't be handled gracefully. In my opinion they can't be handled gracefully because they represent a situation the programmer doesn't understand how came about. Clearly, some assumption about how the code work went wrong and from now on everything can happen. In that case, shut down the program immediately, and write a useful message and stack trace on the screen / in a log. Don't bother to try to catch the unexpected nullpointer-exception or whatever whatever at some level in the program (such as the main screen) and let the program continue: the result could be much worse if the user thinks the program works even though it is in a broken internal state. Worse, it might give testers the impression the program is sort of working. Instead, simply shut it down, and everyone can see something doesn't work and it will be fixed. If you're writing a program where this could lead to data loss (for instance, a Word Processor) consider an auto-save feature. If unfeasible, and if your data model is very isolated and the error isn't related to the data-model, you can add emergency-save logic to the data model. In cases where it is still not acceptable to shut down the program, it probably wouldn't acceptable for the program to fail a few seconds later so in these cases you have to get it right anyway. And these "hard" asserts makes testing easier and promote the writing of stable code.

      Things that I always check for:

      * Input parameters (do all checking possible unless it is a function used only internally, for instance, a "private" method).

      * Check for error codes from API's/hardware. Occationaly "catch(Throwable x)" if I'm dealing with a buggy API that I can't get fixed and I know I can recover gracefully.

      And then I have asserts for sanity-checking of the internal program states, even for things that "shouldn't happen", in case of complex code. These asserts always shut the program down with an error message describing what happened.

  88. Re:http://cvs.opensolaris.org/source/search?q=fuck by felipeal · · Score: 1
  89. OT Re:GRUB project?? by m50d · · Score: 1

    Is it me or does the woman in the pic on that site look a lot like Kwan Boa?

    --
    I am trolling
  90. Real Life Carpenters by Anonymous Coward · · Score: 0

    In real life carpentry, the carpenter says fucking nailgun even if it is working, and he stops every 15 minutes to snort some more cocaine or drink another beer. (when you work on a union job you can afford cocaine, non-union is beer)

  91. ITS NOT SCOTTISH by Anonymous Coward · · Score: 0

    I like to use the term "This is not Scottish"

    and we all know, if its not scottish, ITS CRAP!

    1. Re:ITS NOT SCOTTISH by turgid · · Score: 1
      and we all know, if its not scottish, ITS CRAP!

      And the English are all POOFS!

  92. What if you DIE? Comments are CRITICAL! by Tsu+Dho+Nimh · · Score: 1
    Yes, it happens. It was not pleasant for the company. One programmer keeled over from cardiac arrest, he hadn't written much in the formal specs, and he was working alone on a small but important customer-related project.

    I, a lousy programmer (I'm worse now), had to go through his code looking for comments and clues as to what he was trying to accomplish with his code, augment the comments where I could, and make an effort to identify the various modules and functions. Then I had to turn my results over to the dead guy's replacement ... my work was to give the new programmer (a more expensive contractor) a head start on finishing the code.

    It was a wasted effort for me: he had a lot of profane "venting", some pr0no fantasies, and little useful information to help decipher what each chunk of code did.

    1. Re:What if you DIE? Comments are CRITICAL! by ingenthr · · Score: 1

      In Sun's process on Solaris, and I agree with this, all code commits are associated with a CR (change request/bugid). So if you introduce code (to the tree) on Monday with a bug, find it Tuesday, fix it Wednesday, you'll also file a bug and close it.

      Major changes always have a "one pager" describing what you are looking to accomplish and why it should be done. In Sun, that has to be approved by a council.

      I bet some of this practice will become part of the opensolaris community. Its good stuff IMHO. If you can't describe what you're planning to do in one page before you go create major new functionality, then perhaps it shouldn't be part of the overall project...

    2. Re:What if you DIE? Comments are CRITICAL! by Anonymous Coward · · Score: 0

      Actually if you die comments are the least of your worries. Har!

  93. Re:Not something you want a customer to see by apuku · · Score: 1

    We had a new industrial control product (hardware boxes and a GUI running on a PC) which we had to demo at a big trade show. The team hacked away until the last possible moment and then I got to drive the stuff overnight to Chicago (600 miles).

    We got there, set it up and it worked fine ... except the message window filled up with "The little piece of code that's never supposed to execute just executed!" - probably about five a second scrolling continuously off the top of the window.

    By strategically placing a graphical window over the top of the message window, we got away with the demo, but "clever" error messages were frowned on from then on.

    --
    Look, it's trying to think - Albert Rosenfield
  94. Manager by Anonymous Coward · · Score: 0

    Comments make fun reading...

    From a GPS project:

    "Tracker Manager: Like all managers this manager sits around doing nothing until something works then it screws it up"

    Another one from the kalman filter: "This is a kalman filter but not as we know it Jim" (This Kalman filter did bugger all a KF should do)

  95. http://cvs.opensolaris.org/source/search?q=cunt by Anonymous Coward · · Score: 0
    Did you mean: count mount b_bcount Count account amount umount v_count ioc_count rcount

    yes, I meant to mount the cunt that counts. What's the amount? Put it on my account.

  96. An anonymous reader? by Anonymous Coward · · Score: 0

    That's the name The SUN PR machine goes by is it?

    Editors, can we please have less OpenSolaris propaganda and more about OS's people are actually using.

  97. Why Even Bother? Error Messages Are More Effective by Anonymous Coward · · Score: 0

    It's not like anyone sees comments in the source code. I, on the other hand, prefer to have my profanity appear in my error messages: when the user's a fucking idiot, I tell him, and make sure he doesn't do that again.

  98. Cursory Search for Profanity?? by Anonymous Coward · · Score: 0
    from TFA: A cursory search through the code revealed almost a complete lack of commonly-used profanity.

    Just thought a Cursory search for profanity was funny....

  99. clock rates by sacrilicious · · Score: 1
    "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,"

    Huh? They had 200 MEGAherz machines in 1996... what was this person talking about?

    --
    - First they ignore you, then they laugh at you, then ???, then profit.
    1. Re:clock rates by Anonymous Coward · · Score: 0

      The system clock. Get a clue.

    2. Re:clock rates by Anonymous Coward · · Score: 0

      "Get a clue"? You jerk. Like the notion that the term "clock rates" obviously indicates something other than the cpu clock. Like *everyone* should assume so, no matter that cpu clocks are what everyone thinks and talks and markets to death when evaluating computers.

  100. Re:Amusing things that frequently end up in my cod by Blakey+Rat · · Score: 1



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

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

    Haha, funny ass show/movie.

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

  102. My First Memorable Comment by BraceletWinner · · Score: 1
    After I'd been programming about a year, I had a particularly tough problem to solve. After a few days, I had it working, and the bulk of it was some nasty nested for loops. I commented it as well as I could, but upon reviewing it, I knew no one would get it right away. I left a (hopefully) humorous comment at the top of the section that read:

    If you can understand this, you deserve a raise.
  103. Re:Not something you want a customer to see by Jim_Maryland · · Score: 1

    For some internal data collection programs, I used to write similar messages to code I was 99.99% sure would never be run. I don't recall anyone ever actually seeing it run so I guess I was OK. IIRC, the output went something like "Bad things happening here - ". The code never repeated the message though, it would just end the application after the user clicked "OK".

  104. Leetspeak all over by ubuntu · · Score: 1

    What rulez?

    Hint: It's in MM_MacOS.pm. Therefore, Mac rulez!

    p.s. Dear Solaris, L33tsp3ak is unprofessional.

  105. Re:http://cvs.opensolaris.org/source/search?q=fuck by Anonymous Coward · · Score: 0
  106. Ah yes!!!! The programemrs like pie!!!! by grolschie · · Score: 1
  107. Re:Ah yes!!!! The programmers like pie!!!! by grolschie · · Score: 1

    Whooops. Should've checked my typing on the title. ;-)

  108. my own comments by snorklewacker · · Score: 1
    I've been known to curse an absolute blue streak in comments, but I usually delete them immediately after writing. I use the standard "XXX" comment, with some fairly standard codes after:
    // XXX TODO
    // XXX FIXME
    // XXX WRITEME
    // XXX REFACTORME
    // XXX HACK
    // XXX HACK ALERT DIVE DIVE (a slightly stronger version)
    // XXX WTF (bug I can't explain)
    // XXX WTF WHISKEY TANGO FOXTROT?!?! (more than slightly stronger version)
    --
    I am no longer wasting my time with slashdot
  109. The famous "RIP LVB"... by PaulDineen · · Score: 1

    Stolen from some web page I just googled:

    That might have been the 4K paper tape typesetting program.
    4K because it ran in 4K words of PDP-8. It was all in assembler of
    course, heavily self modifying as was the fashion in those days. There
    was only one comment line in the whole 4 inch stack of listing and no
    documentation.
    I remember the comment line to this day "/RIP LVB"
    I think the contents of the instruction equated to the year that
    Beethoven died. I guess the author was making a point. Bastard!

    The damn thing was dumped on me when I first joined DEC as a cocky
    little brat.

  110. Re:What is this fascination with "obscenity?" by Anonymous Coward · · Score: 0

    Those who live in glass houses shouldn't throw stones.

  111. ...though sometimes, clients react unexpectedly. by TheOrquithVagrant · · Score: 1

    Occasionally, the reaction is the opposite.
    During the testing phase of a project I was working on as a consultant, the single closed-source product involved was the one causing the most trouble, and one problem was that it kept messing with a certain file in /etc, sometimes causing a situation where the system never fully booted. I had to create a small script to be run during init which looked for this condition and fixed it. I called this script $PRODUCTNAME_Unfuck. Every bootup, you'd end up seeing $PRODUCTNAME_Unfuck [OK] printed during the boot process.
    Eventually I managed to get $BIG_SOFTWARE_COMPANY to fix the bug in $PRODUCTNAME, and the patches got applied, and the insultingly named little script was no longer necessary.
    However, when I visited the customer, long after the project was finished and taken into production, I witnessed $PRODUCTNAME_Unfuck [OK] pop past as one of the systems booted. Turned out that due to still being not-exactly-happy with $COMPANY or $PRODUCTNAME (there had been plenty of other problems) my clients had left the script in (it was basically a NOOP at this point since the error was fixed) simply because they wanted to needle $COMPANY's consultants when they visited. I thought it was pretty funny.

  112. a true 'dirty words in code' story! by tod_miller · · Score: 1

    Writing some complex and large CMS/workflow applcations for a large (very large) financial instritute somewhere in europe I recall one meeting in the plush and trendy meeting room, we were all happy, and a newly mastered release (only a 0.6 probably) with a whole 2 stright no holidays of work on it, was about to head off to a courier.

    Great. In comes the comical yet lovable scottish boss (not in scotland) who stars talking a non-english lanuage, fires up xemacs (through cygwin) on the projector computer, does some home magic, and runs a script with some grep on the code (Java).

    Ensuing hilarity as the page floods with multi-lingual obscenities. A quick -10n hack and we had a rough count attributed to each person. The skin head in the metal-band-of-your-choice-T's face lit up as he was exponentially above the rest.

    The female developers were a bit shy in the fact that they hadn't gotten away scot free.

    We grabbed the CD from the courier, and ceremonially broke it up.

    It was to be sent to a code integration review, and well... you know... (maybe you had to be there - imagine 20 techies around a... round table... late on a Thursday - right laughs I tell you)

    So, what have we learnt? DOCUMENTING CODE IS BAD! I know some people actually believe that, they say the method names should be well structured, and each method very atomic, so you do not need MUCH comments (but def some).

    About going back to code as little as 3 weeks later, seeing some lines of code with comments, homing in to remember what was happening at this place, and then seeing the helpful: //AUTHOR: Doesn't work? //AUTHOR: removed lines to fix //AUTHOR: seems to be working????

    yeah... so helpful... seemed easy at the time. But what it shows is, some of these 'wtf?' comments are now null and void, because pruning old traces/comments is the most arduous task of a programmer. it compiles, runs, closes without bombing, ship it already!

    --
    #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
  113. Examples from Burroughs and Cray by Anonymous Coward · · Score: 0
    Yes, I am that old. I worked at Burroughs at the Large Systems division and I also used a Cray-XMP at another job.

    At Burroughs, the B5000-6000 series had hardware memory descriptors to manage memory segments. Each descriptor had a primary instance called the mother descriptor. They also had way of making new processes call forking. You know where this is going... The process that made primary instances of a mother descriptor was called the motherforker. (I don't remember exactly how it was spelled.)

    These were the days when many computer centers had on site software and hardware support, and there were hard copies of the operating system, in this case the Master Control Program, on site. Well, one day a customer found out about this procedure and the word came down from On High: no more suggestive names or comments in the code!

    On the Cray we were using Fortran and assembly. The machine did not have virtual memory and the Fortran system had overlays, where you could manually control what part of the code was in memory. We were doing very complex overlay management, and at one point we got this error message from the overlay manager: STOP: DAMN.

    Fortran had a STOP command with a single argument, and if you gave it a number it would print the number when it stopped. You could also give it a string constant of up to 8 characters and it would print that when it stopped. We contacted Cray, and it turned out that the overlay code was written in Fortran. We actually talked to the guy who wrote the code, and he told us that he knew that this situation could come up, but he didn't know what to do about it. He just put in a STOP command and hoped that it would never happen. Well, it did happen, and he went back and fixed the problem. As far as I know there were no negative reports to anyone in his chain of command.

  114. Code as Speech? by Vagary · · Score: 1

    Wouldn't that set a precedent that code is art rather than device? Maybe the OS community should try and cause such a trial...

    1. Re:Code as Speech? by Jah-Wren+Ryel · · Score: 1

      Source code (versus object code) is well on its way to being universally considered speech by the US court system. At the base of the rulings and opinions is that source is meant to communicate ideas between humans (versus object code which is meant to control computers and is not generally considered human-readable). Thus it falls into the category that contains all the other methods of human communications - speech or more broadly expression.

      --
      When information is power, privacy is freedom.
  115. 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."
    1. Re:Comments are notes... by Anonymous Coward · · Score: 0

      "Sorry for rambling."

      It's your ignorance of the "Preview" button that you should be apologizing for.

    2. Re:Comments are notes... by kaladorn · · Score: 1

      I'll apologize for my laziness in not using preview (which in no significant way affects content in this instance other than having some unworkable HTML in it) when people stop posting as anonymous cowards and take the time to log in and own up to their posts. Of the two, I know which I consider more odious.... and it ain't a few bad tags amidst the text....

      --
      -- Mal: "Well they tell you: never hit a man with a closed fist. But it is, on occasion, hilarious."
  116. and good bugs need good workarounds.... by grahamsz · · Score: 1

    http://sunsolve.sun.com/search/document.do?assetke y=urn:cds:docid:1-1-4256482-1

    Work Around:
    Don't bang on the keyboard like a wild monkey

  117. Did they lose a donkey or what? by RavenChild · · Score: 1
    found in BST.java
    318
    319 Debug.info("HELP: Looking for ass");
    320 result = result.find_tree("ass", false);
    321 result.traverse_find("ass");
  118. Does anyone know what code SUN is NOT giving us? by jonwil · · Score: 1

    I looked at the binary archive and couldnt make sense of what those bits actually DO :(
    Any people more knowledgable about solaris want to chime in? It looks like probobly most of the code missing is either "stuff they dont own 100%" (e.g. drivers which was mentioned elsewhere) or "encryption bits" (although I cant see the issue with releasing the encryption bits, I doubt that there is 3rd party code in EVERY encryption related binary)

  119. One of the comments by tpv · · Score: 1

    One of the snippets in the article refers to a supposedly alarming comment in dtrace.
    The author of the comment has explained(*) it in his blog.
    (*) explained in a way that probably only makes sense to hardware/assembly geeks. (i.e. Not me)

    --
    Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
    1. Re:One of the comments by ahl_at_sun · · Score: 1
      explained in a way that probably only makes sense to hardware/assembly geeks. (i.e. Not me)
      Here's a higher level explanation: everything's fine.

      Here's a slightly lower level explanation: you basically can't be too paranoid when you're writing code that can never fail. One form of paranoia is to express what you think are the certitudes of the system so that it will fail immediately if those constraints are violated. This is an instance where an assertion was added to address a previous violation.
  120. Re:Does anyone know what code SUN is NOT giving us by FireDoctor · · Score: 1

    At the time of release, the encryption bits were covered under export law. Now that the code is open source, the crypto stuff can be opened.

    It's in the roadmap to be release within 3 months.

  121. Linux will not benefit directly by PengoNet · · Score: 1

    It will not happen. Sun's license (CDDL) may be OSI approved, but it is not GPL compatible. Sun's code cannot be directly ported into Linux.