Code humor

A few years ago (but discovered by me only recently), kerneltrap had a thread about amusing, horrifying, and humorous code in the Linux kernel. Alas, open source evolves fast, so much has changed since that time; for instance, in 2.6.x kernels, there file include/asm-ia64/sn/sn2/shub_mmr.h (which was voted as a particularly frightening piece of work) is no longer in the kernel. However, drivers/usb/class/usblp.c still has the memorable line

static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };

Apparently the source for kernel 0.01 was more amusing.

However, this old newspost describes the funnyiest code comment (not in Linux, but in some random Fortran code) that I’ve ever heard about.

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

Priceless…
Adendum: the GNU humorous C declarations are also nice.

Leave a Reply