URLs suck

jerakeen.org contains just about everything I produce, and I try to use sensible urls – every page has a unique url, of the form /category/slug/ or /category/yyyy/mm/dd/slug/. The index for a category is just /category/. Pages have tags, and you can see all pages belonging to a tag at /tags/tagname/ as well. You can search using /search?q=search_term. Finally, you can get a feed of any category at a /category-name/feed page.

Enough back-story. This system is just about sensible, but only because it’s so simple, and even then there are odd bits. For instance, why category/feed? Why not feed/category? Why does the search page have a CGI parameter in it, but not the tag pages? Suppose I wanted an RSS feed of pages tagged with ‘python’, what would that URL look like? /feed/tag/python? /tag/python/feed/? Feed types are not sub-headings under categories. The single-page permalinks make sense, but why do they encode only the category, date and slug? Why not the tags?

Essentially, I want to describe several dimensions of filtering as well as a view type in a single URL, and I’m feeling constrained by the requirement to have a linear path. I want to describe lists of pages filtered by category, tags, search terms and dates, and I’d like to view this list of page as an HTML file, or as RSS, or Atom, or JSON… Essentially, I’d like the innards of my site to be a pipeline – I perform searches, get a list of pages, sort them, then render the list. Each step has little to do with the other steps. I also shouldn’t have to do anything special to my code to add an RSS feed to a tagged page list – it should have a feed automatically just because it’s a list of pages.

At this point, something similar to ?category=blog&tag=python&view=atom makes a lot more sense as a sensible URL. It’s actually describing intent properly. I could always just put each of those words into a normal URL path, but there’s an implicit assumption that the ordering means something there, and it’s not true. There are many way of ordering parameters, of course, so the uniqueness of the URL is broken to a certain extent, but anyone trying to uniquely identify URLs really should be normalizing parameter order anyway.

This leaves me with a few problems. Parameter-using URLs are certainly a lot uglier than path-based ones. Google seem to be ok with parameters in URLs now, but only up to a point, and I have three parameters on the trivial example above already. As an alternative, blech suggests something akin to Perl’s hash interpolation – an url like /category/blog/tag/python/view/html, which is an interesting idea, but still falls prey to the ordering problem. The ordering of the path atoms in an URL implies a strong hierarchy that doesn’t exist here.

Essentially, URLs suck. They’re not dimensional enough for my needs already, and this site is utterly trivial.

the broken desktop metaphor

There was a throw-away comment by Dan Hill in an article on Elite about the desktop metaphor and the workarounds we have to use to make it work. Now, I don’t think exposé is a work-around. I think it’s the most sophisticated window-management system I’ve ever used, it’s lovely. But it does hilight something that’s need nagging at me for a while. The Desktop.

Now, essentially, the desktop metaphor is broken. It’s not a desktop at all. It’s far too small, for a start, I’ve heard it described as the airplane seat metaphor. But the most important distinction is what’s underneath all your bits of paper. Suppose you have a real desk. Pick up all the things on it and look underneath them. What do you see? You’ve got a completely blank desk. Ok, now hide all your windows and things from your computer ‘desktop’. Got a blank desk? No? Didn’t think so.

Eventually, everyone needs a hack in their windowing system so that they can get at the desktop. Windows has ‘Minimize All’, or in extreme cases, ‘Show desktop’ (there’s a difference between these two. Try explaining the difference to a non-geek). For me, Windows always seems neatest with all windows either maximized or minimized. The fact that the only graphical way of getting at your hard disk is the ‘My Computer’ icon on the desktop means that you need to be able to get at it easily. Mac OS X 10.2 and before never had a really good solution to get at the desktop. There are various third party hacks but the only decent way I ever used was to Command-Option-Click on the desktop, or Command-Option-H with the Finder focussed. This hides everything except Finder windows. Of course, if there are Finder windows blocking your desktop, you’re stuffed. Ah, well.

Exposé solves this – one button and all your windows get out the way. Yay! Finally they’ve solved a problem Windows solved 5 years ago. (Or whenever, I don’t care).

I’m tired of working round this. I can shuffle through all of my windows with Command-Tab, but I can’t get to the desktop without moving all the windows out the way? This is an annoying special case, and I don’t like it.

New philosophy. Nothing will go on the desktop. Nothing at all. I won’t display drives on it, I won’t save files on it. I’m going to change it’s permissions so that I can’t write to it. My default download folder will be a folder in my home directory. We’ll see how long I last before I go insane.

Update – I follow this up here