So you want to write a URL shortener? Let’s make it short and painless. You’ll need two pieces: a key generator and redirector. The key generator is used to represent a shortened url with a series of characters, often a-zA-Z0-9. This is what you see at the end of tinyurl and bit.ly links. The redirector needs to link the key to a url and perform a HTTP redirect. Shall we? First things first The s