Giter VIP home page Giter VIP logo

hellofresh-recipe-count-test-2020's Introduction

Recipe Stats Calculator

In the given assignment we suggest you to process an automatically generated JSON file with recipe data and calculated some stats.

Instructions

  1. Clone this repository.
  2. Create a new branch called dev.
  3. Create a pull request from your dev branch to the master branch.
  4. Reply to the thread you're having with our HR department telling them we can start reviewing your code

Given

Json fixtures file with recipe data. Download Link

Important notes

  1. Property value "delivery" always has the following format: "{weekday} {h}AM - {h}PM", i.e. "Monday 9AM - 5PM"
  2. The number of distinct postcodes is lower than 1M, one postcode is not longer than 10 chars.
  3. The number of distinct recipe names is lower than 2K, one recipe name is not longer than 100 chars.

Functional Requirements

  1. Count the number of unique recipe names.
  2. Count the number of occurences for each unique recipe name (alphabetically ordered by recipe name).
  3. Find the postcode with most delivered recipes.
  4. Count the number of deliveries to postcode 10120 that lie within the delivery time between 10AM and 3PM, examples (12AM denotes midnight):
    • NO - 9AM - 2PM
    • YES - 10AM - 2PM
  5. List the recipe names (alphabetically ordered) that contain in their name one of the following words:
    • Potato
    • Veggie
    • Mushroom

Non-functional Requirements

  1. The application is packaged with Docker.
  2. Setup scripts are provided.
  3. The submission is provided as a CLI application.
  4. The expected output is rendered to stdout. Make sure to render only the final json. If you need to print additional info or debug, pipe it to stderr.
  5. It should be possible to (implementation is up to you):
    a. provide a custom fixtures file as input
    b. provide custom recipe names to search by (functional reqs. 5)
    c. provide custom postcode and time window for search (functional reqs. 4)

Expected output

Generate a JSON file of the following format:

{
    "unique_recipe_count": 15,
    "count_per_recipe": [
        {
            "recipe": "Mediterranean Baked Veggies",
            "count": 1
        },
        {
            "recipe": "Speedy Steak Fajitas",
            "count": 1
        },
        {
            "recipe": "Tex-Mex Tilapia",
            "count": 3
        }
    ],
    "busiest_postcode": {
        "postcode": "10120",
        "delivery_count": 1000
    },
    "count_per_postcode_and_time": {
        "postcode": "10120",
        "from": "11AM",
        "to": "3PM",
        "delivery_count": 500
    },
    "match_by_name": [
        "Mediterranean Baked Veggies", "Speedy Steak Fajitas", "Tex-Mex Tilapia"
    ]
}

Review Criteria

We expect that the assignment will not take more than 3 - 4 hours of work. In our judgement we rely on common sense and do not expect production ready code. We are rather instrested in your problem solving skills and command of the programming language that you chose.

It worth mentioning that we will be testing your submission against different input data sets.

General criteria from most important to less important:

  1. Functional and non-functional requirements are met.
  2. Prefer application efficiency over code organisation complexity.
  3. Code is readable and comprehensible. Setup instructions and run instructions are provided.
  4. Tests are showcased (no need to cover everything).
  5. Supporting notes on taken decisions and further clarifications are welcome.

hellofresh-recipe-count-test-2020's People

Contributors

nenad avatar ichiaohsu 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.