Lesson 8 of 8

Code Comprehension · The method · Lesson 8 of 8

Say it out loud

The interviewer can only score what they hear. A simple script to talk through any debugging problem, what to say when you’re stuck, and how to sum up a full round.

By Akshay, software engineer, India

On this page

A script that works for any bug

  1. The contract: “So this should return the items for one page, pages starting at 1.”
  2. The reproduction: “Let me reproduce it: five items, page 2, size 2. I expect 3 and 4… I get only 3.”
  3. The hypothesis: “One item short sounds like an edge: probably the slice end.”
  4. The check: “Start is 2, end is 4… and it slices to end - 1, so it stops at index 3, exclusive. There it is.”
  5. The fix: “slice already excludes the end, so it should be slice(start, end).”
  6. The proof: “The test passes. Let me also try the last, partial page and an empty list.”
  7. The wider look: “Other places that compute page ranges might have the same mistake.”

When you’re stuck

Say what you’ve ruled out: “The input to total() is right, so the problem is inside it, not upstream.” That’s progress the interviewer can see, and it often unsticks you. It’s also fine to ask a question: “Is it OK to assume the list is sorted?” A good question is a sign of care, not weakness.

Sum up a full round

With a few minutes left, give the interviewer the whole story in four sentences: the cause and how you proved it, what the AI got right or wrong and how you knew, how the feature fits the code, and what the speed-up costs. If you ran out of time on a task, say what you would do next and how you’d test it. A clear summary of three finished tasks beats a rushed fourth.

Remember
  • Contract → reproduce → hypothesis → check → fix → prove → look wider.
  • Stuck? Say what you’ve ruled out, and ask a clear question.
  • End a full round with a four-sentence summary, including what you’d do next.
Your progress stays on this device.