Code Monkey home page Code Monkey logo

url-shortener's Introduction

Objective

Your assignment is to implement a URL shortening service using Ruby. You can use any framework you want (or no framework at all, it is up to you).

Brief

ShortLink is a URL shortening service where you enter a URL such as https://codesubmit.io/library/react and it returns a short URL such as http://short.est/GeAi9K.

Tasks

  • Implement assignment using:
    • Language: Ruby
    • Two endpoints are required
      • /encode - Encodes a URL to a shortened URL
      • /decode - Decodes a shortened URL to its original URL.
    • Both endpoints should return JSON
  • There is no restriction on how your encode/decode algorithm should work. You just need to make sure that a URL can be encoded to a short URL and the short URL can be decoded to the original URL.
  • Your application needs to be able to decode previously encoded URLs after a restart.
  • Provide detailed instructions on how to run your assignment in a separate markdown file.
  • Provide tests for both endpoints (and any other tests you may want to write).
  • You need to think through potential attack vectors on the application, and document them in the README.
  • You need to think through how your implementation may scale up, and document your approach in the README. You do not need to build a scalable service for this challenge but you need to document how you would approach building a scalable version of it.

Evaluation Criteria

  • Ruby best practices
  • API implemented featuring a /encode and /decode endpoint
  • Completeness: did you complete the features? Are all the tests running?
  • Correctness: does the functionality act in sensible, thought-out ways?
  • Maintainability: is it written in a clean, maintainable way?
  • Security: have you thought through potential issues and mitigated or documented them?
  • Scalability: what scalability issues do you foresee in your implementation and how do you plan to work around those issues?

url-shortener's People

Contributors

pandabamboo90 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.