Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Google Code Search Reveals Dark Corners

kdawson posted about 8 years ago | from the oopsie dept.

297

saccade.com writes, "The new Google Code Search isn't just for hackers sniffing for passwords. Jason Kottke and friends have discovered the new feature reveals all sorts of dark corners hidden in our code. And you thought nobody ever read your comments!" From the article: "Code search is a great resource for web developers and programmers, but like the making available of all previously unsearched bodies of information, it's given lots of flashlights to people interested in exploring dark corners."

Sorry! There are no comments related to the filter you selected.

google seems to inspire... (5, Interesting)

Beuno (740018) | about 8 years ago | (#16388143)

Google seems to inspire this kind of behaviour for some reason. The have been lots of websites like krugle who search a big db of code, and these things didn't come up until google launched this.

Re:google seems to inspire... (5, Funny)

Kangburra (911213) | about 8 years ago | (#16388355)

I think their success comes from the simple interface, that despite varied functions retains sufficient uniformity to facilitate usefulness.

Jeez, I must have swallowed a dictionary!

Re:google seems to inspire... (1)

glarbl_blarbl (810253) | about 8 years ago | (#16388877)

to facilitate usefulness.
ITYM "to facilitate facility." Ah, english...

??? Profit! (5, Funny)

slavelayer (956212) | about 8 years ago | (#16389133)

1. Read Slashdot
2. Search Google Code [google.com]
3. ???
4. Profit!

How come when I search for Linux source code... (3, Funny)

The_Abortionist (930834) | about 8 years ago | (#16389173)

Google shows me SCO source?

Dark corners? (5, Interesting)

c0d3h4x0r (604141) | about 8 years ago | (#16388155)

Indeed [google.com] !

Re:Dark corners? (4, Interesting)

PlusFiveTroll (754249) | about 8 years ago | (#16388293)

Not suprising, about half the responces on the first page were about how bad IE (Internet Explorer) fucks things up!

" but IE6's implementation fucks up the..."
" // check for function objects (as usual, IE is fucked up)"

Re:Dark corners? (0)

Anonymous Coward | about 8 years ago | (#16388503)

linux-2.4.33.3/include/asm-sparc64/system.h

who would have thunk?

Re:Dark corners? (2, Funny)

-Brodalco- (938695) | about 8 years ago | (#16388873)

Indeed, indeed. [google.com]

Re:Dark corners? (0)

Anonymous Coward | about 8 years ago | (#16389191)

i have to say, i'm surprised (and delighted) by the frequency fuck appears *outside* of comments. makes for memorable variable names, i guess?

Dark corners? (4, Insightful)

FlyByPC (841016) | about 8 years ago | (#16388163)

"it's given lots of flashlights to people interested in exploring dark corners."

They say sunshine is the best disinfectant. More eyeballs can fix problems as well as exploit them.

Ahhhh... (2, Funny)

dangitman (862676) | about 8 years ago | (#16388169)

So that's where I left that rant about the inherent inferiority of asian people, and my treatise on how someday the aardvaarks will be the dominant form of life on earth (after they eat the asians).

And the Ever Popular... (5, Funny)

gambit3 (463693) | about 8 years ago | (#16388175)

"Windows Sucks" [google.com]

--
Go Where Web Thinkers Gather [webcogito.com]

Re:And the Ever Popular... (5, Funny)

Karloskar (980435) | about 8 years ago | (#16388237)

Re:And the Ever Popular... (5, Funny)

Werkhaus (549466) | about 8 years ago | (#16388373)

Whilst we're on the subject of /. memes [google.com] ...

Re:And the Ever Popular... (1)

Sinryc (834433) | about 8 years ago | (#16388609)

And even Linux Sucks! [google.com]

Re:And the Ever Popular... (1)

8ball629 (963244) | about 8 years ago | (#16388703)

Synonymous to IE Sucks [google.com] .

Re:And the Ever Popular... (0)

Anonymous Coward | about 8 years ago | (#16388719)

Re:And the Ever Popular... (1)

jkleid (127829) | about 8 years ago | (#16389125)

Counts for various search strings:

"Windows sucks": about 50 results
"Linux sucks": about 50 results
"Macs suck": about 20 results (some of these may be "emacs sucks" however)
"bloody microsoft" 4 results
"bloody Linux" 2 results
"emacs sucks": 18 results
"vi sucks" - did not match any documents

Clearly Google Code Search is a highly objective source of information for winning (or losing) a variety of arguments.

Re:And the Ever Popular... (1)

MrWhitefolkz (751859) | about 8 years ago | (#16389211)

Along the lines of "python sucks", there are 0 results for "ruby sucks"...
And there are 0 hits for "rails sucks"...
And plenty of results for "php sucks", "perl sucks", "c sucks", "c++ sucks"...
Take it for what its worth, I don't even code. Just was curious.

Re:And the Ever Popular... (1)

nEoN nOoDlE (27594) | about 8 years ago | (#16389327)

from your link
Windows Sucks. Unix Sucks. C Sucks.

There's a guy who really hates his job.

Old-school (4, Interesting)

FlyByPC (841016) | about 8 years ago | (#16388203)

Zork nostalgia [google.com] , anyone?

Your signature that very much is a signature (0)

Anonymous Coward | about 8 years ago | (#16388589)

About your signature: Your signature is very much a signature, whearas a painting of a pipe is very much not a pipe. If you had typed it by hand each post, that would be the spirit of the painting, but I do believe it is a signature, as when I reply I do not see it.

Re:Your signature that very much is a signature (0)

Anonymous Coward | about 8 years ago | (#16389341)

About your lack of signature: Your lack of signature is very much a complete lack of signature, whearas a painting of a pipe is very much not a pipe. If you had typed it by hand each post, that would be the spirit of the painting, but I do believe it is a lack of signature, as when I reply I do not see it.

The corner files. (0)

Anonymous Coward | about 8 years ago | (#16388209)

"but like the making available of all previously unsearched bodies of information, it's given lots of flashlights to people interested in exploring dark corners."

Mulder would have liked Google.

Bloody Microsoft (5, Funny)

RyatNrrd (662756) | about 8 years ago | (#16388211)

Re:Bloody Microsoft (1)

gardyloo (512791) | about 8 years ago | (#16388725)

Only ten pages if you wimp out early :)

Re:Bloody Microsoft (1)

Neoncow (802085) | about 8 years ago | (#16388813)

It's actually 37 pages if you keep clicking till the end ;)

Fucks. (5, Interesting)

Anonymous Coward | about 8 years ago | (#16388241)

Re:Fucks. (1)

utway (1009465) | about 8 years ago | (#16388625)

The #f*ck per source file for the C language is 0.003141593, the digits remind me of Pi.

It's not surprising that PHP is the leader. (0)

Anonymous Coward | about 8 years ago | (#16388673)

It's not suprising that PHP is the leader in that category.

Of all the PHP developers I've met or known of, I can break them down into two groups. One is the talented developer who is stuck using PHP because some idiot manager told him or her to. This sort of a person would likely use the word "fuck" to describe the horrors they encounter daily while using PHP.

The second type is the immature, know-it-all 13-year-old brat who read a PHP tutorial online, and now thinks he's a professional programmer. People like them lack the professionalism, and think it's "cool" to pepper their code with obscenities.

Re:It's not surprising that PHP is the leader. (1)

jpardey (569633) | about 8 years ago | (#16388775)

Or, it could just be that there are a lot of cross platform web pages written in PHP, and every browser has its own "fuck"ing way of doing things, most of which mean a lot of time peicing together a kludge. PHP is nearly used only for websites, whearas Python and Perl are used for many other things. Javascript is client side, so there would not be a lot of comments, let alone comments with obscenities.

Re:It's not surprising that PHP is the leader. (2, Insightful)

Andrew Kismet (955764) | about 8 years ago | (#16389247)

That and PHP is used for a lot of bulletin boards, forums, etc - the majority of those "fuck" counts would be on swearlist fliters hardcoded in.

Re:It's not surprising that PHP is the leader. (1)

jpardey (569633) | about 8 years ago | (#16389301)

Yeah, true, there seem to be a lot of word lists, and that probably is the majority. Seems odd that they wouldn't be kept in a plaintext or database though.

However, have you seen the comments complaining about how broken IE is?

Re:It's not surprising that PHP is the leader. (0)

Anonymous Coward | about 8 years ago | (#16388833)

Trollll----ing... good programmers always write "fuck." If I haven't written "fuck" once per fifty lines of code, I must not be enjoying myself!

Yeesh. Go write your own slick localized open source content-driven language. Make sure you can knock off a fully functional program in ten seconds, too. And don't just say Perl.

Watch your language please (1)

Voice of Meson (892271) | about 8 years ago | (#16389261)

bad_words = ['asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit'] # all in lower case .......

raise ValidationError, ngettext("Watch your mouth! The word %s is not allowed here.",
        "Watch your mouth! The words %s are not allowed here.", plural) % \

Ha! Assheads

This should never happen... (5, Funny)

EvanED (569694) | about 8 years ago | (#16388247)

This is a fairly amusing one. [google.com]

I like the memset search on that page too... scary. People need to run Lint or something. (Will Lint pick up that error?)

Re:This should never happen... (2, Funny)

TapeCutter (624760) | about 8 years ago | (#16388553)

A different response [google.com] to the impossible.

And a few religious [google.com] constatnts [google.com] to ignite a flame war.

Because someone had to (1)

Broken scope (973885) | about 8 years ago | (#16388259)

Re:Because someone had to (0)

Anonymous Coward | about 8 years ago | (#16388647)

You could have atleast searched for porn [google.com] .

14000 > 200

In Soviet Russia... (0, Redundant)

FlyByPC (841016) | about 8 years ago | (#16388269)

...code [google.com] searches *you*!

I had to do it... (3, Funny)

kypper (446750) | about 8 years ago | (#16388291)

All your base [google.com] :-D

My favorite programmer qoute... (1)

creimer (824291) | about 8 years ago | (#16388325)

"I don't know what the problem was. But whatever it was, it's now fixed."

Re:My favorite programmer qoute... (1)

jfengel (409917) | about 8 years ago | (#16388583)

That was me.

Today.

You fAil it (-1, Troll)

Anonymous Coward | about 8 years ago | (#16388365)

Slashdot lore? (-1, Redundant)

istartedi (132515) | about 8 years ago | (#16388371)

In Soviet Russia [google.com] Google code searches you. I for one [google.com] welcome our code searching overlords [google.com] as long as there aren't too many programs out there that want to kill all humans [google.com] .

OK, "kill all humans" is Futurama lore, not Slashdot. I'm too lazy to copy/paste any more, but there is plenty of hot grits in the code out there, and stuff...

Re:Slashdot lore? (1)

Tablizer (95088) | about 8 years ago | (#16389095)

You forgot goatse. Lots of goatse.

For the record (4, Funny)

achurch (201270) | about 8 years ago | (#16388413)

I was not drunk when I wrote this [google.com] ; that's just some immature coder making fun of me.

Granted, being drunk is about the only valid excuse I could make for only initializing half of a doubly-linked list node . . .

Re:For the record (2, Interesting)

BeeBeard (999187) | about 8 years ago | (#16388541)

Hehe...I read that and I was like "Who in the heck is Andy Church?" and "I've got to treat this guy to a pint!" You rock, Mr. Church.

Re:For the record (1)

Jedi Alec (258881) | about 8 years ago | (#16389215)

Is it a bad sign that I saw the code and didn't even need to look at the filename to recognize it? Still using the stable branch, but props for all the good(and in some cases, not so good) work :-)

Do no evil. (1)

c0d3r (156687) | about 8 years ago | (#16388527)

Its my assesment that shining light on dark corners fits into the category of their "do no evil" motto.

Wow. Just wow. (1)

CaffeineAddict2001 (518485) | about 8 years ago | (#16388533)

+"FIXME" +"sql injection"

If you know it's a problem, why don't you fix it before you publish???

Re:Wow. Just wow. (1)

adamruck (638131) | about 8 years ago | (#16388743)

That is very scarey and sad all at the same time.

Re:Wow. Just wow. (1)

vindimy (941049) | about 8 years ago | (#16388929)

if they knew how to fix it (or had time) they definitely would. at least give them thanks for pointing out an error.

LOL (0)

Anonymous Coward | about 8 years ago | (#16388569)

http://google.com/codesearch?hl=en&lr=&q=bill+gate s&btnG=Search [google.com] BILL GATES

"This is a Bill Gates so use with discretion."

"BOOL is tri-state according to Bill Gates."

"/* Ask Bill Gates what this is all about. */"

The Bool Sheet (1)

c0d3r (156687) | about 8 years ago | (#16388607)

I recall a professor in college saying "George Bool put all of his theory on one page and they used to call it the bool sheet".

Re:The Bool Sheet (0)

Anonymous Coward | about 8 years ago | (#16389003)

It sounds so much naughtier when you spell George Boole's name as a 4-letter word.

Re:The Bool Sheet (0)

Anonymous Coward | about 8 years ago | (#16389015)

Is that really TRUE... or FALSE?

No fun! (2, Interesting)

Greyfox (87712) | about 8 years ago | (#16388597)

The vast majority of code along with wonderful comments is hidden behind corporate firewalls where the google search engine will never get at it. Which is probably just as well as I've no doubt that potential future employers would be searching that code if it were available and reading my sardonic comments about the drug habits of prior programmers, speculation as to the number of box tops they had to send in to obtain their degrees and gripes about how co-workers clearly did not read my warning about not changing function interfaces unless they really knew what they were doing, and they clearly did not know what they were doing as evidenced by the fact that they passed record counters as ints in one place and then used those ints as pointers in another place (And no, this was not some form of genius on their part, either.) Also: Run-on sentences.

Instead potential employers (like me) can google your code and read those comments that you wrote in there. Don't worry though... I won't hold those against you.

Anyway, "unless you really know what you're doing" and "smoking cracK" are also fun searchesa over there...

Re:No fun! (1)

remembertomorrow (959064) | about 8 years ago | (#16388793)

+1 duh

Re:No fun! (1)

TheViffer (128272) | about 8 years ago | (#16389339)

Duh [google.com]

Suicidal code... (4, Funny)

chillieburger (987121) | about 8 years ago | (#16388645)

Who said programming was easy? http://google.com/codesearch?hl=en&lr=&q=%22kill+m e+now%22 [google.com]

Re:Suicidal code... (1)

kypper (446750) | about 8 years ago | (#16388689)

Won't somebody please think of the children [google.com] ?!?

Suprised... (1)

MoriaOrc (822758) | about 8 years ago | (#16388653)

I didn't see these two in the article, or a quick check of the comments so far (as clearly they are the two most useful tools in a programmers arsenal):
Magic [google.com] and more magic [google.com]

What code? (1)

bendodge (998616) | about 8 years ago | (#16388683)

Where exactly does all this code come from? Will this be much more useful than regular search, as most good code on the net is easy to find? Will this just shine a flashlight on junk?

Favorite (4, Interesting)

springbox (853816) | about 8 years ago | (#16388771)

This is my favorite from the article: The phrase "should be big enough" [google.com] should never be seen alongside statically allocated arrays.

security holes (0)

Anonymous Coward | about 8 years ago | (#16388831)

I was surprised to see that 'security hole' brought up a neat collection of ... errr.. security holes.

Kittens (1)

sankyuu (847178) | about 8 years ago | (#16388839)

Imagine if your boss found out what you think of kittens! [google.com]

That damn blogger revealed all sorts of bad *** (-1, Flamebait)

zitintheass (1005533) | about 8 years ago | (#16388853)

Thank you, we all feel more secure now when you dummie Ad$en$e hungry blogger revealed all sorts of vulnerability searches.

Whole lot of people and businesses can be affected by this. Omg isn't this even prohibited by the law?
Hope we will not face some unexpected surprices just before this Xmas shopping season. We need our servers running and this is first hand helping the exploiters and haxors. Thx again dude.

I wonder.. (4, Funny)

technos (73414) | about 8 years ago | (#16388855)

How long before SCO files a third amended counterbrief to IBM's second interrogary motion for relief claiming new evidence of infringement after one of their marketing boys tries 'Linux Santa Cruz Operation' after reading about Google Code in the WSJ?

The Wisdom of Mr. T. (1)

BigZaphod (12942) | about 8 years ago | (#16388861)

"Pity the fool [google.com] " :-)

NDA search terms (0)

Anonymous Coward | about 8 years ago | (#16388895)

Fun search terms to use are "Non Disclosure Agreement"

Good times, good times.

What dark corners? (1)

3seas (184403) | about 8 years ago | (#16388933)

With all the flashlights I don't see any dark corners no more.

But this won't help so much with bugs, as bugs usually show up in the running of code.

Who says we have no life? (1)

jlowery (47102) | about 8 years ago | (#16388937)

Slightly off-topic (1)

joe_cot (1011355) | about 8 years ago | (#16388957)

Search results coming out a bit strange. for example:
\W((java)|(python)|(php)|(C(\+\+)?)|(asp)|(javascr ipt))\ ((sucks)|(stinks))\W [google.com] 30,800 results
\W((java)|(python)|(php)|(C(\+\+)?)|(asp)|(javascr ipt)|(asm))\ ((sucks)|(stinks))\W [google.com] 50 results
In other words, either they're cutting off their reg-exs for some reason (based on length, time for computation, etc), or my regular expressions are getting a bit rusty, or their reg-ex engine needs a bit of work -- I sorta want them to put the Code Search code on Code Search, just so I can do the Buffer search [google.com] and see if it comes up.

You are not expected... (4, Interesting)

slushdork (566514) | about 8 years ago | (#16388985)

My favorite: You are not expected to understand this [google.com]

See here [bell-labs.com] for an explanation (from the horse's mouth, as it were...)

How come I don't see this one? (1)

bornyesterday (888994) | about 8 years ago | (#16388991)

Dark corners? Of course, we can find them [google.com] too

Dark very dark (1)

goldgriff (144171) | about 8 years ago | (#16389011)

Luke ... [google.com]

IE vs. Firefox (1)

RandomPrecision (911416) | about 8 years ago | (#16389047)

Your search - "firefox sucks" - did not match any documents.
Did you mean to search for "IE sucks"?

Seriously though -
Search: "IE sucks"
Results 1 - 10 of about 30,200.
Search: "firefox sucks"
Your search - "firefox sucks" - did not match any documents.

multiline mode (1)

zobier (585066) | about 8 years ago | (#16389051)

Would someone please let me know if they find out how to trigger multiline mode regex in Google Code Search. Ta.

E-mails (1)

shodai (970706) | about 8 years ago | (#16389077)

At first, crawlers/bots/etc would search for plaintext emails, now that they can easily search mass quantities of code, wouldn't this make it easier for crawlers to find emails [google.com] hidden in code also? I have little to no idea what i'm talking about, but this is a bad thing, right?

Arrrgh! (1)

Kuukai (865890) | about 8 years ago | (#16389251)

My favorite group is programs that contain "Arrrgh!" [google.com] .

The "lameness filter" totally ruined this post...

It's right... (1)

laejoh (648921) | about 8 years ago | (#16389263)

You can find a lot of dark corner's [google.com] .

Couldn't resist it!! (1)

Rockgod (962796) | about 8 years ago | (#16389305)

OMG!! PONIES!!! [google.com]

You have been warned... (1)

saccade.com (771661) | about 8 years ago | (#16389323)

...about 10,000 times. [google.com] .

Interesting to note the Slashdot editor didn't run with my original headline: "Google Code Search Reveals the Evil of all Source"

goto (1)

ricardo_nz (917753) | about 8 years ago | (#16389345)

goto [google.com] Results 1 - 10 of about 939,000 ... not as bas as expected.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?