Archive for June, 2008

This is one of those things onto which I’ve been really slow to catch, but which seems to have eluded many other developers so far, so I don’t see sharing it being a waste of time. I eventually decided to look into it this evening and found it’s just as simple to implement as I’d hoped.

I’m talking about allowing browsers to ‘discover’ the search functionality on a site so that users can add it in a couple of clicks to the list of search engines available in the browser’s built-in search box (to the right of the address bar in Firefox, Internet Explorer 7+, etc).

This can be achieved by describing your search engine with an XML file called an OpenSearch description document and providing browsers with a link to that XML in the head of your HTML:

<link rel="search" type="application/opensearchdescription+xml"
    href="/search.xml" title="Example.com Search" />

The specification is described in meticulous detail on the OpenSearch site but the examples of the XML description documents are breezily self-explanatory.

Just be aware that if, like me, you can’t be bothered to return results in RSS or Atom and would rather use your site’s existing old-school get query URLs, you probably want to use the following sort of Url element (instead of the fancy-pants RSS one in the “simple” example):

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>Example.com Search</ShortName>
    <Url type="text/html" method="get"
        template="http://www.example.com/search?q={searchTerms}" />
    <!-- ...snip... -->
</OpenSearchDescription>

Comments

It’s not as if there aren’t already several URL-shortening services, but nonetheless I decided not long ago to start making this and now I’ve got a working version (of sorts) running on the web.

Shorten long URLs with attoURL.

I suppose the challenge that I want to relish is to add something unique to my variation on this simple concept in order that my variation will have a reason for existing. I’m still thinking about what that unique element might be.

Comments

As a geek I have an appreciation for the versatile: the Swiss army knife; the command line terminal emulator; the roll of duct tape.

I also have a fetish for the simple object ruthlessly made perfect for a single purpose. My new Sigg bottle is precision-engineered to carry liquid. That’s all it does. It doesn’t attempt to thermally isolate it. It doesn’t leak and it doesn’t impart any taste. (I bought the bottle for carrying water with me while commuting on the hot, cramped tube, in the hope that it might eventually save me money on buying expensive bottled water. Efficiency: another geek goal.)

Sigg bottles are available with some fairly fashionable designs, but mine is black. Why black, when I could choose from a myriad colours and patterns? It’s not that I don’t appreciate beautiful things. (If my girlfriend is reading this, you alone are proof of that!)

What started as me wondering about this turned into a revelation about what means to be a geek. As a geek I see beauty in function as well as form—and there is more beauty in the unadulterated functionality of the Sigg bottle than there could be in its exterior form.

Comments

MySpace logo

MySpace. Home to some of the greatest user-created eyesores on the Internet. Inflictor of immeasurable pain upon web developers employed to shoehorn hacked and mangled code into custom profile layouts—creations of which Dr Frankenstein would be proud. Plagued by reliability problems and exploited by dangerous user-created scripts.

That’s my view of the social network, at least.

On MySpace’s developer site, the long preamble to OpenSocial on the MySpace Developer Platform is a gem of autobiographical prose which presents an entirely different (and patronisingly worded) perspective on MySpace’s code pedigree. A view from the inside, perhaps, where everything we thought MySpace were doing wrong was actually what they were doing right; where the apparently well-deserved repercussions of their shoddy code and lax security were no less than unwarranted assaults on their pioneering social “utopia”.

And a view where MySpace’s inevitable catching-up to Facebook’s well-executed application platform is varnished over with a smug account of how MySpace got there first:

MySpace has a very interesting history with applications written by users. You, gentle reader, may very well have participated in that history.

Through a little known technology known as “cut and paste”, users could “install” applications they liked on their own profiles.

There may be more to come here about MySpace’s application platform as I try to develop for it in the near future. If this introduction was supposed to repair relations with developers for whom MySpace has long been a source of mirth, however, it’s had the opposite effect on me.

Comments