Tagged: code

Source code search engines


Lazy people like me are often looking for re-usable components and libraries to do the hard work for them. While a combination of Google, Freshmeat and Sourceforge usually gets the job done, the process can be made much more painless with a dedicated source code search engine.

The very first search engine that I ran into was [[http://koders.com|Koders.com]]. I haven’t used it very much, but it looks pretty cool. Searching for “java hash map” will return a list of Java files having a map or a hashmap, //and// show the relevant code snippet for context. Each search result also has links to the corresponding project and the source file.

//Edit: I had written up a whole bunch when I accidentally pressed Ctrl-W and closed the window. Dang! Can’t wait for some drafts like feature in WordPress.//

A new entrant in this arena is [[http://krugle.com|Krugle.com]]. You can think of it as the Web 2.0 version of Koders.com. Krugle is not open to the public yet, so I couldn’t test it out. You cn get some idea of the functionality by [[http://krugle.com/product/|looking at the screenshots]]. Functionally, I can’t find too many differentiating features, the one exception being the ability to save/share searches.

Finally, there is [[http://gonzui.sourceforge.net/|Gonzui]] — its essentially a desktop version of source code search engines. So instead of going to some website, you just download and run Gonzui on your own. Seems to be a waste of resources, but the advantage is that you can customize and filter the projects you actually want to search in. This might be particularly useful if you need to frequently search code of a small number of projects. But then why wouldn’t I use something like cscope/ctags instead?

It seems like the [[http://raa.ruby-lang.org/|Ruby Application Archive]] is using Gonzui to provide a [[http://raa.ruby-lang.org/gonzui/|search interface]] for projects it hosts/lists. I guess thats one way to use Gonzui, specially if RAA denies services like Koders or Krugle the right to index their code. Though given that a lot of this code is freely downloadable, it doesn’t seem likely its possible to do that legally.

Projects

Most of my new code can be found on Github.
  • gaestebin: a secure, private pastebin for Google App Engine
  • uBoggle: the best way to play Boggle online! (taken offline because of.. ahem..)
  • ucsd-thesis: A LaTeX class to typeset thesis for the University of California, San Diego

WordPress related

Python

Random

Old/Abandoned Projects

  • Starfish: a Java based password manager.
  • JUnC: a Java compiler written in Java.