Skip to content

Instantly share code, notes, and snippets.

@BBischof
Last active January 9, 2019 12:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BBischof/d788f98b3305ffe157a60091f4bcc686 to your computer and use it in GitHub Desktop.
Save BBischof/d788f98b3305ffe157a60091f4bcc686 to your computer and use it in GitHub Desktop.
Work-at-home Challenge for Blue Bottle Coffee Engineering Manager

Engineering Manager Challenge (Allot at least 2 hours)

Note: Don’t feel constrained by the time limits.

Consider the following scenario:

You have 2 scheduled roasts of Hayes Valley Espresso totaling 50lbs. (For simplicity, assume that all batches are maximum of 30lbs for physical reasons).

Roast A, 20lbs available. 
Roast B, 30lbs available. 

You have 50 total lbs of coffee demand that needs to be assigned to roasts A and B. The demand is divided into the following subsets as 1lb bags. Note: It is okay to split a subset into smaller sets but this should be minimized. 

Subset C: 10lbs 
Subset D: 17lbs 
Subset E: 12lbs 
Subset F: 7lbs 
Subset G: 4lbs 

Below is an example of the desired outcome (one of many possible combinations). 

Roast A - 20lbs 

Subset C: 10lbs 
Subset F: 7lbs 
Subset G: 3lbs (3 out of 4lbs) 

Roast B - 30lbs 

Subset D: 17lbs 
Subset E: 12lbs 
Subset G: 1lbs (1 out of 4lbs) 

Below are some other examples that might be helpful.

Challenge

We wish to design web-app that solves this problem on a much larger scale, and effectively.

  • Design an implementation plan for this app, some things to consider: (allot at least 1-3hrs)

    • software architecture
    • language/frameworks
    • hosting/deployment strategies
    • necessary integrations (storage/error-handling)
    • API spec (endpoints, how to query, responses)
    • presentations of this plan for various audiences (outline a briefs for engineers, another for execs)
    • be prepared to describe the development cycle; what are the logical parts that could be split into separate stories.
  • Understand and implement a solution to this problem in code: (allot at least 1hrs)

    • Implement the above algorithm(JUST THIS ALGORITHM IS NECESSARY) in either Ruby or Python(certain other languages admitted upon request) to conform with your spec
    • Be prepared to present—with explanation—the algorithm you used for solving the above problem.

Please submit a document with these materials—md, txt, pdf, doc are all accepted

On-site Presentation:

During a potential on-site, we will ask for a 35 minute presentation(with 10 minutes additional for questions) on the above material. We'd like you to present the above as if you were outlining the project as an engineering effort for coming sprints.

Request

{
  "roasts": {
    "roast A": 20,
    "roast B": 30
  },
  "subsets": {
    "subset 1": 10,
    "subset 2": 17,
    "subset 3": 12,
    "subset 4": 7,
    "subset 5": 4
  }
}

Response

{
  "roast A": {
    "subset 1": 10,
    "subset 4": 7,
    "subset 5": 3
  },
  "roast B": {
    "subset 2": 17,
    "subset 3": 12,
    "subset 5": 1
  }
}

Request

{
  "roasts": {
    "roast A": 20,
    "roast B": 30
  },
  "subsets": {
    "subset 1": 0,
    "subset 2": 20,
    "subset 3": 1,
    "subset 4": 1,
    "subset 5": 1
  }
}

Response

{
  "roast A": {
    "subset 2": 20
  },
  "roast B": {
    "subset 3": 1,
    "subset 4": 1,
    "subset 5": 1
  }
}

Request

{
  "roasts": {
    "roast A": 10,
    "roast B": 30,
    "roast C": 41
  },
  "subsets": {
    "subset 1": 100,
    "subset 2": 50,
    "subset 3": 60,
    "subset 4": 71,
    "subset 5": 42
  }
}

Response

{
  "roast A": {
  },
  "roast B": {
    "subset 4": 30
  },
  "roast C": {
    "subset 4": 41
  },
  "unfulfilled": {
    "subset 1": 100,
    "subset 2": 50,
    "subset 3": 60,
    "subset 5": 42
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment