This post originated from an RSS feed registered with Java Buzz
by Weiqi Gao.
Original Post: Google Code Search: Good
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
I received multiple alerts about the newly available Google Code Search in the past few days.
In keeping with past tradition of WeiqiGao.com, the first search I did on it is a self-referential one. And the result looks good:
It's nice to know that the internet remembers the tiniest contributions you make. The second item on the list was from 1991! It was for a bug in the Mathematica mode for GNU Emacs!! On the other hand, I've been writing code for a living for more than a decade. I feel sad that none of the volumes of code I wrote will ever show up in places like Google Code Search. They were proprietary code and I'm not even the proprietor. The search result includes a file from my web server. (But not the other one.)
Google Code Search allows you to specify language, license, package name and file names. Although I believe most often the search will be for a phrase or sentence in the comments. When Google publish their ranking of the top search words for Code Search, it will undoubtedly be dominated by swear words, phrases like "you are not supposed to understand this" or "this is tricky."
It won't be long before this feature is integrated with major IDEs. Just imagine, in IntelliJ IDEA for example, that you press Control-n to do a name search, and there is a checkbox that allows you to specify the search is to be done on a Google Code Search scale. Similarly for find usages: instead of finding all the spots where a variable is used in your current project, with the help of Google Code Search, you find all the spots where the variable is used in all code bases in the world. Similarly for refactorings: when you change a public API, not only code in the current project is changed, Google can send the refacoring to every project in the world that uses the API and let then carry out the refactoring.