Skip to content

Instantly share code, notes, and snippets.

@keithtom
Last active December 14, 2015 20:49
Show Gist options
  • Save keithtom/5147113 to your computer and use it in GitHub Desktop.
Save keithtom/5147113 to your computer and use it in GitHub Desktop.

Dev Bootcamp Prep Pairing

What is pairing?

Pairing is when two programmers work together on a problem. We do it a lot at DBC.

Since we'll be pairing with you, if you don't know something, like some fact or detail, that's fine. You should really focus on how to think and talk about the challenge (the technical problem), ie. how to explain what you're thinking, follow what we do together and talk about it, and be able to recognize when we've succeeded!

Most of all just try to relax and enjoy working with us through this process.

What are we looking for?

We are looking for a solid knowledge of the ruby basics (ie. the prep material) and would like to pair on a simple challenge with you from phase 1, essentially something you would see in your first week with us.

Here's the challenge.

Exercise: The Restaurant Wait Time

We have been contracted to write a piece of software for a restaurant. They want to easily be able to enter orders that come in, and be told how long the wait time will be for that order. That is, we are going to write a simple program for placing an order at a restaurant and it will print to the screen how long the wait is.

You can order the following items:

  • pizza
  • spaghetti
  • lasagna
  • salad

Each item takes a certain amount of time to prepare. A pizza takes 15 minutes, spaghetti 12 minutes, lasagna 30 minutes and a salad only 5 minutes.

You need to keep in mind that as items keep getting ordered, the wait will be longer and longer. For example, if there are two pizzas ordered, the wait will be 30 minutes (2 x 15 minutes).

Lastly, if the wait is longer than 1 hour, the system will just say 'more than an hour'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment