Google Code Search Reveals Dark Corners
saccade.com writes, "The new Google Code Search isn't just for hackers sniffing for passwords. Jason Kottke and friends have discovered the new feature reveals all sorts of dark corners hidden in our code. And you thought nobody ever read your comments!" From the article: "Code search is a great resource for web developers and programmers, but like the making available of all previously unsearched bodies of information, it's given lots of flashlights to people interested in exploring dark corners."
Google seems to inspire this kind of behaviour for some reason. The have been lots of websites like krugle who search a big db of code, and these things didn't come up until google launched this.
Indeed!
Moderator hint: a comment is neither "Flamebait" nor "Troll" if it is true.
Zork nostalgia, anyone?
Paleotechnologist and connoisseur of pretty shiny things.
Why didn't I keep on programming?
It also inspired Number of fucks per programming language and license.
Hehe...I read that and I was like "Who in the heck is Andy Church?" and "I've got to treat this guy to a pint!" You rock, Mr. Church.
Instead potential employers (like me) can google your code and read those comments that you wrote in there. Don't worry though... I won't hold those against you.
Anyway, "unless you really know what you're doing" and "smoking cracK" are also fun searchesa over there...
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
This is my favorite from the article: The phrase "should be big enough" should never be seen alongside statically allocated arrays.
See here for an explanation (from the horse's mouth, as it were...)
I have to say, the search for incorrect use of C's memset really cracked me up. One instance after another of code which doesn't do a thing!
These could be of special interest malloc(strlen(\w+));
and these new char[strlen(\w+)];
Oh, we can do much better. Here are some favorites:
"guy who wrote this" "in case some idiot" "ugly hack" "rewrite this later" "hail mary" "this shouldn't work" "compiler happy" "what the fuck" "blows goats"
And I really love this one: i=i++
This is not sad, it's scary!
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.