How to Conduct Live Coding Interviews

How to Conduct Live Coding Interviews
Photo by charlesdeluvio / Unsplash

There’s no way around it: live coding is stressful. If you just ask your coding problem like a robot and sit down in silence, you will fail to create an environment in which you can evaluate candidates fairly. In this guide, we’ll go over the steps you can take to make an interview less stressful, conversational, and ripe with opportunities for a candidate to shine.

Before the Interview

I’ll leave the subject of choosing the right problem for another day, but before you continue I’ll assume you have a question (somewhat) ready and that you’ve made sure it is adjusted to the experience level expected for the role.

Here’s what you should do next:

  • Code out multiple solutions to the question yourself. Don’t just think through the problem, do the work and have your own verifiable solution.
  • Solve the problem in at least one more programming language. (Unless your company is explicitly hiring for a single language.)
  • Keep a note ready with all the solutions you’ve figured out, as well as their time and space complexities. (As a cheatsheet you can reference if needed.)
  • What were the tricky bits of each solution? Write down those notes as well!
  • Calibrate the question with another colleague or a friend outside your company. Grab them for 20-30 minutes and do a mock interview with your problem. Gather their feedback and adjust as needed.

Of course, the general best practices for conducting an interview still apply.

Next, plan out a timeline of how the live coding should (ideally) go. For example, this is how I plan a 30-minute loop:

  • 4 minutes to disambiguate the problem
  • 6 minutes for problem-solving and choosing an approach
  • 12 minutes of coding and discussing
  • 8 minutes for follow-up problem coding or discussion

Let’s break down each of these sections and what typically happens in each.

Part 1: Framing the Question

As you go into the interview, you need to already know how you will deliver the problem to the candidate. You will need to include some level of ambiguity so that you can measure their problem-solving skills and give you a deeper insight into their professional experience.

Is it a junior role? Then give them most of the details, maybe even some sample input/output data. Is it a senior role that requires software design skills? Then frame an ambiguous problem and let them dig a bit.

Measuring how the candidate deals with ambiguity is a very important part of the coding interview. This part can quickly help you figure out if this is a mid-level or senior candidate! It’s a very important component for running a good phone screen and figuring out if the candidate has a chance.

Here’s how this part could go:

  • Scenario 1: The candidate disambiguates the problem quickly, yet thoroughly.
    • Next step: Guide them to move on to thinking about the solution.
  • Scenario 2: The candidate is doing ok, but struggling to understand completely. They understand that they are missing something.
    • Next step: Give a few hints, if they are really stuck after 4 minutes, reveal what is remaining and guide them to start solutioning.
  • Scenario 3: The candidate thinks they have it figured out, but they don’t. Instead of continuing to think through the problem, they want to rush to the coding.
    • Next step: Interrupt them and point out what they missed as a hint. Consider it as scenario 2.

Part 2: Solutioning

Some candidates will try to jump into coding too early and some will spend too much time thinking through the problem without getting to a possible solution. You need to keep both of these types of interviewees on track.

If they’re rushing too much, tell them you would like them to first explain the solution to you. Ask them if they’re considered anything else and if so, why did they choose their current solution? If they are stuck on just one approach, give them some hints for other possible solutions, even the less optimal ones.

Why you might ask? Because your goal here is to understand their ability to problem solve, compare solutions, and make trade-offs. This is another skill that is a must at senior levels.

For the other type of candidate, who is stuck, you need to start giving hints early. Do it through conversation and ask leading questions. Don’t let them shut off and sit in silence and don’t reveal the answer either. If they can’t come up with a solution on their own, it’s your job as an interviewer to guide them there. But how?

Filip Danic

Filip Danic

Software Development Manager at Amazon and recovering JavaScript enthusiast. Sharing my experience and insights with the broader tech community via this blog!
The Netherlands