News:

How did you even find this place?

Main Menu

Google Code Search -- Find stupid programming!

Started by iago, October 09, 2006, 09:34:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iago

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 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))];


BigAznDaddy

thats cool   ;D
never would have thought of that


iago


Sidoh