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."
sooner or later http://www.google.com/codesearch?as_q=fuck&btnG=Se arch+Code&as_lang=&as_license_restrict=i&as_licens e=&as_package=&as_filename=&as_case=
God is real unless declared as int
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.
It's the sound of millions of CS majors cheering!!!!
Dang, this a neat tool.
Yep, I never spell check.
More incorrect spellings can be found he
At last we can use regexps and search on all the important characters between the alphanumerics! For example the prefixed '@' in PHP - very hard to figure out what this is, without reading the reference cover to cover. Now at least we can search the codebase and hope to see some useful comments preceding it, or figure out from context what's going on.
e.g. "@fopen file:.php"
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 :)
all bugs are shallow."
C sif%5C(%5B%5E)%5D*%5C)%3B+license%3Agpl+lang%3Ac%2 B%2B&btnG=Search
Well, it looks like that's not really the case: http://www.google.com/codesearch?hl=en&lr=&q=++%5
I hope this service will help improve code quality...
LOL your search has now uncovered the hidden angst of a million programmers :
"I don't see any option to search for Cobol."
Well, that's one entire season of "Battlestar Galactica" rendered entirely pointless. Thanks a lot!
Where were you when the voynix came?
It's a good start. They really need to start searching Subversion/CVS repositories as well. One of the most obvious things that they seem to have missed is to index all the Sourceforge downloads.
were you expecting to see a sig here? perhaps you'd rather see the inside of an ambulance!
How to find security holes in PHP web applications:
e +%5C%24_POST+-addslashes+lang%3Aphp
http://www.google.com/codesearch?hl=en&lr=&q=Wher
They who would give up an essential liberty for temporary security, deserve neither liberty or security - Ben Franklin
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
Good programmers write good code. Great programmers find it on Google!
Read any good sonnets lately?
Your search 10 print "boobs" 20 goto 10 returned no results. Try searching again using fewer terms.
Fnord.
It's true that not a lot of people write COBOL today, but the submiter was talking about legacy code. No wonder they're not on the Internet: not only they are from a pre-Internet era, but the vast majority of it is from corporations that keep their code very closed.
factor 966971: 966971
Crap! There goes SCO's case.
Opus: the Swiss army knife of audio codec
I hope my CS professor doesn't find this until the semester is over.
This is just too funny :-)
/* potential mating partner */ /*printf( "." ); fflush( stdout );/**/ /* mating must be mutual */ /*M_wait += 15;/**/ /*printf( "+" ); fflush( stdout );/**/ /* this is male object */ /* perform breeding in female object */ /* this is female object */ /* current position */ /* behind position */ /* back to field wall */ /* newborn's position */ /* move mother backward */ /* conception */ /*printf( "CHILD%d ", child );/**/ /* birth */
/* partner.printGenotype();
void Mammal::mate( Mammal& partner ) {
M_partner = partner.getId();
if( partner.getPartnerId() != M_id ) {
return;
}
if( M_gender == 0 ) {
partner.mate( *this );
return;
}
assert( M_gender == 1 );
int x = M_x, y = M_y;
switch( M_direction ) {
case EAST: x--; break;
case NORTH: y++; break;
case WEST: x++; break;
case SOUTH: y--; break;
}
if( !M_field->in( x, y ) ) return;
int cx = M_x, cy = M_y;
M_x = x;
M_y = y;
orgasm();
partner.orgasm();
Mammal* child;
child = new Mammal( *M_field, cx, cy, NEWBORNENERGY, *this, partner );
M_energy -= CHILDBIRTHENERGY;
M_population->add( *child );
printf( "MATE(%d,%d)->%d(%d) ", M_id, partner.getId(), child->getId(), child->getGeneration() );
partner.printState();
printGenotype();
printState();
child->printGenotype();
child->printState();/**/
}
void Mammal::orgasm() {
M_energy -= MATINGENERGY;
M_result = 1;
}
Beware: In C++, your friends can see your privates!
I just searched for "20 GOTO 10". Oh my. I don't know if that is funny or sad.
Have you read my journal today?
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?
True. And if there's any COBOL code on the Internet, it can be found using the following search terms:
"IDENTIFICATION DIVISION" "DATA DIVISION" DISPLAY PROGRAM-ID SECTION
No need for Google to develop a special search for what look less like a computer program and more like a plain text file.
--- Sueños del Sur - a webcomic about four young siblings