Thursday, June 4, 2009

A programmerś utopia

In the good old days, when visiting the kernel source code wasn´t this daunting a task as it now, I had this first hand experience of discovering that linux source code is interspersed with interesting/witty/funny comments and shocking amounts of profanity.
Could never motivate myself to congregate them all and send them to others interested ( read jobless) souls like me.
Luckily found a list of them on the internet :D, courtesy here and here.
Would be adding to the list, as i come by more :).


Some of my favourites are :

==> *!-- I didn't write an indexed search because I have no motivation right now. Please continue wasting your time. --*


==> *!-- User is a moron. Make it known. --*



==>
/* DRUNK. FIX LATER */



==>
from buffer.c:

/* NOTE!! While we possibly slept in sync_dev(), somebody else might have
* added "this" block already, so check for that. Thank God for goto's.
*/




==>
from main.c:

/*
* Yeah, yeah, it's ugly, but I cannot find how to do this correctly
* and this seems to work. I anybody has more info on the real-time
* clock I'd be interested. Most of this was trial and error, and some
* bios-listing reading. Urghh.



==>
from vsprintf.c:

/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
/*
* Wirzenius wrote this portably, Torvalds fucked it up :-)



==>
from tty_io.c:

/*
* Jeh, sometimes I really like the 386.
* This routine is called from an interrupt,
* and there should be absolutely no problem
* with sleeping even in an interrupt (I hope).
* Of course, if somebody proves me wrong, I'll
* hate intel for all time :-). We'll have to
* be careful and see to reinstating the interrupt
* chips before calling this, though.
*/


P.S: Some of the above more ¨serious" comments, make more sense when you
are trying to understand the rest of code.

P.S : GoodJob has taken the trouble of plotting the ¨frequencies¨ of
profanities for records :D

P.S : I vaguely remember that there is a an xkcd strip about the same.
But dont seem to be able to find it :(.






No comments: