Solving the TinyUrl centralization problem
scripting.com
scripting.com
URLs should be as simple and short as possible but not too simple and short. It should still tell me where I'm going, just extremely succinctly.
I see developers make this mistake all the time. They make their URLs look like this: http://example.com/users/dcurtis/profile . That has at least 14 useless characters in it. It could be changed to http://example.com/dcurtis with no loss at all, because /users and /profile both are useless structural information.
I wouldn't consider the users and profile namespaces a mistake. People get cute and it can create a large constraint how your architecture works. Also, URLs structures as such are often a result of some framework behind it. http://example.com/model/controller/view. It expedites development and managing code something fierce. Perhaps there is opportunity for a shortening widget within the MVC pattern. I need to think about it -- or let other smarter people than me think about it. :)
http://www.amazon.com/shamwow is invalid, along with the other permutations I tried. Amazon doesn't have core shortening service, it seems.
I think the issue is more around URLs which can be parsed by a human vs the proverbial querystring. A TinyURL solves technical problems and looks nicer which is 2/3 of the way there. The remainder makes sense to a person.
/users and /profile do not ever have extra information, except in extreme cases where you have /users and /aliens and /pants that your app is centralized around.
Having a hierarchical resource namespace makes plenty of sense in many contexts. If nothing else, it's more likely to be long lived because it makes URL redirection easier in the future if the system changes. When version 2 of the site software comes out, someone can easily redirect all the /profile urls to a legacy system or parse them into the new system. Whereas a flat namespace is much harder to migrate and keep constant.
And besides, we shouldn't confuse the two issues of readable URLs and short alias URLs. Both have very legitimate uses.
Unless you absolutely positively have to have another extra layer of url hierarchy, and you can justify it extremely well, please don't. It's just a burden on the user when they go to share/copy/read it.
Imagine the namespace collisions if every product that amazon sold could shorten like that. Categories break down nicely though.. eg wii, books, even garden
I have successfully cut-n-pasted long URLs into IRC, Email, and IM, and it has never not worked. It may be a bit ugly, but who really cares?
If you're not going to make your own, and are obsessed with shortness, though, we just launched our own shrinker:
How long has it lasted? What is going to kill it that hasn't killed it yet?
a href="longurl" : shorttext