Giter VIP home page Giter VIP logo

geohashing-exercise's Introduction

Geohashing Exercise

Implement a geohashing restful service, as described in XKCD:

XKCD

Given: GET /geohash?lat=37.421542&lon=-122.085589

Expected Output from API: => 200 application/json {lat: 37.857713, lon: -122.544543}

Inputs

  • Dow Opening Query:

https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22%5ENDX%22%2C%22INDU%22)&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=

Extra Credit

  • Accept lat/lon as POST
  • Abstract the geohashing logic into a separate module
  • Cache the dow opening API call to occur once per day
  • Write unit tests for the module and/or TDD your way there!
  • Use pipe instead of a callback to handle the stock call
  • Implement a "cacheable" function that takes as input a function to cache, and a cacheKey such that when you compose the functions together ie: cacheable(myFunc() {..}, "my-cache-key") you are returned a function that caches results for that key; use this function as your caching strategy
  • Implement a promise-based API
  • Make the promise-based API also handle callbacks :)

geohashing-exercise's People

Contributors

davemo avatar willkoehler avatar

Watchers

 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.