Code Snippets Part of Universal Search

By mgray
In Google  

Print Post Print Post Email Post Email Post    ADD TO STUMBLEUPON Sphinn It ADD TO DEL.ICIO.US  Tweet This

I’ve never seen this before a code snippet as part of a Google Universal Search Result

strlen - Google Search

Related posts:

  1. How to Turn Off Personalized Search in Google Chrome With the impending arrival of Google OS I’ve been spending...
  2. Google iPhone Voice Search – It’s All About the Ads I was lucky enough to have lunch with Matt Cutts...
  3. How to Add Search Shortcuts to Google Chrome. Last week Danny Sullivan twittered he was looking for a...

Crazyegg Link Tracking

{ 4 comments }

Igor The Troll April 6, 2008 at 4:57 pm

Wow, that is pretty wild. Maybe soon we can just Google for PHP script and have the whole code come up in search results. Looks like Google moving to Artificial Intelligence..:)

tonyrocks April 7, 2008 at 12:26 am

Let’s see if they purposely leave out code snippets for any .NET code :)

httpwebwitch April 7, 2008 at 9:35 am

I think this feature was intended to be useful for programmers. It’s not. I don’t like it. The results are crappy one-liners from Google Code, exposed out of context. It sometimes gives you a sample of usage and syntax, but for a function name like “strlen” I’d much rather get a wikified “hello world” sample or a generic definition.

For “strlen”, this would have been much more useful nugget to expose:

STRLEN – PHP
int strlen ( string $string )
Returns the length of the given string.
[example]
$len = strlen(”hello world”);
// $len is 11
[/example]

I see code snippets also when I search other function names like indexOf, createNode, strstr, strrev, and mysql_query, and other common Javascript and PHP functions.

Igor The Troll April 7, 2008 at 11:12 am

Ha, ha! I rather go to Php.net and find some real code, like classes and other functions. I do find some snippet scripts around on different forums, but take a bit of time to search for them.

Who knows, Google doing Viral? Or maybe they will open up their code base, but is it built like a code language dictionary? I doubt it!

Maybe Google will just curl_init() Php.net and other forums like phpfreaks and serve it as their own. Anything possible with Google. They have done it to news, books, and video.

Evil Google!

Comments on this entry are closed.