Skip to content

Instantly share code, notes, and snippets.

@Drenmi
Last active July 8, 2019 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Drenmi/900f6021f121b9447026c40a80f62d0f to your computer and use it in GitHub Desktop.
Save Drenmi/900f6021f121b9447026c40a80f62d0f to your computer and use it in GitHub Desktop.
EngageRocket Technical Questions

Hello!

Thank you for showing your interest with EngageRocket! We're excited to get to know you.

This is our technical screening test. You're expected to spend at most a couple of hours working throught the problems below. Once you are done, let us know. Regardless of how it goes, we promise we will provide feedback on your answers, and give suggestions on areas you can work on. Have fun!

Note: Please do not post your solution in a comment to this gist. It is used by all candidates.

1. Set Checker

In the card game of Set, each card has four distinct attributes:

  • shape (diamond, oval, squiggle)
  • colour (green, red, purple)
  • fill (blank, lined, filled)
  • count (one, two, three)

A set is made from any three cards where each attributes is either all the same or all different. For example, the below three cards make a set, because all the attributes are different across all the cards.

In our application, a Set card is modelled by:

Card = Struct.new(shape, colour, fill, count)

(All attributes are passed as symbols.)

Your task is to implement the following function which takes three Card objects as input, and returns true if the three cards make a set, or false otherwise.

def set?(*cards)
  # Add your implementation here
end

Constraints:

  • All cards in a deck of Set are unique, so you don't need to care about looking for duplicates.

2. Domain Modelling

In EngageRocket we collect feedback from employees anonymously. One of the forms of feedback we collect are answers to open-ended questions, for example:

If you could change one thing to make your organisation a better place to work, what would it be?

Now we want to build a feature that allows managers to acknowledge that they have seen the feedback, and initiate an anonymous discussion with the employee who left the feedback. Below is an empty routes.rb file. Your task is to add routes that can satisfy all of the requirements listed.

# config/routes.rb
Belong::Engine.routes.draw do
  # Add your routes here
end

Requirements:

  • As a manager, I can acknowledge that I have seen an open-ended answer.
  • As a manager, I can start a conversation with the employee who wrote the answer.
  • As an employee, I can respond to a conversation with the manager.
  • As a manager, I can mark a conversation as resolved.

3. Bug Fixing

We use Sentry to proactively find and fix bugs that our users encounter in production. Whenever an application error occurs, we get a stack trace deilivered to us. We take turns to act as Rocket Surgeon, who is in charge of fixing these bugs.

This week you are the Rocket Surgeon. You have just received a bug report in Sentry. Describe how what you do next. How do you go about trouble shooting the issue? Depending on what you find, what will your next step be? When do you consider the issue "fixed"?

4. Collaboration

Assume you are working on building a new feature in the application, and you are facing some implementation issues. The new feature doesn't seem to go well together with the existing features, and more and more edge cases seem to appear as you go along. Describe, in as much detail as you like, how you would handle this situation.

@srinidhi-lwt
Copy link

@Drenmi I have solved the above problems. The website is throwing an exception that "You have already applied for this job" when I tried to apply. Please let me know your email id. I will send the solutions links to you.

Thank you.

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