Google Unveils Code Search
derek_farn writes, "Google now has a page that supports source code searching. I hope they extend it to be more programming-language aware (e.g., search for identifiers and functions) like the specialist code search sites (Krugle, Koders, and Codease), who probably now have very worried investors. I don't see any option to search for Cobol. I guess there is not a lot of Cobol source available on the Internet, even although there is supposed to be more Cobol source in existence than any other language (perhaps that statement is not true in the noughties)." From the Cnet.com article: "Google engineers, many of whom participate in open-source projects, already use these code searching capabilities internally. Since it is a Google Labs project, the company is not yet seeking to monetize searches through ads."
I made a simple search for "fade file:.js" in order to find a javascript function that would fade a div or table or anything really (I know scriptaculous offers this already, just curious as to what's out there). I found something but the header of the file read:
... it seems to be restricted to one of two uses. If I'm looking for code that does natural language parsing, I could hope a comment somewhere contains NLP as a description of what's going on. Or, I could look for libraries out there with methods and then search for those methods to see how other people used them to get an idea of how they work. The vast majority of this code seems to be just web development front-end code at least from the few searches I've done. Too bad, that's a very small part of programming.
All Code herein is Copyright 2005 Match.com
Do not copy, reproduce, reuse or sell any code herein
without the express, written consent of Match.com.
For information contact webmaster@match.com.
All Rights Reserved.
Which is expected. However, that means this tool isn't useful for finding a method or function or class I can use and then using it
My work here is dung.
found these perhaps interesting: http://www.google.com/codesearch?q=+%22backdoor+pa ssword%22+show:jRPhp0ZHKTo:ci7RRg0kwvU:Xm5ri9nsh7w &sa=N&cd=4&ct=rc&cs_p=http://ftp.osuosl.org/pub/Fr eeBSD/distfiles/flash-0.9.5.tar.gz&cs_f=flash-0.9. 5/flash.1#a0
http://www.google.com/codesearch?q=+%22backdoor+pa ssword%22+show:1lII5NN2DDk:enqxwGER2sU:KEOg6Taq6iU &sa=N&cd=6&ct=rc&cs_p=http://ftp.osuosl.org/pub/Fr eeBSD/distfiles/xsw1.23.tgz&cs_f=xsw1.23/server/ne tlogin.c#a0
http://www.google.com/codesearch?q=+%22backdoor+pa ssword%22+show:L4YZQESJxWo:Yryh5NFJxw0:UVx7zLw_NI8 &sa=N&cd=9&ct=rc&cs_p=http://www.mudmagic.com/code s/dl/2463/copper-3.tar.gz&cs_f=Copper3/nanny.c#a0
I agree, it is rather funny. My favourite is so far:
: /* Fuck me gently with a chainsaw... */
/usr/src/linux/net/core/netfilter.c:
/* netfilter.c: look after the filters for various protocols.
/usr/src/linux/arch/sparc/kernel/ptrace.c
But I also stumbled upon this little gem in
* Heavily influenced by the old firewall.c by David Bonn and Alan Cox.
*
* Thanks to Rob `CmdrTaco' Malda for not influencing this code in any
* way.
*
Anyone knows if there is a story behind this comment? Is it a private joke on taco, or did he piss them off?