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.
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
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???
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
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.
Or, it could just be that there are a lot of cross platform web pages written in PHP, and every browser has its own "fuck"ing way of doing things, most of which mean a lot of time peicing together a kludge. PHP is nearly used only for websites, whearas Python and Perl are used for many other things. Javascript is client side, so there would not be a lot of comments, let alone comments with obscenities.
I have freaks! I did something right...
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!
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
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[^=\(\)]*\)
That and PHP is used for a lot of bulletin boards, forums, etc - the majority of those "fuck" counts would be on swearlist fliters hardcoded in.
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.
Yeah, true, there seem to be a lot of word lists, and that probably is the majority. Seems odd that they wouldn't be kept in a plaintext or database though.
However, have you seen the comments complaining about how broken IE is?
I have freaks! I did something right...
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"
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!
These could be of special interest malloc(strlen(\w+));
and these new char[strlen(\w+)];
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
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.
You incult clod, if the GP said it it was because the GGP's sig is a reference to a painting of an apple that says "Ceci n'est pas une pomme" ("This is not an apple") because it's not an apple but really a painting. The GP was pointing that the GGP's sig was actually a signature although it claimed not to be one, and thus that it didn't fit the spirit of the painting it was refering to, and that it would have been more like the spirit of it if instead of having it to be an actual sig, it was something he pasted at the end of every of his posts to make it look like a sig. It would look like a sig, but it wouldn't be one.
You just got troll'd!
long fuck = 99;
Select SigText from Signatures where Len(SigText) > 120 Order By Len(SigText) desc
Happens in capitalist America too, so where's the joke?
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
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!
Horrors! Notify the Pope!
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
Ah yes, India's contribution to the English language. *sigh*
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
That's odd, but I've seen "regular" Google searches get the page count dramatically wrong.
Maybe code, for some reason, really throws off the estimate. Assuming it's an estimate.
I can get to page 3, FWIW.
Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005
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 ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
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.
I think you mean Magritte's "The Treason of Images" which has a label reading "Ceci n'est pas une pipe" under a picture of a tobacco pipe. Not sure where the apple came from...
[
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
http://www.abcgallery.com/M/magritte/magritte26.JP G
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!
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
Not sure where the apple came from...
n OfMan.jpg
Probably from Magritte's son of man painting, I'm guessing.
http://en.wikipedia.org/wiki/Image:Magritte_TheSo
...no two people are not on fire.
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.
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.
http://ist-socrates.berkeley.edu/~timothyv/images/ magritte.jpg
http://ideiasemdesalinho.blogs.sapo.pt/arquivo/La% 20Promesse_Rene%20Magritte.jpg
http://www.ariadne.org/studio/michelli/magritte.jp g
http://www.latal.de/char/magritte.jpg
And my personal favorite and current background wallpaper:
http://www.ap.stmarys.ca/~smuaps/quotes/Magritte/M agritte,%20Ren%E9%20(Belgian,%201898-1967)%20-%20L e%20Beau%20Monde,%201962,%20oil%20on%20canvas,%20p rivate%20collection%20(Small).jpg
"The story so far: In the beginning the Universe was created. This has made a lot of people very angry and has been wide
Lots of 'em!
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
How could I NOT see them? It's no wonder PHP hits the top so quickly with wordlists and anti-IE rants in the same place. .php document, or to pre-organize them into an array so that another PHP script can just include it directly.
Also, there's a tendancy to do silly things like put said wordlists in a
Ceci n'est pas une pomme. Worst is that you got modded up lol.
You just got troll'd!
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?
I believe the link is what makes this tired joke work. It gives examples, using google code search, for the russian joke inserted into code by programmers...
Man their right, when you explain a joke it drains all teh funny.
Oh you can also search on merobase.com and find lots of code and dark corners :-)