Slashdot Mirror


Linux Kernel Code Humor

An anonymous reader writes "This article points to some pretty funny comments and code in the Linux kernel. From colorful metaphors, to burning printers, to happy meals... A recursive search through the entire code base reveals some interesting language. Is all code like this?"

485 comments

  1. Is all code like this? by EnderWiggnz · · Score: 5, Funny

    Yes.

    Haven't been working long in the real world, eh?

    --
    ... hi bingo ...
    1. Re:Is all code like this? by Ponty · · Score: 3, Informative

      If yours is, you won't either. I've heard of a few people who've gotten burned by sexist/offensive comments in their code.

    2. Re:Is all code like this? by sapped · · Score: 1

      Actually, I use SAP (one of the largest software companies in the world in case you weren't aware). Their products come with all the source code available to you. I have come across a number of funny comments embedded in the code.

      Personally, I think the odd piece of humor adds to the project and is good even in a so called professional environment.

    3. Re:Is all code like this? by 2000+Britneys · · Score: 2, Interesting

      Right and the folks who developed windows code base and applications for M$ are highly professional?

      what about the hidden games in MS Office and developers fun page in one of windows OSes?

      talking bout "highly professional" developers here!!!!!!

    4. Re:Is all code like this? by saskboy · · Score: 3, Funny

      Do you remember about that software package that was mentioned on /. about the coder that was fired for putting a comment on the "help" button:
      "What kind of an idiot needs help with this?"

      Not an exact quote, but you get the idea. He was fired, and the company sent letters to their customers explaining that they didn't think they were idiots afterall.

      --
      Saskboy's blog is good. 9 out of 10 dentists agree.
    5. Re:Is all code like this? by Anonymous Coward · · Score: 0

      Yeah, real coders write 3D flight simulators as easter eggs, and leave unit test code in production releases.

      As a professional tester, I laugh in the face of you and your college buddies.

    6. Re:Is all code like this? by Webmonger · · Score: 2

      Not. Netscape had to spend a bunch of time preparing their code for outside eyes when they open-sourced Mozilla.

    7. Re:Is all code like this? by KMitchell · · Score: 5, Informative
      Um, I have to disagree with this. It really depends on the shop. If by professional you mean formal code reviews by peers, perhaps that would limit some of this stuff. Knowing that you have to stare down a bunch of co-workers is a pretty good way to cause self-censure. Even then it really depends on the attitudes of the people that are going to be looking at your code. Some groups are really anal about comments and others couldn't care less if the code works.


      Now when the customers SEE these msgs, you really get to see what kind of company you work for... at a former gig we had a debug mechanism which caused a debug msg to be displayed when the program crashed in in debug mode. Theory was, the customer would never see these msgs but they were helpful for debugging. Some customer happened to run "strings" on the executable and since they're compiled (unlike comments), got to see a whole lot of messages along the lines of "we should never get here" etc. Kind of funny, really. The customer thereafter put out an anual list of interesting strings found in the program and everyone got a chuckle out of it. None of my comments ever made the list tho ;)

    8. Re:Is all code like this? by Anonymous Coward · · Score: 3, Funny

      Not really. I had a boss once whom I could tell had been fiddling with my code by the off-color comments.

      Other great comments I've seen:
      "Now we can go to the nth dimension and see superman!"
      "I think this works. I'd know for sure, but it's 3:47 AM and I want to go home."
      "F this code."
      checkin comment - "I suck."
      checkin comment - "Removed unholy blight that is X."

      Then there's the scary comments. They're typically about 12 lines long, include directions to talk to somebody, and precede a line of code as deceptively simple as "x += 2;".

    9. Re:Is all code like this? by Hayzeus · · Score: 3, Insightful
      Provided the language is inoffensive, this is simply not the case with most outfits.

      No comments at all are (rightly) far more likely to get you fired.

    10. Re:Is all code like this? by FlemLion · · Score: 3, Informative

      Only in a politically correct going to the uncivilized country will this lead to someone getting fired. What's the problem with some extra comment ?
      Have a lot more trouble without comment.

      Now picture the following:

      - some developers are writing a scanner driver for a medical scanner
      - at some exotic combination of resolution, size and so on, the driver gives an embedded image instead of the real one
      - during development this is a bikini calendar
      - someone forgets to replace this image and put in the team foto
      - a hospital in Iran decides to use a front end to automatically calculate the scanning parameters and guess what ? It hits those specicific values and ... there is the bikini, in Iran

      Talk about an incident. This even stirred political comment.

      Do you think people got fired ???
      In PC world (like the USA) probably for sure.
      And today it might be a reason in Europe too.
      But 10 years ago the repercussions in the European firm concerned did not go that far.

      So get a life, there's more than just code in code.

    11. Re:Is all code like this? by qengho · · Score: 2

      the coder that was fired for putting a comment on the "help" button

      How about the coder that was fired because he left a test name in a database? This guy was working on a mail merge program for some financial house and used "Rich Bastard" as the default name for accounts. Unfortunately, he forgot to remove it and a bunch of letters went out to investors ("Dear Rich Bastard, We value your business blah blah blah").

    12. Re:Is all code like this? by kbrannen · · Score: 5, Funny

      More than you'd initially suspect. :-) I used to work for a Wall Street firm that had the policy that if you worked more than 10 hours a day, they'd buy you dinner. We were on a tight schedule so this was very common for our small team. We rotated the "order dinner" duty around. Anyway, one day several months after the crunch, I was working on some code written by another guy and found something like this in the code. /* thu's order 2 canoli 1 raviloli 1 pepperoni pizza 3 salads 2 chocolate cakes 1 carrot cake 1 bread sticks 3 cokes 1 diet coke */ Looking back thru CVS, I found it had been there a good long while. After a good laugh, I deleted it.

    13. Re:Is all code like this? by slobberjaws · · Score: 1

      yeah, there was political comment, comment over who gets to claim they found the easter egg!

    14. Re:Is all code like this? by netsharc · · Score: 2

      !!!seineew era sreenigne epacsteN

      (J/K, Mozilla rules!)

      --
      What time is it/will be over there? Check with my iPhone app!
    15. Re:Is all code like this? by FlemLion · · Score: 1

      Countries around the 'Axis of Evil' are not exactly known to be this tolerant

    16. Re:Is all code like this? by Anonymous Coward · · Score: 1, Insightful
      Haven't had to actually work with "other people" in a code-reviewed environment, have you? Get out of your parent's basement, real people write real code and don't need to resort to profanity for it.

      Some of us have jobs that involve writing well documented code in a workgroup, towards a specific goal. Not trying spending the day playing with the gimp writing kewl themez for xmms.

    17. Re:Is all code like this? by Anonymous Coward · · Score: 1, Informative
    18. Re:Is all code like this? by qengho · · Score: 1

      Ooops. I could have sworn I read this (long ago) in a reputable magazine. Thanks for setting me straight.

    19. Re:Is all code like this? by Anonymous Coward · · Score: 0

      Talk about code bloat. But that's typical of Linux, immature kernel developers.

    20. Re:Is all code like this? by Anonymous Coward · · Score: 0

      You're excused, just don't let it happen again. I'll tell the secretary to send you a bottle of vodka for your honesty.

    21. Re:Is all code like this? by Anonymous Coward · · Score: 1, Funny

      I guess embedding the string "!seineew era sreenigne epacsteN" in the binary is what professionals do, then?

      I think if you're at all surprised to see the comments in the Linux kernel, clearly you've never really coded. This article kind of makes me roll my eyes, because the truth is, I've seen (and written) a lot funnier.

    22. Re:Is all code like this? by Anonymous Coward · · Score: 0

      Maturity is overrated. Go fuck yourself troll.

    23. Re:Is all code like this? by popmaker · · Score: 1

      Immature but brilliant!

    24. Re:Is all code like this? by Anonymous Coward · · Score: 1, Interesting

      at our mainframe shop one of our tech guys had some datasets with various jobs of his with names like

      STUPID.FUCKING.PROGRAM
      SYS3.SHIT.OUTDEF

      etc.. manager caught word and semi-pissed he was.

      also at one time they tried hooking up this network monitoring stuff to monitor some subcontractors on the floor's useage of our network resources. we kept getting alarms for "sex", of course it turned out to be someone's network password.

    25. Re:Is all code like this? by Hognoxious · · Score: 1
      Actually, I use SAP ... I have come across a number of funny comments embedded in the code.
      Frightening, when you consider that SAP is German.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    26. Re:Is all code like this? by Pr0xY · · Score: 1

      well the way we deal with this where i am is we make the comments the way we normally would, and when we are getting our code ready for delivery to our clients (we do contracting) we go through at cleanup the language a bit.

      for example from a change log: /* spent 12 fscking hours and this piece of sh!t finnaly works */

      would go to /* yay :) after 12 hours of working on it works wonderfully now */

      hehe, all in all, i think having funny/venting comments are very healthy, programming can be very stressing somtimes, especially when deadlines are comming

    27. Re:Is all code like this? by Anonymous Coward · · Score: 0

      Is it just me, or do the words "professional" and/or "mature," when they occur next to "programmer," actually mean "conservative," or "humorless," or "full of him/herself?"

      When I was little, I couldn't take a joke. Now that I'm older, I can. I consider this good evidence that stuck-up business types delude themselves with visions of power and prowess, all the while sinking back into a less spirited, less creative, less interesting existence.

      --os

    28. Re:Is all code like this? by rootmonkey · · Score: 4, Funny

      I typically listen to music while coding and lyrics find there way into my source code. I used to put weird ramblings in my source just to freak out the other developers. /* Its getting dark on the outer rim,insanity is startint to set in .... */. I've stopped doing that but many programmers put the personal touch on their code via comments.

      --

      Yes but every time I try to see it your way, I get a headache.
    29. Re:Is all code like this? by jaavaaguru · · Score: 3, Insightful

      The differnece between "12 hours working on it" and "12 hours fsking with it" shows how difficult the problem was to solve, and as far as I'm concerned could be useful to someone else looking at the code later. Leaving it in is only an option with code that stays in-house I guess.

    30. Re:Is all code like this? by Hognoxious · · Score: 1
      Then there's the scary comments.
      Like the things that you have to include at the beginning of every file because the berk who got there first who wrote the standards says so. It consists of 400 sections, each in a horrid kind of ASCII art frame with a closed RHS[1] (like I've got nothing better to do than faff around aligning +es and |es and \en and similar cack, FFS), along the lines of "how submitedd - [describe here how submited i.e. as an include if so in what programmes]" or "colour of pants - [describe here the pants couloir e.g. stripped]", 95% of which are always "N/A", and most of the others usually are.
      and precede a line of code as deceptively simple as "x += 2;".
      Disgraceful! Everyone knows that the correct way to comment that is "Add 2 to X". Better yet, "increase by two times the varibale X".

      [1] I can't draw one; triggers the lameness filter. There's one in code complete and maybe the jargon file, IIRC.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    31. Re:Is all code like this? by JohnFluxx · · Score: 2

      Heh. Where I worked for a while we were just the researchers. This meant that we did the research, wrote the code, wrote up what the code did and how, then deleted the code and sent the description of the code to some secret underground lab with teams of genetically modified professional coders. (Actually I have no idea who did the 'real' coding - it just wasn't us - none of our code was allowed anywhere near what the code was deployed on :)

    32. Re:Is all code like this? by Fweeky · · Score: 2
      (like I've got nothing better to do than faff around aligning +es and |es and \en and similar cack, FFS)

      boxes(1) will draw these for you. par(1) will (try to) fix broken ones.
    33. Re:Is all code like this? by Anonymous Coward · · Score: 0

      How can it be code bloat if it isn't even code? I've always understood "code bloat" to be something that shows up in your object files.

      /* Hint to humorless AC: your compiler won't give a shit about this! */

    34. Re:Is all code like this? by FireballFreddy · · Score: 4, Funny

      Hehe, but code/comments like this can bite you in the ass too. I remember a developer who was told to add a big red button into a game for kids. For some reason, I believe as a joke, he put in a *huge* red button labeled "BIG FUCKING RED BUTTON".

      Well, the file got propogated to other trees before he could "correct" the button, and during pre-release testing a volunteer was playing the game and lo! the button pops up. :) Too bad it was an adult testing and not a little kid, because that would have been really funny.

      -FF

      --
      SQUEAK, the Death of Rats explained.
    35. Re:Is all code like this? by GlassHeart · · Score: 3, Insightful
      Is it just me, or do the words "professional" and/or "mature," when they occur next to "programmer," actually mean "conservative," or "humorless," or "full of him/herself?"

      Humor can co-exist with professionalism. However, source code is not where you put it. If you ever release that code to a customer, it could damage your company's reputation. Too many such comments could interfere with efforts to search the source code. Humor also often language- and culture-dependent, so your company's foreign employees may even misunderstand subtle jokes as actual useful comments about the code. And then it's no longer funny.

      Not to say that many such coding standards are little more than power trips. However, a professional will always keep in mind the fact that the source code doesn't belong to him or her. If you don't like the rules set by your employer, find another job.

    36. Re:Is all code like this? by wsapplegate · · Score: 1

      Yes. It's the mighty CAD drawing software AutoCAD, from Autodesk. The message shows up in a tooltip. And yes, the programmer has indeed been fired. A shame, if you want my opinion...

      --
      Xenu brings order!
    37. Re:Is all code like this? by Anonymous Coward · · Score: 0
      for example from a change log: /* spent 12 fscking hours and this piece of sh!t finnaly works */

      would go to /* yay :) after 12 hours of working on it works wonderfully now */

      Easyer: if your wife personnally knows the CEO's wife, you are allowed to says "piece of shit". And, even better: You can call you're coworker's code "piece of shit". Now, where did I just mislay that table-tennis paddle?

    38. Re:Is all code like this? by TheCrazyFinn · · Score: 1

      Never seen a Sun's Happy Meal Ethernet adaptor (hme0) have you?

      --
      "You've got an invalid haircut" -Warren Zevon - Life'll Kill Ya
    39. Re:Is all code like this? by Anonymous Coward · · Score: 0

      Well, see, they get paid whether they produce highly efficient, bug-free code or if they just have fun and then release something that barely works. What would you do?

    40. Re:Is all code like this? by Anonymous Coward · · Score: 0
      So let me get this straight; I should confine my coding style and life in the remote chance that some quasimediaeval Muslim barbarians might get offended?

      Fuck that.

    41. Re:Is all code like this? by rock_climbing_guy · · Score: 1
      In consideration of that eBay sale you linked to, I might check you eBay feedback for some interesting quotations soon.

      --There is no spoon--

      --
      Wh47 d1d j00 541, 31337 15n't t3h r0xor5 ne m0r3???
    42. Re:Is all code like this? by Anonymous Coward · · Score: 1, Funny

      "something successfully didn't happen"

      comes to mind from my ye ol days

    43. Re:Is all code like this? by Anonymous Coward · · Score: 0
      /* ACHTUNG! - Warum diese Arbeit? */

      Okay, I admit I used Google to make that since I don't know German.

    44. Re:Is all code like this? by rogueroo · · Score: 1

      Someone oughta write some SMS ACS routines to prevent that kind of misuse of resources.

    45. Re:Is all code like this? by Anonymous Coward · · Score: 0

      Debug messages in production code? That's pretty lame. /* Make with -DDEVEL during development */

      #ifdef DEVEL
      #define DBG(x) x
      #else
      #define DBG(x)
      #endif

      main()
      { ...stuff..
      DBG(debug("It finally worked!"));
      }

    46. Re:Is all code like this? by sconeu · · Score: 2

      In the defense world, too...

      We did artillery stuff. In technical parlance, guns are called "fire units". My boss told me about the time he wrote up a "fire unit check" routine in all innocence, and was told to rename it...

      Then there were other fun things, such as SEXBUG, and one of my favorites, BANANA. There was a routine called "ACCESS" and another called "ACESS". This lead to confusion, hence BANANA ("By Any Name ACESS Not ACCESS").

      Then theres the one a buddy of mine wrote (in assembly): Dude_You_Just_Nuked_The_Hard_Disk

      I commonly wrote routines for filters labelled "snarf_in" and "barf_out", and my copyright notice code was titled "so_there()".

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    47. Re:Is all code like this? by sconeu · · Score: 1

      He didn't say "12 hours fscking with it", he called it "12 fscking hours"...

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    48. Re:Is all code like this? by emmo · · Score: 1

      I remember I couldn't find an elegant solution to a particular bit of code without using a goto, so I ended up with:

      goto loop /* Sod Djikstra */

      Just had a quick look at some of my old code on my laptop, and was amused to find the following:

      # something tells me I am going to regret
      # this "quick and dirty"
      # approach to software development.

      and

      # fixing this code is like that game with the
      # wooden blocks where
      # you remove a piece one at a time until it all
      # falls over.

      I'd completely forgotten putting these comments in, so not only did they bring a smile to my face, they served a useful purpose by reminding me not to bother maintaining this piece of shit.

    49. Re:Is all code like this? by Orbital+Sander · · Score: 1

      Some customer happened to run "strings" on the executable and since they're compiled (unlike comments), (...) None of my comments ever made the list tho ;)

      Would this be because comments are not compiled into the binary?

    50. Re:Is all code like this? by yuiop · · Score: 0

      I once worked at a copy shop, and had to copy a couple of inches think program printout for some guy in a hurry in the middle of the night. It was a program to do credit scoring. In one part, there was a huge switch statement, based on the final score. If your score was really good, it printed something like "750+ Excellent". The last case statement was for something like 400 or less (presumably the programmer assumed this would never get hit), which said something like "You loser!! You have shitty credit and might as well crawl off and die!!". Even assuming that the user was not the person whose credit was being checked, I thought that was a good example of Unwise Programming Practices.

    51. Re:Is all code like this? by carrier+lost · · Score: 1

      First off, I love to comment code. It serves two purposes for me, 1)It signifies that the job is done, or at least, this particular problem is solved. 2)I get to illustrate what a great hacker I am.

      I have two types of comments. One is informational, what-I-did-and-why. The other is developmental, as in this-could-be-done-better. The latter is a marker and I always put the date and my initials next to it.

      On the informational side, I do not comment code indiscriminately. If I do something intricate, and it is not (subjectively) evident what is going on, I will comment it.

      When working with uncompiled code (CGI mainly) I've had to remove the "developmental" stuff because customers can easily see that. That's where my initials come in handy.

      I'd love to be more verbose and humorous in my comments, but I find that not to be generally favored. Of course, if you're writing OSS code for fun and fame, then there's no one to tell you that your comments are whack.

      MjM

      I only mod up...

    52. Re:Is all code like this? by NReitzel · · Score: 1

      Code was like that when we were writing it for Datapoint back in 1973.

      --

      Don't take life too seriously; it isn't permanent.

    53. Re:Is all code like this? by richie2000 · · Score: 2

      Did you ever put "You talk of times of peace for all, and then prepare for war." from a Midnight Oil song into any of your code? And if you did, would you admit it? ;-)

      --
      Money for nothing, pix for free
    54. Re:Is all code like this? by BrokenHalo · · Score: 3, Funny

      Funny you should mention this... I remember some (i.e. many) years ago when I was working as a sysprog on a Sperry site, I wrote and implemented a transaction surveillance program called BIG_BROTHER. The CEO got wind of it somehow, and I got carpeted, so I renamed the prog to LARGE_SIBLING. That was OK, for some reason :-)

    55. Re:Is all code like this? by Hognoxious · · Score: 1
      boxes(1) [thomasjensen.com] will draw these for you. par(1) [nicemice.net] will (try to) fix broken ones.
      Reminds me of when you see people on TV who can memorise phone books, or pi to 9 squillion places, or push nails through their cheeks even, and you don't so much wonder "how?", as "why?".
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    56. Re:Is all code like this? by Cro+Magnon · · Score: 2

      Someone at my job got bit by something similar. Someone else was testing his stuff and a message came up "If you got here, something is seriously fscked up". Management was not amused, especially since the exact word wasn't "fsck"!

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
  2. Anyone remember by LiftOp · · Score: 0

    someone talking about "Kernel Klink" embedded somewhere?

    1. Re:Anyone remember by sczimme · · Score: 4, Funny


      someone talking about "Kernel Klink" embedded somewhere?

      Of course not - we know NOTH-ING!

      --
      I want to drag this out as long as possible. Bring me my protractor.
  3. Cool by flapjackboy · · Score: 1

    Nice to see the coders have a sense of humor :)

    1. Re:Cool by DaBj · · Score: 5, Funny

      Does naming a temporary boolean variable SchroedingersCat constitute humor?

      If so then, yes, programmers do have humor. (Atleast this one does...)

      --
      "GNU's not Unix....it's Linux" / Kami "kokamomi" Petersen
    2. Re:Cool by Anonymous Coward · · Score: 1

      if( SchroedingersCat ){
      Dead = true;
      }else
      Dead = false;

    3. Re:Cool by Anonymous Coward · · Score: 0

      Dead = SchroedingersCat; ?

    4. Re:Cool by Anonymous Coward · · Score: 1, Funny

      Does naming a temporary boolean variable SchroedingersCat constitute humor?

      Oh, yea. That's just too funny.

      If your job as a programmer ever goes under, you can always do standup.

    5. Re:Cool by Anonymous Coward · · Score: 0

      Nope. You havn't observed SchroedingersCat if you don't check its state!

    6. Re:Cool by Ataru · · Score: 0

      That cat's gonna die on stage for sure...

    7. Re:Cool by Anonymous Coward · · Score: 0

      No. It will just make your code harder to read and expose you as a dumbass who is desperate to brag about "knowing physics".

    8. Re:Cool by MoonBuggy · · Score: 2, Funny

      if( SchroedingersCat == Dead ){
      echo "Naughty physicist, you must have looked";
      } else {
      echo "Well what's the point of the experiment if you don't see what happens?";
      }

    9. Re:Cool by McPierce · · Score: 1

      Some engineers at my old job did similar naming jokes; calling local variables "Kenny" (ala South Park) since they were killed everytime the function ran, and "ShelbyvilleIsEvil" and the like. The problem was this code was being given to the customers and such variable names are, quite frankly, unprofessional.

      --
      Darryl L. Pierce "What do you care what people think, Mr. Feynman?"
  4. Yes. by pb · · Score: 5, Funny

    The best code comment I heard about (in a discussion about code commenting, I believe) was something like this: /*** DRUNK -- FIX LATER! ***/

    --
    pb Reply or e-mail; don't vaguely moderate.
    1. Re:Yes. by danamania · · Score: 5, Funny

      I'm just compiling KDE 3.1 - in the middle of part of the code (for KATE the editor I think) is

      warning: why does this work?

      a grrl & her server

    2. Re:Yes. by Anonymous Coward · · Score: 0

      One you don't want to see (when it's something you were trying to get working 100% and really need) :

      "This driver is cursed..."

    3. Re:Yes. by Anonymous Coward · · Score: 0

      I was once working on application using an embedded webserver. The documentation was non-existant so I was looking through the source code to figure out what it was doing. One comment really inspired me:

      ":)

      He then told me that they once had someone call them up. There device had stopped working and it was a sending a message out the Serial Port. The message was: "Jack is an idiot." It turns out that the person reporting this was named Jack. Luckily for them, he also had a sense of humor. :)

    4. Re:Yes. by Anonymous Coward · · Score: 0

      I try to avoid putting things like that in the comments because I won't remember they're there.

      What you should really do is make those the file comments for the check-in to version control.

    5. Re:Yes. by inode_buddha · · Score: 5, Funny

      If you've ever compiled Enlightenment, you'll notice that it checks for Ale in libFridge (before invoking gcc proper), then it flames you for not having any Ale in Fridge...

      --
      C|N>K
    6. Re:Yes. by Ryan+Amos · · Score: 3, Funny
      Heh, I do that. Worst part was turning it in with my assignment not remembering that I had left the comment in there.. Code worked fine, it just had a big

      // Note to self, this code written while really fucked up.. go back and check it later

      I'm sure my TA found it rather humorous...

    7. Re:Yes. by FueledByRamen · · Score: 2

      Ever compiled Mozilla? (Well don't, it's like watching grass grow).

      The name of the image handling library is libpr0n.
      Suddenly, it all makes sense...

      --
      Every cloud has a silver lining (except for the mushroom shaped ones, which have a lining of Iridium & Strontium 90)
    8. Re:Yes. by Anonymous Coward · · Score: 0

      AC_CHECK_LIB(Fridge,mass_quantities_of_bass_ale)
      AC_CHECK_LIB(Fridge,mass_quantities_of_any_ale, , [
      echo "Warning: No ales were found in your refrigerator."
      echo " We highly suggest that you rectify this situation immediately."
      ])

    9. Re:Yes. by Neon+Spiral+Injector · · Score: 2

      You can disable this check by passing --without-sense-of-humor to ./configure.

  5. The Tao of Linux by Anonymous Coward · · Score: 5, Funny

    Something forms itself from the silent void of the empty mailing lists and the noisy chaos of the crowded mailing lists. It shapes and protects us, it entertains and challenges us, it aids us in our journey through the ether world of software. It is mysterious; it is at once source code and yet object code. I do not know the name, thus I will call it the Tao of Linux.

    If the Tao is great, then the box is stable. If the box is stable, then the server is secure. If the server is secure, then the data is safe. If the data is safe, then the users are happy.

    In the beginning there was chaos in Unix.

    Tanenbaum gave birth to MINIX. MINIX did not have the Tao.
    MINIX gave birth to Linux 0.1 and it had promise.
    Linux gave birth to v1.3 and it was good.
    v1.3 gave birth to v2.0 and it was better.

    Linux has evolved greatly from its distant cousins of the old. Linux is embodied by the Tao.

    The wise user is told about the Tao and contributes to it. The average user is told about the Tao and compiles it. The foolish user is told about the Tao and laughs and asks who needs it.
    If it were not for laughter, there would be no Tao.
    Wisdom leads to good code, but experience leads to good use of that code.

    The master Cox once dreamed that he was a Kernel. When he awoke he exclaimed: "I don't know whether I am Cox dreaming that I am a Kernel, or a Kernel dreaming that I am Cox!"
    The master Linus then said: "The Tao envelopes you. You shall create great code for Linux."
    "On the contrary," said Cox, "The Tao has already created the code, I will only have to find it and write it down."

    A master was explaining the nature of the Tao to one of his students:
    "Is the Tao in the VM subsystem?" he asked. "Yes," replied the master.
    "Is the Tao in the scheduler?" he queried again. "The Tao is in the scheduler."
    "Is the Tao even in the modules?". "It is even in the modules," said the master.
    "Is the Tao in the Low-Latency Patch?"
    The master frowned and was silent for much time.
    "You fail to understand the Tao. Go away."

    The Tao is the yin and the yang. It is the good and the evil, it is everything and yet it is nothing, it is the beginning and the end.

    The Tao was there at the kernel compile, and it will be there when the kernel panics.

    A novice user once asked a master: "Why compile in C when C++ is more popular?"
    "Why a monolythic kernel when Mach is more popular?"
    "And why use ReiserFS when ext2 is more popular?"

    The master sighed and replied: "Why run Unix when NT is more popular?"
    The user was enlightened.

    A frustrated user once asked a master: "My kernel has panicked, should I post to lkml?"
    "No," replied the master, "You will only bother the Tao."
    "Should I rm -rf?"
    "No, you will have wasted the Tao's time."
    "Well should I search the web?"
    "You will search for all eternity," said the master.
    "Perhaps I should try FreeBSD?"
    "Then you will have disgraced the Tao."
    "I suppose I could try gdb," said the user.
    The master smiled and replied: "Then you will have made the Tao stronger."

    A stubborn user once told a master: "I run version 2.2. I always have, and I always will."
    The master replied: "You are foolish and do not understand the Tao. The Tao is dynamic and ever changing. Linux strives for the perfection that is the Tao. It flows from version to version with peace."

    "So my Linux does not have the Tao, so what?" said the foolish user. "Oh your Linux is of the Tao," said the master. "However, the Tao of Linux follows the Tao of the C library. One day the C library will change, and your Linux will be left behind." The user was silent.

    An angry user once yelled at a master:

    "My Linux has panicked! What lousy software it is, I hate it so!"
    "You are insulting the Tao," said the master. "The Tao is everywhere bringing order to hundreds of networks, aiding thousands of users, and fighting that of which we call the 'lame.' Do not disrespect the Tao; however, the Tao will forgive you."

    "I apologize," said the user, "And I will be more forgiving the next time the Tao fails me."

    "The Tao has not failed you, it is you that has failed the Tao," said the master. "The Tao is perfect."
    The Tao decides if a kernel shall compile, or if it shall abort.
    The Tao decides if a kernel shall boot, or if it shall freeze.
    The Tao decides if a kernel shall run, or if it shall panic.
    But, the Tao does not decide if a box will have no hardware failures. That is a mystery to everyone.

    A young master once approached an old master: "I have a LUG for Linux help. But, I fail to answer my students' problems; they are above me."
    The master replied: "Have you taught them of the Tao?" he asked. "How it brings together man and software, yet how it distances them apart; how if flows throughout Linux and transcends its essence?"
    "No," exclaimed the apprentice, "These people cannot even get the source untarred."
    "Oh, said the master, "In that case, tell them to RTFM."

    A master watched as an ambitious user reconstructed his Linux.

    "I shall make every bit encrypted," the user said. "I shall use 2048 bit keys, three different algorithms, and make multiple passes."
    The master replied: "I think it is unwise."
    "Why?" asked the user. "Will my encryption harm the mighty Tao, which gives Linux life and creates the balance between kernel and processes? The mighty Tao, which is the thread that binds the modules and links them with the core? The mighty Tao, which safely guides the TCP/IP packets to and from the network card?"
    "No," said the master, "It will hog too much cpu."

    The core is like the part of the mind that is static. It is programmed at a child's creation and cannot be changed unless a new child is made; unless a new kernel is compiled.
    The modules are like the part of the mind that is dynamic. It is reprogrammed every time one learns new knowledge; every time one learns better code.
    One is yin, the other yang. Each is nothing without the other.

    A novice came to lkml and inquired to all the masters there: "I wish to become a master. Must I memorize the Linux header files?"
    "No," replied a master.
    "Must I submit code to Bitkeeper?"
    "No," replied the master.
    "Must I meditate daily and dedicate my life to Linux?"
    "No," replied the master again.
    "Must I go on a quest to ponder the meaning of the Tao?"
    "No. A master is nothing more than a student who knows something of which he can teach to other students."
    The novice understood.
    And thus said the master:
    "It is the way of the Tao."

    A user came to a master who had great status in lkml. The user asked the master: "Which is easier: implementing new features to the kernel or documenting them?"
    "Implementing new features," replied the master.
    The confused user then exclaimed:
    "Surely it is easier to write a few sentences in the man page than it is to write pages of code without error?"
    "Not so," said the master. "When coding, the Tao of Linux opens my eyes wide and allows me to see beyond the code, to let the source flow from my fingers, to implement without flaw. When documenting, however, all I have to work with is a C in high school English."

    He who compiles from the stable tree is stubborn
    and unwilling to change, but is guaranteed reliability.
    He who compiles from the current tree is wise but perhaps too conformist, but is guaranteed steadiness.
    He who compiles from the unstable tree is adventurous and is guaranteed new innovations: some good, some bad.
    He who compiles straight from Bitkeeper is brave but guaranteed turbulence.
    They are all of the Tao. One shall respect the old, and debug the new; none shall argue over which is greatest.

    There once was a user who scripted in Perl: "Look at what I have to work with here," he said to a master of core, "My code is interpreted dynamically, the syntax is unique and simple, I have sockets, strings, arrays, and everything I could ever need. Why don't you stop meddling in C and come join me?"
    The C programmer described his reasoning to the scripter: "Script is to C as ebonics is to Latin. If the scripter does not grow beyond that of which he scripts, he will surely [die]. Besides, without C, how can there be script?"
    The scripter was enlightened, and the two became close friends.

    1. Re:The Tao of Linux by Anonymous Coward · · Score: 0

      Amusing, but you obviously have no comprehension of Tao.

    2. Re:The Tao of Linux by KuNgFo0 · · Score: 0
      Does anyone know the original author of this? I'm just curious, for it borrows heavily from my Tao of Eggdrop that I wrote a few years ago(which borrows heavily from the Tao of Programming and Tao of IRC).
      There once was a user who scripted in Perl: "Look at what I have to work with here," he said to a master of core, "My code is interpreted dynamically, the syntax is unique and simple, I have sockets, strings, arrays, and everything I could ever need. Why don't you stop meddling in C and come join me?" The C programmer described his reasoning to the scripter: "Script is to C as ebonics is to Latin. If the scripter does not grow beyond that of which he scripts, he will surely [die]. Besides, without C, how can there be script?" The scripter was enlightened, and the two became close friends.
      "... he will surely [die]." ??? [die] doesn't make much sense in Perl, but does for Eggdrop-TCL script :P
    3. Re:The Tao of Linux by brandonY · · Score: 1

      Wow, this is just like the Tao of Programming, except not as funny and a cheap ripoff.

    4. Re:The Tao of Linux by plover · · Score: 2
      die LIST
      Outside an eval, prints the value of LIST to STDERR and exits with the current value of $! (errno). If $! is 0, exits with the value of ($? >> 8) (backtick `command` status). If ($? >> 8) is 0, exits with 255. Inside an eval(), the error message is stuffed into $@ and the eval is terminated with the undefined value. This makes die the way to raise an exception.

      Equivalent examples:

      die "Can't cd to spool: $!\n" unless chdir '/usr/spool/news'; chdir '/usr/spool/news' or die "Can't cd to spool: $!\n"

      If the value of EXPR does not end in a newline, the current script line number and input line number (if any) are also printed, and a newline is supplied. Note that the ``input line number'' (also known as ``chunk'') is subject to whatever notion of ``line'' happens to be currently in effect, and is also available as the special variable $.. See $/ in the perlvar manpage and $. in the perlvar manpage.

      Hint: sometimes appending ", stopped" to your message will cause it to make better sense when the string "at foo line 123" is appended. Suppose you are running script ``canasta''.

      die "/etc/games is no good"; die "/etc/games is no good, stopped";

      produce, respectively

      /etc/games is no good at canasta line 123. /etc/games is no good, stopped at canasta line 123.

      See also exit(), warn(), and the Carp module.

      If LIST is empty and $@ already contains a value (typically from a previous eval) that value is reused after appending "\t...propagated". This is useful for propagating exceptions:

      eval { ... }; die unless $@ =~ /Expected exception/;

      If $@ is empty then the string "Died" is used.

      die() can also be called with a reference argument. If this happens to be trapped within an eval(), $@ contains the reference. This behavior permits a more elaborate exception handling implementation using objects that maintain arbitrary state about the nature of the exception. Such a scheme is sometimes preferable to matching particular string values of $@ using regular expressions. Here's an example:

      eval { ... ; die Some::Module::Exception->new( FOO => "bar" ) }; if ($@) { if (ref($@) && UNIVERSAL::isa($@,"Some::Module::Exception")) { # handle Some::Module::Exception } else { # handle all other possible exceptions } }

      Because perl will stringify uncaught exception messages before displaying them, you may want to overload stringification operations on such custom exception objects. See the overload manpage for details about that.

      You can arrange for a callback to be run just before the die does its deed, by setting the $SIG{__DIE__} hook. The associated handler will be called with the error text and can change the error message, if it sees fit, by calling die again. See $SIG{expr} in the perlvar manpage for details on setting %SIG entries, and eval BLOCK for some examples. Although this feature was meant to be run only right before your program was to exit, this is not currently the case--the $SIG{__DIE__} hook is currently called even inside eval()ed blocks/strings! If one wants the hook to do nothing in such situations, put

      die @_ if $^S;

      as the first line of the handler (see $^S in the perlvar manpage). Because this promotes strange action at a distance, this counterintuitive behavior may be fixed in a future release.

      --
      John
    5. Re:The Tao of Linux by Banjonardo · · Score: 2
      Or, for the entire history of the Tao, read The Gospel of Tux

      --

      -----

      Score 3? For what? Being wrong, at length? - smirkleton

  6. Recursive search? by rherbert · · Score: 1

    I hardly see how they performed a recursive search on the code. It looks like the good ol' faithful sequential search.

    1. Re:Recursive search? by Anonymous Coward · · Score: 0

      Perhaps that's what people call it when they use grep's "-r" flag.

    2. Re:Recursive search? by rherbert · · Score: 1

      That's what I get for homonym humor.

    3. Re:Recursive search? by Anonymous Coward · · Score: 0

      Recursive in the fact that they recursively checked all files in the directory tree below the top level directory

    4. Re:Recursive search? by Anonymous Coward · · Score: 0

      Thats just hierachical traversal.

    5. Re:Recursive search? by Anonymous Coward · · Score: 0

      that was humor?

    6. Re:Recursive search? by Anonymous Coward · · Score: 0
      ...which is implemented via recursion.

      Why are you being so obtuse? The goddamn manual page for egrep even says that "-r" means "recursive".

    7. Re:Recursive search? by Anonymous Coward · · Score: 0

      *shrug* Just because you and they like to abuse the English language with the obvious misuse of common words, it does not mean that I should encourage it.

    8. Re:Recursive search? by I(rispee_I(reme · · Score: 1

      keeping your mouth shut != encouragement
      keeping your mouth shut != discouragement
      and, oh yeah,
      the medium != the message

    9. Re:Recursive search? by orangesquid · · Score: 2

      IMHO..

      I don't see how this is abuse. Algorithmic recursion is a subset of general "recursion" as the dictionary defines it. Algorithmic recursion is where the entire algorithm simply repeats, repeats, and repeats, (each repitition functions on a different subset of some data; otherwise this would just be redundant) to finish a task. This is different from iteration, which is a *piece of * the algorithm.

      algorithm Bob: {data}
      [ Recursive ]
      step 1: do something;
      step 2: do something;
      step 3: do something with Bob(subset of data).

      The evaluation of this algorithm causes the recursion.

      algorithm Bob: {data}
      [ Iterative ]
      step 1: iterate {(substep 1: something * substep 2: something)(subset i of data)} with i from point1 to point2

      The evaluation of this algorithm causes the substeps to recurse, but the algorithm does not recurse. This distinction is what makes the second version of the algorithm simply "iterative," even though it has inner recursion.

      Besides, as we all know, the dictionaries are a function of time, social mentality, and the spoken word; words and definitions are forever coming and going from it.

      --
      --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
  7. Diary (and calendar) of a die-hard programmer by Gaxx · · Score: 4, Interesting

    In the days when I was a die-harder coder (unlike the current easy life as a part time manager and part time developer) I used to keep my diary and calendar in code comments - those were, of course, the days without funky handhelds with funkier PIM systems :-) *sigh* The good old days....

    --
    -- Gaxx
  8. Google Cache by Anonymous Coward · · Score: 5, Informative

    Linked off of article here.

    Easier to read too.

  9. The netcat code by sirket · · Score: 2

    In the netcat source code, Hobbit had a comment in the Linux define section that was pretty funny. It went something like:

    "Linux, which is trying so hard to be posixly correct, I think I'm gonna hurl"

    -sirket

    1. Re:The netcat code by sirket · · Score: 5, Interesting

      Ahh found the exact line:

      /* linux, which is trying as desperately as the gnu folks can to be POSIXLY_CORRECT. I think I'm gonna hurl... */ -- *Hobbit*, taken from the netcat source

      -sirket

    2. Re:The netcat code by Anonymous Coward · · Score: 0

      POSIX_ME_HARDER, baby!. Funniest thing RMS ever said.

    3. Re:The netcat code by Ataru · · Score: 0

      Wow, he must be great at parties...

    4. Re:The netcat code by lastninja · · Score: 1

      Well as long as it doesn't say
      /* linux, which is trying as desperately as the gnu folks can to be POSIXLY_CORRECT.I think I'm going Hurd... */
      I'll keep using it ;).

      --
      John Carmack fan, browsing at +5 since 1999.
  10. code commentary by Anonymous Coward · · Score: 0

    one of the funniest comment I reed in the code was for RealTeck(?) networkcard (10Mbit) .. the comment said that the chipset was "Fucked by design" =)

    1. Re:code commentary by Anonymous Coward · · Score: 0

      I had a realtek 10mbit network card die or short out or something and emit volumes of reched burnt electronics gas into my room while I was away.. got back, couldnt figure out what was fried so i turned it on and watched as lots of black smoke poured from a black chip on my network card (?)...

      took the SOB out and all was well, but scared me as I have several of these cards on various machines

  11. Linus by DaBj · · Score: 3, Funny

    Is it true that there somewhere in the kernelcode is a comment by Linus saying:

    "//I wonder why this works"?

    --
    "GNU's not Unix....it's Linux" / Kami "kokamomi" Petersen
    1. Re:Linus by J0ey4 · · Score: 1

      I imagine not, syntax errors and all you know, but this comment might exsist: /* I wonder why this works? */

      I apologize for being so anal :-)

    2. Re:Linus by spanky1 · · Score: 1

      I just searched 2.4.20... nothing with that phrase. But there are a lot of lines with the word "wonder".

    3. Re:Linus by naph · · Score: 1

      try... egrep -ir "wonder" * sometimes i wonder how it all works... heh. :D

      --
      "if i'd known it was harmless, i'd have killed it myself"
    4. Re:Linus by naph · · Score: 1

      i like the ones saying stuff like "if ur wondering how this works, keep the fuck away from my code!"

      i write stuff like that at work, but then quickly remove it for fear of backlash from my stupid co-workers.

      i'm such an elitist!
      heh.

      --
      "if i'd known it was harmless, i'd have killed it myself"
    5. Re:Linus by Anonymous Coward · · Score: 0

      The Linux source coding standard (and maybe C99??? I dunno) explicitly allows //-style comments. Since Linux is only compiled by GNU C, which has allowed // comments in C for years and years, it wouldn't be a syntax error in the Linux context.

      "grep -R '\/\/' * | wc -l" on my (patched) linux source tree gave 31031 hits.

      So I'd say // is allowed in the linux sources :-)

    6. Re:Linus by QuMa · · Score: 2, Insightful
      • C99 Allows // style comments
      • The linux kernel isn't written to be cross-compiler, it's written to work with GCC. And any other compilers it works with are either modifications of GCC or have put a lot of work into acting like GCC.
    7. Re:Linus by QuMa · · Score: 1

      And, lest we forget, the linux kernel is brimming with //-style comments.

    8. Re:Linus by J0ey4 · · Score: 1

      ahhhhh, once again my ignorance rears its ugly head, I appreciate the kernel-enlightened folk above correcting me :-)

    9. Re:Linus by Old+Wolf · · Score: 1

      Linux kernel isn't writter in C99 is it?

    10. Re:Linus by kasperd · · Score: 3, Informative

      "//I wonder why this works"?

      I couldn't find exactly that comment. This is as close as I can get:

      grep -ir 'wonder.*work' linux
      linux/net/ipv4/arp.c: I wonder why people believe that they work.
      linux/drivers/acorn/block/fd1772.c: * code - I wonder if it will still work... No :-)
      linux/drivers/nubus/nubus.c: * I wonder how the CRC is meant to work -

      --

      Do you care about the security of your wireless mouse?
    11. Re:Linus by Anonymous Coward · · Score: 0

      No, it's written in GNU-C. Which, like MS-C, is, by default, not-quite-ANSI-C

    12. Re:Linus by __past__ · · Score: 1

      It's not written in any version of C. It's written in GCC.

    13. Re:Linus by jericho4.0 · · Score: 2

      Huh?? OK that's a joke, then. For anyone who's wondering, the Linux kernel is almost all C. If not all C. The rest of linux (the apps, tools, etc) are 80% C and most of the rest being C++, plus a little Obj-C and the like.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    14. Re:Linus by Anonymous Coward · · Score: 0

      Why'd you grep on W to check for slashes?? huh?!?!

    15. Re:Linus by __past__ · · Score: 2

      AFAIK there are actually some C++ sources in the Linux kernel, but that's not what I was talking about. I referred to the GCC extensions (as in "embrace and extend"?) it depends on. You can't just take any standards compliant C compiler and expect Linux to compile cleanly with it.

    16. Re:Linus by Tarpan · · Score: 1

      Haha.

      I need some coffee, but that was funny.

  12. Bolixed. by danamania · · Score: 5, Funny

    Around the middle of July last year the drive in my web server (a 10 year old 250mb SCSI) died. The first I knew about it was an error along the lines of "device is bolixed".

    It's about the most accurate error message I've seen yet - within half an hour it just wouldn't spin :)

    a grrl & her server

    1. Re:Bolixed. by runderwo · · Score: 2
      The first I knew about it was an error along the lines of "device is bolixed".
      Just for the sake of pedantry, "bollocksed" is the correct spelling. :)
  13. On the fifth day of Xmas my Torvalds gave to me... by Tuxinatorium · · Score: 1, Offtopic

    ...Fiiive core dumps! ...Four reformats ...Three gigs of porn ...Two linux games ...And a usless app on a burnt CD.

  14. Sometimes, and it can cause problems too. by Anonymous Coward · · Score: 5, Interesting

    A couple years ago the company I'm working for had sold the source to one of their business commerce systems to another company. The comments were sprinkled with some superlatives such as 'fuck' and 'son of a bitch' not to mention that there were a few other not-so-nice comments about other products like 'since this fucking windows bug' or what not heh. This other company was NOT very happy at all. It resulted in one person being let go when there were some small "budget" problems even though they just sold some software for over a million and this company wasn't very large (under 20). After he was let go they hired 3 new people. Lukly I just started about a week before this happened so I never got in trouble. Anyway, now the management scans the comments periodically to look for colorful words.

    1. Re:Sometimes, and it can cause problems too. by Oswald · · Score: 1

      Well, so far three people have modded this up as "interesting", which probably means "scary". That it is, but it's also sad and pathetic. This is about on a level with firing someone for what they wear while they're coding.

    2. Re:Sometimes, and it can cause problems too. by hector13 · · Score: 1
      This is about on a level with firing someone for what they wear while they're coding
      Uhm, so programmers should be able to wear t-shirts and jeans while every one else is business casual (or worse, business formal)? Sorry, thankfuly, those days are over.
    3. Re:Sometimes, and it can cause problems too. by Corporate+Troll · · Score: 1
      If this is true, I will be screwed someday. I often make humorous comments in my code, and the occasion expletitive comes in it, especially if I have to work around another bug in the system.
      Actually, up until now, I've never had any problems with it. Often coworks scream out "Hey, that must be your code..." ;-)

      I once made a comment where some terrible hack was in it and I didn't want others to meddle with it. I marked it with "Don't touch: 100% WJO code" (WJO was my short for the versioning system). The maintainer of that code still talks about it at every company party when I meet her, because she was laughing out loud when she found it.

    4. Re:Sometimes, and it can cause problems too. by Sparr0 · · Score: 1

      anyone who never deals with people outside the company should be allowed to wear anything they damn well please. i would never work in an office with a dress code. why should i be wearing a business? its uncomfortable, expensive, and cramps my style.

    5. Re:Sometimes, and it can cause problems too. by coyote-san · · Score: 4, Insightful

      The saddest thing is that the managers will never understand that they're responsible for their own problems. There are a lot of valid reasons for easing somebody out of the door, but the style of comments acceptable at the company before the merger is not one of them.

      N.B., I am not defending comments that are abusive to coworkers, slanderous, etc. That type of language has no place in an office.

      But the tone of a comment is a valuable indication of how much effort was put into fixing it. If I see a comment like // workaround, some_library_call() isn't working like advertised

      it tells me that they RTFM but found a workaround. Maybe a future version of the library (or the FM) will get it right. I probably don't need to talk to the author before touching the code myself. In contrast, a comment like // fucking windows refuses to allow us to keep both widgets visible at the same time, so we'll do this instead...

      tells me that they put a lot of effort into finding a solution to the problem, but every attempt failed. If I have an idea, I should talk to the author to see if he's already tried it. (Better yet would be a pointer to some internal document detailing everything they tried.)

      This isn't absolute - many people will never let their comments contain any emotional tone, and others will swear at the slightest problem. But it's a valuable tool when it's used properly.

      (Speaking of bugs, why does slashcode insist on merging paragraphs?)

      --
      For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    6. Re:Sometimes, and it can cause problems too. by secolactico · · Score: 1

      Blessed are those that get to pick and choose where to work.

      I would consider wearing a tie a small price to pay in order to increase work conditions, salary, etc.

      Luckily, I don't have to, in my current job (but then, I don't deal with customers either).

      --
      No sig
    7. Re:Sometimes, and it can cause problems too. by Ataru · · Score: 0

      "fuck" is an expletive, not a superlative. "son of a bitch" is errrm an expletive phrase I suppose.

    8. Re:Sometimes, and it can cause problems too. by BetaJim · · Score: 1
      I would consider wearing a tie a small price to pay in order to increase work conditions, salary, etc.

      I agree with you but, a tie is a most useless piece of cloth. Unlike a shirt or jacket which can keep you warm. A tie has no use.

      It would bother me greatly to be forced to wear one, though for money I would do many things :)

      --

      "Drug related crime" is a misnomer, "prohibition related crime" is the more accurate and correct phrase.

    9. Re:Sometimes, and it can cause problems too. by Anonymous Coward · · Score: 0

      Yeah, maybe they should wear a fucking tuxedo and a carnation.

      How about a top hat and spats too?

      The only people wearing ties and long sleeves should be the pretentious business fucks who, by the way, are the only people that would object to others wearing something that doesn't make them look like an asshole.

      Ties are for meetings with customers or clients where the business exceeds $1000. Anything else is pretentious bullshit.

    10. Re:Sometimes, and it can cause problems too. by Anonymous Coward · · Score: 0

      The comments were sprinkled with some superlatives such as 'fuck' and 'son of a bitch'...

      Those would be expletives, not superlatives.

      Companies tend to have zero tolerance for "humorous" code comments that point out bugs for which liability may exist. Remember, lawyers have no sense of humor.

    11. Re:Sometimes, and it can cause problems too. by Ataru · · Score: 0

      Err, is there a fucking echo in here or what?
      Like I only pointed that out more than an hour ago...

    12. Re:Sometimes, and it can cause problems too. by Desert+Raven · · Score: 1

      Uhm, so programmers should be able to wear t-shirts and jeans while every one else is business casual (or worse, business formal)? Sorry, thankfuly, those days are over.

      Maybe for you. Thankfully, some employers actually understand that what a programmer wears has absolutely nothing to do with the quality of the code.

      Even better, a few actually understand that when you have folks who work very hard, for long hours, and often have to fix problems at strange hours of the day, you should give them as much leeway as you can so long as it does not degrade the quality or quantity of the work done.

      Hey, if you want to work for a company that treats you just like every other gear in the works, be my guest. I'd rather work for a company that values my skills, not my fashion sense. I haven't worn a dress shirt or tie at work for several years. Heck, I can't remember the last time I wore standard *shoes* to work. I usually wear sandals, though I've been known to wear ghillies or caligae.

    13. Re:Sometimes, and it can cause problems too. by Joe+Tie. · · Score: 1

      A tie has no use.

      Sure it does. It gives those of us who don't have to wear one a good laugh at the expense of people who have to kowtow to irrational cultural mores. Seeing people walking around in suits and ties is about as funny as if they were decked in charms to ward off evil spirits.

      --
      Everything will be taken away from you.
    14. Re:Sometimes, and it can cause problems too. by RetroGeek · · Score: 3, Informative

      a tie is a most useless piece of cloth

      History of the tie

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    15. Re:Sometimes, and it can cause problems too. by sasami · · Score: 2

      No, dress is not itself the issue.

      A dress code is obviously required in some contexts. Less so in others. I'll dress for a customer meeting, but if a company inflexibly insists on enforcing the policy everywhere -- policy for policy's sake -- what does that say about their culture and management?

      Stories abound where policy or management has foiled:

      - Ergonomics and working conditions: "In the meantime, my doctor recommended that I spread my keyboarding out over the weekends. I was to work 4 hours per day Friday through Monday, as opposed to 8 hours on Friday and Monday. Microsystems countermanded my doctor's orders, stating that they wanted me to rest my wrists on the weekends." Then illegally fires him while he's on scheduled disability leave.

      - Product design Engineer is fired for not doing what he's been forbidden to do.

      - Responsible planning: IT manager notices paper prices go up next month, so orders a 6-month supply in advance. Boss forces her to return it all and pay restocking fees. More important to follow the "budget" than to save money!

      - Risk management and employee safety: Consultant wants webmail so he doesn't have to carry a laptop back and forth to a client in a seedy district. But laptop owners are not allowed to have webmail because they already "have" email. IT says: "It's company policy that we would rather lose a $1,600 laptop than to give you a free Web-based e-mail client."

      - Can't even categorize this one: "'Why is the wrong day's backup tape in the server?' boss asks. IT admin points out that the backup system hasn't worked in two years, so why waste the time? Wrong, says boss: 'Just because it doesn't work, doesn't mean we don't put the tapes in there.'"

      And these are just the few I remember lately. A strict dress code isn't inherently a disaster, but it's a warning sign. (In this economy, though, it's not a showstopper anymore. You take what you can get.)

      ---
      Dum de dum.

      --
      Freedom is not the license to do what we like, it is the power to do what we ought.
    16. Re:Sometimes, and it can cause problems too. by Speedy8 · · Score: 2

      When in business has anything been fair? We don't all get the same pay, we dont' all have the same responcibilities, nothing in a company is equal... unless you are apart of a union or a communist/socialist.

    17. Re:Sometimes, and it can cause problems too. by Anonymous Coward · · Score: 0

      Okay, you are the l33test. Sorry.

    18. Re:Sometimes, and it can cause problems too. by BetaJim · · Score: 1
      Though useless, the history is interesting!

      Thanks for the link.

      --

      "Drug related crime" is a misnomer, "prohibition related crime" is the more accurate and correct phrase.

    19. Re:Sometimes, and it can cause problems too. by Anonymous Coward · · Score: 0

      "fuck" is an expletive, not a superlative. "son of a bitch" is errrm an expletive phrase I suppose.

      Fuckingest son of the bitchiest bitch would be superlative though.

    20. Re:Sometimes, and it can cause problems too. by RetroGeek · · Score: 2

      More important to follow the "budget" than to save money!

      There was a multi-million contract to repair the sewers. Next year the budget called for repairing the water line. Both sewer and water line were routed down the middle of the street.

      To repair the sewer the contractor ripped up the street, dug down, and repaired the sewer. While he was down there he noticed that the water line had also been exposed.

      He went back to the owner and said: "For a few dollars more I can fix the water line".

      The answer? No WAY. The sewer contract used up this years budget and there is no money.

      Saving pennies, throwing away dollars.....

      Um yes, this was a government contract. Your tax dollars at work.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    21. Re:Sometimes, and it can cause problems too. by kasperd · · Score: 2

      which probably means "scary".

      The most scary one I ever got was on a RH7.1 system. After upgrading a lot of RPM packages, I sudenly started getting the "Self-destruct in 5 seconds. Have a nice day..." message. That was one of the error messages I was hoping never to see.

      --

      Do you care about the security of your wireless mouse?
    22. Re:Sometimes, and it can cause problems too. by Oswald · · Score: 1
      What difference does it make what they wear? Do your programmers meet customers? Do they do it while they're coding? Dress code is a power play, plain and simple.

      Fortunately, I no longer have to play that game. (I just wear what my wife tells me to ;)

    23. Re:Sometimes, and it can cause problems too. by Reziac · · Score: 3, Interesting

      idSoftware had a little util called "unfuck" that they would apply to their source before sending it off to the latest licensee. Gee, I wonder why? :)

      Somewhere in one of the Paradox 3.5 for DOS executables, someone left a brief rant on upper management (it's readable text in the executable). Betcha that was some interesting source...

      --
      ~REZ~ #43301. Who'd fake being me anyway?
  15. Hardly by barzok · · Score: 5, Funny

    I've seen code from one of our vendors with comments such as "whoever wrote this should be shot. but it was probably me. no time to fix it." He both admitted it was sketchy code and said it like that - and then we bought it.

    I've been known to "talk to myself" in my comments, but I do keep it PG-rated or cleaner. Sometimes at a function exit point you'll see "all done, have a nice day".

    1. Re:Hardly by Xerithane · · Score: 2

      I've seen code from one of our vendors with comments such as "whoever wrote this should be shot. but it was probably me. no time to fix it." He both admitted it was sketchy code and said it like that - and then we bought it.

      That is frighteningly similar to something I wrote in some code a couple years back. It was never anything that would have left the office. At least I hope not. It was one of those "Here ya go, you have till 5pm" projects. I've also posted about management conditions, such as "When you have to produce over 5K lines a week, you do stuff like this:"

      --
      Dacels Jewelers can't be trusted.
    2. Re:Hardly by Anonymous Coward · · Score: 0

      My version of this is inspired by The Simpsons: "Thank you. Come again!"

  16. Well no, it's not all like that by kfg · · Score: 5, Funny

    Only the best code written by the coolest people in a great working enviroment is like that.

    I think that's the real reason MS won't release code. It isn't that the code sucks and they'd be emabrassed ( because that cat is already out of the bag), it's that it would reveal what a dull lot the lot of them were and make it hard to recruit.

    I bet you won't find *one* "Fuck Clippy" comment in the whole code base, and you know they *want* to say it.

    Damned marketroids won't let people have *any* fun.

    KFG

    1. Re:Well no, it's not all like that by fizban · · Score: 3, Insightful

      I actually think there's probably plenty of "Fuck Clippy" messages in Microsoft code, and they won't release it because it would show how much they hate themselves.

      The developers in Microsoft can be quite at odds at the organization itself, like in any company...

      --

      +1 Insightful, -1 Troll. What can I say, I'm an Insightful Troll.

    2. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0

      Well, at my company we do have lots of "interesting" comments in our code base, and sometimes we end up releasing the source code either publically, or to specific customers who have paid for it. When we do, we have to go through the code line by line looking for said comments and cleaning them up. We've stopped being interesting in the comments...:)

      ...by "interesting" I mean the kind of things that would get censored on a TBS showing of a rated "R" movie...humour is fine.

    3. Re:Well no, it's not all like that by lowtekneq · · Score: 1

      From what i have heard, Microsofts code is hacky as hell (which is good), M$ does have some of the best programmers around. What really screws them over is the deadlines, if Microsoft let the programmers take their time, or go back and fix things Windows would be muuuuch more stable.

      --
      Carpe meam simiam!
    4. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0

      I'm at a different computer, and forgot my password, so that's why this is anon.

      Actually, comments like that should NEVER be put into code. It shows immaturity. I'm guessing the poster of parent is a 14 year old boy who thinks that it's cool that he's written a D&D character generator in QBASIC. (Been there, done that, heh).

      Also, when your job is changing other peoples' code ALL DAY LONG, would you rather see comments like

      /*
      * getPath()
      *
      * This function uses dijkstra's single-source
      * shortest path algorithm. Check http://www.
      * url.com/path for details on how it works.
      */

      or

      //OH YEAH! This algorithm is the coolest, and
      //just shows why I'm DA BOMB! WOOOHOOOO!
      //Eat THIS shortest path, bitches!

      Please learn to provide some useful information in your comments.

    5. Re:Well no, it's not all like that by ironfroggy · · Score: 1

      In an entire forum talking about code jokes and humorous comments you pick this one poor soul to insult? fiend.

    6. Re:Well no, it's not all like that by drsquare · · Score: 1

      Am I the only one who thinks comments like 'This algorithm is the coolest, and just shows why I'm DA BOMB! WOOOHOOOO!' would make the code actually interesting and exciting to read? This sort of thing should be encouraged.

      I'm sick of reading code that sounds as if it was written by a librarian.

    7. Re:Well no, it's not all like that by Crash+Gordon · · Score: 1

      > Please learn to provide some useful information in your comments.

      Well, sure. But sometimes you just have to put in something like:

      /* Look, I know this is stupid, and you know it's stupid
      * But [bossname] says we've GOT to have this feature
      * so here's the stupid feature, and damn the torpedoes.
      */

      That's not so much "useful information" as it is "CYA with the rest of the team".

    8. Re:Well no, it's not all like that by Hognoxious · · Score: 1
      Damned marketroids won't let people have *any* fun.
      Which is why there is not, and never has been, an MS office app with a built in flight simulator, FFS.
      I suppose them as wrote it think that's k3wl. But in fact, it just proves how sloppy their QA is, and what a bunch of tossers they are.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    9. Re:Well no, it's not all like that by Skal+Tura · · Score: 1

      this is like third hand information but anyways, i have a relative which knowns someone whos cousin is working at MS as a coder and he has said that place completely sucks, you'd need to work 24/7 without sleep and with a salary way too small to make the management even sometimes be quiet and not bitching about everything.
      They have very odd rules on top of the regular contract rules etc...
      I do not know exactly what all things suck there, i was just told that he does not like to talk about his job at all and tries to put the talk to other tracks immediately as someone mentions his work. But it is clear that he hates working for MS but apparently he has no other choice, don't know why tho.

    10. Re:Well no, it's not all like that by bratmobile · · Score: 2, Informative

      Oh, you simply wouldn't believe the inside of MS code bases -- both good and bad.

      The Office Assistant (Clippy and all his ilk) started as a project in the Office group. It came up for review in front of BillG, and when someone told Bill exactly what feature the meeting was about, he said, "Oh, is this about that fucking character?"

      Needless to say, this was a pretty demoralizing remark for the team presenting their new feature. So, internally, "TFC" became the codename for the Office Assistant, and was used as the function prefix, header file prefix, etc. for a long time.

      I know this because I worked with some of the guys from that team, and I've heard the story corroborated by a lot of different sources.

    11. Re:Well no, it's not all like that by EvanED · · Score: 2

      I'd rather see the first. You or course don't sacrifice clarity and actual documentation for humor. But if a comment can both express what it is mean to and be humorous, so much the better.

    12. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0

      Actually I'd be willing to bet that there's more 'Fuck Clippy' comments in microsoft code than there are 'Fuck '. Mainly because the code required to integrate 'Clippy' (along with the other mso?.dll functionality common to all office apps) is a complete nightmare. its not helped by the fact that the integration of these features was forced upon the unsuspecting developers of the separate applications (word, excel, access, etc...) from above.

    13. Re:Well no, it's not all like that by Anonymous Coward · · Score: 1, Funny

      Microsoft's web site for Clippy has a picture of Clippy saying "all your base".

    14. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0

      UHM yes there has. It was an easter egg in one of the earlier versions of MS Office. I played it myself.... not much too it tho, just fly around a hilly landscape as i recall.

    15. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0
      /* Look, I know this is stupid, and you know it's stupid
      * But [bossname] says we've GOT to have this feature
      * so here's the stupid feature, and damn the torpedoes.
      */

      Patrick Beaver! Patrick Beaver! Patrick Beaver! Patrick Beaver!
      Patrick Beaver! Patrick Beaver! Patrick Beaver! Patrick Beaver!
      Patrick Beaver! Patrick Beaver! Patrick Beaver! Patrick Beaver!

    16. Re:Well no, it's not all like that by EvanED · · Score: 2

      Not very good at spotting sarcasm, are you?

    17. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0

      It would be perfectly acceptable to say 'I like, know this guy, and he works at MS...' You might even get some Karma for it then.

    18. Re:Well no, it's not all like that by plover · · Score: 3, Interesting
      I beg to differ. Excel '95 had far and away the most elaborate Easter egg I've ever seen. It was a built-in 3D Doom-style temple. You could walk around a la first-person shooter and read the names of the developers on the walls.

      Naming an empty macro "Magic 8-ball" in Word '95 and putting it in the toolbar would give you a magic 8-ball shaped icon that would randomly spew the "Don't bet on it" or "Reply hazy-try later" kind of answers when you clicked on it.

      Easter eggs weren't the exclusive province of the Office development team, either. The first 3D text screen saver under NT 3.51 had a couple of Easter eggs. Typing BEER into the text would bounce around names of beers. Typing VOLCANO would bounce around names of volcanos.

      But once the temple thing was made public in the wild, Microsoft got all suity and made a big stink about it, and they claimed they'd fire anyone responsible for putting any new Easter eggs into any Microsoft product.

      --
      John
    19. Re:Well no, it's not all like that by Reziac · · Score: 2
      I dunno about Windows or Clippy, but... [goes off, greps M$DOS6 source -- filenames omitted to protect the guilty]

      ; fuckin' sixteen-bit machine ought
      ; to be able to handle a SIXTEEN-BIT
      ; DISPLACEMENT!!

      ; is not reliable under DOS versions 4.00 and 4.01. (IBM fuck-up).

      ; BIOS is fucking with us - give up

      ; fucking jump out of range by *two* bytes!

      * path statement. The path can be in about a million fucked up forms
      * depending on the level of stupidity in the user.

      Hmm. That's really not much fuckin' for 60mb of code!! Nope, workin' for M$ won't get you laid enough to notice.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    20. Re:Well no, it's not all like that by PyroX_Pro · · Score: 2, Funny

      Microsoft realized that clippy is dumb. http://www.microsoft.com/office/clippy/ ( The flash, its amusing )

    21. Re:Well no, it's not all like that by Hognoxious · · Score: 1

      Er, like, check your sarcasm filter dude!

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    22. Re:Well no, it's not all like that by Anonymous Coward · · Score: 0

      Oh yes he is!

  17. bad bad devs by haukex · · Score: 1, Redundant

    Just grep the kernel sources for bad words, you'll be suprised (and amused ;) ).

    1. Re:bad bad devs by Anonvmous+Coward · · Score: 2

      "bad bad devs (Score:1, Redundant)
      Just grep the kernel sources for bad words, you'll be suprised (and amused ;) )."


      Looks like you shoulda grepped before you posted. ;)

  18. Hardware On Drugs! by mdechene · · Score: 5, Funny

    My personal favorite is the "Hardware On Drugs" message.

    cd /usr/src/linux
    grep -r drugs *

    linux-2.4.19/drivers/net/wan/dscc4.c:
    printk(KERN_INFO) "%s: hardware on drugs!\n", dev->name);

    --

    Karma: Not Particularly Funny.
    1. Re:Hardware On Drugs! by RyLaN · · Score: 1

      jeesh that grep took along time! i tried running it on my 486/16meg ram.. coulda atleast warned us! what does grep do again?

      --
      At least the war on the environment is going well
    2. Re:Hardware On Drugs! by Nameles · · Score: 1

      Isn't it like an ultra version of "find" that spits out the line that the search string is on.

    3. Re:Hardware On Drugs! by antistuff · · Score: 1

      uhhh man grep maybe?

  19. FreeBSD's /usr/src/sys/pci/if_rl.c by flynn_nrg · · Score: 5, Funny

    Bill Paul, the guy who coded the Realtek 8139 driver put a very funny comment:

    /*
    * The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
    * probably the worst PCI ethernet controller ever made, with the possible
    * exception of the FEAST chip made by SMC. The 8139 supports bus-master
    * DMA, but it has a terrible interface that nullifies any performance
    * gains that bus-master DMA usually offers.
    *

    1. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by almeida · · Score: 2

      I have this very card in two boxes, one FreeBSD and the other OpenBSD. I knew the card wasn't fancy, but I figured it was at least halfway decent so I was a bit disappointed when I read your post. The same comment is in /usr/src/sys/dev/ic/rtl81x9.c on OpenBSD. I found this a few paragraphs after what you already posted:

      * It's impossible given this rotten design to really achieve decent
      * performance at 100Mbps, unless you happen to have a 400Mhz PII or
      * some equally overmuscled CPU to drive it.
      *

      Good thing my CPU is sufficiently overmuscled, by their standards at least ;).

    2. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Anonymous Coward · · Score: 0

      I got one of those for $5. The box consisted entirely of Chinese characters. You get what you pay for.

    3. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Door-opening+Fascist · · Score: 3, Informative

      I have this card on a PII-350MHz Red Hat Linux machine, and an integrated one in a 1.3GHz Celeron laptop dual-booting Windoze 2000 and Debian Linux. In Linux, I never get above 5MB/s on a 100baseT-FX link, but in Windoze the limit is around 1.5MB/s. I guess Windoze has even worse support for this chipset than Linux.

    4. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Skal+Tura · · Score: 1

      off topic i know, but yes, RealTek nics suck but there is one thing to remember: they are the most easiest cards available, they are just like plug & go, don't know why, but i've ran into more problems with nearly other brand.
      Seems like the cheapest cards are the easiest to use, maybe not the fastest & technically even mediocre.
      And yes i know, configuring a NIC is a really basic stuff but i've seen beginners fiddle around with 3coms etc... couldn't get them to work somehow amazingly, but as soon as i handed them an SMC or RealTek NIC they got it working.
      And i remember the first time i was setting up an lan like 5 or 6 years ago (i'm 18) i had bunch of 3Com cards and few realteks, 3Coms were a pain in the ass but got the realtek work immediately.
      Afterwards i noticed that 3Com EtherLink III has an dos configuration utility tho and first time when i was setting up an lan, other puter had wind0ze and other one had linux.

      Not very long ago we happened to talk about different NICs with friends and some others claimed that 3Coms can sometimes be a pain in the ass but the cheap nics worked allways without hickups.

      and oh yeah, nice comment about RT 8139 tho =)
      and sure is right, would it be a working driver if not? =)

    5. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by spongman · · Score: 2

      yeah probably because the windows drivers were written by reltek themselves, and i suppose their software division isn't any better than their hardware...

    6. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Ilgaz · · Score: 2

      I use Win XP pro now, I had Linux kernel somewhere and when I checked rt8139.c on LINUX kernel, there is a similar thing as that.

      That was the main reason I decided to replace the NIC with another card. Also... YES, its sucky. On windows the "sucky" includes the drivers too.. They don't "release IP" which becomes a huge problem for Cable Internet support services.

      Another "cool" thing about Realtek ;-) They provide Linux driver, check it... Its ZIP format, for gods sake :)

    7. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Anonymous Coward · · Score: 0

      Interesting. Do you happen to know if the "Via Rhine II" is a relabeled RealTek NIC? (Some Via NICs are.)

      I recently purchased an MSI KT4V-L, with an Athlon XP1800+ (OCed to an XP2000+, don't tell my dealer...). Anyways, it has an onboard LAN. I have yet to manage to get more than about 700KB/s out of it, in W2K. My DEC 21143 chipset-based cards, can easily do 5MB/s in W2K. All this through a 5-port LinkSys 10/100 switch, also kind of low-end, but with only two ports in use, it should give me near true wire speeds, I would hope. Anyways, DON'T buy this board. It sucks. Get the NForce2-based boards, or the MSI KT4-Ultra with the Broadcom Gbit NIC, if you must buy MSI. The sad thing is, you would think that even if bus-master DMA performance on the Via onboard NIC were crap, that an XP2000+ would be able to manage decent transfers, even if the CPU had to modulate the wire directly in software, even, but it can't. Via/RealTek == CRAP!

    8. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Door-opening+Fascist · · Score: 2

      Is the MSI KT4V-L the original nVidia nForce? If it is, I have that too, and am also running Win2k (SP3) on it. I have the onboard NIC running at between 2.5 and 3.5MB/s. Not great, but good enough for my purposes.

      BTW, did you download the unified driver package from nVidia? That's what I have installed, so you might try that. URL is http://download.nvidia.com/Windows/nForce/2.00/nFo rce_win2k_2.00.exe

    9. Re:FreeBSD's /usr/src/sys/pci/if_rl.c by Anonymous Coward · · Score: 0

      You missed the best part.. the full comment (courtesy of google and a number of websites) goes:

      * The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
      * probably the worst PCI ethernet controller ever made, with the possible
      * exception of the FEAST chip made by SMC. The 8139 supports bus-master
      * DMA, but it has a terrible interface that nullifies any performance
      * gains that bus-master DMA usually offers.
      *
      * For transmission, the chip offers a series of four TX descriptor
      * registers. Each transmit frame must be in a contiguous buffer, aligned
      * on a longword (32-bit) boundary. This means we almost always have to
      * do mbuf copies in order to transmit a frame, except in the unlikely
      * case where a) the packet fits into a single mbuf, and b) the packet
      * is 32-bit aligned within the mbuf's data area. The presence of only
      * four descriptor registers means that we can never have more than four
      * packets queued for transmission at any one time.
      *
      * Reception is not much better. The driver has to allocate a single large
      * buffer area (up to 64K in size) into which the chip will DMA received
      * frames. Because we don't know where within this region received packets
      * will begin or end, we have no choice but to copy data from the buffer
      * area into mbufs in order to pass the packets up to the higher protocol
      * levels.
      *
      * It's impossible given this rotten design to really achieve decent
      * performance at 100Mbps, unless you happen to have a 400Mhz PII or
      * some equally overmuscled CPU to drive it.
      *
      * On the bright side, the 8139 does have a built-in PHY, although
      * rather than using an MDIO serial interface like most other NICs, the
      * PHY registers are directly accessible through the 8139's register
      * space. The 8139 supports autonegotiation, as well as a 64-bit multicast
      * filter.
      *
      * The 8129 chip is an older version of the 8139 that uses an external PHY
      * chip. The 8129 has a serial MDIO interface for accessing the MII where
      * the 8139 lets you directly access the on-board PHY registers. We need
      * to select which interface to use depending on the chip type.

  20. at my last job by pizza_milkshake · · Score: 3, Interesting

    i was reprimanded for extensive offensive language in my code. how else to keep it interesting?

    1. Re:at my last job by Anonymous Coward · · Score: 1, Insightful
      how else to keep it interesting?

      Don't use comments at all. Then, use lots of pointers and pointer math. Instead of just plain old:

      int i = 7;


      Try

      int* i;
      i = (int)malloc(sizeof(int));
      *i = (int)7;


      I'm sure you can manage lots of other great examples.
    2. Re:at my last job by Anonymous Coward · · Score: 0
      At my last job, it was forbidden to even use humour in code comments. It was considered "unprofessional".

      That grim nest of worker-ants later went bankrupt. Sweet irony.

    3. Re:at my last job by Ataru · · Score: 0
      Oops, maybe you meant:-
      i = (int*)malloc(sizeof(int)); // i is a pointer!
      *i = 7; // why cast to int?
    4. Re:at my last job by Anonymous Coward · · Score: 0

      Any moment I expect to see a message "I was reprimanded at my last job... right before we lined up at the door to go to recess."

      Why do people agree to be treated like first graders for money? Why?

    5. Re:at my last job by Anonymous Coward · · Score: 0

      To make the person reading it say, "Why cast to int?" as he attempts to understand what we hope he assumes to be a very subtle hack?

    6. Re:at my last job by Ataru · · Score: 0

      Err, good comeback, I guess...

    7. Re:at my last job by Kourino · · Score: 1

      I thought the green guy (H2G2 guy?) and cow in the kernel panic messages were a nice touch. Unfortunately I can't put them in here because Slash complains about "junk characters", even with lots of rambling, semi-off-topic filler.

      More people should read lkml to find the gems like this. Amusing things will get aired if you read the endless liscensing debates to the point where people get pissed too. Especially the asbestos suits and flamethrowers bits.

    8. Re:at my last job by dacarr · · Score: 2
      You were lucky.

      The internal email at my last job had an autoresponder that popped up a window when somebody sent you an email. It was usually filled in with generic comments like "Thanks, I'll get back to you".

      Shortly after the WTC incident, I put 'rm -rf /bin/laden' and was promptly reprimanded for it by my supervisor, who didn't know what it meant. This is the same woman who says telnet "isn't standard" despite RFC 854 being thrown in her face.

      (OK, fine, SSH is preferred.)

      --
      This sig no verb.
    9. Re:at my last job by Anonymous Coward · · Score: 0
      We do it because it beats living in homeless shelters and standing in soup lines.

      Which below describes you:

      • Young and still naive
      • My daddy's really rich
  21. Funny comments from other systems by Anonymous Coward · · Score: 5, Interesting

    In the VM subsystem for the Sun-3 kernel, about late 1986 I think, there appeared the following:

    panic("Shannon and Bill say this can't happen");

    One of the first mass market Unix boxes was sold through the now-defunct line of Tandy computer stores and contained a 68000 and a Z-80 as an I/O processor. They apparently had problems with the Z-80 going insane periodically. This would be noticed by the 68000 which would then...

    panic("Beam us up Scotty, she's sucking mud again");

    Of course the most famous of all is the comment in the task switching code of the original v6 Unix (Lyons commentary era) which said ... /* You are not expected to understand this */

    1. Re:Funny comments from other systems by Anders · · Score: 3, Insightful

      Of course the most famous of all is the comment in the task switching code of the original v6 Unix (Lyons commentary era) which said ... /* You are not expected to understand this */

      And, of course, it means something like "this won't be on the exam". See Odd Comments and Strange Doings in Unix for more of this kind of fun.

    2. Re:Funny comments from other systems by Risc_0 · · Score: 1

      And then there was the TI990 system message:
      "Shut her down Clancy, she's a pumping mud!'

      From Texas Instruments [you know oil, etc.].

      One client that received this message was not pleased at all, accused us programmers of writing it :-)

    3. Re:Funny comments from other systems by deanatav8net · · Score: 0

      OSF/1 had after the end of the kernel main loop (one should never get there), that went similarly, "Shut her down Clancy, she a'pumpin mud." I think that got cleaned up before release. --Dean

    4. Re:Funny comments from other systems by taniwha · · Score: 4, Informative
      but the funny thing was that it made lots of sense .... I did a V6 port (a long time ago and to the Vax no less) and worried about that line over and over again ..... I'd keep coming back to it and puzzle and worry over it .... one day I got there and it made absolute sense .... I'd won! .....

      Basicly what was going on was that fork() internally was a routine [newproc()] that returned 1 or 0 depending on whether you were the parent or the child .... and one of two things happened ... either you had enough memory, allocated it, copied the parent, and fudged up a return stack in the child to get back to return 0 (or 1 I forget which). But if you didn't have enough ram you'd swap out the parent and dummy up the swapped out image as the child, and set this bit in the process state saying you needed to return from newproc() somewhere in the swapper - which is why this comment was there - suddenly in the middle of a routine that returns no value it would test a flag, fudge the stack and return '1'.

    5. Re:Funny comments from other systems by Guy+Harris · · Score: 2
      panic("Shannon and Bill say this can't happen");

      "Shannon and Dan", as I remember (Bill Shannon and Dan Walsh).

  22. Variable Names too.... by RebelTycoon · · Score: 5, Funny

    One can be very colorful with variable names too.

    I remember my high school computer teacher made us make a pixel drawing program. Part of the specs was to be able to toggle between draw and move mode.

    The natural variable names were...

    PenIsUp and PenIsDown ...

    1. Re:Variable Names too.... by __past__ · · Score: 4, Informative
      Not to mention the unheard cries of thousands of VB code monkeys:

      On Error GoTo Hell

      Or in general

      GoTo ConsideredHarmful

      GNU has a whole page with (more or less) funny variable names

    2. Re:Variable Names too.... by Crash+Gordon · · Score: 1

      Oh, come on... Who has never used Q as an index in a BASIC "for" statement?

      Or does this get modded -5 for "too bleeding obvious"...

    3. Re:Variable Names too.... by Anonymous Coward · · Score: 0

      You don't need 2 variables, you dumb piece of shit.

    4. Re:Variable Names too.... by cruachan · · Score: 2

      Your teacher? This one has been around for at least 20 years.

    5. Re:Variable Names too.... by cruachan · · Score: 2

      Oh, should have said, PenIsDown/Up because the joke originally refered to a vector line drawing printer which really did have a pen (or set of pens) on an arm which could be set up/down. Not seen one of those for years now but they sure were cool to watch.

    6. Re:Variable Names too.... by YrWrstNtmr · · Score: 3, Funny

      We had one like that recently:

      something to do with revenue in the "pipeline" (future/expected)

      MyPipeFirm
      MyPipeNotFirm

    7. Re:Variable Names too.... by Anonymous Coward · · Score: 0

      Why the fuck would you need two variables? When you define each variable, do you always define another to store the opposite? Fucking twat! I fucked your mother's face last night, and tought her a thing or two about variables, I can tell you.

    8. Re:Variable Names too.... by Anonymous Coward · · Score: 0

      Why do you need PenIsUp and PenIsDown? Shurely if PenIsUp is true then PenIsDown will simply be false, and visa versa.

      -1 Can't Fucking Program

    9. Re:Variable Names too.... by Ataru · · Score: 0

      Unless the Pen was HalfWayUp, then it would be neither Up nor Down.

      +1 Nursery Rhyme

    10. Re:Variable Names too.... by JohnFluxx · · Score: 3, Funny

      I remember someone telling a story (on /. maybe - i forgot) about they called their new program "enis", but the custom was to add a "D" for development, and a "P" for production. They didn't want to ship the customer a product called Penis, so the managers changed it to "Pnis" iirc, which still sounds the sound when pronounced.

    11. Re:Variable Names too.... by SimonMcC · · Score: 1

      A while back we were using a bastardized version of polish variable naming, I had Boolean All OK...bAlloks, I was most upset when I managed to remove the need for it :-(

      I also got a bug fix rejected from QA due to swearing in the comments....

    12. Re:Variable Names too.... by sheetsda · · Score: 1

      I remember years ago when I was browsing Doom's source seeing colorful for loop variable names, such as "for (int fuck = 0; fuck 10; fuck++) {"

    13. Re:Variable Names too.... by Anonymous Coward · · Score: 0

      you mean a "plotter" not a printer :-) Young kids...

    14. Re:Variable Names too.... by isorox · · Score: 2

      I like PHP's

      fopen("foo.bar", "r") or die(trying());

    15. Re:Variable Names too.... by __past__ · · Score: 2
      :)

      While we're at it: Didn't the Windows API, back in the days of "cooperative multitasking" include a function "keepWindowsAlive()"? Worked pretty well so far.

    16. Re:Variable Names too.... by iabervon · · Score: 2

      My high school computer teacher found once that he's messed up the capitalization of LoopsEx, which he was showing to the class.

    17. Re:Variable Names too.... by carrier+lost · · Score: 1

      On Error GoTo Hell

      I remember writing some VB code that said:

      "On Error Goto Dodge"

      "Dodge" was my error handler as in, "get the hell out of..."

      MjM

      I only mod up...

  23. BeOS kernel API by fintler · · Score: 1

    there's is_computer_on_fire() funct that actually checks the processor temperature and a is_computer_turned_on() which you were supposed to call before anything else...crazy stuff

    at napster (back when it was alive) in the mac version of the src tree there were insane amounts of comments about dustin's mom :D

    1. Re:BeOS kernel API by Anonymous Coward · · Score: 0

      is_computer_on_fire() didn't "actually" check the processor temp--it's a joke.

      double is_computer_on_fire(void)
      Returns the temperature of the motherboard if the computer is currently on fire. Smoldering doesn't count. If the computer isn't on fire, the function returns some other value.

      int32 is_computer_on(void)
      Returns 1 if the computer is on. If the computer isn't on, the value returned by this function is undefined.

      And there were the platform_type constants:

      typedef enum {
      B_BEBOX_PLATFORM = 0,
      B_MAC_PLATFORM,
      B_AT_CLONE_PLATFORM,
      B_ENIAC_PLATFORM,
      B_APPLE_II_PLATFORM,
      B_CRAY_PLATFORM,
      B_LISA_PLATFORM,
      B_TI_994A_PLATFORM,
      B_TIMEX_SINCLAIR_PLATFORM,
      B_ORAC_1_PLATFORM,
      B_HAL_PLATFORM
      } platform_type;

    2. Re:BeOS kernel API by Anonymous Coward · · Score: 0

      there's is_computer_on_fire() funct that actually checks the processor temperature and a is_computer_turned_on()

      That's nothing. Go to the CPU monitor- you can actually stop the CPU. I wonder if anyone actually ever submitted a big for "unable to restart CPU" :-)

      If you have a dual CPU system, you can bounce the system back and forth between one CPU and the other.

  24. Re:Is all code like this? (I hope so!) by jdkane · · Score: 3, Interesting

    I think a sense of humor represents the imaginative side of the programmer. I find that programmers with a sense of humor often produce more creative solutions and aren't as afraid of the code or the solutions compared to their more staunch, anal-retentive counterparts. The coder with a sense of humor seems to live for creative endeavour of the coding, and in my opinion often produces a better solution sometimes even faster because they are enjoying the process. And if the humor gets reflected in the code then so be it -- we call all share in the laughs.

  25. Ok, what's interesting is: by dagg · · Score: 3, Interesting
    This guy was looking for something that was:

    I was looking for something terribly complicated and looking awesome to the eye...

    ... to put on a T-shirt. Most all his replies consisted of expletives and weird crap found in the kernel. Expletives are just more interesting than elegant code, I guess.

    --
    Sex - Find It
    1. Re:Ok, what's interesting is: by Kourino · · Score: 1

      Well, the thing is, "elegant", well-written code doesn't look "awesome to the eye". Take a look at the new scheduler code, for example. It's very well written, and easy to read, but because of this it doesn't "look impressive". But that's the way it should be. Someone should have told him to look at the code in drivers/ ... for all the bitching Al Viro does about that code, there's got to be some absolutely horrid examples in there that would be perfect for scaring people.

  26. The worst I ever saw by cca93014 · · Score: 5, Funny
    while working on a large (more than 3 million Sterling worth) financial risk system I found a comment that read:
    /* The following code demonstrates a complete and utter lack of professionalism. */
    The contractator that wrote it was long gone by the time anyone noticed it...

    1. Re:The worst I ever saw by Syphonius · · Score: 1

      So what was the code? Do tell.

  27. Amusing Bits by DarkKnightRadick · · Score: 5, Funny

    I was compiling Perl 5.8 when I found these funny little tidbits:

    From Perl 5.8.0's ./Configure:
    "Checking to see how your cpp does stuff like catenate tokens...
    Oh! Smells like ANSI's been here.
    We can catify or stringify, separately or together!"
    "You have POSIX termios.h... good!"

    Gimp 1.2.3 was no less immune:

    checking for intelligent life... not found

    Both were found during the ./configure stages of compiling the source.

    --
    "There is a way that seems right to a man, but its end is the way of death." Proverbs 16:25 (NKJV)
    1. Re:Amusing Bits by Kourino · · Score: 1

      The perl configure script is the greatest. "Seems like you're not running Eunice." Every time I build perl, I never use configure.gnu, that would be too boring. Always got to be Configure. ^_^ It's also the best-written plain-language configure script I've seen, in terms of understandability.

    2. Re:Amusing Bits by DarkKnightRadick · · Score: 1

      Amen to that, brother! lol

      --
      "There is a way that seems right to a man, but its end is the way of death." Proverbs 16:25 (NKJV)
  28. cleaning code up for public viewing by calyxa · · Score: 1
    there's a comment in some SDK source I work with where a second comment indicates that in preparation for outside eyes, the second guy left the first guy's comment in because "he has a way with words".

    the first guy's comment was:

    // A structure that defines a UIDialog.
    // hmmmm... confusing you say???
    // If you don't like it you can take it up with big momma.
    // She'll send you down the street with 3 shoes...
    // 2 on your feet and 1 in your ass!

    -calyxa

    --
    Decay! Decay! Decay! -Helium
  29. Funny printk in die_if_kernel for sparc64 by Etyenne · · Score: 5, Funny

    And colleague and I where working a client E450 when we saw some funny ASCII art in /var/log/messages. At first, we believed that the machine got owned and the cracker was making fun of us. A little grepping later we found it in arch/sparc64/kernel/traps.c die_if_kernel() (around line 1450 for 2.4.18). I'd like to post the snippet, but the lameness filter refuse to let me do so. Go see for yourself.

    BTW, kerneltrap.org comment posting system seem borked ... it ate my post !

    --
    :wq
    1. Re:Funny printk in die_if_kernel for sparc64 by Controllers · · Score: 5, Funny

      #arch/sparc64/kernel/traps.c
      /* Amuse the user. */

      \|/ ____ \|/
      "@'/ .. \`@"
      /_| \__/ |_\"
      \__U_/

      thats hilarious!!!

      --
      You have 30 Moderator Points! Use 'em or lose 'em!
    2. Re:Funny printk in die_if_kernel for sparc64 by Kourino · · Score: 1

      Nah, I like the cow better. Slash won't let me post it, so here's a link.

    3. Re:Funny printk in die_if_kernel for sparc64 by Xpilot · · Score: 2

      I've seen it more than once each time my Linux-Sparc kernel panics. It does have a sort of soothing effect though, unlike the BSOD :)

      --
      "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." -- Linus Torvalds
  30. Encourage this! by dmorin · · Score: 5, Funny
    Ya know, I'll take goofy comments over no comments anyday. As long as somebody can come along later and understand what you meant, it's fine. If having fun with it causes you to write a small explanatory paragraph rather than just writing things like "Added new feature", everybody wins.

    Compare this to the boss I had that told me I wasn't allowed to call a variable "temp" (for temperature), because other programmers on the team might misunderstand and think that's a temporary variable.

    • char *dummy = ... ; ... free(dummy); // Because hey, free dummy.
    • History: Took out previous feature. I have no idea what I was smoking. I'm really very, very sorry.
    • And Lo, there came forth a Great Renaming, wherein the Lord did provide a mighty shellscript, and it did crunch upon the code for forty megs and forty bytes, and on the last day, all occurences of the expression "oldCompanyName" had become "newCompanyName", forever and ever, amen.
    1. Re:Encourage this! by p0et · · Score: 1

      If it was a couple of years ago, you could go with something like

      char *kevin =..; free(kevin); // FREE KEVIN!

      and also make a political statement! :)

  31. Proper code indentation by Cadre · · Score: 5, Funny

    I ran across this gem awhile ago, been saving it as a text clipping on my desktop for years now waiting for the perfect moment to post:

    Halfway down the code there is a comment that looks something like this:
    **SFS 07/05/96** Third day. Still no sign of an indented IF. Food and water is running out and the bearers are getting restless. I think Carruthers is going mad...

    - Shane Smith <Shane.F.Smith@Healthnet.com> on proper code indentation, in comp.os.vms

    --
    All editorial writers ever do is come down from the hill after the battle is over and shoot the wounded.
    1. Re:Proper code indentation by Isomer · · Score: 1
      IRC daemons have a varied and chequered history, including some totally bizarre comments.
      #define FLAG_TS8 /* Why do you want to know? */

      /* why 80? why not? */

      crule.c: /* type conversions and ()'s are fun! ;) here have an asprin.. */

      m_pass.c: /* Do something here */

      class.c: * XXX - This destroys data

      parse.c: * Never "FRANCE " again!! ;-)
      What "FRANCE " was has more or less dropped out of the IRC knowledge pool, noone really knows what this comment refers to. Also, the IRC logs of discussions of features in an irc daemon. Kinda expected I guess, but they do tend to take up a lot of space. My favourite, of course, is:
      m_nick.c: * Put this 'if' here so that the nesting goes nicely on the screen
      Since there is no if there anymore!
  32. grep fuck by romkey · · Score: 2, Funny

    Yes, I think most all code has a lot of cursing in it.

    Someone in the group I used to be in at MIT's Lab for Computer Science used to grep out all the fucks and shits before she'd do a release of our TCP for V6 UNIX.

  33. Cray-3 compiler declaration by ColonelPanic · · Score: 5, Funny

    While working for a loony British midget at Cray Computer Corporation, I put the declaration "short volatile *VP;" into the compiler's optimization phase.

    --
    "Skill shows through where genius wears thin." -Wittgenstein || Religion: uniting aviation and architecture.
  34. some suprises from apps by ElOttoGrande · · Score: 5, Funny
    Once was compiling xscreensaver and for some reason didnt have bc library installed...

    configure: error: Your system doesn't have "bc", which has been a standard
    part of Unix since the 1970s. Come back when your vendor
    has grown a clue.

    and one from the slackware adduser script..

    ~# adduser

    Login name for new user []:
    Come on, man, you can't leave the login field empty...

    i also remember a good one in the enlightenment configure script though i dont have it saved .. something about searching the -lfridge for lager ;)

    1. Re:some suprises from apps by T-Ranger · · Score: 1

      The configure script for mrtg claims to order CD's for the primary author a few times while beeping loudly.

    2. Re:some suprises from apps by digitalsushi · · Score: 2

      that looks like jamie zawinkski's work...

      --
      slashdot: where everyone yells sarcastic metaphors to themselves to understand the issue
    3. Re:some suprises from apps by Anonymous Coward · · Score: 0

      Jamie rules. He has lots to say, and writes good code. Most people can do the former, but can't do the latter.

    4. Re:some suprises from apps by Anonymous Coward · · Score: 0

      I wouldn't doubt it. i was looking at his web site earlier, and oh my god have a lot of people bought him CDs and DVDs as gifts! he's got a list.

    5. Re:some suprises from apps by Anonymous Coward · · Score: 0

      Stupid configure script doesn't even NEED bc, but somebody was lazy. Lame.

  35. malloc by Anonymous Coward · · Score: 1, Interesting

    My fav source is the malloc source for FreeBSD, it isn't so much funny as upbeat. I feel inspired when I read it.. All code should be commented like it...

    #define SOME_JUNK 0xd0 /* As in "Duh" :-) */ /* Are we trying to die? */
    static int suicide; /* If we are already sinking, do not making things worse */
    if (suicide) return;

    But then ther is some code I have read by people that is just boring and sad... you can see their flustration in their comments, and their code usually causes problem.

    Where the malloc and general VM implementation of FreeBSD tied together is what has made it the powerhouse it has always been in a paged environment. You can read college style papers on the theory behind it, and people had fun implementing it. Funny how that works.

    Furthermore, as a small hint... on freebsd, it was always good to make a file called malloc.conf in the /etc directory, and put nothing but the letter H in it. Effectivly it will never make a difference due to the fact unused pages eventually get swaped out.. but it helps keep the resident size of your programs down...

    1. Re: malloc by Fweeky · · Score: 2
      Furthermore, as a small hint... on freebsd, it was always good to make a file called malloc.conf in the /etc directory, and put nothing but the letter H in it. Effectivly it will never make a difference due to the fact unused pages eventually get swaped out.. but it helps keep the resident size of your programs down...

      Actually, malloc.conf is supposed to be a symlink to a file*name* containing options, not a regular file containing them, i.e:
      ln -s 'H' /etc/malloc.conf
      man malloc for more flags, and alternative ways to specify them.
    2. Re: malloc by Anonymous Coward · · Score: 0

      Fuck, thats so intuitive! No wonder Unix is No. 1 on the desktop!

    3. Re: malloc by joto · · Score: 2
      Actually, malloc.conf is supposed to be a symlink to a file*name* containing options, not a regular file containing them,

      Wow, that's just scary! It's not that it wouldn't work, but it just scares me to think of what kind of other weird stuff the man who thought of that would put into code elsewhere...

      Not that I don't see similar stuff daily :-)

    4. Re: malloc by Fweeky · · Score: 2

      Actually it struck me as being quite logical, especially for such an important syscall. It means you can get the options with a single pretty much atomic and very cheap call to lstat() -- otherwise you'd need at least an open()/read()/close(), and then you run into worrying about locking while the config file's open.

      It did make me do a bit of a double-take when I first saw it though :)

  36. Not all, but a lot by Syphonius · · Score: 2, Interesting

    At my company, yes, there are interesting comments all through the code. They aren't as colorful as the Linux kernel though (those kind of comments would probably get you in trouble in a business setting).

    I like to think that having interesting comments (non abusive comments mind you) in the code shows the developers are enjoying themselves and working on something they like and with a team they like. Our code is sprinkled with numerous quips and questions and many comments are part of a running joke involving one of our team members and his (humourous, not real) abusive drinking.

    You do have to be careful though. In one previous version of our product some Javascript code (i.e. viewable in the browser) went out with a comment along these lines: "How could this have ever worked? No one must have tested this part at all." It was removed shortly after a customer called to complain about it. :)

    1. Re:Not all, but a lot by rmohr02 · · Score: 2

      A customer called and complained about that???? Some people have no lives.

  37. shutdown.c by almeida · · Score: 3, Funny

    While neither in Linux nor in the the kernel, there is some humor in shutdown.c (/usr/src/sbin/shutdown) in both FreeBSD and OpenBSD. The function die_you_gravy_sucking_pig_dog gave me a good laugh when I saw it the first time.

  38. Dutch code! by desaster · · Score: 5, Funny

    Here's my favourite part of the Blender source:

    #ifdef WIN32
    static int is_a_really_crappy_nvidia_card(void) {
    static int well_is_it= -1; /* Do you understand the implication? Do you? */
    if (well_is_it==-1)
    well_is_it= (strcmp((char*) glGetString(GL_VENDOR), "NVIDIA Corporation") == 0);

    return well_is_it;
    }
    #endif

    1. Re:Dutch code! by ewhac · · Score: 2

      /* Do you understand the implication? Do you? */

      *smack hand on forehead*

      I can't believe it took me ten minutes to figure this out. He's caching the result of the strcmp(), which seems like a fairly pointless optimization...

      Schwab

    2. Re:Dutch code! by ChadN · · Score: 2

      Before I go try this out on my really crappy nvidia cards, is the implication that the vendor string can change? So that caching it early on is the only way to know later? That would be crazy... It must mean something else and I'm not getting it. Or is it just a speed thing (assuming this is called fairly often)?

      --
      "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
    3. Re:Dutch code! by sesquiped · · Score: 1

      Um, no. He's caching the result of the glGetString() call, which might take much longer than the strcmp().

    4. Re:Dutch code! by ntp · · Score: 3, Insightful

      Not pointless. It's saved in a static variable so glGetString and strcmp are only called once, even if the function is called a million times.

      --
      I control the time!
    5. Re:Dutch code! by cakoose · · Score: 1

      Um, no. He's caching the result of a combination of both calls, which will take longer than either one separately. It would stupid to only cache the glGetString().

    6. Re:Dutch code! by freaq · · Score: 1

      hold on. greenhorn here.

      a static variable in a function call... what will its scope be?

      and will not that static variable be set to -1 each time you call is_a_really_crappy_nvidia_card() ?

      --
      united states nuclear device terrorist bioweapon encryption cocaine korea syria iran iraq columbia cuba
    7. Re:Dutch code! by Jim+the+Bad · · Score: 1

      will not that static variable be set to -1 each time you call is_a_really_crappy_nvidia_card() ?

      Nope - that's what the static declaration is for.

      --
      -- And when Justice is gone, there is always... Force. --Laurie Anderson, "Oh Superman"
    8. Re:Dutch code! by Brian+Blessed · · Score: 1

      I think I prefer:

      static int well_is_it = -1;
      well_is_it = (well_is_it+1) ? well_is_it : (strcmp((char*)glGetString(GL_VENDOR), "NVIDIA Corporation")==0);
      return well_is_it;

      -Brian.

  39. he's trolling, no such comments there (nt) by xintegerx · · Score: 1

    nt

    1. Re:he's trolling, no such comments there (nt) by Anonymous Coward · · Score: 0

      Those comments are on the weather pages for the cities. Try any one. Try this one

  40. Please note I didn't say they didn't *write* it by kfg · · Score: 1

    I said you couldn't *find* it.

    Two totally different statements.

    As you note the code gets cleaned up before release. Management learned a long time ago that it's wise to grep for "fuck" before letting raw code out the door.

    KFG

    1. Re:Please note I didn't say they didn't *write* it by operagost · · Score: 1

      As if anyone in a management position knows what "grep" is. They're still trying to figure out how to right-click.

      --

      Gamingmuseum.com: Give your 3D accelerator a rest.
  41. after I was laid off ... by e1en0r · · Score: 5, Funny

    from my old job at a dot com I was instructed to make the website "self-maintaining". I was laid off on a friday but was told I had to spend the next week doing this. I remember one of the last scripts I worked on had something like this:

    if ( $get_out_while_you_can == $or_they_will_fuck_you ) {
    $with_a_cold_aluminum_baseball_bat = 1;
    }

    and

    if ( $this_company_is_run_by_morons == $i_hate_them_all ) {
    die();
    }

    1. Re:after I was laid off ... by Esion+Modnar · · Score: 2, Informative

      This is why many companies walk you out the door the very minute they announce you are laid off. In the middle of that upgrade/install/whatever? TFB!

      --

      They say the first thing to go is your penis. Well, it's either that or your brain. I forget which...
    2. Re:after I was laid off ... by Anonymous Coward · · Score: 0

      Hopefully you were paid for that extra week...forcing you to work without pay is illegal.

    3. Re:after I was laid off ... by miracle69 · · Score: 2

      forcing you to work without pay is illegal.

      You've never heard of Emtala, have you?

      --
      Linux - Because Mommy taught me to Share.
    4. Re:after I was laid off ... by Sayjack · · Score: 3, Insightful

      Companies which lay people off, then let them code for the remaining 2 weeks are pretty naive. The last thing you want in your system is a pissed off coder.

      I'd rather have a hacker in my system than an angry coder any day. They should get a clue.

      --

      -- Good judgement comes with experience. -- Experience comes with bad judgement.

    5. Re:after I was laid off ... by Fulcrum+of+Evil · · Score: 2

      I can beat that. One place fired me, then demanded I work for them during my severance period.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    6. Re:after I was laid off ... by isorox · · Score: 2

      I take it you demanded they pay you

      What is it with people that are willing to be screwed over for free?

  42. What a loser by Little+Grey · · Score: 2, Funny

    Also the ammount of 'shit' and 'fuck' words totally blew me off :) either this guy meant to write "totally blew me AWAY" or he really needs a girlfriend

  43. Any other /. references in Linux kernel? by VZ · · Score: 5, Funny

    I wonder why nobody has mentioned this:

    % sed -n 2,5p ./net/core/netfilter.c
    * Heavily influenced by the old firewall.c by David Bonn and Alan Cox.
    *
    * Thanks to Rob `CmdrTaco' Malda for not influencing this code in any
    * way.

    1. Re:Any other /. references in Linux kernel? by echucker · · Score: 5, Funny

      % sed -n 2,5p ./net/core/netfilter.c
      * Heavily influenced by the old firewall.c by David Bonn and Alan Cox.
      *
      * Thanks to Rob `CmdrTaco' Malda for not influencing this code in any
      * way.

      Ahh, good to see that there is some code out there with no spelling errors ;-)

  44. Especially in code that uses MFC by Mr.+Sketch · · Score: 2

    MFC is the worst toolkit I've ever used and it has so many wierd quirks and odd behavior that I've got tired of commenting each of them. So I now just comment everything as: // FMFC

    I'm sure we can all figure that much out since my company has a problem with explicatives in code comments.

  45. Funny messages on old BIG IRON.... by Anonymous Coward · · Score: 0

    Here's one not many will remember (or want to):

    An ancient big iron OS that ran on Xerox Sigma's, Honeywell (now Bull) DPS/DPX mainframes and others was called CP-6 (Control Program 6) and chock full of funny messages. Among them...

    "Recovery says.... Hang loose..." (during a screech/system crash)

    "Th Th Th Thats all folks" (Final message during System Shutdown)

    "Oink:" (Prompt for PIGGETTE (format) command)

    and many others.

    In addition, during a screech (system crash) the message was sometimes accompanied by a reference like "This is the 'insert name(s) here' memorial screech". The person(s) named were departed programmers from the Los Angeles Development Group (LADC) who wrote and maintained much of the CP series.

  46. redefines the meaning of 'low end.' by kfg · · Score: 4, Interesting

    I guess this is why Road Runner stuck me with one of these things.

    They probably don't pay as much per unit as a decent chocolate bar.

    It brings up an interesting use for having source though, even if you don't code. Before buying a particular bit of hardware it might be interesting to read the driver comments to see what the programer thought of the thing at the low level.

    KFG

    1. Re:redefines the meaning of 'low end.' by silvaran · · Score: 2

      Did you ever get your chocolate bar?

    2. Re:redefines the meaning of 'low end.' by kfg · · Score: 1

      Yeah, and the throughput is better than the Realtek's. You have to liquid cool it though or you get a complete meltdown.

      KFG

    3. Re:redefines the meaning of 'low end.' by silvaran · · Score: 3, Funny

      Hahaha, melts in your PC, not in your hand...

    4. Re:redefines the meaning of 'low end.' by glitchvern · · Score: 2, Informative
      It brings up an interesting use for having source though, even if you don't code. Before buying a particular bit of hardware it might be interesting to read the driver comments to see what the programer thought of the thing at the low level.


      Another good place is in section 4 man pages. The bsd's actually have man pages for most of their drivers. Here are FreeBSD's ethernet drivers, OpenBSD's ethernet drivers, and NetBSD's list of all drivers (NetBSD's web page doesn't provide a link to just their ethernet drivers. Also check out the quick reference catagories on FreeBSD's and OpenBSD's online man pages for other device drivers.
    5. Re:redefines the meaning of 'low end.' by alexburke · · Score: 2

      I work at a computer store, and we sell a model RC-8139C (God only knows who assembles them) with, amazingly enough, an 8139 as its main IC.

      Our cost from our distributor is something like C$7 each (purdy little cardboard box included), and we sell them for C$11.

      The next step up is the DFE-528, at about C$25 retail.

      After that, it's the 3C905TX-M (with the newer BGA IC), at something like C$58 retail. We had three in stock in August '02, and we had three in stock -- the same three -- today.

      All of that probably has something to do with why the 8139 is nearly everywhere you look...

  47. A Freudian slip? by naph · · Score: 1

    egrep -ir "windows should be destroyed" *

    well almost... :D

    --
    "if i'd known it was harmless, i'd have killed it myself"
    1. Re:A Freudian slip? by kasperd · · Score: 1

      egrep -ir "windows should be destroyed" *

      In fact you will find that in the Linux sources. But the context will give it a different meaning than you might expect:

      scripts/tkgen.c: * We are checking which windows should be destroyed and which are

      --

      Do you care about the security of your wireless mouse?
  48. Strangely enough ... by Aceticon · · Score: 4, Interesting

    ... (or maybe not) i usually find more funny comments in code from people who actually like coding (and are good at it) than from code monkeys .

  49. Some true gems by jongus · · Score: 2, Informative
    I found this while browsing E2.

    Just just gotta love this one:
    include/asm-mips/mmu_context.h: /* Fuck. The f-word is here so you can grep for it :-) */

    1. Re:Some true gems by laptop006 · · Score: 1

      I liked that one so much I made it my /. sig...

      --
      /* FUCK - The F-word is here so that you can grep for it */
  50. Some of mine... by BoneFlower · · Score: 2

    Not so much on the comments, but I have error messages like this:

    "If you see this, I've done fucked up"

    "You did something really dumb."

  51. Re:Is all code like this? (I hope so!) by naph · · Score: 1

    well said, i hope it's true.

    --
    "if i'd known it was harmless, i'd have killed it myself"
  52. PHP code offers humour. by fleppir · · Score: 1

    Any language that allows:

    $link = mysql_connect($dbase,$uname,$pass) or die("horribly");

    is a language of choice for programmers with a sense of humour :)

    --
    I am the Barber of Seville.
    1. Re:PHP code offers humour. by Anonymous Coward · · Score: 0

      Bah. Perl was doing that while PHP was in diapers.

      Just a side-effect of a language that really doesn't give a damn about types.

  53. Assembly Comment by Amstel · · Score: 1

    I was an assembler programmer for a fair while. It was usual to name counters as CNT01, CNT02 etc. These were read out during code reviews as CNT OH ONE. A manager forbade the use of this abbreviation as it was considered crude. Thus we renamed all of the jump entries in the jump tables (remember those?) to the names of favourite girls. These became JMP JANE, JMP NICOLA etc. and were read out as such.

    1. Re:Assembly Comment by FyRE666 · · Score: 2

      Thus we renamed all of the jump entries in the jump tables (remember those?)

      Yeah, I've always considered them to be "switch blocks for *real* programmers".

  54. Scheme by Anonymous Coward · · Score: 0

    I'm surprised I haven't seen this posted... When exiting the scheme the very last thing it prints out is "Happy Happy Joy Joy". With *hit ops like cons car and cdr, who would have thought they had a sense of humor ;)

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

      Seen on bumper sticker at UC Berkeley (Go Bears!):
      My other car is a cdr.

  55. Ex-girlfriend commentary as assembly line labels by QuasiEvil · · Score: 5, Funny

    Several years ago, there were three of us, all working (well, "working") for our university's solar car team. Most of the telemetry code was written by one of the other guys (whose basement I'm now writing this from), and somewhere mid-project his girlfriend royally screwed him over. As we now tell people, it wasn't that she was a raving bitch, it was just that she really, really liked guys. All of them, everywhere, personally and intimately. :)

    Anyway, getting on with the story, after that event, he cranked out phenominal amounts of microcontroller code - all very intricate, clever, and good (from an engineer's point of view, not necessarily from a comp-sci view). However, written in assembly, he was forced to regularly come up with line labels for jumps in the code. These rapidly devolved from useful things like :CRC16UpperCalc before the girlfriend disaster to things like :LivsABitchDieDieDie afterwards. Made for some very funny looks back at the old code, but rather frustrating for anybody to debug. After all, how was I supposed to know the difference between the functionality of one with three "die"s and one with four "die"s. And yes, there was a difference, and yes, he knew exactly what each did.

    Lousy maintainability, but it was microcontroller code that nobody would ever again touch. Or, based on what we know of the teams after us, even understand. :)

  56. from code I used to work on by ucblockhead · · Score: 5, Funny
    #ifdef THOSE_BASTARDS_CHANGE_THE_SPEC_BACK_AGAIN
    // lots of code
    #endif

    This text is here because the above code triggers the lame filter. You know, that thing they put in the slash code to force crapflooders to be creative.

    --
    The cake is a pie
    1. Re:from code I used to work on by rmohr02 · · Score: 2
      Weighted shuffling for Winamp. Download RoboDJ [robodj.org] now.
      Cool. What version of WinAmp? I use 2.8 because I have to use a 2.x version to get the WinAmp Trillian plugin to work.
    2. Re:from code I used to work on by rmohr02 · · Score: 2
      Well, I'll assume it works for 2.x because of this:
      An experimental Winamp 3 version of this plugin exists.
    3. Re:from code I used to work on by ucblockhead · · Score: 2

      Right now, 2.x, but I am releasing a version that supports both 2.x and 3.x this week sometime.

      --
      The cake is a pie
    4. Re:from code I used to work on by rmohr02 · · Score: 2

      Cool program. I'd been wanting something like it, but I'd never spent much time looking.

  57. How about a flow chart? by John+Ineson · · Score: 5, Funny

    arch/i386/kernel/dmi_scan.c
    [...]
    /*
    * Check for clue free BIOS implementations who use
    * the following QA technique
    *
    * [ Write BIOS Code ]<------
    * | ^
    * < Does it Compile >----N--
    * |Y ^
    * < Does it Boot Win98 >-N--
    * |Y
    * [Ship It]
    *

  58. Funny Code by afabbro · · Score: 2

    GNU hello, which is a joke to begin with, has some funny code and constructs. As I remember, various little functions are tucked away so you don't see them until you suddenly come to "while (elvis the king lives)", and it compiles fine. SunOS had at least one funny Dr. Suess joke in the public /usr/include headers, but I don't have a copy of SunOS any more so I don't remember it exactly ;)

    --
    Advice: on VPS providers
  59. Half-Life SDK by Anonymous Coward · · Score: 0

    doors.cpp //This is the most hacked, evil, bastardized piece of code ever written.

  60. A few snippets... by La+Temperanza · · Score: 2, Interesting

    linux/arch/mips/kernel/sysirix.c:

    /* 2,191 lines of complete and utter shit coming up... */

    linux/net/ipv4/netfilter/ip_conntrack_core.c :

    while ((h = get_next_corpse(kill, data)) != NULL) {
    /* Time to push up daises... */
    if (del_timer(&h->ctrack->timeout))
    death_by_timeout((unsigned long)h->ctrack);
    /* ... else the timer will get him soon. */
    ip_conntrack_put(h->ctrack);

    linux/drivers/net/ eepro.c:

    printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n");

    linux/net/ipv4/ip_gre.c:

    #ifndef I_WISH_WORLD_WERE_PERFECT

    /* It is not :-( All the routers (except for Linux) return only
    8 bytes of packet payload. It means, that precise relaying of
    ICMP in the real Internet is absolutely infeasible.

    Moreover, Cisco "wise men" put GRE key to the third word
    in GRE header. It makes impossible maintaining even soft state for keyed
    GRE tunnels with enabled checksum. Tell them "thank you".

    Well, I wonder, rfc1812 was written by Cisco employee,
    what the hell these idiots break standrads established
    by themself???

    Don't forget to grep the source for "borken" - did they typo alone or were aliens involved?

    --

    --
    est modus in rebus
    1. Re:A few snippets... by Anonymous Coward · · Score: 0

      if (del_timer(&h->ctrack->timeout))
      ; death_by_timeout((unsigned long)h->ctrack);


      What's that first semi-colon doing there?

  61. The purpose of comments is to be USEFUL... by dpbsmith · · Score: 2

    ...not to show off... not to be entertaining... not to conform to an internal coding standards document... not to give an impression of "professionalism"... not to vent or blow off steam...

    The purpose of comments is to be helpful and useful to whoever needs to work on the code next. 90% of the time, of course, that will be the person that wrote the code originally.

    1. Re:The purpose of comments is to be USEFUL... by gilroy · · Score: 3, Insightful
      No. A purpose of comments is to be useful. As the bazillion examples posted here show, there are apparently other uses for comments, such as to let off steam, amuse oneself (or one's peers), or just be clever.


      Unless the spurious commenting actively obstructs maintenance -- and it's hard to imagine how it could do that -- it's perfectly fine if it's funny, witty, or (gasp!) off-task. Work is done better by those who enjoy themselves doing it.

    2. Re:The purpose of comments is to be USEFUL... by gurensan · · Score: 1

      Aww... come on. Which would your manager want to see... a programmer sleeping or a programmer with a smile on his face?

      /* don't mind me I just work here */

      --
      You are all fartheads.
    3. Re:The purpose of comments is to be USEFUL... by SN74S181 · · Score: 1
      A purpose of comments is to be useful. As the bazillion examples posted here show, there are apparently other uses for comments,


      Ahem....
    4. Re:The purpose of comments is to be USEFUL... by Anonymous Coward · · Score: 0

      Go eat a cock, you humorless jackal.

    5. Re:The purpose of comments is to be USEFUL... by Elwood+P+Dowd · · Score: 3, Interesting

      Work is done better by those who enjoy themselves doing it.

      This is a common misconception. Unhappy, overly criticized workers are less likely to make mistakes, and get more accomplished. In the general case. Extensive research on the subject has been published, although I'm not interested in hunting it down.

      --

      There are no trails. There are no trees out here.
    6. Re:The purpose of comments is to be USEFUL... by Anonymous Coward · · Score: 0

      Strange, then, that comments must follow a rigid format. That smacks of conforming to a standard, and it happens in a lot of codeshops.

      I managed to convince the people auditting my code that repeating the function name in the comment preceding the function *really* doesn't make any sense and just frustrates grepping. I also managed to convince them that repeating the full comment block (ie. description of purpose, description of formal parameter list) should NOT be done on every inherited function. So while I am working on bringing across the information the maintenance people (or maybe I myself) may one day need, the organization sure put up a fight to stop me from doing just that... All in the name of QA...

    7. Re:The purpose of comments is to be USEFUL... by Bisifiniti · · Score: 1

      Of course, the study was published before they found all the timebombs in the unhappy, overly criticized workers' code.

    8. Re:The purpose of comments is to be USEFUL... by Elwood+P+Dowd · · Score: 2

      Well, I'm pretty sure that the studies were with officeworkers in general. So it's still possible that more creative jobs require more relative happiness. Of course, I don't think you can call us VB programmers creative professionals, exactly.

      --

      There are no trails. There are no trees out here.
    9. Re:The purpose of comments is to be USEFUL... by refactored · · Score: 2

      /* "If you feel the urge to document you should simplify the code until
      the code is so lucid that the urge to document goes away." -
      John Carter

      "Bugger" - Matt D

      Umm. This code was kind of twisted.

      So I'm going to untwist a little.

      But only a little.

      It is not really evil. Just a little mindwarping.

      You see there is this cute Reactor singleton that dispenses wisdom,
      mothers milk, signals, events i/o etc. etc.

      Well. Umm, I fork() and exec it three times.

      So the singleton actually becomes a quadrupleton.

      But only one per process. Got that?

      So we keep the original process around to watchdog the other 3.

      So Reactor singleton #1 is watching the other three.

      It responds to SIGCHLD's and restarts the other three when they die.

      It responds to SIGINT's and kills off the other three when it is
      time to finish.

      It has a neat little timer that checks that the other three have put
      a fresh timestamp in their little timestamp slots.

      If they haven't it concludes they have gone barkin' mad and takes
      them out back and shoots them.

      Now to kill off the kiddies it sends them a SIGILL, to which they
      should respond by quietly shutting down and exiting.

      If they don't they get clobbered with a SIGKILL.
      */

    10. Re:The purpose of comments is to be USEFUL... by Cro+Magnon · · Score: 2
      Unhappy, overly criticized workers are less likely to make mistakes, and get more accomplished.

      True. The unhappy workers screw up their code on purpose.
      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
  62. from a professional shop by shortscruffydave · · Score: 5, Funny

    I work in a professional software house, and a while back I write a utility to trawl through some source code for an application and extract the comments. The ratio of 'practical' comments to frustration-venting, sideswiping and humour ran at about 50:50.

    One member of the team has a reputation for doing useful but wacky things, and most of examples of his code were prefixed with /* Trust me...I know what I'm doing */

    At some point a bug-fix had been applied by a junior programmer, prefixed by /* don't trust me...I may not know what he was doing */

    1. Re:from a professional shop by Anonymous Coward · · Score: 0

      One member of the team has a reputation for doing useful but wacky things, and most of examples of his code were prefixed with /* Trust me...I know what I'm doing */

      I hate fsckers who do this, they don't know what the fsck they are doing, you have to spend a whole day figuring out their shit, and once you have, you realize they had the mental cohesion of the Mad Hatter on LSD, so you rewrite heaps of shit making it smarter, smaller, and cleaner, but everyone rags on you in the next meeting 'cause you touched the "gods" code, you { calmly, rationally } explain how much it sucked and how this new solution is better, but it doesn't mean shit on a social level cause you don't have the same self-aggrandizing nature as this "god" - who funnily enough doesn't work there anymore, stayed only a little while! So now you're not the new god (who writes much better code) you're the fscker who messes with the old "gods" code and you can't be trusted!

      To all you fsck sticks that write shit like that in your comments and think you are king shit, do real coders a favour and take a job a macdonalds where you belong, my fscking goldfish could write better code, I know this because it has a longer attention span!

      PS Sorry, had to get this out of my system - maybe the person you are talking about isn't like this, but so many are, and even if he isn't, he should write real comments not self-promoting BS.

  63. Hilarious by Rogerborg · · Score: 2

    Given that half of the NIC chips I've ever seen are RealTek 8139's, it's even funnier.

    --
    If you were blocking sigs, you wouldn't have to read this.
    1. Re:Hilarious by GigsVT · · Score: 1

      Because it matters little unless you are running a server. I have cheap realteks in every system in my house, and regularly get the max 100Mbit bandwidth through them when shooting files around the house.

      It's a $10 network card, and it's more than enough for most home uses. At work we use Intel or 3com in servers though, and 3coms in most of the desktops, mostly to ensure quality drivers.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
  64. Code Comments by Beatlebum · · Score: 1

    First of all, 90% of "#$^%$ windows bug" code comments I have read were not windows bugs at all. Secondly, 99% of code comments trying to be funny are not funny at all in the cold light of day. So my advice is to save your commedic stylings for open mic at the Laugh Shack.

    One more thing. Everytime I see someone wearing one of those code jock T-Shirts with source code, I fanatasize about headbutting the individual down a steep flight of concrete stairs. Memo to those folks- the really bright programmers I have met wear Banana Republic, don't have facial hair and stay in shape.

    1. Re:Code Comments by Anonymous Coward · · Score: 0
      the really bright programmers I have met wear Banana Republic, don't have facial hair and stay in shape.

      I think you must be talking about Microsoft programmers.

    2. Re:Code Comments by Beatlebum · · Score: 1

      And your point is?

    3. Re:Code Comments by Corporate+Troll · · Score: 1


      Did a funny comment bite you when you were young?

    4. Re:Code Comments by Anonymous Coward · · Score: 0
      And your point is?

      I'm glad you asked that, I'm glad for the American people ... but seriously. If Microsoft programmers are so fscking smart, their intelligence must be manifest in their application for a job in which they wouldn't have to produce stable code, and can get paid relatively high amounts of money for producing said code.

    5. Re:Code Comments by Beatlebum · · Score: 1

      Well if they're dumb, how come they have, on average, made a ton of money and produced code which is more ubiquitous than any code ever written. It's very easy to criticize from the sidelines, much harder to get off your arse and do better. If you know so much, I suggest you do what BillG did: improve upon existing technology and make the world a better place. Of course, an easier option would be to whine like a little bitch. Anonymously.

    6. Re:Code Comments by TheCrazyFinn · · Score: 1

      Never seen a pic of Denis Ritchie, Alan Cox or Richard Stallman(Love him or Hate him, he's written some good code) have you?

      The only good coder who wears Yuppie Suits I can recall is Linus.

      --
      "You've got an invalid haircut" -Warren Zevon - Life'll Kill Ya
    7. Re:Code Comments by Anonymous Coward · · Score: 0
      Well if they're dumb, how come they have, on average, made a ton of money and produced code which is more ubiquitous than any code ever written. It's very easy to criticize from the sidelines, much harder to get off your arse and do better. If you know so much, I suggest you do what BillG did: improve upon existing technology and make the world a better place. Of course, an easier option would be to whine like a little bitch. Anonymously.


      Or I could get on my high horse and start praising the status quo, displaying my ignorance while proudly telling everyone "hi my name is [insert name here], and I'm an idiot who likes to continue the status quo."



      But, in response to your one actual relevent point, BillG didn't buy and improve existing technology. He bought existing technology, made it worse, and marketed it better while forcing market superiority through monopoly power. There is a difference.

  65. PalmOS programming by ardiri · · Score: 1

    // f*ck you palm :P - get around that darn limitation

    you dont want to know how many times i have that comment in our code. its amazing how pissed you get when you find out the environment your programming for has limitations you would never expect :)

  66. Half-Life SDK comments by sheetsda · · Score: 5, Funny

    See here and my sig.

  67. Can't beat this in a production environment by Majik · · Score: 1

    Yes, speaking of "Fun" errors to see in your morning logs...

    messages:Jan 4 13:20:01 TheSunGod kernel: VFS: Busy inodes after unmount. Self-destruct in 5 seconds. Have a nice day...

    I loooved seeing that coming from our beefy db server, when it looks to be a harmless error stemming from it's NFS exports.

    Fun Stuff!

    --
    Nick Lange nick.lange@SPAMTASTIC.hushmail.com
  68. IN SOVIET RUSSIA by Anonymous Coward · · Score: 0

    Humored Kernels not comment code from YOU!!!

  69. Microsoft humour is much more open... by Anonymous Coward · · Score: 1, Funny

    ...the entire OS is the joke.

  70. printer error "on fire" now gone. by cant_get_a_good_nick · · Score: 2, Informative

    I think this was pulled a couple months back; it confused newbies, and was really applicable back in the old days of tractor feed dot-matrix printers where a jam really would cause a fire (or at least make your printer smoke) but not in Laser Printer days. Someone missed it so much he made a patch against the kernel to restore it.

    1. Re:printer error "on fire" now gone. by bluGill · · Score: 2

      While printers MIGHT have caught fire at times, it did not happen often. I've seen many jamed dot-matrix printers (funny how tractor feeds seemed to jam all the time, but plain paper which seems harder rarely jams), but none that even got hot enough to smoke.

      The real reason for that comment was the Centronic parrel port had an error line for out of paper, an online status line, and another error line. The comment in the code read something like /* Not out of paper and not offline. Must be on fire */. Most of those ports were not bi-directional back then without some fancy tricks that printers didn't support, so all problems other than out of paper and offline had to all be lumped into one error.

  71. Printer On Fire! by chill · · Score: 2

    This is a holdout from older Unix. It is an error message that is supposed to stimulate lazy users to get off their ass and LOOK at the printer, instead of just calling the admin and saying "my job won't print".

    It frequently stemmed from a paper jam, no toner or other trivial fix that simply required someone to physically go to the printer.

    --
    Learning HOW to think is more important than learning WHAT to think.
  72. Your VB monkeys are good then... by Sunda666 · · Score: 1

    At least they are doing the exception handling.

    All I found on code form my monkeys here is:

    "On Error Resume Next" (or something like that, I am clueless about VB)

    disgusting if you ask me.

    cheers.

    --


    ``If a program can't rewrite its own code, what good is it?'' - Mel
    1. Re:Your VB monkeys are good then... by Anonymous Coward · · Score: 1, Informative

      Yep, that's valid VB to pretend the error didn't happen and carry on to the next instruction. It's at the top of just every .vbs virus/worm I've ever seen (where spreading at all costs is the goal regardless of things breaking) but it certainly has no place in "real world" code.

      Of course you could argue the real culprits are MS for putting this in the language to start with. At least such a horrible kludge is slightly more work in other languages, e.g.

      catch (Exception e)
      {
      return;
      }

      Bonzo the wonder dog

    2. Re:Your VB monkeys are good then... by Anonymous Coward · · Score: 0

      For some reason I was playing with embedded-VB on Pocket PC. The language doesn't support anything other than "On Error Resume Next" or "On Error Goto 0". So you _have_ to use On Error Resume Next, then in the next statement check your error. For every statement that might have an error, if you want to catch any errors. What a crappy language.

  73. Colorful language elsewhere by Anonymous Coward · · Score: 0

    In a fix to LiveJournal's HTML sanitizer, we can see that one of the developers perhaps wasn't happy with the standard of commenting used when another developer was forced to fill a regex with lots of \s* to make sure the sanitizer didn't let through anything which might cause IE's over-zealous parser to execute some JavaScript.

    "god IE is a fucking piece of shit" might not be the most innocent comment in the world, but at least it puts the blame in the right place...

    Check out the rest of the code for other sprinklings of code necessary due to the amazing flexibility IE offers. Oh yes.

  74. The Recipe for Creative Code Comments by Anonymous Coward · · Score: 0

    - Take intelligent, creative people
    - Stick them in boring, repetitive jobs
    - Stir

    1. Re:The Recipe for Creative Code Comments by Wonko+the+Sane · · Score: 1


      - Take intelligent, creative people

      - Stick them in boring, repetitive jobs

      - Stir



      - Profit?

  75. We need more comments like this! by coyote-san · · Score: 5, Interesting

    While this comment is humorous, it's also very deep. It shows that the coder understood what he was doing well enough to know that the behavior wasn't as expected... and anyone else touching the same code should expect problems.

    It's rare, thankfully, but it is possible for code to trigger obscure compiler or even CPU bugs. These can be virtually impossible to track down, esp. if your boss is (justifiably) skeptical of your claim that the problem has to be in the compiler. In these cases the best you can do is flag the code as something that's very flaky.

    (BTW, I have some personal experience with such code. I just hit one with a PNG decoder - one mode had a rare decoder error that would flip one pixel, but the mode meant that the error was propagated across multiple scan lines. A very careful review of the code showed no error, and when I tested the code on different hardware (a PC, not an embedded device) it worked perfectly on the same images. Therefore it has to be the cross-compiler or hardware, and all I could do was document the problem.)

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    1. Re:We need more comments like this! by danamania · · Score: 2

      I've done a couple myself, especially when learning a new language, playing with different constructs provided, and finding those little unique 'features' that I don't yet understand.

      If I can't differentiate between luckily stepping into a solution without understand it fully, and coming across something that the language SHOULDN'T do, I'll comment it as such. Not usually quite as concisely however :).

      a grrl & her server

    2. Re:We need more comments like this! by packeteer · · Score: 2

      I tend to do this is basic stages of programming. A lot of times coders have taught me to put in logic that should never be reached

      Its as simple as:
      if(something) { //sweet it worked
      }
      else { //wtf?
      }

      --
      unzip; strip; touch; finger; mount; fsck; more; yes; unmount; sleep
  76. Happy Meal Ethernet by endrek · · Score: 1

    I must admit, the "happy meal ethernet" kernel code is amusing. drivers/net/sunhme.c check out the happy_meal_tcvr_write function :)

  77. Sadly, not too much in FreeBSD. by bahwi · · Score: 3, Funny

    Not too much in FreeBSD running the same tests. (Yes, I have nothing better to do today, thank you). (Results white-space edited)

    Under /usr/src/sys/
    $ egrep -ir "( fuck)|( shit)" *
    alpha/tc/esp.c: * Things are seriously fucked up.

    dev/sym/sym_hipd.c: * brain-deaded stuff that makes shit.

    i386/i386/math_emu.h: * structure to 12 bytes which breaks things in math_emulate.c. Shit. I

    Doing it outside the /usr/src/sys/ tree has many more results, but alot of them come out of the fortune files. No funny stories I could find, but I'm sure someone else can. =)

  78. Other things that have been written about this by Anonymous Coward · · Score: 0

    There have already been many things written about professionalism in programming, e.g., philg,
    jwg.

    As for me, I made stupid / humorous / profane remarks in real life. My code is about the same. If it's designed well, works well, and J. Random Hacker can understand it from reading the comments, why would anybody give a rat's ass what sort of shit I put in there? (My boss sure doesn't. My users sure don't.)

  79. Horse & Pig reference in Kernel 2.4.20 by antdude · · Score: 2

    [...linux-2.4.20]$ grep -r horse *
    arch/arm/mm/proc-arm2,3.S: * MEMC workhorse code. It's both a horse which things it's a pig.

    Does anyone know how to do grep for "ant" (exact word by itself)? :)

    --
    Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    1. Re:Horse & Pig reference in Kernel 2.4.20 by ActiveSX · · Score: 1

      Does anyone know how to do grep for "ant" (exact word by itself)? :)

      grepping for " [Aa][Nn][Tt] " would probably work.

    2. Re:Horse & Pig reference in Kernel 2.4.20 by antdude · · Score: 2

      [linux-2.4.20]$ grep -r "[Aa][Nn][Tt]" *

      gave me too many hits. None of the results show ant word by itself. :(

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    3. Re:Horse & Pig reference in Kernel 2.4.20 by ActiveSX · · Score: 1

      That's why I said " [Aa][Nn][Tt] " and not "[Aa][Nn][Tt]". I should have been more clear about the spaces.

    4. Re:Horse & Pig reference in Kernel 2.4.20 by antdude · · Score: 2

      Thanks and it worked. I didn't see the spaces due to the bad tiny fonts in Mozilla. :)

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    5. Re:Horse & Pig reference in Kernel 2.4.20 by kasperd · · Score: 3, Informative

      Does anyone know how to do grep for "ant" (exact word by itself)? :)

      Lots of answers, but most of them not really good. How about reading the man page. After doing that, I came up with this:
      grep -ir "\<ant\>" *

      The use of -i is simpler than specifying every letter could be upper or lower case. And the use of spaces at each end of the word misses those cases where where other chars are used at the word boundaries. Then better use the grep builtin feature to indicate start and end of a word.

      --

      Do you care about the security of your wireless mouse?
    6. Re:Horse & Pig reference in Kernel 2.4.20 by cant_get_a_good_nick · · Score: 2

      grep '\<[Aa][Nn][Tt]\>' ....

      The \< and \> metacharacters anchor it to the beginning or end of a word. I'm not sure if it's in all grep's, but GNU grep (the one on Linux and Cygwin, and some others) support this. Check your man page.

    7. Re:Horse & Pig reference in Kernel 2.4.20 by Evil-G · · Score: 1

      I didn't see the spaces due to the bad tiny fonts in Mozilla.

      The press Ctrl and +/- to change the font size. :-)

  80. found again and again.... by rookee · · Score: 1

    I keep finding this in different forms: public static String meaningOfLife = 42;

  81. Grepping kernel src... by hdparm · · Score: 3, Funny
    ...is indeed amusing, especially when you just woke up, drinking first coffee. Few favourites (comments):

    fs/reiserfs/inode.c: /* crap, we are writing to a hole */

    drivers/usb/uhci.c: * is just crap, written by a committee.

    net/ipv4/tcp_input.c: /* Old crap is replaced with new one.

    drivers/sbus/audio/cs4231.c: * how this crap gets set.

    drivers/net/3c501.c: Do not purchase this card, even as a joke. It's performance is horrible

    net/ipv4/ip_sockglue.c: I have no idea, how it will masquearde or NAT them (it is joke, joke :-))

    net/ipv4/tcp_input.c: * Funny. This algorithm seems to be very broken.

  82. We paid a guy to sanitize our code by saarbruck · · Score: 1

    At a previous company, management had one of our full time engineers spend several days going through our code looking for those Seven Dirty Words You Can't Say On Television. Did he remove them? Not exactly... every single one of them became the word 'puff'.

    This led to some interesting comments.

    --
    I am the very model of a modern major general!
    1. Re:We paid a guy to sanitize our code by EvanED · · Score: 2

      Hell... i'll do that. Just give me the code and a program with a search and replace feature and I'll have it alll fixed up.

    2. Re:We paid a guy to sanitize our code by Anonymous Coward · · Score: 0

      /* Puffing Windows won't get this puff right... */

    3. Re:We paid a guy to sanitize our code by forkboy · · Score: 2

      Several days? Doesn't this guy know how to fucking use grep? Jesus. Let me guess, he was paid by the hour...

      --
      This message brought to you by the Council of People Who Are Sick of Seeing More People.
    4. Re:We paid a guy to sanitize our code by Stuart+Park · · Score: 1

      I once saw the opposite - a piece of code that specifically referred to swear words. The code routine created a 4-letter code that was sequentially updated and shown to a user, and the code specifically filtered out any bad word so all the 4-letter words not to be used were checked for.

  83. While in college by Cyb3r · · Score: 1

    I was writting a program and i had a variable that the user was supposed to input int's in and when the user entered something else it would go "Error: User is a dumbass"

    teacher got came to see me and told me if she saw that again shed remove points

    1. Re:While in college by Skal+Tura · · Score: 1

      yeah, thats definately a teacher ;) they are like that, not understanding humor even a little bit...

    2. Re:While in college by green1 · · Score: 2, Funny

      I had a programming instructor in college who taught programming in C on 2 different platforms... our class was working on winblows boxes while the other class worked on some UNIX variant... she gave the same assignment to each class, however due to the differences between the two environments the results came out slightly different (neither one was "wrong" per say... just different spacing on an output file) however the instructor refused to allow for these differences and was grading the assignment by simply comparing the output file of the program with one from her program writen in the other environment. this resulted in many comments in the code in our class allong the lines of "adjustment because our instructor can't tell windows from unix"
      or "adjustment to make my program wrong... but the same wrong as the instructor's program"

      funnily enough nobody lost marks on any of those comments.

  84. Subliminal messages past column 80 by mikehihz · · Score: 2, Funny

    At a previous life I was maintaining a text app built in OS/2 and hit the end-of-line key in Brief (my editor of choice back then) and noticed I was waaaayyyy past column 80. I started hunting around and found that a long-gone programmer had put in some text messages past column 80 that wouldn't be casually found.

    They flashed by very quickly in our UI and said "Xxxx deserves a raise." "Xxxx does great work." "Xxxx should be a lead."

    Of course, as those message boxes weren't causing the bug, I left them alone.

    "First, do no harm."

  85. The best I've seen... by hardcode · · Score: 1

    ex cow-orker[1] (who posts here, hi Ian) - the entire lyrics of "I'm going slightly mad" by Queen

    ex cow-orker[2] - something along the lines of "redundancies, they've laid of billy and morris, I can't be arsed to do this, sod 'em I'm off for a drink"

    me (although I don't remember coding it, long day etc) "cover me - I'm going in" just before some debug printfs

    rich

  86. Re:webpage comments by Anonymous Coward · · Score: 0

    lol, there's even one that says "sucks out there" and "cloudy"

  87. Older post of this by autocracy · · Score: 2, Informative

    An article similar to this was posted sometime over a year ago I'm certain where we discovered all sorts of interesting tidbits of humor within the kernel (mostly of words with expletives). It'd be easy to find if I could look back through all the comments I've posted (thanks /.), but I can't turn anything up via either Slashdot's search engine or Google... Anybody know what article this is?

    --
    SIG: HUP
    1. Re:Older post of this by autocracy · · Score: 1

      No, it was one of the discussions here on /. - around the time that 2.4 came out, IIRC.

      --
      SIG: HUP
  88. Grepping the kernel source code for 'fuck'. by Dthoma · · Score: 2, Funny

    arch/i386/kernel/mtrr.c:1088:/* Some BIOS's are fucked and don't set all MTRRs the same! */

    Documentation/DocBook/kernel-locking.tmpl:65 0: If you don't see why, please stay the fuck away from my code.

    Documentation/DocBook/kernel-locking.tmpl :971: <title>The Fucked Up Sparc</title>

    drivers/cdrom/sbpcd.c:4927: blkdev_dequeue_request(req); /* task can fuck it up GTL */

    drivers/char/drm/drmP.h:690:extern int DRM(release_fuck)(struct inode *inode, struct file *filp);

    drivers/ide/cmd640.c:16: * These chips are basically fucked by design, and getting this driver

    drivers/net/macsonic.c:166: fuck did SONIC_BUS_SCALE come from, and what was it supposed

    drivers/net/sunhme.c:1014:/* Only Sun can take such nice parts and fuck up the programming interface

    drivers/net/sunhme.c:2086: /* This card is _fucking_ hot... */

    drivers/scsi/NCR53C9x.c:1770: * how bad the target and/or ESP fucks things up.

    drivers/scsi/NCR53C9x.c:2690: /* Be careful, we could really get fucked during synchronous

    drivers/scsi/esp.c:2575: * how bad the target and/or ESP fucks things up.

    drivers/scsi/esp.c:2663: * phase things. We don't want to fuck directly with

    drivers/scsi/esp.c:3357: /* Be careful, we could really get fucked during synchronous

    drivers/scsi/qlogicpti.h:76:/* Am I fucking pedantic or what? */

    drivers/sound/aci.c:161:/* The four ACI command types are fucked up. [-:

    fs/binfmt_aout.c:313: /* Fuck me plenty... */

    fs/jffs/intrep.c:2983: don't fuck up. This is why we have

    include/linux/netfilter_ipv4/ipt_limit.h:1 8: /* Ugly, ugly fucker. */

    include/linux/netfilter_ipv6/ip6t_limit.h:18 : /* Ugly, ugly fucker. */

    lib/vsprintf.c:9: * Wirzenius wrote this portably, Torvalds fucked it up :-)

    net/core/netfilter.c:440: /* James M doesn't say fuck enough. */

    net/ipv4/netfilter/ip_conntrack_core.c:1138: /* This is fucking braindead. There is NO WAY of doing this without

    net/ipv4/netfilter/ip_nat_helper.c:249: /* Grrr... SACK. Fuck me even harder. Don't want to fix it on the

    net/ipv4/netfilter/ip_nat_snmp_basic.c:1028 : * (And this is the fucking 'basic' method).

    net/ipv4/netfilter/ipt_limit.c:8: * Alexey is a fucking genius?

    net/ipv6/netfilter/ip6t_limit.c:8: * Alexey is a fucking genius?

    --

    Note to M1-ers: a curt but otherwise insightful message is not "Flamebait" or "Troll".

    1. Re:Grepping the kernel source code for 'fuck'. by cant_get_a_good_nick · · Score: 2

      I remember a story a while back stating that all the 'fuck's in the Linux source code could possibly get it censored. I think at the time Australia had rules strict enough to technically make downloading the Linux kernel illegal.

  89. Code comments by Anonymous Coward · · Score: 0

    There's nothing worse than poorly written code, except poorly written code with humourous comments (or no comments) especially when you're in crunch time and have to put out a fix to a customers problem, and don't know why they're running into the situation that they are because the developer never thought enough about the design (things like serviceability) before they wrote the bloody code. Stuff like this really strikes a nerve:

    switch (id)
    {
    case OP1:
    jim = 15;
    break;
    case OP2:
    jim = 4;
    break;
    default: /* should never get here!!! */
    fprintf(stderr, "Invalid id %d\n", id);
    exit(-1);
    }
    .
    .
    .
    return 0;

    Humourous comments in well written code is acceptable, you likely never really need to completely analyze the comments in well written code. However, in code that is poorly written the last thing I want to see is some smart ass remark about how the answer to everything is 42 or that a particular flow should never get here, or some lame ass who forgot to code the rest of a switch / IF clause by leaving a comment stating /* TODO: dude, put the security stuff here */

  90. Mental note by msobkow · · Score: 5, Funny
    /**
    * Do not accept contracts from D. Smith, as
    * it will lead to a tedious, boring, mind-
    * numbing term in the ninth level of hell.
    * 2002.01.04 MSS
    */
    --
    I do not fail; I succeed at finding out what does not work.
  91. personal experience by morgajel · · Score: 2

    I got chewed out for adding the variable

    EvilBackDoor=true

    or something like that on a internal company website. everyone except my supervisor thought it was fricking hillarious. it didn't do anything, just another waste of space.

    I quit shortly thereafter when I realized the boss had no sense of humor.

    --
    Looking for Book Reviews? Check out Literary Escapism.
    1. Re:personal experience by Ataru · · Score: 0

      You mean, just after he fired you, you said "No, I quit" and he said "No, really, I just fired you, you have no job to quit, get the fuck out of the building before I call security. No, wait, Security? Please come up and escort this twat out of the building, and when I say escort, I mean *kick*."

  92. My favorite C variable name by JWhitlock · · Score: 3, Funny

    while (e_coyote)
    {
    /* code goes here */
    }

    1. Re:My favorite C variable name by jabber01 · · Score: 1

      Errm... Why stop there?

      while (e_coyote) {
      super.genius();
      }

      Sorry, I've been speaking Javanese for a while

      --

      The REAL jabber has the user id: 13196
      What you do today will cost you a day of your life

  93. Burning Printers by Alien54 · · Score: 3, Informative
    The full story on Burning Printers can be seen here

    And apparently, originally it was a very legitimate error message.

    Another bit of lore and trivia for the mad scientist to know

    ;-)

    --
    "It is a greater offense to steal men's labor, than their clothes"
  94. Re:Ex-girlfriend commentary as assembly line label by Anonymous Coward · · Score: 0

    now everyone in ece at queen's has questions on their final exams about the cruise control and telemetry system from the solar car and pseudo code for them is included in the text book. Now I know why they didn't give out the acutal 6811 assembly code.

  95. Re:Ex-girlfriend commentary as assembly line label by Anonymous Coward · · Score: 0

    Its fuckheads like you that make our lives miserable when we have to go back and FIX YOR FUCKING code because you didnt take into account stuff like buffer overflows and counter overflows....

  96. ASCII Art comments by Drakonian · · Score: 3, Interesting
    This is ironic. Yesterday, I was enraged at the embedded system compiler I was using and put in a very large ASCII art warning against doing something that you SHOULD be allowed to do that took 30 hours to debug.

    If you ever need ASCII art comments, head here:
    ASCII Generator. It can use many different "fonts". Great utility.

    --
    Random is the New Order.
  97. Original Usenet post by Cadre · · Score: 1

    Original Usenet post by Shane for those interested.

    --
    All editorial writers ever do is come down from the hill after the battle is over and shoot the wounded.
  98. Funniest Comment I came across by adamy · · Score: 1

    I worked for the Artist formerly known as Walker Interactive Systems. Current Doing business as Elevon. Scrolling through the Gateway code I had recently inherited from a departed collegue, I came across a long stream of difficult code. I guess the half I scrolleed through wasn't as bad as what came after, because right there in the middle was: /* Job Security */

    THen it got really bad.

    --
    Open Source Identity Management: FreeIPA.org
  99. Christmas spirit (As seen in 2.4.19) by Anonymous Coward · · Score: 0

    drivers/scsi/scsi_lib.c: * Now, if we were good little boys and girls, Santa left us a request

  100. The Better the Code the More Colorful the Comments by Greyfox · · Score: 2
    I've noticed that better programmers tend to include more colorful comments. I think it's because they get into a groove where the code is coming right from their stream of consciousness without anything getting in their way. As you go down the bell curve, the programmers have to force their mind into an unfamiliar state to generate code. Of course, somewhere along the curve they just don't comment at all.

    Most companies strip comments from their code when they release it. At Data General we had the AT&T UNIX code with all the comments stripped. I'd have loved to have seen the comments on THAT!

    My personal favorite comment is still /* DON'T CHANGE THIS LINE UNLESS YOU REALLY KNOW WHAT YOU'RE DOING. */ It's actually been proven to be futile, since a guy who didn't know what he was doing changed the line, breaking the code for an entire class of machines. It should just be shortened to /* DON'T CHANGE THIS LINE. EVER. */

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  101. For dummies... by dacarr · · Score: 2

    In the old C For Dummies book is a little tidbit that was never actually made into a lesson in the book, but was thrown into the introduction:

    while horse==dead
    {
    beat(horse);
    }

    The weird thing is, I actually caused a northern CA girl to nearly asphyxiate from laughter when I printed this over IRC to her.

    --
    This sig no verb.
    1. Re:For dummies... by cant_get_a_good_nick · · Score: 1

      Hmm, nothing for C++ or Java?


      while (horse.IsDead())
      {
      horse.beat();
      }

  102. Error 1109: There is no message for this error. by Simon+Brooke · · Score: 2
    My favourite error message of all time is a Microsoft Access one, which is quoted in the subject. I can think of nothing more perfect or complete.

    As to comments, my best ones always happen while I'm working with Java's date and time stuff, which always seems to me to be pervsely broken.

    v = "'" + new java.sql.Date( value.getTime().getTime()).toString() + "'";

    // Baroque, innit? Why, you say, did
    // he not use Calendar.getTimeInMillis()? Well,
    // cos it ain't there, no matter what the friggin docs say.

    . . .

    catch ( ParseException p)
    {

    // I really, really would prefer
    // this didn't happen

    . . .

    if ( offset == 0)

    result.append( "Z");
    // zero offset -- excellent, easy.
    else
    {
    // horrible, horrible, oh most horrible.

    . . .

    /** A simple specialisation of a GregorianCalendar which doesn't make
    * a complete balls-up of rendering itself as a string. I have
    * commented elsewhere on the wanton overcomplication of the Java
    * date handling code... I hope the person who designed it is for
    * ever after forced to keep his diary using the output from
    * GregorianCalendar.toString() as his date format.

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
  103. Example I found by sheriff_p · · Score: 3, Funny

    Not in the kernel, but ... (and this was in Perl code, so, make your own inferences):

    # SUB-PEN.
    # Of post-Soviet-Russian variety, with Chechens and a whole bunch of
    # paintable action figures so you can recreate your very own news
    # broadcast! Parents, dare you deny your children this fabulous
    # opportunity of becoming journalists? Too much caffine has been had.

    --
    Score:-1, Funny
  104. SQL too by Anonymous Coward · · Score: 1, Funny

    Just reminded me of what my colleague put together yesterday:

    select ..... from ...
    where status in ('S','A','N','E') ....

    It took him quite some time to find out why I rolled on the floor :-)

    (S -soon finished, A - active, N - new, E - error, if you ask)

  105. Tac, tac, tac... by CaptainZapp · · Score: 2
    device is bolixed

    Thanks god (or whoever is in charge) that it's after midnight and I don't sit at work, given that I just came down with a red face from a hysterical laughing spree.

    Although one must say that bolixed devices are not funny at all. I experienced bolix on one of my old hard disks. But then again I was able to restore most files, alas that fucker made rather strange noises upon choking out its remains.

    Bolix! But otoh it tought me to do backups.

    --
    ich bin der musikant

    mit taschenrechner in der hand

    kraftwerk

  106. Coincidence! by wackybrit · · Score: 2

    That's weird. I was about to ask the same question on here. I swear I've seen that somewhere in a Linux bootup or installation.

    Seems no-one else can find it though.. perhaps it has been lost from recent implementations.

  107. Mod up, right answer! by seanadams.com · · Score: 2

    "static" is way underrated.

  108. Re:Sometimes, and it can cause problems too... She by Anonymous Coward · · Score: 0

    She?... hrmmm mabe you've got something there... does she have a twinkel in her eye?... for you :)

  109. Re:Sometimes, and it can cause problems too... She by Corporate+Troll · · Score: 1

    I don't think so... Besides she tried to hit on one of my co-workers (while his girlfriend was there!) ;-) Besides, I have a girlfriend.

  110. Actual comment I have seen by sankoz · · Score: 1

    i = i +1; // increment i by 1

    1. Re:Actual comment I have seen by green1 · · Score: 1

      probaly in a student's code... if I DIDN'T put those comments in while in college I lost marks... personnally I thought SOME stuff was self explanitory!

    2. Re:Actual comment I have seen by jericho4.0 · · Score: 2
      Ah, ya gotta love those newbies.

      Seriously, I would rather see every line commented in pseudocode than no comments at all. Literate programming is a nice model to work with.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  111. Funny comment by nukey56 · · Score: 1

    Someone suggested this:

    [root@morgoth:/usr/src/linux]# egrep -ir "( fuck)|( shit)" *

    The best thing that came out was:

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

  112. Actual DOS 2.0 comment (sic) by Anonymous Coward · · Score: 0

    I actually got to see some DOS 2.0 code. In the middle of it, deep deep buried, I found: /* This put here to please my boss, who said:
    "DOS isn't done until Lotus won't run."
    */

    (see the book "Hard Drive: Bill Gates and the Making of the Microsoft Empire")

  113. Umm maybe not... by rufusdufus · · Score: 2

    Static is a very dangerous construct. Statics are global while the code may eventually find its way into multi-threaded code, or code which has fewer assumptions than some obscure function it relies upon.
    This code for example assumes there is only one video card. Of course there isn't enough information here to determine the context of the caller, it is perfectly reasonable to assume that the context could change depending on which video card has been 'selected'.

  114. I think every Real Programmer does it. by Montreal+Geek · · Score: 2
    Sometimes, as reminders, sometimes as self critique.

    Indeed, one of my current pet open source project has a comment that reads:

    // WARNING: This code is ugly as hell, contains black magic, and is // probably going to be a nightmare to fiddle with. It's also suspected // to contain at least one buffer overflow, and to contribute to // holes in the ozone layer. // I wish I wish I wish I could get rid of it.

    In front of the horrible pile of hacks I had to write to temporarly support a file format I had no specs to and was decoded ad hoc. -- MG

  115. You are not expected to understand this by Capt.+Mubbers · · Score: 1
    --
    "Watch the skies, keep watching the skies"
    1. Re:You are not expected to understand this by jericho4.0 · · Score: 3, Funny
      That was a good read, and on-topic also, but the most interesting phrase was;
      The very first use of Unix in the "real business" of Bell Labs was to type and produce patent applications
      There's someting both inspiring and disturbing about that.
      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  116. Mainframe humor: BDOLVB by cant_get_a_good_nick · · Score: 4, Interesting

    I remember reading this as part of a warning really. There was a mainframe app, and there was a constant, and it was called BDOLVB. Some maintenance programmers inherited the system, and saw the obove constant, and didn't know what the hell it was. They tried to look it up, figure out what the meaning was, and they couldn't figure it out. They could see what it was set to, 1770 Octal, but didnt know what it meant. They put looking into it on the back-burner - the system worked but they were stil curious about the meaning. Eventually, after months, they found oout what it meant.
    1770 = BirthDate Of Lidwig Van Beethoven
    Since they spun their wheels for a few days tracking this down, they weren't smiling all that much at the cleverness of this.

    The thing to remember is that code is harder to read than to write. The author has context, information that the reader doesn't have and has to guess at. If you want to be funny, do so, but don't interfere with the ultimate goal of source, to make it easy for people to see and change your code.

  117. Microsoft's approach to comments by danshapiro · · Score: 1
    From my 5 years at MS....

    With in preparation for the "shared source" licensing (about 1.5 years ago), there was a big push to clean up the Windows source code. All profanities were removed, and it was required to remove all "BUGBUG"s. (BUGBUG basically meant "this code needs work"). Unfortunately, the crackdown on BUGBUGs caused most developers to just switch to a different, nonstandard string, which means such things could no longer be searched for.

    --
    This posting is provided "AS IS" with no warranties, and confers no rights.
  118. RE: OT -- grep... by antdude · · Score: 2

    That doesn't work well because I get too many hits like:

    drivers/gsc/.depend: /home/ant/kernels/linux-2.4.20/include/linux/types .h \
    drivers/gsc/.depend: /home/ant/kernels/linux-2.4.20/include/asm/io.h \
    drivers/gsc/.depend: /home/ant/kernels/linux-2.4.20/include/asm/irq.h \

    Binary file arch/i386/kernel/pci-i386.o matches
    arch/i386/kernel/.pci-i386.o.flags:ifeq (-D__KERNEL__ -I/home/ant/kernels/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -nostdinc -iwithprefix include,$(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS_nostdinc) $(CFLAGS_pci-i386.o))))

    --
    Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
  119. Re:The Better the Code the More Colorful the Comme by |_uke · · Score: 2

    I think it's because they get into a groove where the code is coming right from their stream of consciousness without anything getting in their way. As you go down the bell curve, the programmers have to force their mind into an unfamiliar state to generate code.

    This is one of the things that drives me nuts about programming. Some times I will just be in the mood for it. Its hard to explain what exactly this mood is... Im usually a tad tired... But not where you feel really sleepy... (like right now.. ROTFL)... but where you feel zoned out... or not fully present.

    When Im in that state, I find my self writing huge amounts of code... When I come back to it the next day... it usually takes me a while to figure out what the heck I wrote =)

    Ah well... Im sure my bipolar disorder has a good part to play in this too =)

    --
    Luke
  120. Re:Variable Names by freaq · · Score: 1
    --
    united states nuclear device terrorist bioweapon encryption cocaine korea syria iran iraq columbia cuba
  121. panic: I'm a doctor, not a programmer! by jtra · · Score: 1

    drivers/message/fusion/mptlan.c

    panic("Damn it Jim! I'm a doctor, not a programmer! "
    "Oh, wait a sec, I am a programmer. "
    "And, who's Jim?!?!\n"
    "Arrgghh! We've done it again!\n");

    --
    -- Wanna textmode user interface for ruby? http://freshmeat.net/projects/jttui/
  122. Re:Variable Names by freaq · · Score: 1

    forgot the </a>. sorry. //trigger happy submit button presser.

    --
    united states nuclear device terrorist bioweapon encryption cocaine korea syria iran iraq columbia cuba
  123. Donald Becker on Intel NICs... by frozenray · · Score: 1
    I found this comment from Ethernet Uber-Guru Donald Becker while browsing eepro100.c (the source code for the Intel EtherExpress Pro100 [Speedo3] chips):

    IIIA. General
    The Speedo3 is very similar to other Intel network chips, that is to say
    "apparently designed on a different planet".

    :D
    --
    "There are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare." - Blair Houghton
  124. Re:Ex-girlfriend commentary as assembly line label by Jim+the+Bad · · Score: 1
    A friend told me a story of where he used to work.

    It was company policy that the first variable would be called...wait for it.....'A'. The next, 'B' and so on, until AA, AB and onwards. Gulp. This was in COBOL, too.

    --
    -- And when Justice is gone, there is always... Force. --Laurie Anderson, "Oh Superman"
  125. Re: OT -- grep... by kasperd · · Score: 1

    That doesn't work well because I get too many hits like

    That is not a problem with grep, it reports those because the word ant really is there. To avoid that use the grep command on a set of sources which has not yet been used for a compilation, or that has been compiled without that word in the path or machine name.

    --

    Do you care about the security of your wireless mouse?
  126. You don't audit the code you use? by krismon · · Score: 1

    Don't you look at all the code you use line by line to see if there is anything weird in there? Isn't that the reason for using open source? ;^P

  127. Mozilla and clearing history by Pinky · · Score: 3, Informative

    I was trying to find out how to clear the history from XUL in mozilla when suddenly ->

    The comment above the code for clearing the history in mozilla is something like /**** No honey, I haven't been visiting any porn sites. ****/

    Mozilla has lots of stuff like that.

    I mean this is how you import the standard library ->

    xmlns="http://www.mozilla.org/keymaster/gatekeep er /there.is.only.xul"

  128. Sparc Code by caelyx · · Score: 1

    in arch/sparc/mm/srmmu.c

    /* dont laugh, static pagetables*/
    static int srmmu_check_pgt_cache(int low, int high)
    {
    return 0;
    }


    The rest of this file contains a few *interesting* rants against Sun, Fujitsu et al. If you believe them, don't ever buy Sun. :)

  129. Variable Names by wideBlueSkies · · Score: 1

    I usually name throwaway variables (1 use loop sentries, string buffers etc) after tv show or movie plot elements. Just as long as the purpose of the variable can be obtained from it's use, on the spot, I give it a 'meaningless' name.

    For example:
    int vader = strlen(george);
    int anakin;
    for( anakin = 0 ; anakin vader ; anakin++ )
    doSomething( anakin );

    char kramer[vader*2] = "\0"
    strcpy( kramer, george );

    You get the idea. :)

    --
    Huh?
  130. lib/vsprintf.c.... by Kymermosst · · Score: 2

    lib/vsprintf.c: * Wirzenius wrote this portably, Torvalds fucked it up :-)

    That's my favorite line in the entire kernel!

    --
    "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
  131. Re:Ex-girlfriend commentary as assembly line label by QuasiEvil · · Score: 1

    Yup. Just like me. :) I enjoy the challenge of finding such things - I now do this for a living, not just for fun.

    Let me take the time to say that there is such a thing as a device that will never be maintained, such as these. The pieces worked fine for the 18 months we needed them. After that, they'll never need to be maintained again - and can't be, we took the source code and schematics with us. The next team was nearly incompetent and needed to start over, not build on technology they didn't understand.

  132. I can relate, a little by jhylkema · · Score: 1

    On my final project for the weed-out^H^H^H^H^H^H^H introductory programming course at my old school, a couple of times I would get something to work, then say, "why did I do that?" Inevitably, I would bollocks it up, then spend hours putting it back right by the same seemingly odd method I used to get it to work originally. Finally, I'd just write this comment:

    argc = 1; /*Makes sure program does not repeatedly load saved game. Don't fuck with this line.*/
  133. Please, please MOD PARENT UP by BigBadBri · · Score: 1

    it tickled me, anyway. LOL

    --
    oh brave new world, that has such people in it!
  134. Fortran - C comment by ron_ivi · · Score: 1


    In a government lab I saw a comment like this in code someone ported to C from fortran.

    float array[257]; /* NOTE: in C you have to declare arrays with a value one larger than the size of the array you need! */

  135. Dennis Ritchie's ancient 1973 c compiler by Billly+Gates · · Score: 2
    // This is to waste memory

    int waste( waste(); waste(); waste(); waste(); waste(); waste(); waste(); waste(); waste(); waste(); waste());

    I do not remember the code exactly but it was similiar to this and obviously not ansi c compliant as we know today. I noticed in the early compilers that brackets "{}" were not included. Just parenthesis "()". The link where I got the code is no longer active and perhaps someone reading this could find it elsewhere on the web and link it.

    Anyway I found this hilarious because the ancient PDP Dec machines only had like 1-2 megs of ram and most of the memory was reserved for applications. Almost everything was written in assembly due to hardware limitations and wasting memory like this was a complete blashphemy. Programmers just didn't do this back then. THe editor "ed" is an example on how most programs were written and ultra conservative in terms of feautures to reserve ram.

    Glad those days are over.

  136. Another one... by OrangeHairMan · · Score: 2

    I was browsing at +3 and didn't grep this...so...here goes:

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

    Orange

  137. Re:Is all eBay like this? by Anonymous Coward · · Score: 0

    What kind of funny quotations do you think will show up?

  138. Linus started it... by option8 · · Score: 2

    humorous bits of code and comments from linus torvalds' 1991 kernel (version 0.01):

    Entertaining Bits from the Ancient Kernel Tree

    1. Re:Linus started it... by option8 · · Score: 2

      i need to update that page. i posted it a couple years ago when the company i work for was working on the first redhat annual report - which folds out into a poster with the word "open" across the front. there were some ideas thrown out for what to put on the back of the poster; at the beginning it was just going to be blank to save money, IIRC.

      being the "web guy" and the only person at our mac-based graphic design company to actually have used linux (it was around that time that i replaced our old mac file server with a linux box, guaranteeing my job security) i threw out the idea of putting the kernel source on the back.

      well, needless to say, the people we were working with at redhat loved it (and loved it more after talking to some programmers). so i popped over to kernel.org and popped the concatenated text over to the designer working on the poster. the current source being about 4,000% larger than the original at that time (2.2something), we stuck with the original :)

      redhat's legal folks wanted to be sure the source was safe to use and print, since v.01 wasn't covered by GPL. i noted the copyright that said the code was free for use so long as it contained that text. the writer for the report traded emails with alan cox on the subject.

      then they wanted me to go through the text and take out the comments.

      WTF?

      oh no! it has bad words in it! they didn't seem to think there would be anything decipherable in the code, i think. in particular, someone had stumbled on linus' comment about leap years in mktime.c "I also hate Gregorius, pope or no. I'm grumpy." and thought there might be problems with its anti-pope nature.

      that and "Wirzenius wrote this portably, Torvalds fucked it up :-)" in vsprintf.c

      in the end, cooler minds (i.e. mine :) prevailed, and we didn't even have to replace fuck with f**k, which was a proposed compromise at one point.

      anyhoo, it ended up a cool poster, and i still have a copy hanging in my office at home. from our subsequent work for redhat, i hear that a number of the programmers have copies up in their cubes, too.

  139. The more things change... by sillivalley · · Score: 1

    Set your wayback machine to the mid 70's, scenic El Segundo California, home of Scientific Data Systems (bought and torpedoed by Xerox but that's a different story)...

    Not only was the vast majority of the systems software for the SDS mainframes written in assembly code, customers actually got the code!

    Coding/commenting styles differed greatly. The module which handled all remote batch operations, called RBBAT, was *completely* uncommented. Yet its author and maintainer, Sam, when challenged on this, said, "read me 5 lines from any place in rbbat and I'll tell you where they are and what they do."

    I was responsible for some other parts of the operating system. When I saw this thread, I instantly remembered an event from those days -- my boss came into my office and handed me a bug report on my code. Some prudish asshole in Salt Lake City didn't like my comments and had sent in a bug report complaining about them. Ed asked me what I was going to do about it. I told him, not a fucking thing, unless I had the opportunity to visit the customer site. Ed agreed I didn't have to change the comments.

  140. Even way back when... by Anonymous Coward · · Score: 0

    I still have the original PDP-11 assembly source for DEC RMONFB task scheduler, copyright 1975 by Digital Equipment. Almost every new subroutine has comments like: .SBTTL READ/WRITE COMMON ROUTINE
    ; " 'SO IT DOES!' SAID POOH. 'IT GOES IN!'
    ; 'SO IT DOES!' SAID PIGLET. 'AND IT COMES OUT!'
    ; 'DOESN'T IT? SAID EEYORE
    ; -- A.A. MILNE, "WINNIE THE POOH"

    or .SBTTL CLOCK INTERRUPT HANDLER
    ; "THE TIME IS OUT

  141. You are correct by msobkow · · Score: 2

    If you make me miserable and unhappy on the job, I am unlikely to make many mistakes because I'll be gone as soon as the notice period is up.

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:You are correct by Elwood+P+Dowd · · Score: 2

      Oh, me too. I'm not saying that this makes unhappiness desireable for workers. In many situations, specific kinds of worker unhappiness can be profitable for the company.

      This isn't a moral judgment. It's just the way people work.

      --

      There are no trails. There are no trees out here.
  142. Theoretically shouldn't happen! by fo0bar · · Score: 2

    Not really kernel code humor per se, but I received this message in apache's error_log yesterday after making a seemingly innocent config change and restarting:

    [Sat Jan 4 00:18:55 2003] [error] mod_ssl: Init: (hostname:443) Illegal attempt to re-initialise SSL for server (theoretically shouldn't happen!)

    I used to do programming work and remember a similar situation in a daemon I wrote that basically did this:

    if($this == $that) {
    foo;
    fork off;
    exit;
    } else {
    bar;
    fork off;
    exit;
    }
    die("Should never reach this far");

    I would receive that error about once a month...

    1. Re:Theoretically shouldn't happen! by kasperd · · Score: 1

      die("Should never reach this far");
      I would receive that error about once a month...


      How?

      --

      Do you care about the security of your wireless mouse?
    2. Re:Theoretically shouldn't happen! by fo0bar · · Score: 1
      How?

      That was my point. Theoretically, there's no way it should have reached that far in the code.

  143. from arch/i386/kernel/setup.c by robzster1977 · · Score: 1

    /*
    * Now, we have to map the power management section to write
    * a bit which enables access to the GPIO registers.
    * What lunatic came up with this shit?
    */

  144. Breach Hull, All Die by allanc · · Score: 1

    One joke that I almost always put into my programs is a reference to the MST3K movie. In one scene, one of the bots is trying to dig a tunnel out of the ship back to Earth. Of course, this isn't a terribly effective way to get out of a spaceship, so he goes back to review his notes, and says, "Huh. Breach hull, all die. Even had it underlined."

    So my error-catching code always tends to be labeled BHAD.

    --AC

  145. Re:The Better the Code the More Colorful the Comme by Anonymous Coward · · Score: 0
    I still have the original PDP-11 assembly source for DEC RMONFB task scheduler, copyright 1975 by Digital Equipment. Almost every new subroutine has comments like:

    .SBTTL READ/WRITE COMMON ROUTINE
    ; " 'SO IT DOES!' SAID POOH. 'IT GOES IN!'
    ; 'SO IT DOES!' SAID PIGLET. 'AND IT COMES OUT!'
    ; 'DOESN'T IT? SAID EEYORE
    ; -- A.A. MILNE, "WINNIE THE POOH"

    or
    <br>
    .SBTTL CLOCK INTERRUPT HANDLER
    ; "THE TIME IS OUT OF JOINT; O CURSED SPITE,
    ; THAT EVER I WAS BORN TO SET IT RIGHT."
    ; - SHAKESPEARE "HAMLET"

    or
    <br>
    .SBTTL ABORT USERS
    ; "BEHOLD THE LORD HIGH EXECUTIONER!
    ' A PERSONAGE OF NOBLE RANK AND TITLE -
    ; A DIGNIFIED AND POTENT OFFICER,
    ' WHOSE FUNCTIONS ARE PARTICULARLY VITAL."
    ; - W.S. GILBERT, "THE MIKADO"

    followed by
    <br>
    .ENABL LSB
    ; "EXTREME REMEDIES ARE VERY APPROPRIATE FOR EXTREME DISEASES."
    ; - HIPPOCRATES, "APHORISMS"
    12$ RESET ;TERRIBLY FATAL ERROR
    HALT
    BR .-2 ;AND NO WAY OUT
    ; "THE DEATH OF GOD LEFT THE ANGELS IN A STRANGE POSITION."
    ; - BARTHELME, "ON ANGELS"


    And thats just a small sample of some of the most entertaining code I've ever read! And darn good too. I guess they had fun at DEC back in those days.
  146. Colorful Input by schmiddy · · Score: 2, Funny

    In a CS class I took in High School, the teacher was running a little program on the projector with a prompt for a first and last name. One of my classmates raised his hand and suggested "Last name 'Hunt' , First name 'Mike'".
    Attempting to conceal our laughter, we watched as the clueless teacher repeated the name aloud, then entered it into the program. He wondered why the whole class seemed to be laughing, and whether it had anything to do with this "Mike" -- one intrepid classmate told him that it was a friend of ours who had been kicked out of our school some years ago. The teacher then proceeded to use the same name in the next few iterations of the program.

    Guess it just goes to show that teachers think on a different level than their students.

    --
    http://cltracker.net -- powerful craigslist multi-city search
    1. Re:Colorful Input by MeerCat · · Score: 2

      suggested "Last name 'Hunt' , First name 'Mike'".

      A friend of mine from school also used to suggest Mike's brother - Yorrick.

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
  147. Funny Error Messages by pyite · · Score: 2, Funny

    At the company I work for, one of the main components of our main software package will run into a little bit of a problem and throw the following into the event log (Windows): "Screw you guys, I'm going home." Always a fun time when a customer calls for support, you tell them to read any errors in the event log and have them read that to you. Most of them tend to like it, in a frightened sort of way.

    --

    "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

  148. I'm not pagan, just the hardware by bluGill · · Score: 2

    In one job I was responsiable for the code to switch from one redudant peice of hardware to it's backup, and more importantly the code that decided the master was bad. I wrote a comment in 1.0:
    // Do we need a witchover?
    I noticed it the next day, but left it in because knowing how they worked I decided that a witch was more likely to get the job done then my code.

    Amazingly enough switchovers worked fairly well, perhaps I was just too close to the hardware and knew the limitations. I'd like to get another shot at redunadt hardware though to see how if the stupid tricks that we madw work are normal, or if there is a way to make it work that give an engineer confidence that it works.

  149. Sorry! by cookiepus · · Score: 1

    I read the whole thread and have reached a conclusion: source code comments are not funny. If the funniest thing we can put as a comment is // this should never happen.... perhaps we need to seek an alternate source of comedy.

  150. My best by Anonymous Coward · · Score: 0

    I had burned myself out working at a sweatshop (service bureau) doing an accounting program, which was getting more and more balky about running in my 32k bytes I was allowed (I'm an old fart). RSTS/E Basic-plus.

    I wrote "Fixed latest problem. Since this is my last day at the company, this is the last time I ever have to work on this misbegotten son of Murphy's law." I was perhaps slightly more colorful in my prose.

    1985, 4 years later, at a new job, upon being introduced by name, someone else quoted that comment back to me. He had been the next poor fool to try to do the impossible.

  151. Did "EIEIO" damage Intel ? by Taco+Cowboy · · Score: 2



    You sez:
    "Humor can co-exist with professionalism. However, source code is not
    where you put it. If you ever release that code to a customer, it
    could damage your company's reputation."

    I am NOT disputing your finding.

    However, I wish to get your attention to a very tiny piece of embedded code inside Intel's chip, the "EIEIO" register.

    So far, I do NOT see Intel's reputation being damaged in any form. On the contrary, the programmers, yes, who are also CUSTOMERS, seems to enjoy it.

    You see, the ability to laugh at yourself, or be humorous is a plus.

    It distincts ourselves from drones.

    --
    Muchas Gracias, Señor Edward Snowden !
    1. Re:Did "EIEIO" damage Intel ? by GlassHeart · · Score: 2
      So far, I do NOT see Intel's reputation being damaged in any form. On the contrary, the programmers, yes, who are also CUSTOMERS, seems to enjoy it.

      This is an example of the right joke on the right audience, which is why I said these things could damage reputation.

      If I see expletives in source code, however, I cannot help but conclude that the company in question does not practice effective code review. Code review, as you must know, is one of the most cost effective ways to catch bugs, and they're not doing it.

      Jokes are even worse. Most jokes are at least a little offensive to somebody, so there is really a time and place for these. Putting it in source code means that the joke may be read a long time in the future by somebody from a very different culture.

      Remember that it's really hard to be actually funny. Successful comedians get paid a lot of money, and for some reason your day job is still programming.

    2. Re:Did "EIEIO" damage Intel ? by Goldberg's+Pants · · Score: 1

      Erm... One thing, you say that someone from a "very different culture" might read the joke. The fact is, the only people insane enough to read code are programmers.

      You're a humourless corporate drone.

  152. That's funny. by Dthoma · · Score: 1

    Is the word 'fuck' really that bad? I mean, some of those 'fuck's are pretty funny when you put them in context!

    --

    Note to M1-ers: a curt but otherwise insightful message is not "Flamebait" or "Troll".

  153. how not to comment your code by MegaFur · · Score: 2

    I remember an example of a really bad comment form one of my programming books:

    /* horse the string into correctitude... */

    IIRC, the book claimed it was from an actual program. Generally speaking, humor is good. However if your comments have sloppy writing, sloppy jokes, and lots of expletives, what can we expect your actual code to look like?

    --
    Furry cows moo and decompress.
  154. Russian comments in Oracle by franticek · · Score: 1
    I heard a story about some comment in the depth of Oracle sources.

    The comment says in Russian about some far procedure :

    /* Damn, I hope it will never reach this dead-end... */

  155. 2 seconds of funny by Anonymous Coward · · Score: 0

    20 years of lame.

    i pity poor programmers who have to maintain source code where some lamer thought he was 'cute' and 'funny' when after the 2nd reading, it is neither.

  156. Re:Ex-girlfriend commentary as assembly line label by Anonymous Coward · · Score: 0

    Phone number? :-)

  157. NOT a troll by xintegerx · · Score: 1

    Never mind, he's not a troll.... He just linked the wrong place.

    You have to go to your local forecast then search for !-- .

  158. Re:On the fifth day of Xmas my Torvalds gave to me by jo42 · · Score: 2

    ...and the 31,416th version of the kernel, which required the latest glib, which broke all my apps...

  159. Actually, that was Shultz by wowbagger · · Score: 1

    "I KNOW NOTHING! NOTHING!" was not Col. Klink's catchphrase (which was "HO-GEN!"), it was Sgt. Shultz's.

  160. Inscrutable but vitally necessary comments by Anonymous Coward · · Score: 0

    My brother's company decided to outsource a critical Internet banking application they were building (always a bad sign) and their first vendor totally blew the project. They considered cancelling, but they finally decided to oursource the project again.

    When they received the code base, the product almost worked. However, it had some critical bugs that made it unusable and my brother was on the team to fix those bugs, but he couldn't figure out the code. Fortunately, the programmer(s) had put plenty of comments into the code -- in Spanish.

    They unraveled most of the code but got stuck at one section that they couldn't understand and decided to call a Spanish speaking coworker for help. They spelled the comments to him over the phone, but had trouble understanding his response because he couldn't stop laughing. The translation? "... and further into the darkness we go..."

  161. /usr/src/linux/drivers/usb/stv680.c by Evil-G · · Score: 1

    Found this today:

    Memory management
    *
    * This is a shameless copy from the USB-cpia driver (linux kernel
    * version 2.3.29 or so, I have no idea what this code actually does ;).
    * Actually it seems to be a copy of a shameless copy of the bttv-driver.
    * Or that is a copy of a shameless copy of ... (To the powers: is there
    * no generic kernel-function to do this sort of stuff?)
    *
    * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
    * there will be one, but apparentely not yet -jerdfelt
    *
    * So I copied it again for the ov511 driver -claudio
    *
    * Same for the se401 driver -Jeroen
    *
    * And the STV0680 driver - Kevin

  162. Totally appropriate. by SEGV · · Score: 1

    If you suspect something that appears to work, and you can't demonstrate completely whether it is correct or incorrect, by all means flag it.

    I once reviewed a function just before release and had a bad feeling about the code. I was quite tired due to overwork, but I've learned to trust my gut. Everything appeared to work correctly, but that doesn't mean there isn't a coding error. But I couldn't satisfy myself that there was no error, and had other things to attack so couldn't really see if there was an error. So I put a warning saying there might be a bug here, check back later.

    Eventually I went back and removed the warning, after ensuring the code was indeed OK. But the warning was appropriate, and served its purpose.

    --

    --
    Marc A. Lepage
    Software Developer
  163. When "we should never get here" is appropriate. by SEGV · · Score: 1

    I had to do this once.

    In Java, you can override clone(). You might do this in all derived classes in a part of your class hierarchy.

    In the implementations, you might call super.clone() and cast it to that base class. But, when you call super.clone(), you must catch CloneNotSupportedException.

    But clone() must be supported, you implemented it yourself! You know what class you are (at least, you're in that part of the class hierarchy). In this case, you know the clone() you are calling is supported, but the compiler does not.

    So that catch block should never happen! (Barring compiler problems etc.) But it must be there. So I just had it print "this should never happen."

    --

    --
    Marc A. Lepage
    Software Developer
  164. Perl Code to extract funny Linux Kernel comments by avishal · · Score: 1

    Hi,

    Checkout this site for a more comprehensive (?) list of funny linux kernel comments!

    http://www.mar00ned.netfirms.com/funny.html

    In case you have troubles finding it, check out the perl script used to generate this at:

    http://groups.google.com/groups?hl=en&lr=&ie=UTF -8 &oe=utf-8&selm=be1aeb16.0210050052.838ea12%40posti ng.google.com

    Love, Peace, Open Source!
    Vishal

    --
    v==hal if /wal/; #if (Perl) = agar (Hindi)