5 Oct
Via ValleyWay: Google will launch a source code search engine tonight
Google will launch a search engine for source code tonight, but journalists informed of the launch agreed to a press embargo until 9 PM.
Well, it’s live right now. The homepage has a list of possible searches, with full regular expression support. You can limit to only one language too using the lang: prefix, e.g. lang:”c#”. As you can see from the 1st result, it’s not perfect. Pretty nice though. It’s also really funny to see what people put into their comments:
So many developers who feel the need to apologise for their code.
There’s an odd bug if you go to the end of the search results too. For example, if you do an lang:c# search it says there’s around 87,300 results. But once I get to page 14, results 131 (of 92,000 now), it won’t let me go any further. It doesn’t say anything about a supplemental index, but I assume that’s what’s being hit here. Just odd that there’s no message at all, it increases the ’start’ querystring value, but the page doesn’t change. Oh well, this one hasn’t even made it to perpetual beta yet, it’s still in the labs.
Update: There’s already a Mycroft search engine available for it too.
It’s a top idea anyway, and if it does what it’s supposed to, it will really help. For instance, I was looking for a binary search method in c# the other day, and I could have just done this: lang:”c#” binarysearch. Nice.
tags: Google, Programming, Code, Source Code, Code Search
10 Responses for "Google Code Search"
What do you think of all the Wordpress database info popping up? Pretty scary. How is that stuff getting indexed?
Well, if people leave their source code lying around in plain text, that’s just stupid. Google can’t index code that’s being processed, this code would have to be left in a folder that doesn’t process php files.
I figure if you’re silly enough to leave real db access info in plain text, you deserve what’s coming to you!
Something else to note is that putting code into a zip file doesn’t stop it from being indexed : http://www.google.com/codesearch?q=show:cF4R5AgHIXc:mjPVvA167xI&sa=N&ct=rdl&cs_p=http://static.wordpress.org/archive/wordpress-1.2-beta.tar.gz&cs_f=/wordpress
Seems google is indexing into zip files. Dunno if that’s exactly what people would expect. Still it’s not like zip files are encrypted, and if you leave it sitting in a publicly accessible folder…
True… but I was able to find the info of some pretty well known blogs. Wonder if anything will come of it.
I imagine so. I think the indexing of zip files is likely to cause the most complaints. The normal google search doesn’t do that does it?
What do you think of all the Wordpress database info popping up? Pretty scary. How is that stuff getting indexed?
Well, if people leave their source code lying around in plain text, that’s just stupid. Google can’t index code that’s being processed, this code would have to be left in a folder that doesn’t process php files.
I figure if you’re silly enough to leave real db access info in plain text, you deserve what’s coming to you!
Something else to note is that putting code into a zip file doesn’t stop it from being indexed : http://www.google.com/codesearch?q=show:cF4R5Ag...
Seems google is indexing into zip files. Dunno if that’s exactly what people would expect. Still it’s not like zip files are encrypted, and if you leave it sitting in a publicly accessible folder…
True… but I was able to find the info of some pretty well known blogs. Wonder if anything will come of it.
I imagine so. I think the indexing of zip files is likely to cause the most complaints. The normal google search doesn’t do that does it?
Leave a reply