Interview preparation
The questions that actually get asked, and what a good answer sounds like.
They ask "why would you choose Go?" What is the strongest answer?
All questions with explanations (answers shown)
1. They ask "why would you choose Go?" What is the strongest answer?
Answer: One static binary, concurrency built in, fast builds, a big standard library — then name the cost
"It is fast" invites a benchmark argument you cannot win. Naming a real strength and then its cost is what shows judgement.
2. They ask something you have never used. What do you do?
Answer: Say you have not used it, then reason out loud about how you would expect it to work
One confident wrong answer can undo several good ones. "I have not used that, I would expect X because Y — is that close?" sounds honest and thoughtful.
3. In a live coding round, what loses the most marks in Go?
Answer: Ignoring errors with
_, noctx, and unbounded goroutinesThey are hiring someone whose code the team will maintain. Error handling, context and bounded concurrency are what they mark.
4. What should you do before writing any code in a live round?
Answer: Restate the problem, ask about scale and input, and say your plan out loud
A good solution to a different question still fails the round. Thinking silently teaches them nothing about you.
5. One of the most common Go live-coding questions is some form of:
Answer: Fetch N URLs at the same time with a limit on how many run at once
It tests goroutines, bounded concurrency, error handling and context in one small problem.
errgroupwithSetLimitis the short answer.6. How should you describe a project you built?
Answer: What it does, how it is laid out, one decision and its cost, one thing you would change
Naming what a decision cost you is the sentence they are listening for. A list of technologies tells them nothing about your judgement.
7. They ask how you stop one user reading another user’s data. Best answer?
Answer: Put
AND user_id = $2in the query itselfIn the query you cannot forget it and there is no race. UUIDs only hide the problem: that is security through obscurity, not a fix.
8. They say "this endpoint is slow". What is the first thing you say?
Answer: "I would measure first — profile it and count the database round trips."
Guessing is the wrong instinct and they are testing for it. Most often it turns out to be N+1 queries or a missing index, not Go code.
9. What should you say about interfaces to sound like someone who has maintained Go?
Answer: Do not add an interface until there is a second implementation or a test that needs a fake
A one-implementation interface is pure indirection. Saying this marks you apart from people bringing Java habits into Go.
10. What is worth asking the interviewer at the end?
Answer: "Is the Go code laid out by domain or by layer?" and "do you run the race detector in CI?"
Those two answers tell you a lot about the codebase you would inherit, and asking them shows you know what matters.
11. Which sentence is the strongest thing to say in any design answer?
Answer: "I chose X, it cost me Y, and here is when I would switch."
Every design choice has a cost. Naming yours is what separates a senior answer from a memorised one.