Practice interviews

What does “replace the schedule” mean?

Clarify a destructive upload before choosing the implementation.

The question

Patchwell is a fictional team that builds scheduling software. This is an authored practice case. A customer uploads a CSV to replace a schedule. An AI draft deletes existing shifts, then inserts valid rows. Two hundred rows contain invalid time zones.

Upload
Rows
Total1000
Valid800
Invalid time zone200

Authored example. Values are supplied for this case.

Product request

Replace this month’s schedule from CSV. Let the manager correct errors.

Constraints

The existing schedule has 900 shifts. Staff can view it during upload. The manager must not lose the current schedule if the upload fails.

“What must you clarify, and what implementation would you propose before writing code?”

A strong answer, step by step

Open each step in turn. This is one strong answer, not the only one.

Step 1: Resolve replacement semantics

What would you do here? Open the move you’d make.

  • Insert the 800 valid rows immediately

    Tempting, but it misses something. That assumes partial replacement is acceptable.

  • Ask about partial success and month boundaries

    The strong move. They determine which rows may replace which shifts.

See how a strong candidate says it

“Does one invalid row reject the whole upload, or can the manager approve a partial schedule? What defines “this month”: venue time zone or uploader time zone? I would settle those before treating 800 rows as success.”

What a strong candidate could say

Why it works: These answers change the data contract and the user outcome.

Step 2: Protect the current schedule

What would you do here? Open the move you’d make.

  • Build a candidate version first

    The strong move. A failed validation leaves the live schedule intact.

  • Delete first so rollback is simpler

    Tempting, but it misses something. The old schedule is gone before validation completes.

See how a strong candidate says it

“I would parse and validate a candidate version before changing live rows. The active schedule should remain the old version until a complete replacement is ready.”

What a strong candidate could say

Why it works: The supplied constraint rules out delete-first behavior.

Step 3: Choose an atomic switch

What would you do here? Open the move you’d make.

  • Insert each row directly into the live schedule

    Tempting, but it misses something. Readers can see an incomplete replacement.

  • Switch only after validation and version checking

    The strong move. It addresses incomplete reads and conflicting changes.

See how a strong candidate says it

“Once the manager resolves errors and confirms the preview, I would activate the candidate version in one atomic operation. I would compare the version the manager previewed with the current schedule to detect intervening edits.”

What a strong candidate could say

Why it works: Readers must not see a half-written schedule or silently lose later edits.

Step 4: Name the remaining tests

What would you do here? Open the move you’d make.

  • Test failure and conflict paths

    The strong move. They protect the explicit no-loss requirement.

  • Only time a valid 1,000-row upload

    Tempting, but it misses something. Performance alone does not prove safe replacement.

See how a strong candidate says it

“I would test invalid time zones, a month boundary, a mid-upload failure, a concurrent manager edit, and a retry after activation. I would show the old and new schedule IDs in diagnostic logs, not raw personal CSV rows.”

What a strong candidate could say

Why it works: The checks follow the failure modes in this task.

The answer, in short

Decision
Validate a candidate schedule, then switch atomically.
Because
Delete-first violates the no-loss requirement and assumes partial success.
What would change it
A documented partial-import contract would change the preview, error handling, and activation rules.

Common traps

  • Treating an ambiguous product sentence as a full specification.
  • Confusing fast insertion with safe replacement.

Check your answer

  • Did you ask questions that change the design?
  • Did you protect the old schedule during validation?
  • Did you handle concurrent edits?
  • Did you derive tests from the named failure modes?

Last reviewed Nov 10, 2026