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."
VB has been the language with the most LOC since the early-mid 90's.
As scary as that sounds.
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.
Whenever I search for something code related on the web it's usually because I want to know how to do something. In such cases I dont really know what the code itself would be (i.e. the reason why I'm searching) so this wouldn't help at all. I suppose if you were looking for specific code it could be useful, but why would you be doing that? That would likely be your own code, so wouldn't a simple grep be easier?
I'm sure I'm missing something here - Google doesn't (usually) release useless new products :)
As a programmer who needs to solve a problem I need a place to find answers to the problem I am solving. Searching for a code won't do it because I am looking for an answer and not how to code it. To find answers I use Omgili - it is a vertical search engine that search ten of thousands of forums and millions of discussions. Usually someone already asked my question and hopefully it has an answer. It is highly recommended for troubleshooting and specific problems/questions.
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 did a brief survey on "I hate [X]", and got the following:
Looks like John McCarthy wins.
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?
Not to fuel the fire or anything... http://www.google.com/codesearch?q=%5E%5Ba-zA-Z%5D (%5B.%5D%3F(%5B%5B%3Aalnum%3A%5D_-%5D%2B)*)%3F%40( %5B%5B%3Aalnum%3A%5D%5C-_%5D%2B%5C.)%2B%5Ba-zA-Z%5 D%7B2%2C4%7D%24&btnG=Search&hl=en&lr=
Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
I can't find any of the software with my name on it that's on SourceForge, though.
Your design to a real part online: Big Blue Saw
Some of those are a hack around the VC 6 "for loop doesn't scope as per ANSI" bug. This forum post explains when its used.
Indent style searches: K&R about 5,900,000 Alli (Actually, this is a bit broken! Anyone worked out how to enable multiline mode?) about 11,100,000
Me lost me cookie at the disco.