Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Amusing comments in source code

created by Aegis-Comm

(thing) by Aegis-Comm (?) (print)   ?   1 C! I like it! Fri Jan 21 2000 at 19:18:45

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

(thing) by ithron (4.9 y) (print)   ?   1 C! I like it! Sat Jun 10 2000 at 6:32:29

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

(thing) by the_demiurge (1.8 y) (print)   ?   I like it! Sun Sep 10 2000 at 15:46:25

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

(thing) by xunker (4.1 wk) (print)   ?   1 C! I like it! Tue Apr 03 2001 at 18:54:27

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.


(thing) by toastmaster (1.1 y) (print)   ?   1 C! I like it! Tue Apr 03 2001 at 19:07:23

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.


(thing) by Alchemy (6.8 mon) (print)   ?   I like it! Wed Aug 01 2001 at 23:22:33

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

(thing) by Xanthos (6.2 y) (print)   ?   I like it! Fri Sep 07 2001 at 21:36:31

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


(thing) by darkmind.iLs (3.2 y) (print)   ?   I like it! Fri Sep 07 2001 at 22:34:00

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

(idea) by WWWWolf (1.2 y) (print)   ?   I like it! Wed Nov 14 2001 at 12:16:57

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


printable version
chaos

What I hate about working on code with others Why programmers don't comment their code You are not expected to understand this J. Robert Oppenheimer
Extreme Duudsonit Fuck me harder It's so crazy it just might work Running an information technology department is harder than you think
Net::IRC Why would a god let so many of his "flock" stray? Now I am become death, the destroyer of worlds E2 ASCII art
meme virus Code janitor jackass nearly open source
#perl Programming issues Lord love a duck rm -rf /
drunk Big Mac Code Warrior Haiku
No more writeups are being accepted for this node. This node has gotten pretty long. Original lock text was messed up. If you feel you have something to add to this node, post it on your Scratch Pad and contact an editor.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
Stereotypes of the Nipponese: The Sailor Girls vs. The Antiseptic Zombies
Exchanging authors
Why Robert Heinlein bugs the hell out of me
Jesse Jackson
Helping someone who practices self-mutilation
B
Zora Neale Hurston
We are a people in whose bodies old sea-seeking rivers roar with blood
Union of Soviet Socialist Republics
homunculus
The perfect node
Last Thoughts on Woody Guthrie
Josie and the Pussycats
New Writeups
WolfKeeper
Launch loop(idea)
TendoKing
Katana(person)
Wuukiee
Highly ornamental cultivars of brambles still have as many thorns as their wild counterparts(idea)
TheDeadGuy
Editor Log: May 2008(log)
everyday j.Lo
pray do not molest them(thing)
ammie
Bands Who Take Their Names from Eighteenth-century English Poetry and Prose(idea)
shaogo
Under My Thumb(review)
ammie
Rock On(person)
The Custodian
The Dresden Files(thing)
Ouzo
PETA becomes you, a proposed future(fiction)
Ereneta
Stone Soup, Part Two(fiction)
jjen
Sorrier than I ever thought I would be(personal)
locke baron
Moskva class antisubmarine cruiser(thing)
Wuukiee
May 15, 2008(idea)
locke baron
Kuznetsov class aircraft carrier(thing)
This affordable entertainment brought to you by The Everything Development Company