Google Code Search - Now you can search the Bathroom Wall of Code
Everyone is agog about Google searching code.
I find the language detection stuff to be really interesting. Are they using heuristics or just the file extension to figure out what language the code is? Probably extensions, but it'd be clever if they also used code keywords to guess.
One point that I think should be addressed by a future version is tuning of relevance data. If you search for DasBlog (not a really valid code search), you'll find folks that reference DasBlog libraries, and source inside ZIP files, but not the ACTUAL source at the ACTUAL location. It'd be nice to see them understand where the authoritative source of source is.
A few advanced tricks are:
- Restrict search to "C"-based languages
- Avoid GPLed code
You can also include Google Code Search on your own side as a GDATA (~GoogleRSS) feed. However, you can't restrict code searches by site using site: which is a bummer and limits its usefulness. I'd like to be able to have folks search for source on my blog.
Be sure to read their Google Code Search FAQ if you want to block them (robots.txt) from crawling your code.