5 ms·
End users are given bit.ly URL with a hash.
by HelloBeautiful 15y ago
End users are given bit.ly URL with a hash.
- angusgr 15y agoSplitting hairs because it's closer to a common understanding, but bit.ly URLs aren't hashes they are just alphanumeric IDs. The difference is that AFAIK there's no algorithm to take a URL (plus or minus a username) and give you a bit.ly ID, short of looking it up at bit.ly.
- jholman 15y agoAnd the relationship is this: 'path' element of bit.ly URLs are keys in a key->value mapping (where the value is your target URL), and one of the best implementations of a key->value mapping is a hash-table. (At least, it's good for in-memory implementations... I suppose that on disk something a little more elaborate may be called for?) Historically, the authors of Perl and Ruby (and WP tells me, Common Lisp?) decided to confuse the interface with the implementation, and use "hash" or "hash table" to refer to the mapping, and not ever Perl hacker has a Computing Science degree, so now we live in a world of people who think that "hash" means the thing that bit.ly does for you. Once again, Larry Wall Ruins Everything. :P
- dfox 15y agoIn Common Lisp, it's not interface for mapping but really an hash table as some internal details of hash table implementation are exposed by the interface.