Over a million developers have joined DZone.

The Story of Google Code Search and How it Worked

DZone 's Guide to

The Story of Google Code Search and How it Worked

· Cloud Zone ·
Free Resource

Although it went out of commission only a few days ago, Google Code Search was once the pet project of a team of Google interns in the Summer of 2006.  In an Official Google Blog entry from October 14, 2011, aptly titled "A fall sweep," Google Product VP Bradley Horowitz announced that Code search would be shut down on January 15, 2012, along with Google Buzz, Jaiku, iGoogle's social features, and the University Research Program for Google Search.  Russ Cox, who was on the team of interns that worked on Google Code Search, recently wrote the story of Code Search's development.

According to Cox, Code Search grew out of an existing internal tool within Google designed to run a command-line text-search across all of Google's source tree.  This search, known as gsearch, would gather pieces of the source tree from Google's servers and then merge and print the results.  Cox writes that, with this tool in mind . . .


Jeff Dean, my intern host and one of the authors of gsearch, suggested that it would be cool to build a web interface that, in effect, let you run gsearch over the world's public source code. I thought that sounded fun, so that's what I did that summer. -- Russ Cox

Early snags in the development process were solved using some of Cox's previous education as well as a rediscovery of a useful algorithm that had been previously used by Rob Pike, the writer of one regular expression library that Cox was using. 

The development of Code Search was a source of pride for the team, although it's limited audience may be what led to it's eventual demise: "Code Search was Google's first and only search engine to accept regular expression queries, which was geekily great but a very small niche," writes Cox.

Still, Code search was a useful and appreciated tool while it lasted, even outside of the intended community, as Cox claims that

[Perl consultant] Tom Christiansen recently told me that even people in the Perl community use it (perl -Mre::engine::RE2), to run regexp search engines (the real kind) on the web without opening themselves up to trivial denial of service attacks. -- Russ Cox

Comments connected to the Google Blog post suggest that Google Code search will be missed, with one commenter claiming that the "google code search team suggests a few alternatives - but I don't like them so I  won't mention them.  There simply isn't anything out there that's comparable to this service.  Too bad."

You can read Russ Cox's detailed description of how Google Code search worked here.

Feel free to post your experiences with Google Code Search below.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}