One day I was perusing the source of a site to find this:

...
*!-- I didn't write an indexed search because I have no motivation right now. Please continue wasting your time. --*
Your search returned 0 results.
...

...
*!-- User is a moron. Make it known. --*
Please enter one or more keywords.
...
the Net::IRC perl module contains some good snippets from conversations on #perl.


#    <\mjd>  This is an impressive piece of software.
# <fimmtiu>  Really? I always thought of it as a huge, monstrously multiplying
#            collection of hacks in a metaphorical petri dish. :-)
#    <\mjd>  You say that as though it were a bad thing...


# <fimmtiu>  asylum, then your disk is full. *shrug*  Wield rm -f wildly.
# <asylum_>  fimmtiu. yeah right dude.
#   <DemoN>  rm -f is too slow.  newfs.
# <rudefix>  hell, i just prefer to take the disk out and lick it!


# <Mutiny> I'm having this teeny problem and I want to know if somebody
#          can help me with it..
#   <\mjd> mutiny: Sever the main neck tendons before cutting through the
#          spinal cord.  That will allow you more opportunity to separate the
#          vertebrae prior to removing the head.


#  <ROM_Man>  can anyone point me to a resource on how to deal with shadow
#             passwords in perl?
#  <ROM_Man>  anyone alive?
#     <\mjd>  <rattle> Who dares to disturb my eternal rest?
#     <\mjd>  <clank>    <clank>                     <clank>



and so on and so forth ...
Some amusing comments are in the drivers/net/sunhme.c file from the linux kernel. The programmer uses a McDonald's theme for the network driver, which leads to comments like:

/* Welcome to Sun Microsystems, can I take your order please? */
/* Lettuce, tomato, buggy hardware (no extra charge)? */
/* Put the Big Mac into a sane state. */

One of the most amusing uses of source commentary is a game 'we' (co-workers and I) made up, by the name of 'The Lunch Game'.

The Premise of the game is rather simple. Our code is all modular, so a project is comprised of lots of little objects that in turn make a whole. Whenever one of us creates a new module to add on the the structure, we add a random day of the work week (Monday through Friday) to the header comments.

What happens then, after that revision is deployed and put into production, is the next time a bug is discovered in that module, the person debugging it will look at the day of the week in the comments; if that code was a) written by a programmer other than himself, and b) the day in the comments is the current day, then the person who wrote that module has to buy lunch for the one debugging it.

This has two upshots: One, in encourages extensive testing for bugs, and it encourages your attack bugs found later as fast as you can -- if it's in a module you wrote, you get out of buying lunch for anyone else, and if it's someone elses module, you get lunch bought for you.

I've 'won' twice. I've 'lost' three times.

I can't remember where it was, but I think the most amusing comment I ever saw in a piece of software was:

/* DRUNK. FIX LATER */

You know that's motivation.

An old and relatively over-looked adventure game called "Universe" (developer and publisher currently unknown) had some rather interesting things in the game code. One day, out of pure boredom, I was fooling around in DOS. Since I'm no genius, my method was to simply "TYPE UNIVERSE.DAT". To my surprise, amongst all the strange characters that typically appear when people are foolish enough to treat data files as text documents, a disgruntled programmer had written something to the effect of, "Why am I sitting all by myself, coding this shitty game? I should be out having fun! Fuck this game, fuck this company."

At the tiny company I used to work, there was a programmer who insisted we use "proper english" in our comments. He would be so insistent about it, up to and including changing our comments, that we eventually got fed up, and started writing them in Haiku. For example:

// the user is late
// we cannot wait forever
// make the user leave

...

my favorite:

changed:
// Die a horrible death from lack of resources
to:
// no more resources
// the end of the world is here
// throw legs over head

If one looks at the linux kernel source code, in the arch/sparc/ptrace.c at line 69, "fuck me gently with a chainsaw" appears above the function "read_sunos_user()".

Now THAT is a great comment

A fellow coder of a web-based software package wrote something this thing to a particularly "interesting" place in code (nowadays, luckily obsoleted), in Finnish:

"Tämän ohjelman koodaajat ovat alansa ammattilaisia ja idiootteja. Älkää hyvät lapset kokeilko tätä kotona."

("The coders of this program are skilled professionals of the field and total idiots. Kids, please don't try this at home." For origins of the phrase, see Jackass and/or Extreme Duudsonit.)

The project manager, however, demanded that all of the comments should be written in English. (They were aware of the intent of the message, though. =)

Also, in the same software package, I used a particularly interesting value for "true". In PHP, any string != "0" with some content qualifies as true... so my "true" value parameter read "If a thousand suns were to rise together one morning, that light would be a little like the glory of the Lord, for I am become Death, the shatterer of worlds." (Nuking something from the database requires a certain amount of drama, don't you think?)

Log in or register to write something here or to contact authors.