A take-home exercise asks a candidate to return order counts “per day.” The prompt omits the timezone. One candidate chooses UTC; another groups by the tenant’s local date. A hidden test that silently assumes UTC can reward a guess instead of the skill the exercise was meant to assess.
Ask for a short assumption record with three columns: the unresolved question, the decision made for this submission and the place to change it. For example: “Which calendar day owns each order? UTC for this version. The function that maps an instant to a business date.” The code can now support a useful follow-up without requiring configuration for every imaginable policy.
Give the follow-up a discriminating fixture
Use the instant 2026-02-28 23:30 UTC. Its UTC business date is February 28. In Europe/Berlin it is already March 1 at 00:30. A test that expects one output row in either case cannot distinguish these policies. Assert the explicit date key and the count attached to it. In a second fixture, include one event on each side of midnight so a change in grouping is visible too.
Choose a different boundary for each ambiguity you actually want to discuss. For tied timestamps, decide whether stable ordering matters to the consumer. For duplicate event IDs, decide whether they represent one delivery retried or two distinct occurrences. Naming the decision may be enough; a take-home that asks for a plug-in system for three short ambiguities has changed the task.
Publish the scoring rule with the prompt. If the date convention is a business requirement, state it and grade against it. If surfacing assumptions is the objective, accept either coherent convention and evaluate whether the candidate can identify the change surface and the tests that would move with it. This exercise provides a discussion about design; it supplies no evidence that either convention predicts job performance.
Test the boundary the assumption changes
Use two orders, one at 2026-02-28 22:30 UTC and one at 23:30 UTC. Under UTC grouping, expect February 28 to contain both orders. Under Europe/Berlin grouping, expect one on February 28 and one on March 1. Ask the candidate to change only the named business-date policy and explain the resulting keys and counts. Checking only the overall total of two would miss the policy change.
This article was created with AI assistance.
Top comments (0)