You are here

Code Search Engines

Does anybody use them? Chris just blogged about a new one, Krugle and while it does indeed look neat besides the horrible colors, and incorporates all the appropriate trends -- to the point of outrageousness, actually, look at their blog's sidebar -- I've never actually heard of a developer using a code search engine (Koders has been around for quite a while) that wasn't the LXR for a specific project.

The idea seems fairly sound at first glance, let people find other code, but the issues that seem to prevent it from ever working for me are:

  • I am usually looking for a best practice around a specific area or pattern and besides ones with specific names I'm not really sure which keywords I would use. And, if I know the specific name I probably already found the best practices for it in one of the ActiveState cookbook pages, including commentary and alternate methods.
  • I may be strange in this, but I generally keep the source to any project I deal with on an even casual basis checked out on my machine, which usually means a slow, though not often as slow as loading up a webpage and scanning search results, grep of their source will do the trick. This is also the area where LXR excels.
  • As with the previous point, if I find a useful idea in a project, say a module system that I think is innovative or a nice command-line interface, I will also grab the source.

Aside: Interestingly enough, this is one of the main features for which I value Flock, we are doing full-index history search of the pages you visit, and if you are like me those include an awful lot of code and documentation. So Flock feature/extension idea: either heuristically mark pages as code/documentation so that the search can bring them up as such and they won't fall off your history, or provide a button to do so, the star works but I want one that distinguishes something as a doc, maybe. It would also be nice to be able to query indexed data from the command-line, though I guess I could keep local copies of these things and write a pylucene interface to query with. Maybe I'll incorporate that into workspace. Oh dear, this is quite aside now.

So, anyway, has anybody used a code search engine and liked it?

Technorati Tags: , , ,