
An algorithmically reversible personal URL shortener - donohoe
http://tantek.pbworks.com/Whistle
======
nitrogen
I like the algorithmic reversibility, but this seems to depend on a specific
site layout. Would something like this be possible for abitrary URLs without
actually making them longer?

Simply converting to base 60 or 64 wouldn't work, but since most URLs have
characters that are close to each other, what about storing the differences
between characters and/or using Huffman coding (or something similar) to give
shorter symbols to the most common characters/differences? Maybe a preshared
dictionary of common URL components?

------
chacha102
I think the author got a little too caught up in flickr's cleverness of making
an ID based on different information. For instance, the first letter is the
post type, then a group of letters is date, and then there is the post number
for that day.

The fact is, not many people are going to go devise their own URL shortening
algorithm and implement it. While it is a good idea, I just don't think many
people will put in that kind of effort.

What might work is a more general algorithm. An algorithm that can reliably
shrink and unshrink any URL.

I'm not sure, but this might not be possible considering that many people have
invented compression algorithms, and the general rule is that if you compress
data, you are going to loose data. (I'd like to hear someone's opinion on that
considering I haven't dove deep into compression)

Edit: By 'possible' I mean 'meaningfully possible'. Taking a URL around 50-80
characters and making it around 20-30.

~~~
tel
I am not an expert, but for lossless compression I believe the idea is that if
there's a mismatch between the size of an encoded symbol and it's information
content (novelty) -- then you've got some room for lossless compression.

Is that the case with URLs? Probably not directly. Certain atoms (.com, www)
might be encodable to save space, but it'll not necessarily be a big gain.

~~~
nitrogen
It might be enough to shorten only the most common sites and platforms' URL
forms.

------
wzdd
His argument doesn't make sense to me. Consider the uses he gives for the
shortened URL:

    
    
      * Presentations
      * Email
      * IM and Twitter
    

Given these use cases, what, exactly, is the utility of retaining the longer
URL? If every time you reference the location it's through the short URL, then
the advantages of the longer URL (comprehensibility, mainly) are lost --
because nobody will ever look at it!

It seems like the only reason to do this is to maintain compatibility with
systems which impose a particular URL scheme.

The post is a good argument for making shorter URLs in general, not a good
argument for a personal and application-specific URL shortener.

------
davnola
Yes, but two major difficulties mitigate against its adoption.

First, only a tiny number of people will actually devise, implement, and
install their own shortener. Perhaps the major blogging platforms would adopt
it, but that still leaves a large number of sites uncovered.

Second, consumers of URL shorteners actually want unique short URLs so they
can track clickthru. So even if a site self-hosts reversible personal short
URLs, consumers will not adopt it.

I have no alternative positive suggestion. It would be nice if URL shorteners
called a webhook on the shortened domain.

------
kuahyeow
[http://tantek.pbworks.com/NewBase60#AdditionalImplementation...](http://tantek.pbworks.com/NewBase60#AdditionalImplementations)

I can't find any actual code for the shortener. But the base60 should allow
you to come up with your own shortening scheme

