msankhala / ac-remote-simulation-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem statement

  1. We're trying to create a simulation of an Air Conditioner and its remote.
  2. Create a program that prints "AC running at {$currentTemp} every {$interval} seconds" (bonus points if the embedded vars are configurable).
  3. Create a companion AC Remote program, which at random intervals, prints "Remote currently in IR range" or "Remote currently not in IR range"
  4. This AC Remote program also needs to receive a command from time to time, to increase or decrease the temperature.
  5. Both the AC and the Remote programs need to support a "current temperature" query.
  6. If the Remote is out of range, the temp increase will only be on the remote.
  7. The temperature will sync with the AC only when a command is issued to the remote AND it is in IR range.
  8. The "UI" and implementation details are completely up to the programmer - UI, Web or anything exotic as well, as long as Interviewers can run it somehow and observe outputs.

Things that will be tested by this exercise:

  1. Ability to envision a problem and structure a logical approach to solving it.
  2. Code hygiene and good habits (linting and unit tests).
  3. Ability around Web or Console UIs (most likely places for this to be implemented with).
  4. Architecture and usage of message passing servers, etc (based on their approach).

About


Languages

Language:JavaScript 100.0%