LyraLearn AI Learning Platform
Exams
← Module 9 Β· Debugging and Ops Scenarios
🎧 Listen

Reading Code and Stack Traces Aloud

Many .NET interviews now include a live-review round: they show you code or a stack trace and watch you think. The skill being tested is not spotting the bug in four seconds β€” it's narrating a disciplined read so the interviewer can follow your reasoning. Silence reads as confusion even when you're thinking well. Practice talking while you read.

Narrating a stack trace

Work it top-down and say what you're doing: "The exception type is ObjectDisposedException, the message mentions the DbContext, and the top frame in our code β€” skipping the framework frames β€” is OrderService.GetHistoryAsync. So something is using a context after its scope ended." That's the pattern: exception type β†’ message β†’ first frame in our namespace β†’ hypothesis. Mention that with async code the trace can be reshuffled by the state machine, so you anchor on your own namespaces, and that an AggregateException or inner exception is where the real story usually hides β€” always say "I'd unwrap the inner exception first."

The bugs they plant

Live-review snippets recycle a small set of classics. Rehearse spotting and naming each:

If you can't find a bug, verify aloud instead: inputs, boundaries, error paths, disposal. Structured checking beats a lucky guess.

Critiquing code politely

You may be asked to review a teammate's PR-style snippet. The tone test matters as much as the technical one. Use questions and shared ownership: "What happens here if the list is empty?" rather than "this is wrong." Anchor comments to effects ("this will run one query per order β€” at 1,000 orders that's a slow page") not style taste. Concede uncertainty when real: "this might be fine if the caller guarantees non-null β€” is that documented?" And say something genuinely good about the code first; reviewers who only find faults are exhausting teammates, and interviewers know it.

Red flags

Practice prompts

  1. Take any recent exception from your own logs and narrate it aloud, top frame to root cause, in under 90 seconds.
  2. "This action calls .Result on an async service method. What could go wrong, and how would you phrase the review comment?"
  3. Write a three-sentence polite review comment for a loop that queries the database on every iteration.
🧠 Quiz yourself on this lesson →

Ask the AI Tutor

Grounded in the course lessons β€” it cites its sources and says when it doesn't know.