Command Triplets
You are building a decoder for a legacy industrial robot controller. The controller receives a continuous stream of 3-character instruction codes. Each triplet maps to a named operation. When a HALT code is encountered, execution stops immediately.

- command_triplets.rb
- command_triplets_test.rb
The full README and the hidden test suite are available once you open the byte in your CodeSubmit workspace. Candidates never see the hidden tests.
Standard engineering judgment. Multiple edge cases worth handling.
More Ruby bytes

Manage badge factory settings. When an access badge is issued, it starts out unnamed.

Your team maintains an internal alert triage service. Each incoming alert carries five severity tags — tokens composed of a level indicator and a category code (e.g. 4S 5H 7C 8D JC). The ranking rules for these tag sets follow standard poker hand rankings.

An online retailer sells five distinct product SKUs. Each item costs $8 at full price. To encourage bundle purchases, the retailer offers tiered discounts when a customer buys distinct items together:

You are cleaning imported contact records before they are saved into a CRM. Each record includes a freeform phone field entered by a human, so the data can contain spaces, dots, parentheses, hyphens, and an optional leading country code of 1.

Classify a delivery drop-off location into the correct fee tier based on its distance from the warehouse.

Calculate the date of scheduled deployment windows. Teams often schedule recurring deployment windows on the same day of the week each month. In this exercise, you will take a description of a deployment window date and return the actual date it falls on.