Author Topic: Google Code Search -- Find stupid programming!  (Read 3537 times)

0 Members and 1 Guest are viewing this topic.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Google Code Search -- Find stupid programming!
« 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 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:
Code: [Select]
int i = *(int*)&x;       /* get bits for floating value */
i = 0x5f375a86 - (i>>1); /* what the fuck? */
 x = *(float*)&i;         /* convert bits back to float */

Code: [Select]
# deep deep badness
Siesta->log("holy shit, a listadmins mail is bouncing, so we can't tell them about it!");
return;

Code: [Select]
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" };

Code: [Select]
if (! ref $phases) {
# holy crap, that actually worked!
$phases = [map(eval "$_", _path_to_array($phases))];

Offline BigAznDaddy

  • Hero Member
  • *****
  • Posts: 2163
    • View Profile
Re: Google Code Search -- Find stupid programming!
« Reply #1 on: October 09, 2006, 09:40:18 pm »
thats cool   ;D
never would have thought of that


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Google Code Search -- Find stupid programming!
« Reply #3 on: October 11, 2006, 09:59:09 am »
Another funny line to search for: Windows Sucks :)

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Google Code Search -- Find stupid programming!
« Reply #4 on: October 11, 2006, 11:25:02 am »
::)