The query: Protocol

1
Sep
2009

Update: I implemented this idea at http://queryprotocol.appspot.com. Comments, questions, and suggestions are welcome!

When trying to explain a concept to others over email, I often find myself linking to a search engine’s result pages for a specific query, instead of a single destination URL. These are non-navigational queries, and there is no single result that I expect to be the most important one. Instead, my intention is to provide the reader a variety of links on the topic such that s/he may draw her own conclusions, or solve their own problem — all they need is a nudge towards the right query term to use. If, over time, better search results are available for the same query, then future readers get the benefit of automatically updated results.

E.g. Q: Where can I find the latest numbers related to the spread of the Swine Flu?
A: Try [H1N1 update].

To do this today, I simply link to my favorite search engine, Google. But that does not seem fair to fans of other search engines: Bing, Yahoo!, Altavista, and others. I would prefer to use a notation that allows the reader to use their choice of search engine to obtain the results. Just as we specify our default browser and default email client, we should be able to pick our default search engine.

We have already solved the first two problems (picking default browsers and email clients) using protocol handlers in the operating system. When I pass around a link to a web page, starting with http://, I do not specify the browser it should open in. Your operating system determines that it’s a link to a hyper-text transfer protocol (HTTP) document, and invokes your default browser. Similarly, for emails, the mailto: protocol provides for an application-agnostic way to invoke the user’s default email client to send an email.

It is easy to see how a query: protocol could be implemented similarly. To point you to the search results for a particular term, I would send you the following link: (don’t click on it, it won’t work — at least as of this writing.)

[h1n1 update]

The URL that the above links to is query:h1n1+update. Note there’s no HTTP protocol marker specified. If the OS wanted, it could provide local results as well. This means that the protocol extends seamlessly to Desktop Search as well.

Syntactically, this validates as a URI. Just as the mailto: protocol handler defines standard parameter names, subject, cc, and bcc, similar parameters can be standardized for the query: protocol. These may include corpus restricts (corpus={web, images, desktop, ...}), pagination controls (start=0, num=10), or domain restricts (site=manas.tungare.name).

Implementation is simple: all operating systems and major browsers support external custom protocol handlers. They can be configured as follows:

Protocol Prefix: query
Application Name: /Path/to/Application

The application does not need to be very complicated. It’s a mere stub, which, depending upon the user’s preferred search engine, converts a URI of the form query:h1n1+update to http://google.com/search?q=h1n1+update or http://bing.com/search?q=h1n1+update and opens that link in the user’s default browser.

Eventually, if browsers understand the query: protocol, there is no need for the stub application, and users may be able to share and exchange queries and yet seek results using their favorite search engines.

(The opinions expressed in this blog post are solely my own, and may not reflect the opinions of my employer, Google.)

An awesome “prank” on the Virginia Tech campus

21
Oct
2007

I received the following email a few minutes ago, with fake headers and the works, and is formatted exactly the same way as the regular email we get from these folks. It’s probably viral marketing for the upcoming game, Portal, releasing November 23, 2007. Lots of references to it in the text.

1. UNDERGROUND HALLOWEEN ADVENTURE
2. BOBBY FISCHER – ENDED THE SOVIET CHESS HEGEMONY
3. SELECTING YOUR CABLE COMPANY IN BLACKSBURG
4. PI EATING CONTEST
5. POSSIBLE BAG BAN
6. DONALDSON-BROWN LOCKS TO BE CHANGED
7. ODD – OPEN DOOR DAY
8. MICROSOFT VISTA SERVICE PACK DEMO
9. WEEKLY SPEAKER SERIES
10. REGISTRATION FOR DEAN’S FORUM ON HEALTH, FOOD AND NUTRITION
11. STUDY PARTICIPANTS NEEDED

1. UNDERGROUND HALLOWEEN ADVENTURE
A Halloween tour of the steam tunnels beneath campus will be offered for the first time this year to four groups of eight people on Oct. 29th and 30th. Sign-up for each of the four tours will begin on Monday, October 22nd, and continue until all places are taken. Interested parties should contact Richard McCoy at 231-3200 for more information.

