Google code search

Sunday 8 October 2006This is over 16 years old. Be careful.

Google announced Google Code Search the other day. It’s the Google search engine, but pointed at chunks of source code rather than at web pages. Koders and Krugle have both been doing this for a while, but it’s interesting to see how Google’s take on it differs.

Right off the bat, it looks like Google gives more results, but they are not always as useful. My first test search was for, what else?, my name. Google’s returned 192 results, but many were lexicons for natural language parsers, where ‘ned’ appears at the end of ‘aforementioned’. Koders returned 3 results, and Krugle returned 17. One immediately noticeable difference is the Google is finding code wherever it may be, while the other two are only looking in known code repositories. For example, Google found the zip files on my site where I distribute code, while the other two did not.

Krugle has more features, for example, the ability to limit search to comments, or to function definitions. I haven’t used it enough to know whether that will be helpful or not, but it is cool to see that they parse the code deeply enough to provide the feature. Krugle also has an Ajaxy interface, which seems like overkill for a search engine. If I get used to it, it may be really nice, but it breaks all my habits in dealing with search engines and their results. On a non-search-related note, they have hip help-wanted ads on their site:

another reason not to work at krugle:
you like to set the bar low & surpass expectations with average work.

Overall, Koders seemed like the poor relation, with the fewest results and the fewest features.

One more thing: Jason Kottke has a list of interesting stuff (like passwords!) that you can find out with Google code search.


I found that all three will leave out some results if you search on your full name. I tried the same thing and found that if I searched for my last name by itself, I'd get results for bits of code of mine that didn't show up when I searched for my full name despite the fact that they ought to have. Odd, that.

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.