Thursday, March 20, 2008

Do you use GoogleCodeSearch?

Recently one of my team mates was looking for a library call or some implementation to be able to get the subnet mask given a CIDR notation like 172.xx.xx.xx/16. There's a command "ipcalc" that can show you the subnet and other info given a CIDR notation, but we wanted to see how its implemented. With the kernel src code RPM not installed on that machine, we thought of doing a search for it's implementation on Google. It turned out that Google (which seems to be the parent of all searches) isn't as good in doing these type of code searches as it's more specific child Google Code Search

Although I've used Google Code search for finding out algos, implementations, generic API's for some typical scenarios and areas of interests in development, but it works much faster than tracing it locally for Open source code, even the kernel code and other system level implementation like in the above case.
What else, you get some really cool re-implementation of Linux code; some with improvements and customizations that can be useful.
The search results that we got also displayed implementations for some important related commands like ifconfig, iproute etc.

But then there's lot more to GoogleCode Search than searching just linux source code.
Like if you need to put your application or IDS/IPS firmware thru a burst traffic load then you can just search for a packet generator and voila!







For similar code searches I tried koders but it stands a bit low as can be seen by the search results (and interface) for the same query. Clearly, the interface as well as the results are not that intuitive and the search doesn't add anything to what you're looking for, say for e.g: more similar implementations or some links that provide more information on the searched item.

The one that gives a close fight to GoogleCodeSearch is Krugle.

With a search result providing different levels of implementations, modules to look for on this topic and one that also offers technical help, white papers and other related links on the searched context, this one sure is a better place to code-search. To promote it further, these guys offer an enterprise version that can sit on your desktop and provide code-searches both for internal and open source indexed code.

Other code search engine that can be referred:
Oreilly, Ucodit

I found another review for these search engines at: 5-great-code-search-engines

Code search can be fun too!

1 comment:

Anonymous said...

The challenge with code search is how to form the correct search query string. I have use Google code search for more than a year or two and thats because I did not get good results. I knew that my search string was not correct. I think I should try again more often.