2. BOBBY FISCHER – ENDED THE SOVIET CHESS HEGEMONY
Monday, Oct 22, 5:30-7:00 in Williamsburg Rm, 7:00-8:00 in Haymarket Theater in Squires Center The man who ended the Soviet chess hegemony by defeating Boris Spassky will speak at Virginia Tech. A reception will precede his presentation at 7:00pm. Robert James “Bobby” Fischer is a United States-born chess Grandmaster who in 1972 became the only US-born chess player to become the official World Chess Champion. Fischer’s victory during the Cold War caused a great interest in chess and is responsible for the swelling of members of the World Chess Federation.

3. SELECTING YOUR CABLE COMPANY IN BLACKSBURG
Sometime between Tuesday, Oct 23 08:00am and next Friday, Nov 2 7:00pm in Room C in the GLC Are you interested in purchasing a subscription package from your local cable company? Presenters from NTC Communications Comcast Digital Cable and Cox Communications will talk about the different internet, phone and cable packages available and answer questions about rates and programming.

4. PI EATING CONTEST
Tuesday, Oct 23, 7:00pm in Room F in the GLC the VT Math club is sponsoring a Pi festival. Approximately 3,141 pies will be available for sampling. They will include but are not limited to Apple, Banoffee, Banana cream, Blackberry, Blueberry, Cheesecake, Cherry, Chestnut, Cream, Custard, Grape, Lemon meringue, Peach, Pecan, Pumpkin, and Rhubarb. In addition, at 7:30 there will also be a pie eating contest. The first contestant to eat an irrational number of pies will receive a hand-carved Penrose triangle.

5. POSSIBLE BAG BAN
Due to the heightened security of many university campuses, a possible ban of all bags on campus may be implemented in the next two weeks. Backpacks, duffels, shoulder-bags, and purses may soon join the list of items prohibited on campus. This measure has been proposed since it has been pointed out that bags may be able to conceal already illegal items. An unlikely supporter of the ban is the campus Health and Safety Department as it would also alleviate the troubling phenomenon of overweight book bags that commonly lead to health problems later in life. Acceptance of the proposal will be decided by the campus Board of Directors later this week.

6. DONALDSON-BROWN LOCKS TO BE CHANGED
It has come to the attention of university security personnel that many graduate students have access to the GLC 24 hours a day. In order to remedy this threat to campus security, all doors to the GLC will have their locks changed between Monday evening and Tuesday morning. In addition, Donaldson Brown dorm rooms will also have their locks changed on a short rotation. You may need to request a new room key from your Residential Fellow.

7. ODD – OPEN DOOR DAY
To help promote social interaction amongst the graduate students, Thurs, Oct 25, will be open door day. Graduate students on campus are encouraged to keep their door open and meet their neighbors as well as their Residential Fellow if they have not done so already. We are aware that the doors in the GLC rooms close on their own, this is why you have been provided with doorstops. Use them! Hopefully open door day will become more routine and no longer considered odd.

8. MICROSOFT VISTA SERVICE PACK DEMO
Wednesday, Oct 24, 6:00-7:00pm in McBryde 666, Microsoft will be giving an exclusive preview of service pack one for Vista. In response to the massive number of problems, compatibility, and stability issues in Vista, Microsoft has spent the past year fervently addressing these issues in the much anticipated service pack 1 (SP1). Representives from Microsoft will demonstrate the features and stability changes of SP1, such as the newly bolstered DRM software. This update and others in SP1 that will be demonstrated should help provide Vista users with new enhanced reduced functionality.

9. WEEKLY SPEAKER SERIES
Friday, Oct 26, 4:00-5:00pm in Room F in the GLC Faculty speaker: Dr. Henry Warren – Physics, on Structure of the Proton. Graduate students and faculty from across the university present weekly their teaching and research passions in a casual, coffee house atmosphere. Free coffee and pastries served from 3:45pm.

10. REGISTRATION FOR DEAN’S FORUM ON HEALTH, FOOD AND NUTRITION
Registration for the Nov 5 forum is now open. This forum will showcase health, food, and nutrition efforts in research, extension/outreach, and teaching currently underway at McDonalds, Kraft Foods, Monsanto, and LuthorCorp. Register by Sunday, Oct 28 if you plan on attending the event. Sponsors will showcase the health benefits of the latest developments in GMOs, growth hormones, preservatives, artificial sweeteners, hydrogenated oils, flavoring and texturizing food additives. For more information, including registration links, and to view the Forum agenda, please visit http://www.mcvideogame.com/index-eng.html

