Skip to content

Instantly share code, notes, and snippets.

@thomasballinger
Last active December 27, 2015 04:39
Show Gist options
  • Save thomasballinger/7268187 to your computer and use it in GitHub Desktop.
Save thomasballinger/7268187 to your computer and use it in GitHub Desktop.

Let's build a Bitly Clone!

Bitly is a url shortening service. Building a url shortener is a common interview question / take home project, because it's a minimal project that involves many aspects of web development. Build a website that allows you to submit a link, then gives you a new, hopefully shorter url to use for that link.

Advice and motivation

Typically at Hacker School understanding is emphasized over ability to throw things together - this is an exercise in the latter. It's also practice reading documentation to figure out how to do things quickly, and a guided way to gain exposure to web development concepts that you might research more after this sprint today. It reminds me (in good and bad ways) of a hackathon.

A programming task like this would obviously be individual in most job application settings, but helping each other out if fine today. A good level of help to provide is answering the questions "How do you make a dynamic web page?" with "Flask is a simple web development framework for Python, here's a link to the documentation," and not "I'll Zulip you the code, just copy and paste." The projects aren't actually being graded, this is just an exercise in seeing how far you can get. You can work together if you want, but I recommend you don't in order to really accurately assess your knowledge and skills learning enough to build something. If you're the sort of learner who likes answering "how do I do _____", this structured task can serve as a jumping off point for many topics.

If you'd like to share hints, thoughts, questions etc, use this hackpad link https://hackpad.com/LsUcOCXbNDw or the Zulip Friday Jobs stream.

Because everyone's at a different point with web development, everyone should get to different points in this list.

  1. Build a webpage you can visit in a web browser.
  2. Make a form on this webpage
  3. Make submitting the form result in a new link that can later be used to get back to that site
  4. Display data on how much
  5. Display that data graphically
  6. Make that data private to whoever made the original shortened link

Here are some bonus items to throw in anywhere

  • Make shortened links not guessable
  • Deploy your site somewhere besides localhost
  • graphically display the click data
  • load test your server - can you take 100 posts per second? 1000 shortened link GETs per second? Make is so you can.
  • make a bookmarklet that gives the user the shortened version of a link without leaving a page.
  • style your page a bit
  • update your link click stats in realtime (no refresh required)
  • break down link click stats by browser
  • Build an api for people to use to access their click data

If you like "points," then see this version of the task: http://gist.io/7268256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment