Lesson 151 of 296
How to behave in a live coding round
What you will learn
- What interviewers actually score
- What to do before, during and after coding
- Useful sentences for each stage
- What to do when you are stuck or make a mistake
- Remote interview setup
- How to practise
On this page
What interviewers score
Most companies use a scorecard with areas like these:
| Area | What they look for |
|---|---|
| Problem understanding | Asks clarifying questions; restates the problem; finds edge cases |
| Approach | Starts simple, improves with reasons, knows the trade-offs |
| Code quality | Clear names, small functions, readable structure, no copy-paste |
| Correctness | Works on normal and edge cases; tests it |
| Communication | Explains while working; takes hints well; stays calm |
| Engineering judgement | Mentions validation, errors, performance, security where relevant |
Notice how much of it is not about the final code. A candidate who communicates well and has one small bug often passes; a silent candidate with perfect code sometimes does not.
Before coding (first 5 to 10 minutes)
- Listen and take notes. Write the requirements as comments at the top of the file.
- Restate the task: "So I need to build X that takes Y and returns Z. Is that right?"
- Ask clarifying questions (Lesson 117):
- Inputs: types, sizes, can they be empty or invalid?
- Outputs: format, ordering, what to return on errors?
- Scope: "Should I focus on the core logic first, and add validation after?"
- Constraints: performance, can I use libraries, which language features?
- Agree a plan. Say the steps out loud. Ask: "Does that sound reasonable before I start?"
While coding
- Talk in short sentences: "Now I'll write a function that groups orders by customer."
- Start with the simplest working version, then improve. A working simple solution beats an unfinished clever one.
- Use clear names:
ordersByCustomer, notobj. - Write small functions with one job each. They are easier to explain and test.
- Leave TODO comments for things you will come back to:
// TODO: validate negative quantities. - Keep it running. Run the code often, if the environment allows, rather than writing 100 lines and running once.
- If you forget a method name: "I don't remember the exact name of the method, so I'll write a small loop instead." That is completely fine.
After coding
- Test it with a normal example, then edge cases (Lesson 152). Do not wait to be asked.
- Walk through the code briefly.
- State the complexity and trade-offs.
- Mention what you would add with more time: validation, more tests, logging, persistence, handling large inputs.
Useful sentences
| Situation | Say |
|---|---|
| Starting | "Before I start, can I ask a few questions about the input?" |
| Choosing an approach | "The simple way is X, which is O(n²). I think I can do O(n) with a Map. Shall I go with that?" |
| Unsure about a requirement | "I'll assume Y for now, and make it easy to change. Is that OK?" |
| Stuck | "I'm stuck on how to handle Z. My options are A or B. I'm leaning towards A because..." |
| Taking a hint | "That's a good point, so if I use a Set here, the lookup becomes O(1)." |
| Found a bug | "This gives 103 instead of 13. I think quantity is a string. Let me check." |
| Running out of time | "I have about 10 minutes left, so I'll finish the main path and describe how I'd handle the rest." |
When you are stuck
- Say what you are thinking. The interviewer cannot help if you are silent.
- Go back to a small example and solve it by hand.
- Simplify: solve a smaller version (ignore one rule) first.
- Ask for a hint. It costs very little; long silence costs a lot.
When you make a mistake
Everyone does. Interviewers want to see how you deal with it:
- Stay calm and say what you see.
- Form a guess, check it, fix it (Lesson 44).
- Do not apologise repeatedly; just fix it and move on.
Questions about AI tools
Most live rounds ban AI assistants. If asked how you use AI at work (Part 22), be honest: you use it to speed up routine work, and you review and test everything it produces.
Remote interview setup
- Quiet room, good light, camera at eye level.
- Test the video tool and the coding platform beforehand (CoderPad, HackerRank, CodeSandbox, or sharing your own editor).
- Close notifications; have water and a pen and paper.
- If sharing your screen, increase the editor font size.
- Know the keyboard shortcuts of the online editor (run, format, comment).
How to practise
- Record yourself solving a problem out loud, then watch it back (a task from your study plan). You will notice long silences, unclear explanations and habits like skipping tests.
- Practise with a friend or teammate acting as the interviewer.
- Use the same tools as the test: a plain editor without AI or heavy auto-complete.
- Time every session.
How to say it in an interview
(When asked "how do you approach a coding problem?") "I start by clarifying inputs, outputs and edge cases and agreeing a plan. I build the simplest working version first with clear names and small functions, talking through my decisions, then improve it. Before saying I'm done, I test normal and edge cases myself and state the complexity and what I'd add with more time, such as validation or persistence."
Key words
| Word | Meaning |
|---|---|
| Scorecard / rubric | The areas an interviewer marks |
| Clarifying question | A question that removes uncertainty about the task |
| Thinking aloud | Explaining your thoughts while you work |
| Scope | What is included in the task |
Now prove it
This lesson is complete when you pass the quiz and all three practice levels.