11. STUDY PARTICIPANTS NEEDED
A graduate student researcher working on behalf of Aperture Science is seeking highly-motivated individuals in good physical condition between the ages of 18-25 for her study. Participants will be asked to perform complex tasks. The entire study should last a minimum of 3 hours and moist, delicious cake will be served upon successful completion of the test. For further information or to sign up to participate, please contact Glados, glados@aperturescience.com

Microsoft on a Vote-Buying Spree for MSOOXML Standardization

28
Aug
2007

The company everybody loves to hate (for good reasons, mostly) is now on a shopping spree, buying Standards Organizations in various countries to get them to vote YES on a proposed vote by the International Standards Organization to accept their binary-in-XML-clothing file format as a standard.

There are numerous good reasons why MSOOXML should not be accepted as an international standard, all nicely summarized in this document from Google, expressing their opposition to the proposal in technical terms, not political.

But the only thing today that maintains Microsoft’s monopoly in the office document market is their use of proprietary locked formats, and they would hate to lose this unfair advantage. So they have been busy manipulating the voting process in Germany, Portugal, Switzerland, The Netherlands, and Sweden (also here).

These days money can buy anything. Or anyone.

And Microsoft was never big on ethics anyway. Shame on you, Microsoft.

Update: Following coverage in the Swedish media about the Microsoft payola, Microsoft admitted to an email sent to their partners assuring market benefits and reimbursement for joining fees. The Swedish standards organization has now decided to change its decision to ‘abstain’ [PDF] because of the irregularities in the process. Hungary is also set to reconsider its vote.

A complete discussion of all objections to the standardization of MSOOXML is available from GrokDoc. Especially galling is Microsoft’s insistence on declaring the 500-year old Gregorian calendar incorrect and forcing the rest of the world to consider 1900 as a leap year because of an acknowledged bug in Excel.

Microsoft doesn’t want Mac users to switch!

1
Feb
2007

Which, on the whole, is a Good Thing™. But the way they convey the message is disgusting.

A friend pointed me to Microsoft India’s Vista Promotion (for its humor value, of course), which I tried to access using Safari on my Mac. This is the page I got back:


<HTML><HEAD><META HTTP-EQUIV="Refresh" CONTENT="0.1">
<META HTTP-EQUIV="Pragma" CONTENT="no cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD></HTML>

It is not as innocuous as it may look; there’s an infinite redirect loop on line 1. Safari didn’t crash, of course, but MS still tried.

I figured I’d see what happened if I changed the user-agent string (which, by the way, is how websites can identify what browser you are using.) I asked Safari to masquerade as Internet Explorer using a fake user-agent string, just for kicks. And lo!, the entire page showed up! Quelle surprise!

Microsoft have pulled this trick before during the launch of Windows XP (and again, and again). Will they never learn? Will they ever stop being such immature kids and not try to prevent competing browsers from viewing their websites?

I would’ve said they just lost a customer, but I wasn’t one to begin with, so that doesn’t make much sense.

Vista Promotion, as viewed in Safari/Mac OS X
Switching User Agents, from Safari/Mac OS X to MSIE/Windows
Vista Promotion, as viewed in Safari masquerading as MSIE/Windows


Plays? For Sure? No, Really?

6
Nov
2006

Users who bought music from Microsoft’s MSN Music Store (no one I know, but still) will not be able to play it on the newly-announced Zune portable player. (Oh, did I mention Zune is made by Microsoft too?)

Let’s see how many different classes of people they’ve alienated this time:

  1. There are the users who bought players from their hardware partners. If they want to “upgrade” to a Zune, they’ll have to re-buy their music.
  2. Their hardware partners, because this is going to affect their sales, no doubt.
  3. Their music suppliers, because they’re discontinuing the MSN Store.
  4. And this is in addition to all of us Mac OS X and Linux users for whom Microsoft doesn’t even have a media player (not that we care, but still.)

From playsforsure.com:

Look for the PlaysForSure logo if you’re shopping for a music or video device and you want to make sure the digital music and video you purchase will play back on it every time.

Heh. I’d just buy an iPod, then. :)

And the irony to top it all is that this initiative was called ‘Plays for Sure’. Yeah, right.

Presentations: The Good, The Bad and The Ugly

18
Sep
2006

I’ve been reading Presentation Zen lately, and various related resources. I’ll credit Stanford Law School Professor, Larry Lessig, with exposing me to “alternate” styles of presentation when he gave a talk at Google last Summer.

Some interesting quotes and links I picked up along the way, with credits.

“If someone that did not attend to [sic] my presentation can understand anything if I mail them my slides, I have made a really bad set of slides. Really bad.” — eirikso.com.

“What a computer is to me is it’s the most remarkable tool that we’ve ever come up with, and it’s the equivalent of a bicycle for our minds.” — Steve Jobs.

An excellent presentation from Seth Godin at the Gel Conference, on all things broken!

Jonathan Shewchuk’s tips for academic talks.

“Start-up a PowerPoint presentation and the average IQ of the room drops by 10 points.” – Anon

A suicide PowerPoint presentation featured on The Onion.

Because You Can …

5
May
2006

I’m installing Windows XP on a Mac. Well, a lot of folks are doing that today thanks to BootCamp, but there’s a difference: I own a PowerBook, not a MacIntel. (For the non-technologists, the PowerBook uses a PowerPC processor, not an Intel x86 processor.) I came across a qemu port for Mac OS X named Q that emulates an x86 very, very, slowly. So I’m installing Windows, well, because you can.

Apart from the performance, the other thing that’s been bothering me is Microsoft’s counter: there’s a little counter by the side which has been saying “Setup will complete in approximately 23 minutes” for the last couple of hours. I mean, if you’re gonna put a counter there, shouldn’t it accurately reflect the time remaining, based on the speed of the processor you’re running on? Right now, it seems to me like the timestamps have been hardcoded, and even if it takes days to install, it will still maintain a cheery-faced “23 minutes to completion.”

Windows on a PowerPC Mac


Microsoft Vista Preview

12
Apr
2006

Here’s a preview of Windows Vista. The soundtrack seems to be a Microsoft original; the operating system on the other hand, ahem. This is an interesting followup to a previous post by me.

Copyright notice: I did not find copyright information about this video on either Google Video or MetaCafe. If you are the copyright owner, and would like me to remove this video (embedded from Google Video), please contact me.

What if Microsoft designed the iPod packaging?

27
Feb
2006

This is a pretty interesting (and sadly true) parody of the iPod packaging.

Reminds me of Antoine de Saint Exupéry’s comment on design: "Perfection in engineering is achieved not when there is nothing left to add, but when there is nothing left to take away." This reflects the important distinction between Apple and Microsoft …

Ten Reasons to Buy Mac OS X instead of Windows Vista

Permanent Link | Filed under: Apple,Microsoft
18
Feb
2006

Michael Desmond has a piece in PC World, titled, Ten Reasons to Buy Windows Vista. Frankly, after reading his article, it seemed to me like, “Ten Features that Windows Vista borrowed from Mac OS X Tiger”. And even on the PC platform, there are free (as in beer or as in freedom) third-party utilities that give you everything. If you’re running Windows XP, the only reason to upgrade seems to be a shiny new Aqua-inspired UI called Aero, and that too, if your graphics card can handle it.

Here’s what I mean:

