Nailing the On-the-Spot Coding Interview
Most of us are not comfortable with on the spot coding interviews. We prefer thinking when we’re alone away from other people’s eyes. Yet, there are recruitment processes that require on-the-spot coding interviews.
Below are some tips on how to approach that dreaded interview.
Before the Interview
Nothing is more frustrating than having an on-the-spot coding interview when you are not expecting. If you already have the slightest idea, then use that to your advantage to brush yourself up for the challenge. Being prepared elevates your confidence during the interview.
I’ve had on-the-spot interviews where I wasn’t given notice prior. If I had only known earlier, below are some things I would have done to prepare before the interview.
Review on technical concepts. Visit references online that would help you review technical concepts, mostly relevant to software design and best engineering practices. Also, review language-specific capabilities such as .
Practice on a few coding problems. Some of the common coding problems used in interviews are the Fizz buzz problem, Fibonacci sequence, Palindromes, and Reverse String. Most coding problems are designed to be that complicated but rather to sift those who can’t code from those who can.
Perform a mock on-the-spot coding interview. You may invite a friend to be the mock interviewer but you could also do this by yourself. Just pick a problem that you are to solve on the spot and simulate the coding interview. Try applying the practices below during the simulation. This should boost your confidence during the interview.
During the Interview
Your nervousness will be your greatest enemy; make sure your head is as clear as possible.
Ask for the Rules. Before starting the challenge, ask the interviewer what you are allowed to do whilst coding. Ask whether you are allowed to consult references online or use a library handy to your challenge. Use all the resources allowed to help you with the problem.
Get into the mind of the interviewer. Ask the interviewer what he is looking for on your code. Do they value performance over readability or memory efficiency over data consistency? Whatever these may be, align your code to the interviewer ‘s criteria.
Understand the problem. You should be able to know what are the inputs and outputs to the problem as most coding interviews requires you to write a small piece of code.
Should the problem still be unclear to you, never hesitate to ask questions. The interviewer appreciates it when you admit not understanding the problem over pretending otherwise and would be delighted to help you. If you want, provide your own set of input and output sample and let the interviewer verify.
State the problem back to the interviewer to make sure you’re in the same page. It provides hints to the interviewer that you understand the problem before you start tackling it.
Speak out your mind. Personally, this is the most crucial thing that you should do during the interview. For the interviewer, it is where he gets to see your skills firsthand. Thus, this makes a great opportunity for the candidate to showcase what he has to offer.
Make sure you don’t lose the interviewer in the coding process. Walk him through your process in coding especially on parts that are peculiar. The amount of narration should be in line with the professional level of the interviewer. For instance, if the interviewer is a senior-level developer, you need not to explain subtle cases like why that sum
variable is of type double
.
- Showcase your technical skills. While solving the problem, especially a complex one, layout the different approach that you may take in solving the problem. Don’t be afraid of presenting a wrong one.
- Don ‘t be afraid of mistakes. If in the process you have presented one that does not solve the problem, acknowledge what you’ve missed out, tell the interviewer how it’s not gonna solve the problem, and pick the next best one from the approaches you presented earlier.
- Showcase your communication skills. Communication is one of the foundation soft skills and is essential especially for senior and mid-level developer positions. You will also be evaluated on how you are able to convey your ideas into words that are understandable by your colleagues (not necessarily non-technical people).
- It’s okay to ask for clues if you’re stuck. Not everything goes well in this industry and when you’re in a dead end, asking for help is the best course of action. Perhaps the interviewer has some clues prepared to help guide you to the goal.
- If it’s too hard for you, raise the white flag. So, you still haven’t figured things out and estimated that you wouldn’t be able to. Maybe it’s time to raise the white flag and proceed to the next challenge. Admitting what you do not know is part of the growth mindset. Let the interviewer know why you can’t solve that problem and remember to learn something out from it later on.
After the Interview
Ask for feedback. Whether you nailed the interview or raised the flag, always ask for feedback. Ask the interviewer if there are ways to improve the solution you have presented to them. Leave the impression that you are always open for improvements. If you raised the flag, ask how the problem could have been solved such that the next time you come across the same problem, you know your way around it.
Whatever the outcome of your coding interview, make it as a learning opportunity for improvement.