Sunday, September 30, 2007

Code search engines mini-review

A couple of weeks ago I got sick of searching our codebase with Total Commander. So I went googling for a code search engine. This is what I found:

  • cs2project: (open-source) developed by Simone as an academic project, using Lucene.Net to index. It's very basic as it's still a new project, but looks really promising. For some reason it only indexed 740 files and then stopped. I'll turn on logging later to see what happened...
  • Koders Pro: (commercial) led by Phil Haack, supports over 30 languages and provides lots of statistics. I installed the demo and after the indexing finished, I went browsing and searching and suddenly it asked me to get a (free) account on koders.com. Hmm, no thanks.
  • Krugle Enterprise: (commercial) seems cool, but I couldn't find a trial version.
  • Fisheye: (commercial) seems more repository-oriented than code-oriented. I mean, you can do full-text queries, but it doesn't give you the exact LoC where the query matched and it doesn't cross-reference classes and types. But when it comes to repository analysis, I think no other product has so many features. It even has a pseudo-SQL language called EyeQL to query the repository! Too bad the trial crashed while indexing our repository...
  • OpenGrok: (open-source) developed in Java, under the wing of OpenSolaris, OpenGrok uses Lucene to index source code. It's only about searching and doesn't offer statistics like the commercial products, but it's very good at what it does. It groks (parses) several languages, including C/C++,Java, Shell Scripts like ksh, bash, Perl, Makefiles, XML/HTML/SGML files, ELF files, Java class files, Java Jar files, archive files like TAR, GZip, BZip2, Zip files, man page formats like troff and more, but sadly, still no .NET languages. For the languages it groks, it provides cross-referencing of classes and types. And it gives you repository history search, too!

 

So I kept OpenGrok, and after installing and configuring, I announced it to the team. But our web designer (one of the coolest guys I have ever worked with) heard "OGrok" instead of OpenGrok (ogro means ogre in spanish). He went on calling it OGrok, and then he even put together an alternative logo, featuring the most famous ogre :-)

It has since become an invaluable tool for us, I can't recommend enough that you install one of these code search engines, it really improves collaboration with your teammates.

5 comments:

Mike G said...

Hi Mauricio, this is Mike and I work for Koders. Just wanted to let you know that the accounts created with Pro are used to control access to your index, so that all your code is locked up safe. I think you'll find the features that Koders Pro has to offer are far superior to "OGrok" if you're willing to take Pro for a test drive. Please let me know if you have any questions or comments. It's a new product and we're working hard to make it better.

Mauricio Scheffer said...

Hi Mike. I know Koders has waaay more features than OpenGrok.
I just think it shouldn't be required to get an external account to browse my code. The login window was really surprising to me (in a bad way).
Our servers don't have internet access for security reasons, so the koders service can't reach your servers to validate the login. It's great that security is integrated, but IMO it should remain local. It should allow anonymous access if I want that.
Maybe you could put a registration form before downloading, if you want to track who's using the trial...
Keep up the good work, I love koders.com and I know koders pro is gonna be a great product :-)

Unknown said...

Nice to hear that you found OpenGrok valuable. Feel free to create feature enhancements on http://defect.opensolaris.org (under Development/opengrok).

Unknown said...

The WHIFF package also provides full text source tree searching. Please see http://aaron.oirt.rutgers.edu/myapp/docs/W1300.testAndDemo for pointers and information.

smbily said...

Hi Mauricio,
I'm the product manager now for Koders.com and Code Sight. Code Sight is the search engine we use for Koders, but you can also download it to use on your own code. Koders.com will pull its upcoming list of projects from ohloh.net. (@koders, @ohloh) We're sorting through integration points with ohloh, so your thoughts are welcome!
Susie