April 2007

How often do you find yourself writing an email in which you tell someone to do an Internet search? If you do it often enough, you’re probably familiar with the following cycle, the one that starts with you saying:

Just Google for “there will also be corn served”.

Then you realize it’s unclear whether or not you meant a phrase search — that is, whether the double quotes are part of the search string, or just there to separate the search words from the rest of your email. So you add:

Make sure to include the double quotes!

Then you remember that your friend works at Yahoo and always gets annoyed when people equate searching on the Internet with Google, as though there were no other search engines in the world. With a sigh, you go back and edit the text to be service-neutral, turning it into one sentence while you’re at it:

Type “there will also be corn served” into your favorite search engine, and make sure to include the double quotes.

Gosh, what a lot of work just to tell someone to search for a six-word phrase. And the recipient still has to manually cut and paste the phrase into a search engine, aiming the mouse carefully so as to catch the double quotes. There’s got to be an easier way!

Introducing search://

Most people, if they saw the following in an email, would know what to do:

search://"there will also be corn served"/

It means “Go to your preferred Internet search engine and enter the string of text between the second and third forward slash, exactly as written here.” It works for non-phrase searches too:

search://thumbnail image dimensions standard/

And for combinations of word- and phrase-searches

search://tommy's tequila "san francisco"/

Note that it’s not actually a URI, so it need not obey the URI syntax rules (which involve, among other things, special sequences to represent spaces and double quotes). You can just write the search string exactly as it would be entered in the search engine’s text box. The search:// syntax takes advantage of two convenient facts:

  • All the major search engines support the same basic search string syntax, e.g., using double quotes for phrase searches.
  • “/” isn’t normally used in search strings anyway (the search engines don’t track forward slashes, although they do remember that there’s a word boundary there), so we’re free to use “/” for the delimiters around the search string.

This syntax is both human-readable and machine-parseable. The former property is crucial, because you want people to know what you’re telling them to search for before they do the search. The latter property is also crucial, because it means software can automatically recognize a search description and Do The Right Thing when you click on it (namely, take you to whatever search engine you’ve configured as your preference, enter the search string into the input box, and submit the form). “Software” means web browsers, of course, but also mailreaders and all other text-reading environments.

I’ve already starting using this syntax in email messages, and in one case even on a poster. So far everyone seems to understand it right away; that is, no one has asked me what it means, and several people seem to have done the suggested searches. Once this syntax is widespread, I expect software support to emerge organically, as happened with email addresses, with http:// syntax, and many others. When something useful is machine-parseable, software is usually quickly adjusted to recognize it.

Confidential to J. Random Hacker:

You’re probably thinking “But this isn’t even compatible with URI generic syntax as defined in RFC 3986.” That is correct. It’s not a URI. In addition to the tolerance of double quotes (which can never appear unencoded in a URI), the spaces need to remain unencoded anyway, because the string has to be comprehensible to humans. It may seem counterintuitive to use a syntax so similar to URI syntax, but there are good reasons for doing so. Nothing else would have the immediate comprehensibility of search://, because many people are now accustomed to the general format foo://bar/, and will intuitively grok what this new syntax means. I spent a fair amount of time trying come up with something better, and couldn’t. If you can, let me know… But it’s probably already too late: I’ve set the meme loose, and no one can control it now. Mu-wa-ha-ha-ha-haaaaah.

Brief background for those who haven’t been following this particular bit of theater: The radio commentator Don Imus, while watching a college women’s basketball game, called one of the teams “nappy-headed hos”. This was going too far, even for a shock jock like Imus. Advertisers started pulling their ads, and eventually Imus’s employer cancelled his show entirely, despite his going around and apologizing to everyone in sight.

Now, I’m totally in favor of Don Imus getting fired. In fact, I’m in favor of him not having been hired in the first place — who needs talk shows like that anyway?

But I was bemused, and disturbed, to hear Imus on NPR quoted saying that while he regretted his comments, he’s not a racist, and if he’d really been guilty of racist hate speech, he ought to be thrown in jail. (I wish I had the exact quote here, but I was just listening to the radio in the kitchen and not taking notes. I tried to find a transcript on the Internet, but couldn’t, even at npr.org.)

It’s obvious what Imus was trying to convey. “I’m not one of the bad guys! I’m a good guy! I’m not really a racist! It was all for show! Racists are bad people who spew hateful speech and deserve jail; I’m not one of them.”

Still, how can someone whose entire career has been utterly dependent on freedom of speech — by which I mean, freedom from government-enforced penalties for speech — turn around and stab the principle in the back like that? Sure, people lose their jobs for speech all the time, and that’s fine. Freedom of speech doesn’t mean that there’s no such thing as bad, harmful speech: there certainly is such a thing, and there are times when it should cost you your job. (Universities are a special case, and the tenure system is in part a formal protection for controversial speech by academics.) But jail? Or other state-mandated penalties? Those should be completely off the table, because otherwise people wouldn’t feel free to disagree with the government.

Thanks for nothing, Don Imus. If you want to make it up to the rest of us, send a big check to the ACLU. They’ll still defend your right to free speech, even if you won’t.