Quantcast
Channel: code candies - codecandies.com
Browsing all 25 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

This algorithm sucks

/* FIXME: This algorithm sucks. I need to be shot for  * writing such atrocious code. Grr. */ Source: Direct link to the source code Software: Flood – a profile-driven HTTP load tester Programming...

View Article



Image may be NSFW.
Clik here to view.

yellow pages

/*  * It’s someone else’s. Let our fingers  * do the walking. (Why the fuck do they call it  * the “yellow pages” anyway. They’re white pages  * dammit! If they were YELLOW pages, we could  * say...

View Article

Image may be NSFW.
Clik here to view.

Don’t read this code right after dinner

/*  * Accessing the EEPROM is `interesting’ to say the least  * – don’t read this code right after dinner.  *  * This is all about black magic and bit-banging the  * device… I wonder in what hospital...

View Article

Image may be NSFW.
Clik here to view.

Why are smart people using this?

# WTF is this? http://optionparser.rubyforge.org/ # why are there like 20 differnt option parsers all called # OptionParser!? and seemingly no attempt at # disambiguation. its like an oldskool CPAN...

View Article

Image may be NSFW.
Clik here to view.

smelling like retched cigarette ashes

/* We changed phase but ESP shows bus service,  * in this case it is most likely that we, the  * hacker who has been up for 20hrs straight  * staring at the screen, drowned in coffee  * smelling like...

View Article


Image may be NSFW.
Clik here to view.

feel good today?

/* okay, this is a mess. some 3d apps seem to try being */ /* unique, hello cinema4d & 3d exploration, feel good */ /* today?, and save this crap in tons of different */ /* formats. gah, those...

View Article

Image may be NSFW.
Clik here to view.

Relax

/* uhhh…. i’ve commented this out. it was a great pervertion, i know, but it could result in broken packets, and that’s more f*cking than a simply crash. Relax. */ Source: Direct link to the source...

View Article

Image may be NSFW.
Clik here to view.

Trying to understand this years from now

/* Most of this code was written while watching the Marlins sweep the Giants in the 1997 National League Playoffs – no Braves fans allowed to use this code (just kidding :-). I realize that if I...

View Article


Image may be NSFW.
Clik here to view.

Complicate your code

// To make Flash Storage work on IE, we have to load up an // iFrame which contains an HTML page that embeds the // object using an object tag wrapping an embed tag. // Of course, this is unnecessary...

View Article


Image may be NSFW.
Clik here to view.

this needs to be explained

Thanks to David for this code candy // this needs to be explained!! $this->_searchResult[$type] = $this->_searchResult[$type]; Programming language: PHP Tweet

View Article

Image may be NSFW.
Clik here to view.

out-of-date preferences

# Now bring out-of-date preferences back up to speed # What a nice developer I am, taking care of the # behind-the-times users. :-) Source: Direct link to the source code Software: PilotManager...

View Article

Image may be NSFW.
Clik here to view.

Clean it up

/*  * This code is rather messy, but I don’t have time right  * now to clean it up as much as I would like.  * But it works, so I’m happy. :-) jpw  */ Source: Direct link to the source code Software:...

View Article

Image may be NSFW.
Clik here to view.

God were we wrong

Thanks to Andi for this code candy /** this code does more than necessary. this was because we thought we could leave the parameters optional. god were we wrong… */ Programming language: PHP Tweet

View Article


Image may be NSFW.
Clik here to view.

IE caching for ajax requests

Thanks to dac-xp for this code candy /*  * random number for the shitty InternetExplorer to f*ck  * their caching-system. I hope the programmers of the IE  * caching for ajax requests will die a...

View Article

Image may be NSFW.
Clik here to view.

No exceptions

Thanks to Tobias for this code candy return verify_iban($this->iban); # we could throw exceptions of various types, but why – # does it really add anything? possibly some slightly # better user...

View Article


Image may be NSFW.
Clik here to view.

Distracted by their beards

/**  * Returns the specified integer as a string because the  * designers of C were too distracted by their beards to  * write a lanague that doESNT SUCK ASS F*CK SHIT  */ Source: Direct link to the...

View Article

Image may be NSFW.
Clik here to view.

Vim comments

“vim comments are so f*ckin stupid!! Why the hell do they “have comment delimiters that are used elsewhere in the “syntax?!?! We need to check some conditions especially “for vim Source: Direct link...

View Article


Image may be NSFW.
Clik here to view.

Longest. Comments. Evar.

# FIXME: and this is just plain /wrong/. Naughty naughty # this is why I have to learn some kind of signal creation # techinque. OOOOH OH OH OH , ORRRRRR, I can just pass # in a single callback…? pull...

View Article

Image may be NSFW.
Clik here to view.

2-dimensional array

Thanks to liskel for this code candy // I have absolutely no idea, why it becomes a // 2-dimensional array … so working around instead // of solving $css = $css[0]; Programming language: PHP Tweet

View Article

Image may be NSFW.
Clik here to view.

Jiggery-pokery

# all this f*cking around with unicode and the document # header is to get lxml to STFU. Yeah, this is probably # The Wrong Way(TM), once again, but that’s how I roll, # y0: ghetto-tastic shitball...

View Article
Browsing all 25 articles
Browse latest View live




Latest Images