1.0.16 • Published 4 years ago

get-forecast-arash v1.0.16

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Front-end library

Objective

This is a programming task that will test your ability to use the Node JS environment to develop a front end library, in line with the work we do at Joyn.

The Task

Write a library with a single api called getForecast() which returns weather forecast parameters like precipitation, temperature, humidity etc. The API should make use of the publicly available weather API OpenWeatherMap.

The API takes no inputs and returns an JSON object. For example:

    {
        "temperature" : "18.2C",
        "precipitation" : "0.1",
        "humidity" : "93%"
    }

The library must take into consideration certain user preferences which are stored in a JSON file:

  • location of the user
  • forecast parameters like:
    • precipitation
    • wind speed
    • wind direction
    • temperature
  • forecast period (in hours)
  • forecast units (metric/imperial)

An example of how the user preferences JSON might look like:

{
    "parameters" : ["precipitation", "temperature", "humidity"],
    "location" : "Munich",
    "units" : "metric",
    "period" : "2"
}

Based on the user preferences mentioned above, the API should get the following forecast-data for the city of Munich over the next 2 hours:

  • precipitation probability
  • temperature
  • humidity

Technical requirements

The library you build should:

  • Provide unit tests using testing frameworks.
  • Be consumable as a single prebuilt, minified file.
  • The API should be asynchronous.
  • Have a simple HTML page that demonstrates the implementation of the library API.
  • Assume the user preferences file is stored as a JSON file in the same path as the packaged library file (e.g. in the /dist folder).

Constraints

  • Use Node.js version 10+
  • Do not introduce any system dependencies (databases, caches, search engines, docker, ..) to solve this task. This task is about your problem solving skills and not about creating a production ready system. It should not require more than npm install and npm run build to have a packaged library.
  • 72h after being added to the project, your pushing rights will be revoked and the latest commit of your implementation will be the basis for your evaluation.
  • We respect your time and encourage you to keep it simple: You are not expected to spend days on this - just proof that you know how to write great software in Node.js

Evaluation criteria

In general you can think of the evaluation being a thorough peer review of your code. You will be evaluated by a number of criteria, among others:

  • How well did you apply engineering best practices (general & node.js specific)?
  • Is the library working as intended?
  • How readable is your code?
  • Does the library solve the problem
    • correctly?
    • efficiently?
  • Is your code consistent in itself (styling, language constructs, ..)?
  • Appropriate use of 3rd party modules
  • Proper use of git
  • Making good assumptions and documenting them
1.0.16

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.10

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago