Funny comments in open source software

Whenever I’m looking through code at work I come across various little nuggets of wisdom from whoever wrote what I happen to be working on at the time. Usually it’s just something fairly innocuous and helpful, but sometimes it’s just downright funny.

Based on this I decided to take a look around various pieces of open source software to see what kind of things their developers leave behind for future coders. I’ve gone through and come up with a list of some of the better ones. Enjoy:

/* most drives spin up by 10sec */
/* > 99% working drives spin up before 20sec */
/* give > 30 secs of idleness for retarded devices */

Linux Kernel – drivers/ata/libata-eh.c

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

Linux Kernel – arch/x86/kernel/visws_quirks.c

This insane behavior probably doesn't matter, but we're compatible just for shits and giggles.

Mozilla – source/build/pymake/pymake/

/* There are, alas, devices in this world too dumb
* to read their own hardware colormaps. Sick, but
* true. */ Server – dix/colormap.c

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

Linux Kernel – net/ipv4/ip_gre.c

/* NB: this is conceptually wrong, the string returned by setlocale should
* be taken as opaque -- but then we would be in deep shit^Wtrouble. This
* seems to actually happen on Win32.

XBMC – sources/enca-1.9/src/locale_detect.c