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.
"it's given lots of flashlights to people interested in exploring dark corners."
They say sunshine is the best disinfectant. More eyeballs can fix problems as well as exploit them.
Paleotechnologist and connoisseur of pretty shiny things.
So that's where I left that rant about the inherent inferiority of asian people, and my treatise on how someday the aardvaarks will be the dominant form of life on earth (after they eat the asians).
... and then they built the supercollider.
"Windows Sucks"
--
Go Where Web Thinkers Gather
Watch the Teaser Trailer for "The Lightning Thief" Her
Zork nostalgia, anyone?
Paleotechnologist and connoisseur of pretty shiny things.
"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."
Mulder would have liked Google.
Ten pages of righteous anger
Why didn't I keep on programming?
It also inspired Number of fucks per programming language and license.
This is a fairly amusing one.
I like the memset search on that page too... scary. People need to run Lint or something. (Will Lint pick up that error?)
http://google.com/codesearch?hl=en&lr=&q=%22penis% 22&btnG=Search
Sorry.
You mad
...code searches *you*!
Paleotechnologist and connoisseur of pretty shiny things.
All your base :-D
"I don't know what the problem was. But whatever it was, it's now fixed."
I was not drunk when I wrote this; that's just some immature coder making fun of me.
Granted, being drunk is about the only valid excuse I could make for only initializing half of a doubly-linked list node . . .
http://www.google.com/codesearch?hl=en&lr=&q=%22us e+the+force%22&btnG=Search
Its my assesment that shining light on dark corners fits into the category of their "do no evil" motto.
+"FIXME" +"sql injection"
If you know it's a problem, why don't you fix it before you publish???
http://google.com/codesearch?hl=en&lr=&q=bill+gate s&btnG=Search BILL GATES
"This is a Bill Gates so use with discretion."
"BOOL is tri-state according to Bill Gates."
"/* Ask Bill Gates what this is all about. */"
About your signature: Your signature is very much a signature, whearas a painting of a pipe is very much not a pipe. If you had typed it by hand each post, that would be the spirit of the painting, but I do believe it is a signature, as when I reply I do not see it.
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?
I recall a professor in college saying "George Bool put all of his theory on one page and they used to call it the bool sheet".
Who said programming was easy? http://google.com/codesearch?hl=en&lr=&q=%22kill+m e+now%22
I didn't see these two in the article, or a quick check of the comments so far (as clearly they are the two most useful tools in a programmers arsenal):
Magic and more magic
It's not suprising that PHP is the leader in that category.
Of all the PHP developers I've met or known of, I can break them down into two groups. One is the talented developer who is stuck using PHP because some idiot manager told him or her to. This sort of a person would likely use the word "fuck" to describe the horrors they encounter daily while using PHP.
The second type is the immature, know-it-all 13-year-old brat who read a PHP tutorial online, and now thinks he's a professional programmer. People like them lack the professionalism, and think it's "cool" to pepper their code with obscenities.
Where exactly does all this code come from? Will this be much more useful than regular search, as most good code on the net is easy to find? Will this just shine a flashlight on junk?
The government can't save you.
No one should ever have to see this.
Don't thank God, thank a doctor!
This is my favorite from the article: The phrase "should be big enough" should never be seen alongside statically allocated arrays.
http://google.com/codesearch?hl=en&lr=&q=%22they+k illed+kenny%22&btnG=Search
Excuse me, but please get off my Pennisetum Clandestinum, eh!
I was surprised to see that 'security hole' brought up a neat collection of ... errr.. security holes.
Imagine if your boss found out what you think of kittens!
http://google.com/codesearch?q=%22the+truth+is+out +there%22&btnG=Search&hl=en&lr=
Excuse me, but please get off my Pennisetum Clandestinum, eh!
How long before SCO files a third amended counterbrief to IBM's second interrogary motion for relief claiming new evidence of infringement after one of their marketing boys tries 'Linux Santa Cruz Operation' after reading about Google Code in the WSJ?
.sig: Now legally binding!
"Pity the fool" :-)
Hexy - a strategy game for iPhone/iPod Touch
Fun search terms to use are "Non Disclosure Agreement"
Good times, good times.
http://google.com/codesearch?hl=en&lr=&q=%22allah+ akbar%22&btnG=Search
Excuse me, but please get off my Pennisetum Clandestinum, eh!
With all the flashlights I don't see any dark corners no more.
But this won't help so much with bugs, as bugs usually show up in the running of code.
For a good time --% 22&btnG=Search&hl=en&lr=
n g+crack%22&btnG=Search
% 22&start=10&sa=N
m e%22&btnG=Search
y +shorts%22&btnG=Search
http://google.com/codesearch?q=%22for+a+good+time
Who's smoking crack?
http://google.com/codesearch?hl=en&lr=&q=%22smoki
Can't get enough:
http://google.com/codesearch?q=+%22fuck+me+harder
Like an Electrolux!
http://google.com/codesearch?hl=en&lr=&q=%22suck+
Finally, eat this:
http://google.com/codesearch?hl=en&lr=&q=%22eat+m
If you post it, they will read.
Search results coming out a bit strange. for example:r ipt))\ ((sucks)|(stinks))\W 30,800 results
r ipt)|(asm))\ ((sucks)|(stinks))\W 50 results
\W((java)|(python)|(php)|(C(\+\+)?)|(asp)|(javasc
\W((java)|(python)|(php)|(C(\+\+)?)|(asp)|(javasc
In other words, either they're cutting off their reg-exs for some reason (based on length, time for computation, etc), or my regular expressions are getting a bit rusty, or their reg-ex engine needs a bit of work -- I sorta want them to put the Code Search code on Code Search, just so I can do the Buffer search and see if it comes up.
See here for an explanation (from the horse's mouth, as it were...)
Dark corners? Of course, we can find them too
Luke ...
Your search - "firefox sucks" - did not match any documents.
Did you mean to search for "IE sucks"?
Seriously though -
Search: "IE sucks"
Results 1 - 10 of about 30,200.
Search: "firefox sucks"
Your search - "firefox sucks" - did not match any documents.
Would someone please let me know if they find out how to trigger multiline mode regex in Google Code Search. Ta.
Me lost me cookie at the disco.
I thought there'd be a quiz later:
you are not expected to understand this.At first, crawlers/bots/etc would search for plaintext emails, now that they can easily search mass quantities of code, wouldn't this make it easier for crawlers to find emails hidden in code also? I have little to no idea what i'm talking about, but this is a bad thing, right?
You forgot goatse. Lots of goatse.
Table-ized A.I.
1. Read Slashdot
2. Search Google Code
3. ???
4. Profit!
Google shows me SCO source?
Linux violates 235 Microsoft patents.
Couple of bugs in there, one in mozilla/security...
lang:c ^\s*if\s*\([^=\(\)]*\s=\s[^=\(\)]*\)
My favorite group is programs that contain "Arrrgh!".
The "lameness filter" totally ruined this post...
Sendou Wave Kick!!
bad_words = ['asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit'] # all in lower case .......
raise ValidationError, ngettext("Watch your mouth! The word %s is not allowed here.",
"Watch your mouth! The words %s are not allowed here.", plural) % \
Ha! Assheads
Dammit! I had a good one.
You can find a lot of dark corner's.
OMG!! PONIES!!!
A witty signature proves nothing
Interesting to note the Slashdot editor didn't run with my original headline: "Google Code Search Reveals the Evil of all Source"
http://google.com/codesearch?q=%22solaris+sucks%22 &btnG=Search+Code
...although I can't find 'Fucking McNealy...'
goto Results 1 - 10 of about 939,000 ... not as bas as expected.
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!
That was exactly what Microsoft developers thought.
Remember when their stolen code surfaced? It was laced with "fuck", "shit", and other swear words.
These could be of special interest malloc(strlen(\w+));
and these new char[strlen(\w+)];
http://google.com/codesearch?hl=en&lr=&q=%22do+the +needful%22&btnG=Search
I sure like the regular expression search! Too bad you can't search the whole WWW using regex's.
I wonder how (or if) they guard against very cpu-hungry regular expression strings?
"python sucks": Results 1 - 10 of about 20. (0.02 seconds)
"perl sucks": Results 1 - 10 of about 32,900. (0.01 seconds)
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
...it should be hard to understand.
It appears that several programmers like history. But not everyone loves Ben Franklin.r anklin%22&btnG=Search
http://google.com/codesearch?hl=en&lr=&q=%22ben+f
search: "Copyright (c) 2006 Microsoft Corporation"
audiofile-0.2.6/test/testaupv.c - 10 identical
45: long fuck = 99;
Awwww yea..... makes me want to go off and write some code right now.
Goto in C isn't necessarily evil... I've used it quite a lot of times to break from nested loops (like a "break", but a double/triple/... break, which doesn't exist in C but exists in Java for example).
The AACS key is NOT 0xF606EEFD628B1CA427BEA93A9CA9773F
There you have the proof. No one uses Python :-)
There's something especially gratifying about this graph flipping us all the bird.
W
-------------------
This is my SIG. There are many like it, but this one is mine.
Gentlemen (and women- both of you), I present to you: gets(). Much of it is in test code. Much of it is not. I cringe in horror.
Human? What makes y'all think I'm a human?
returns about 32,800 apparently
i s+a+hack%22&btnG=Search
http://google.com/codesearch?hl=en&lr=&q=%22this+
If you don't risk failure you don't risk success.
long fuck = 99;
Select SigText from Signatures where Len(SigText) > 120 Order By Len(SigText) desc
hizzzlarious
Search for "you moron" and Google won't let you past page 2! It's like something in the 2nd page of the result set is screwing up the generated HTML.
http://www.google.com/codesearch?hl=en&lr=&q=%2B%2 2by+a+grue%22
// You are surrounded by conditional-compilation code, all alike. // You are likely to be eaten by a Grue...
My favorite is:
866:
[Test]
Just because you can mod me down, doesn't mean you're right. Shoes for industry!
Be here
Could someone explain why that memset code (setting last argument to 0) is a bug?
I hold it, that a little rebellion, now and then, is a good thing. -- Thomas Jefferson
debug only
Although I imagine it was already posted in the earlier code search password discussion...
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
I think very deeply
i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
pity the fool!
Looking at some of the results that google code is returning I cannot understand how it is possible that some companies place internal code online. I am in favor of Open Source so I think companies should share more code but before you do so you might want to check some things. Like bulls*t comments from coders, passwords, private internal addresses etc etc..
Those kinds of things should be sifted out of the code before making it available to the public. Looking at these results it looks like a lot of companies do not have a good policy for these kinds of things.
Regards,
Johan Louwers.
Regards, Johan Louwers.
\s+arghhh predictably appears in a lot of comments, but suprisingly is also a large number of variables/classes/identifier-of-some-kind!
* http://google.com/codesearch?hl=en&lr=&q=%22fix+th is+later%22&btnG=Searcht +right%22&btnG=Searcho w%22&btnG=Searchw ere+you+thinking%22&btnG=Search
* http://google.com/codesearch?hl=en&lr=&q=%22fix+i
* http://google.com/codesearch?hl=en&lr=&q=%22for+n
* http://google.com/codesearch?hl=en&lr=&q=%22what+
Keep the Classic Slashdot.
http://google.com/codesearch?hl=en&lr=&q=%22this+s ucks%22&btnG=Search
stuff |
Heh! And we all thought nobody would ever see those snide comments we left in the code. Perhaps the next version of Visual Studio will include a profanity filter. Is there an Eclipse plugin for this? Sounds like a fun afternoon project!
To the making of books there is no end, so let's get started
I mean, I'm not a coder, I'm an engineer who can program somewhat. Thing is, I might have a construct that should be all-inclusive but I'll still put in a catch like that just in case something sneaks by that I didn't consider.
Yes, I know, exception handlers...but it is possible to go overboard with those. If I can manage it, I like to see all my causes and effects accounted for.
{which might just give me away as not being a professional programmer}
A goal is a dream with a deadline
All the holes already existed, and were searchable using other code search engines. This blogger didn't magically create them.
http://google.com/codesearch?hl=en&lr=&q=sballmer& btnG=Search
arg
http://google.com/codesearch?hl=en&lr=&q=%22how+th e+hell%22&btnG=Search
Te audire no possum. Musa sapientum fixa est in aure.
Which one of you all is Andy Church? And why does Andy Church drunk return 1000 results?
Your sig(k) has been stolen. There is a puff of smoke!
I was hoping that this search would return no hits, but I wasn't surprised by how many people concatenate '19' with the value from tm_year. Hey, it's only 19106!
malloc(strlen + 1)?
And then there's another, and I look it up, and it turns out to be a response to a reverse engineering challenge. It makes sense that they include the password of the computer that they're intentionally compromising, in the program.
Another resolves the backdoor password to "BACK_DOOR_PASSWORD," which, searching the rest of the code for, has no definition. It's likely defined with a compile-time macro definition.
There was one or two I saw where I think concern is legitimate, but it was by no means as impressive as the first impression leaves.
Sorry had to... Read the first result: http://www.google.com/codesearch?q=coconuts
For a couple minutes of code-search fun try searching some of your favorite TLAs & explitives. For example, search for "wtf" and feel the pain of a few devs.
Just think - currently most large employers google an employee as well as checking the major social networking sites, to determine if there's something about the person they don't want. Now an employer could use google code search to measure an applicant's code writing ability/discression.
Genius is one percent inspiration and 99 percent perspiration, which is why engineers sometimes smell really bad.
Its good to see that those software engineering classes are paying off
http://www.google.com/codesearch?q=+%22hail+eris%2 2&start=10&sa=N>Hail Eris!
All rites reversed 2010
And in the "know your language" category: sizeof(char).
My favorite query so far is "piece of shit"
;; #### this is a horrible piece of shit function that should ;; not exist. In FSF 19.30 this function has gotten three times ;; as long and has tons and tons of dumb shit checking ;; special-display-buffer-names and such crap. I absolutely ;; refuse to insert that Ebolification here. I wanted to delete ;; this function entirely but Mly bitched.
Lotsa Gems. Like this one from the first page of results:
I found my favorite comment in the source for ReiserFS:
"I'm going to kill that BITCH!!
http://google.com/codesearch?hl=en&lr=&q=%22I+am+a n+idiot%22&btnG=Search [google.com]
http://www.google.com/codesearch?hl=en&lr=&q=phpar adise&btnG=Search
default password is
That's doubleplusungood!
The Tao of math: The numbers you can count are not the real numbers.
http://www.google.com/codesearch?q=%22All+your+bas e%22
http://www.google.com/codesearch?q=%22are+belong+t o+us%22
http://www.google.com/codesearch?q=AYBABTU
(Repeating for benefit of the excellent comment posting as AC)
This one always tickles me: &array[0].
But that's the best way to use a std::vector as smart array.
Because... if you can't laugh, you can't live. Or Something
Cool! Amazing Toys.
http://www.google.com/codesearch?hl=en&lr=&q=%22po rn%22&btnG=Search
I feel dirty
PHP Sucks
u cks%22&btnG=Search
http://google.com/codesearch?hl=en&lr=&q=%22php+s
Freaking fix the freaking array freaking implementation in the sucking PHP. Implement the freaking offset array and speed up my freaking apps 80%. I dont want to buy a freaking 16-way MIPS server because PHP crawls slower than a freaking turtle.
Hey, it had to be said.
goatse and tubgirl
Unfuckingbelievable for the German "Unglaublich" :)
Interesting comment:
http://www.google.com/codesearch?hl=en&lr=&q=%22no +donut%22&btnG=Search
I could write a book with this! The title? Secrets of Programming!
(T>t && O(n)--) == sqrt(666)
My boss
What?
I like how a bunch of those are just debug statements to see if that code is even run. I feel so bland just using "test".
It's scary being a Flash and Flex developer on Slashdot. You guys are unnaturally rabid.
Lots of 'em!
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
In French the word "pipe" is slang for blowjob.
Sometimes my arms bend back.
http://www.google.com/codesearch?hl=en&lr=&q=%22I+ need+sleep%22&btnG=Search
If they made a movie of your life, would anybody buy a ticket?
At least you didn't whine like a little bitch again about being modded to hell.
Maybe your account wouldn't be permanently fucked up from assholes modding you as a troll, if you'd stop trolling.
Oh you can also search on merobase.com and find lots of code and dark corners :-)