Redmond, start your photocopiers.

  1. Security, security, security: Mac OS is based on OpenBSD, has only had one virus worthy of mention so far (which, BTW, spreads by relying on the user clicking it and then wilfully giving it the administrator password. Vista is only now getting User Account Protection (and it’s a Microsoft version-one feature, we all know what that means). On Mac OS X, it’s been like that ever since the switch to OpenBSD, so administrator privileges are not required for regular use (like running programs, you know.)
  2. Internet Explorer 7, a Firefox-inspired makeover: (Those are Desmond’s words, not mine.) Mac OS has Safari, that is better than either Firefox or IE. It’s the only browser to pass the ACID-2 test; even Firefox cannot boast of that much standards compliance. I’m still not sure why buying a new operating system to get a browser makes more sense than downloading the better browser for free on your current OS.
  3. Righteous eye candy: Windows plays catch-up to Mac OS. Yet again. Yawwwnn.
  4. Desktop search: Spotlight has been here for how long now? And on Windows, trust it to the guys who know search: Google. Google Desktop is a free download for Windows 2000/XP. (Disclaimer: I worked on Google Desktop.)
  5. Better updates: Good thing they corrected yet another mistake. And yet another feature that has been the right way on Mac OS. Why was checking for operating system updates ever a feature accessed by a web browser?
  6. More media: Desmond boasts Windows’ new media player, dvd creation software and photo manager. Hmm, that sounds like iTunes, iDVD and iPhoto to me. And now, iWeb, since 2006. Available free with every Mac.
  7. Parental controls: Seen that, but never had to use it. So I don’t know how good it is on Mac OS X, but it exists.
  8. Better backups: Copy and Paste. Because your data isn’t stored in C:\Documents and Settings\Username\Application Data\Company\Program\somewhere. Pick up your home directory, and put it where you want to back it up. Your documents and settings go with it. For more power, get the free Apple Backup.
  9. Peer-to-peer collaboration: Bon jour, mes amis.
  10. Quick setup: This is one where I can’t compare Windows and Mac OS. Mac OS came preinstalled on my PowerBook (obviously), and I haven’t ever had to reinstall it. Windows, on the other hand, has stolen precious days out of my life, because the only way to make my system faster was to reinstall it. Of course, the 15-minute installation time is only for the OS itself … (but even that is a huge help to those have to live with it).

I must add that (most of) these features have existed on Mac OS for quite a long time, so they have been better tested and exercised. I’ve never been able to rely on first-generation Microsoft products, so I have my reservations there. The only reason to stay with Windows is if you have Windows-only applications. Then again, they work fine on your machine today, so why upgrade?

I switched from being a heavy Windows user (and developer; check out the Projects section on my website) to a Mac user last year. The transition has been smooth and painless, and I’m still discovering features and applications that make me go wow. If you’re in the market for a new computer, do seriously consider a Mac. You’ll thank yourself for it for years to come.

Update: This comic sums it up nicely.

Which version of Vista should I buy?

Aiming for the Lyttle Guy

8
Nov
2005

Microsoft is at it again. This week, they sent a trademark infringement notice to a 22-year old Australian Windows developer, Adam Lyttle, who wrote and distributed a program named Windows Defender. He agreed to sign over the rights to Microsoft, since it probably was a genuine trademark infringement case. But when signing the agreement, Microsoft sneaked in a clause that gave them all rights to the Windows Defender name. Adam did not receive any monetary compensation, of course; nor was he informed why they decided to pursue this particular case, and why they demanded rights to the name.

It was all revealed today, when Microsoft named its antispyware app ‘Windows Defender’.

Last year, the company went after Mike Rowe, a 17 year old developer, who owned a site named MikeRoweSoft.com. They succeeded in getting the site taken down, citing that the site’s pronunciation was too close to their own name, but later realized that they took him too seriously.

I wonder how much the two names, “MikeRoweSoft” and “Windows Defender” diluted Microsoft’s trademarks. But IANAL (I Am Not A Lawyer), so I may be wrong. But does this mean that young developers (…, developers, developers, developers, … you know the drill!) must first take Law 101 before they write the first line of code? How much research should I perform before I pick a name for my shiny new product? I can’t afford to hire a legal department the size of Microsoft’s, so does that I mean I’m left to fend for myself?

.Net Wrapper for Google Desktop Search

23
Mar
2005

I’ve been reading the Google Desktop Developer Forums pretty often, partly to see what people have to say about my Spindle Search plugin, and partly to help whenever I can.

I realized that a lot of C# / .Net developers are reinventing the wheel when writing code for interoperating with the Google COM object. So I thought, why not separate that into a library (I already had the code written as part of Spindle Search.)

So there’s now a new project, .Net Wrapper for Google Desktop Search, on my site.

Bookmark and share using ...

Delicious Facebook Digg Google Friendfeed Stumbleupon Twitter Linked In