Code research made fun
-
Totally hilarious some of the code snippets our friend G00gle finds, amazing how many people comment that their code (or some caveat of a language, or the weather) sucks.
http://www.google.com/codesearch?hl=en&lr=&q=%22this+sucks%22&btnG=Search
We can probably find a ton of CodeSOD's and whatnot all over the place in just those results (approx. 5,000 results for that phrase).
Another good one:
http://www.google.com/codesearch?q=fuck&hl=en
And the classic:
http://www.google.com/codesearch?q=%22this+code+sucks%22&hl=en&lr=
Check out the 7th one down. Great for a laugh & 0.5!
BTW: Thanks to David in this post for clueing me in on the nifty G00gle code search.
-
ARGH! I hate not being able to edit my own posts!!!
Almost forgot to include the best one yet:
http://www.google.com/codesearch?hl=en&lr=&q=%22+WTF+%22+-%22%23ifdef+WTF%22
Helps you find that WTF-ey code (minus some common #ifdef jonx).
This aughtta keep Alex /Tim/Derrick busy on the CodeSOD's for quite a while...
-
-
You must be new here. We've had quite a few threads on this already.
-
i've been around for a while, just always musta missed this. highly amusing to me at this moment so i thought i'd repost it.
FWIW: someone should code an auto CodeSOD based on these search results. It could randomly generate background stories to things and then just stick some of the code it finds in the body... an Alex-bot!
hmmm....
-
My favorite:
long fuck = 99;
So that's the secret to getting a long fuck! Now if only we knew the units...
-
My Favorite. Maybe.
559: # by calling $self->type in a void context (which reblesses the object)
# and then calling $self->script again. I think this sucks, but then
# again this code shouldn't be called that often. Maybe.
-
What about these?
[url=http://www.google.com/codesearch?hl=en&lr=&q=%22what+does+this+do%22]http://www.google.com/codesearch?hl=en&lr=&q=%22what+does+this+do%22[/url]
[url=http://www.google.com/codesearch?hl=en&lr=&q=%22what+have+I+done%22]http://www.google.com/codesearch?hl=en&lr=&q=%22what+have+I+done%22[/url] This one's my favorite
-
A lot of these seem to be coming from something called horde-groupware. Much less, from its XML handling. And it's nearing production (1.0rc1). Quick, we need to kill this before it sees daylight!
-
a good one for our friends across the pond (if you're stateside)
http://www.google.com/codesearch?hl=en&lr=&q=wanker&btnG=Search
-
brilliant!
http://www.google.com/codesearch?hl=en&lr=&q=%22stole+this+code%22
even better - thief!!!
-
http://www.google.com/codesearch?hl=en&lr=&q=%22oh+dear%22&btnG=Search
I found some funny ones with this.
-
"I don't know why this works" - always a horrible feeling. Bad enough when you've just fixed a problem by poking at it until it goes away, but even worse when you realise that your code is horribly muddled and entirely wrong, but somehow still functions (case in point: I'm working on a (primitive) collision detection system, and one of my checks involved iterating over an array of coordinates ... except I forgot that they were stored in groups of three, so two out of every three coords would be entirely wrong. This would have been fine, if it weren't for the fact that my unit tests were still passing happily...)
-
Here's another good one: http://www.google.com/codesearch?hl=en&q=+%22what+did+I+do%22+-%22what+did+I+do+wrong%22&start=10&sa=N
Returned a diary of an insane coder, among other amusements:
"uigtk/uigtk.c: think i might stop coding soon... this is all
proving too much. right what did i do? ok i like updated the
todo file to say that i havn't updated the todo file, and"