Skip to content

drdma/gaia_typescript_challenge

Repository files navigation

Coding Challenge

Welcome to our coding challenge. It's designed in a way that does not require completion, necessarily; it is all about seeing how you think of solutions, and code quality.

Please keep in mind that you won't need to do any coding beforehand as this will be completed during the interview in a pair programming exercise.

It is meant to be challenging enough to show your skill. Don't worry if you do not remember something, one of our engineers will be pairing with you and you can ask any questions just as you would on a real pair-programming session, as well as use Google, Stack Overflow, etc.

In order to prepare for this challenge we suggest:

  • Read the specification
  • Familiarize yourself with Replit
  • Play around with the basic file structure and tests.

Specification

IVF treatments require a tight schedule with many actions to be taken at very precise moments in time. We (hypothetically) would like to implement a feature that sends out email notifications to our members based on their individual treatment plans.

We have generated a notification config file for each member in the following format:

30 1 daily_check_in
45 * medication_reminder
* * pulse_check
* 19 past_dinner_reminder

The first field is the minute past the hour, the second field is the hour of the day and the third is the notification to send. For both cases * means that it should send the notification for all values of that field. In the above example, daily_check_in has been set to be sent at 1:30 am every day and hourly_notification at 45 minutes past the hour every hour. The fields are whitespace-separated and each entry is on a separate line.

We want you to write a program that takes two arguments. The first argument is the simulated 'current time' in the format HH:MM. The second argument is the path for the text file containing the scheduler config. The program should output the soonest time at which each of the commands will fire and whether it is today or tomorrow. In the case when the task should fire at the simulated 'current time' then that is the time you should output, not the next one.

For example, given the above examples as input and the simulated 'current time' command-line argument 16:10 the output should be:

1:30 tomorrow - daily_check_in
16:45 today - medication_reminder
16:10 today - pulse_check
19:00 today - past_dinner_reminder

About

Gaia coding challenge to learn typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors