Skip to content
Coding · 8 min

Thinking aloud while coding

Communication is a scored dimension in every coding rubric and the one experienced engineers most often lose points on, because they solve the problem silently and well. This lesson gives you a script for the first five minutes and a cadence for the rest.

The first five minutes

  • Restate the problem in one sentence and name the output shape.
  • Ask one clarifying question that changes the design ("should 3xx count?", "are intervals half-open?").
  • State the approach and its complexity before writing code. If it is below target, say what you would do if you had more time.
  • Name two edge cases you will test: empty input and the boundary.

This takes about ninety seconds and earns most of the Communication score. It also protects you: if the approach is wrong, the interviewer will usually nudge you now rather than after fifteen minutes of typing.

A cadence while you type

Narrate decisions, not keystrokes. "I'm keying buckets by (window, path) so out-of-order lines don't matter" is useful; "now I'll write a for loop" is noise. A good rhythm is one sentence per function or branch, and silence while you write the body. If you go quiet for more than a minute, say what you are thinking about.

Linked exercise · needs a computer · 10 minParse and bucket latency logsRead it here, do it on a computer

When a test fails

Read the diff aloud before touching the code: "With 60-second windows, a line at ts=119 belongs in the window that starts at 60. The test expected the key 60 and my code produced 120, so I am rounding up at the boundary instead of down." Then state the hypothesis and the fix. Candidates who immediately start editing often fix a symptom, and the interviewer cannot tell whether they understood the bug.

What not to say

  • "This is easy" or "I've seen this before." It raises the bar and buys nothing.
  • Apologies for typos or syntax. Fix them and move on.
  • "I think it works." Run it, or say exactly what you would test.
  • Long detours into how you would do it in another language.