
Say your intent before you type
One sentence before each step: "I am going to write the function that parses one line first, then loop over the file." The interviewer can now follow you, and can stop you before you spend ten minutes going the wrong way.
Treat the interviewer as a teammate
- Ask what you would ask a colleague: "Do we care about invalid lines, or can I assume the input is clean?"
- Offer choices: "I can do this with a map or by sorting first. The map is simpler. Any objection?"
- When they suggest something, try it. You can say what you would have done differently afterwards.
Work in small steps and run them
Write a little, run it, look at the output. A candidate who writes sixty lines and then runs them for the first time spends the rest of the session debugging in silence. Small steps keep you in conversation.
Take hints well
A hint is the interviewer doing their half of the pairing. Say "good point", use it, and keep going. The people who lose points are the ones who do not hear the hint, or who argue with it.
When you are stuck
- Say what you know and where it stops.
- Say the two things you could try next.
- Pick one and try it for two minutes.
- If it does not work, ask.
Asking after a real attempt reads as good judgment. Staying silent for five minutes reads as being lost.
Tools
Ask at the start which tools you may use: your own editor, documentation, completion, AI assistants. The answer differs from company to company. Whatever is allowed, explain what you take from it. An answer you pasted and cannot explain counts against you.