This was originally part of my other thread on the security board, but I decided to separate it.
Basically, it's a contest.. find the funniest code snippits with clever Google Code Search (http://www.google.com/codesearch) searches. Here is a thread that discusses a lot of them:
http://thedailywtf.com/forums/thread/94630.aspx
And here are some of my favorites:
int i = *(int*)&x; /* get bits for floating value */
i = 0x5f375a86 - (i>>1); /* what the fuck? */
x = *(float*)&i; /* convert bits back to float */
# deep deep badness
Siesta->log("holy shit, a listadmins mail is bouncing, so we can't tell them about it!");
return;
if (!strcmp(ft->UID, FILE_SEND_UID)) {
/* holy crap. who the fuck would transfer gigabytes through AIM?! */
static char *sizes[4] = { "bytes", "KB", "MB", "GB" };
if (! ref $phases) {
# holy crap, that actually worked!
$phases = [map(eval "$_", _path_to_array($phases))];
thats cool ;D
never would have thought of that
http://www.google.com/codesearch?q=+SID_AUTH_INFO+show:vybhVx4-bW0:9lz7IuD-yeA:Y6qHPj5_C3A&sa=N&cd=2&ct=rc&cs_p=http://www.liquid-server.org/stuff/javaop149.zip&cs_f=src/bot/util/CheckRevision.java#a0
Another funny line to search for: Windows Sucks (http://google.com/codesearch?hl=en&lr=&q=%22windows+sucks%22&btnG=Search) :)
::)