Live Coding Demystified
Do you dread the “live coding” portion of technical interviews? Seeing an unfamiliar technical challenge and not knowing how to proceed can be an intimidating experience. However, having a thorough plan for tackling live coding can help you to gain confidence, communicate your thought process, and arrive at a working solution. With practice, live coding can become a much easier, and even enjoyable, experience. This is a general framework that should give you an idea on how to approach live coding.
Step One: Read the instructions
Step Two: Restate the question
- Repeat the question out loud in your own words.
- Ask the reviewer if you understood the question correctly
- Write out pseudocode restating the question.
Step Three: Describe a possible solution
- Try to break your solution down into individual steps (eg, “First, I would need to do …)
- Describe the tools you would use (for loop, .map, etc)
- If you think of multiple solutions, let the reviewer know, but pick the one that you think is the most likely
Step Four: Write out pseudocode
- Write down the steps of your potential solution as pseudocode
- Say out loud what each step does as you write your pseudocode
Step Five: Write out the code for first step
- If you don’t remember the syntax for a particular operation, just take a guess.
Step Six: Test your code
Use a console.log to see if the code you have written for your first step works.
If it works:
Move on to the next step
If it doesn’t work
- Don’t worry, this is a normal part of programming
- Try to think of why
- Think of what you could change to make it to work
- If you think it is a syntax error, tell your reviewer you are going to look up the proper syntax.
- Repeat steps 3–6
Step Seven: Once it works
- Move on to the next step
Step Eight: Repeat until you have a working solution
Please fill out this survey: https://forms.gle/C9FgZWxETDpFoLz6A, so I can incorporate your feedback into this guide.