Jump to content

Google Code Search


Recommended Posts

Search engines for searching code bases is nothing new, but this time Google did it with Google Code Search.

Obviously, it only searches "publicly accessible source code" but there is plenty of that available. Specifically, you can search within archives (.tar.gz, .tar.bz2, .tar, and .zip), CVS repositories and Subversion repositories. There are advanced restrict functions that Google allows you to use to find your code of choice, to only search PHP you can use this command, [lang:php].

Yes, there is an API for this product and you can submit your code to the index as well. Hey, search engine optimization for your code. Outsourcing firms, you may have a niche or vertical creep strategy at your finger tips here soon.

Link: Google Code Search


Link to comment
Share on other sites

Aqui fica a notícia através do Newsforge, que se lembrou tambem de consultar o CEO do Krugle de modo a estabelecer alguma relação entre o lançamento por parte do Google e o motor de pesquisa de código-fonte já lançado em 2004:

Google jumped into the open source code search arena this week with the announcement of Google Code Search. The new tool allows users to search billions of lines of open source code and will also search files that the standard Google search engine does not. Google's code search capability falls under the "it's new to us" category, since the same functionality has existed at other sites for years.

In addition to culling code information published on Web sites, Google Code Search will also crawl .zip files and source code repositories like Subversion and CVS, information that Google says has been "historically difficult" for developers to access in the past.

Popular code search engine Koders, however, has been indexing repository code since 2004. Darren Rush, CEO and co-founder of Koders, says, "We started by indexing code found in the major open source repositories. Our crawler technology connects directly to CVS, Subversion, and other version control systems –- indexing quality code where it lives. We also support .zip archives and other ad-hoc version control systems."

Krugle, a code search Web site that debuted earlier this year, functions in much the same manner. "We crawl and index hundreds of publicly available code repositories containing millions of files. We are also working with high profile content partners to crawl and index private repositories to provide even deeper, high quality content," says Laura Merling, vice president of marketing and business development. "[We] also encourage our user community to provide us URLs for code repositories or projects we should include."

Google Code Search has few bells and whistles, but Google product manager Tom Stocky says a specially designed Google Data API will collect information on search queries so further refinements can be made to the service. In the meantime, Google's new tool allows users to search for code by line, license, or programming language -- a feature Koders already offers. Krugle users can search by line, language, comments, function call, function, or class definition.

As Google watches to see what developers want in a search engine, officials at Krugle say they already know. According to a survey conducted by the company, 20-25% of a developer's time is spent looking for answers to problems others have already encountered and perhaps solved. As a result, searches tend to be exploratory in nature. "The first search is for a potential answer, then they want to do research on the answer they found. They want to know more about the project, and they want to read any technical documentation they can find on it," says Merling.

In response, Krugle incorporated features into their site that allow developers to collaborate and share a wide variety of information. "Krugle allows users to create, save, share different types of information (code, its documentation, or forum discussions, for example), as a single result. Krugle also provides the ability to annotate a code file, tech page, or project with a 'note.' This allows users to share ideas, comments, and expertise. Collaboration and conversations about code are the next big phase for code search, in our view."

Koders believes developers need more than basic search capabilities to get the information they need. "Finding open source code is a requirement, but there is also a lot of quality code inside the enterprise that is highly relevant to professional developers. Access to enterprise code and better integration with IDEs are two of the major directions for code search," says Rush.

Rush has a suggestion for Google as it wades into the waters of code search. "My advice to any entrant into this space is to focus on the unique structure of code, because indexing and searching code requires specialized algorithms and tools that Koders has already developed and refined."

Early feedback on Google Code Search shows some developers aren't particularly enthusiastic about the new feature. Clint Talbert, a developer with Simdisk, says, "It only searches for code from sources it knows about online. For example, I was able to find a couple of holes by searching for code from non-normal sites that are probably not being indexed by their engine." While Talbert likes the way the tool displays search results, he says it would be helpful to have a way to browse the directories that contain code results.

Talbert says that "for 99% of the cases out there, it will probably be useful. I don't think it will be a tool I would use just yet, but that is largely due to the fact that Mozilla has solved this problem with its lxr search."

Google has taken a step towards helping developers quickly and efficiently locate the answers they need. It appears, however, that as with other areas the company has ventured into recently, there doesn't seem to be any compelling evidence that Google Code Search is the wave of the future.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.