tecznotes

Michal Migurski's notebook, listening post, and soapbox. Subscribe to this blog. Check out the rest of my site as well.

Apr 14, 2009 1:34am

the shortest thing that could possibly work

I've been watching the brewing energy around Kellan's rev=canonical mind-bomb from just last week. Les Orchard has this to say:

You guys are moving on this stuff too fast! Welcome to 2002, when lots of us had more spare time than employment and we deployed new crap like this on our blogs and sites daily.

I'm convinced.

One of the small tools that I think would make rev=canonical even more useful is a rapid, brainless way to create short URLs for any domain. It's possible, in a brief PHP script that only knows how to speak HTTP, to:

  1. Redirect from short URLs to long URLs
  2. Respond with a short URL for a given long URL
  3. Add a new short URL for a given long URL

"teczno.com" is already a pretty minimal domain name, so I've gone and made a shortening service at "/s" that does all of the above for every page on this blog automatically, e.g. http://teczno.com/s/x for http://mike.teczno.com/notes/, http://teczno.com/s/47 for this post, and so on. Each time a page here is accessed, it calls home for a short URL and makes a new one if necessary, backed by a tiny, three-column MySQL database. The short URLs get longer as the database fills up.

I've put the whole thing on github, in the hopes that new clients in other languages might be written.

It's called "shlong". =)

Comments (2)

  1. Ha, did the punch line come up before the project, or was it a happy consequence? It's funny to read this post shortly after this post: http://www.boingboing.net/2009/04/04/why-url-shorteners-s.html

    Posted by Taylor Wright on Tuesday, April 14 2009 11:11am EDT

  2. No comment. =)

    Posted by Michal Migurski on Tuesday, April 14 2009 11:40am EDT

Sorry, no new comments on old posts.

June 2017
Su M Tu W Th F Sa
    
 

Recent Entries

  1. blog all dog-eared pages: human transit
  2. the levity of serverlessness
  3. three open data projects: openstreetmap, openaddresses, and who’s on first
  4. building up redistricting data for North Carolina
  5. district plans by the hundredweight
  6. baby steps towards measuring the efficiency gap
  7. things I’ve recently learned about legislative redistricting
  8. oh no
  9. landsat satellite imagery is easy to use
  10. openstreetmap: robots, crisis, and craft mappers
  11. quoted in the news
  12. dockering address data
  13. blog all dog-eared pages: the best and the brightest
  14. five-minute geocoder for openaddresses
  15. notes on debian packaging for ubuntu
  16. guyana trip report
  17. openaddresses population comparison
  18. blog all oft-played tracks VII
  19. week 1,984: back to the map
  20. bike eleven: trek roadie

Archives