Clan x86

Technical (Development, Security, etc.) => General Programming => Topic started by: iago on October 09, 2006, 09:34:33 PM

Title: Google Code Search -- Find stupid programming!
Post by: iago on October 09, 2006, 09:34:33 PM
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))];

Title: Re: Google Code Search -- Find stupid programming!
Post by: BigAznDaddy on October 09, 2006, 09:40:18 PM
thats cool   ;D
never would have thought of that
Title: Re: Google Code Search -- Find stupid programming!
Post by: Joe on October 10, 2006, 07:51:39 AM
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
Title: Re: Google Code Search -- Find stupid programming!
Post by: iago on October 11, 2006, 09:59:09 AM
Another funny line to search for: Windows Sucks (http://google.com/codesearch?hl=en&lr=&q=%22windows+sucks%22&btnG=Search) :)
Title: Re: Google Code Search -- Find stupid programming!
Post by: Sidoh on October 11, 2006, 11:25:02 AM
::)