Google Code Search Reveals Dark Corners 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."
google seems to inspire... (Score:5, Interesting)
Re:google seems to inspire... (Score:5, Funny)
Jeez, I must have swallowed a dictionary!
??? Profit! (Score:5, Funny)
2. Search Google Code [google.com]
3. ???
4. Profit!
Re: (Score:2)
Dark corners? (Score:5, Interesting)
Re:Dark corners? (Score:5, Interesting)
" but IE6's implementation fucks up the..."
"
*snicker* (Score:2)
Re: (Score:2, Funny)
Re:Dark corners? (Score:5, Interesting)
Just better not SCO know about this
Re: (Score:3, Funny)
Re:Dark corners? (Score:4, Funny)
Re: (Score:2)
Re: (Score:2, Funny)
// I'd say.
Dark corners? (Score:5, Insightful)
They say sunshine is the best disinfectant. More eyeballs can fix problems as well as exploit them.
Ahhhh... (Score:3, Funny)
And the Ever Popular... (Score:5, Funny)
--
Go Where Web Thinkers Gather [webcogito.com]
Re:And the Ever Popular... (Score:5, Funny)
I, for one, welcome our new xxxxxxxx overlords [google.com]
Re:And the Ever Popular... (Score:5, Funny)
Re:And the Ever Popular... (Score:5, Interesting)
"guy who wrote this" [google.com] "in case some idiot" [google.com] "ugly hack" [google.com] "rewrite this later" [google.com] "hail mary" [google.com] "this shouldn't work" [google.com] "compiler happy" [google.com] "what the fuck" [google.com] "blows goats" [google.com]
And I really love this one: i=i++ [google.com]
Re:And the Ever Popular... (Score:4, Funny)
Re: (Score:2)
Re: (Score:2)
And I really love this one: i=i++
hmm... apparently one of them is gtk [google.com] ... it's all making sense now.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
So I did...
http://google.com/codesearch?hl=en&lr=&q=%22slash
-Jar.
Re: (Score:2)
Windows Sucks. Unix Sucks. C Sucks.
There's a guy who really hates his job.
Re: (Score:2)
Linux Sucks [google.com].
Funny - they both return the same approximate number of results...
Old-school (Score:5, Interesting)
Re: (Score:2)
http://www.google.com/codesearch?q=xyzzy [google.com]
http://www.google.com/codesearch?q=%22hello+sailo
And what's up with all the red-background links, anyway?
Re: (Score:2)
Re: (Score:2)
That's just gruesome!
all the best,
drew
http://www.nanowrimo.org/modules/newbb/viewtopic.
Come on over to NaNoWriMo and write and copyleft a novel in 30 days.
Re:Your signature that very much is a signature (Score:4, Informative)
You incult clod, if the GP said it it was because the GGP's sig is a reference to a painting of an apple that says "Ceci n'est pas une pomme" ("This is not an apple") because it's not an apple but really a painting. The GP was pointing that the GGP's sig was actually a signature although it claimed not to be one, and thus that it didn't fit the spirit of the painting it was refering to, and that it would have been more like the spirit of it if instead of having it to be an actual sig, it was something he pasted at the end of every of his posts to make it look like a sig. It would look like a sig, but it wouldn't be one.
Re: (Score:3, Insightful)
Bloody Microsoft (Score:5, Funny)
Re: (Score:2)
Re: (Score:2)
Ahh frustrated programmers (Score:3, Interesting)
Fucks. (Score:5, Interesting)
Is that chart trying to tell me something? (Score:2)
W
Re: (Score:3, Insightful)
This should never happen... (Score:5, Funny)
I like the memset search on that page too... scary. People need to run Lint or something. (Will Lint pick up that error?)
Re: (Score:3, Funny)
And a few religious [google.com] constatnts [google.com] to ignite a flame war.
explain memset bug? (Score:2)
Re: (Score:2)
memset (destination , datatocopy, numbytes);
The last argument should be the number of bytes to copy from datatocopy into the destination. If numbytes == 0, then copy all bytes from datatocopy. i.e. if sizeof(datatocopy) is > sizeof(destination), you have an overflow which might be exploited.
Re: (Score:2)
memset(s, c, n) places character c into first n characters of s, and the programming error referred to is about mixing c and n with each other. The original search [google.com] looks for n == 0, because it makes no sense, and is thus an indication of this mixup.
I actually use that comment... (Score:2)
Yes, I know, exception handlers...but it is possible to go overboard with those. If I can manage it, I like to see all my causes and effects accounted for.
{which might just give me away as not being a professional programmer}
I had to do it... (Score:4, Funny)
Re: (Score:2)
http://google.com/codesearch?q=+%22set+up+us+the%
My favorite programmer qoute... (Score:2)
Re: (Score:2)
Today.
For the record (Score:5, Funny)
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: (Score:3, Interesting)
Wow. Just wow. (Score:2)
If you know it's a problem, why don't you fix it before you publish???
Re: (Score:2)
Re: (Score:3, Interesting)
Re: (Score:2)
Often, it turns out that the "incorrect" cases simply never get touched.
Programmers, it turns out, have a limited amount of time available, and have to prioritize and decide what fixes ar
No fun! (Score:3, Interesting)
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: (Score:2)
Suicidal code... (Score:4, Funny)
Re: (Score:2)
A subroutine worse than death! (Score:2)
Re: (Score:2)
No one should ever have to see this.
ROFL!!! [google.com]
Not sure why... but I think that guy was a little frustrated ;-)
Favorite (Score:5, Interesting)
I wonder.. (Score:5, Funny)
The Wisdom of Mr. T. (Score:2)
What dark corners? (Score:2)
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? (Score:2)
http://google.com/codesearch?q=%22for+a+good+time% 22&btnG=Search&hl=en&lr= [google.com]
Who's smoking crack?
http://google.com/codesearch?hl=en&lr=&q=%22smokin g+crack%22&btnG=Search [google.com]
Can't get enough:
http://google.com/codesearch?q=+%22fuck+me+harder% 22&start=10&sa=N [google.com]
Like an Electrolux!
http://google.com/codesearch?hl=en&lr=&q=%22suck+m e%22&btnG=Search [google.com]
Finally, eat this:
http://google.com/codesearch?hl=en&lr=&q=%22eat+my +shorts%22&btnG=Search [google.com]
Re: (Score:2)
http://google.com/codesearch?hl=en&lr=&q=%22this+
Yep, life sucks.
You are not expected... (Score:4, Interesting)
See here [bell-labs.com] for an explanation (from the horse's mouth, as it were...)
multiline mode (Score:2)
Whew! (Score:2)
I thought there'd be a quiz later:
you are not expected to understand this [google.com].Arrrgh! (Score:2)
The "lameness filter" totally ruined this post...
You have been warned... (Score:2)
Interesting to note the Slashdot editor didn't run with my original headline: "Google Code Search Reveals the Evil of all Source"
memset( pointer, size, 0 ) - NO! (Score:2, Interesting)
malloc(strlen(\w\)); (Score:2, Interesting)
and these new char[strlen(\w+)]; [google.com]
Regular expression search (Score:2)
I wonder how (or if) they guard against very cpu-hungry regular expression strings?
Let the holy wars begin: (Score:3, Informative)
"perl sucks": Results 1 - 10 of about 32,900. (0.01 seconds)
Re: (Score:2)
"Linux sucks" Results 1 - 10 of about 20
"Unix sucks" Results 1 - 10 of about 70,900
"Solaris sucks" Results 1 - 10 of about 81,400.
Re: (Score:2)
Heh, this is fun...
"Python rocks" - 6 results, (one refering to "monty").
"Pearl rocks" - 0 results.
"love python" - 50 results, (some may refer to male anatomy)
"love pearl" - 0 results, (no false positives that refer to female anatomy)
Re: (Score:2)
"perl rocks" [google.com] - 4 Results
"love perl" [google.com] - 50 Results
Personally I do prefer python but I think perl still has a place. (Of course I'm still learning python, perhaps one day I will completely replace perl with python)
Re: (Score:2)
It was hard to write... (Score:3, Funny)
My favourite... (Score:2)
45: long fuck = 99;
Awwww yea..... makes me want to go off and write some code right now.
"this is a hack" (Score:2)
http://google.com/codesearch?hl=en&lr=&q=%22this+
And quite a bit of Zork fans... (Score:2)
My favorite is:
866:
[Test]
Could be interesting... (Score:2)
Although I imagine it was already posted in the earlier code search password discussion...
\s+arghhh (Score:2)
Some interesting ones (Score:2)
* http://google.com/codesearch?hl=en&lr=&q=%22fix+it +right%22&btnG=Search [google.com]
* http://google.com/codesearch?hl=en&lr=&q=%22for+no w%22&btnG=Search [google.com]
* http://google.com/codesearch?hl=en&lr=&q=%22what+w ere+you+thinking%22&btnG=Search [google.com]
"this sucks"... apparently a lot of stuff does! (Score:2)
IDE Profanity Filtering (Score:2)
Alright, fess up. (Score:2)
This could affect future job applicants (Score:3, Insightful)
Goto isn't necessary evil (at least in C) (Score:3, Insightful)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Funny)
Re: (Score:2)
Re: (Score:2)
Maybe code, for some reason, really throws off the estimate. Assuming it's an estimate.
I can get to page 3, FWIW.
Re: (Score:2)