Run a 35-minute coding + narration mock
System Design + Mock Loop · Mock Interview Loop
Implement a state reducer, amount parser, or merge function while explaining tradeoffs and tests.
Prompt
Run a 35-minute coding + narration mock
This is a hands-on rep. Attempt the drill before reading the model answer, then narrate the tradeoffs as if an interviewer is watching.
Interviewers are listening for judgment while you code.
What to ground before answering
Implement a state reducer, amount parser, or merge function while explaining tradeoffs and tests.
Focus vocabulary: mock interview, coding, narration.
The useful mental model is not to memorize a perfect answer. It is to explain what owns the data, what can fail, what the user sees, and what test would prove the behavior.
Implement and narrate a transfer status reducer
Make the behavior executable before comparing against the model answer.
type Status = 'draft' | 'submitting' | 'pending' | 'reconciled' | 'retryable-error';
type Event = 'submit' | 'accepted' | 'reconciled' | 'timeout' | 'retry';
function reduceStatus(status: Status, event: Event): Status {
// TODO: implement a small reducer and be ready to narrate each transition.
return status;
}Interview explanation prompt
- What problem is this practice item really testing?
- What state or contract boundary must be explicit?
- What edge case would cause a production regression?
- What would you test first?
- How would you explain the tradeoff in two minutes?
Self-grade
- Strong answer handles the edge cases before polishing syntax.
- Strong answer explains why the chosen type or function boundary prevents bugs.
- Weak answer passes only the happy path or hides uncertainty in booleans and nullable fields.
Model Answer
function reduceStatus(status: Status, event: Event): Status {
if (status === 'draft' && event === 'submit') return 'submitting';
if (status === 'submitting' && event === 'accepted') return 'pending';
if (status === 'pending' && event === 'reconciled') return 'reconciled';
if ((status === 'submitting' || status === 'pending') && event === 'timeout') return 'retryable-error';
if (status === 'retryable-error' && event === 'retry') return 'submitting';
return status;
}Recall before moving on
- What is the one-sentence answer for "Run a 35-minute coding + narration mock"?
- Which real experience from PR TIMES, React/TypeScript migration, or systems work supports it?
- What edge case would you volunteer before the interviewer asks?
- What is the smallest test or artifact that proves the design works?