DEV Community


Posted on • Originally published at

How to do better on coding interviews

tl;dr Warm up before the interview.
This post is a summary of my YouTube video:


A few years ago I learned a trick: warm up before my coding interviews. I know, it sounds weird. But don't worry, keep reading, it will all make sense (hopefully).

Why warm up

Being the gym lover I am, let's start with gym analogy.

Pretend today is leg day. You come into the gym, grab the bar, load 200KG on it and start squatting. Sounds reasonable? Probably not.

Most likely we would come into the gym and warm up. We'd just do enough exercise to get the blood flowing and our bodies ready for the exercise. So why don't we do the same for coding interviews? Isn't it weird?

We all know coding demands focus. Anyone who's had random ping on Slack or meeting interrupt their flow knows how it feels. It takes time to get back on track.

The same applies to interviews.

Interviewing is inherently hard, not because of the coding challenge, but because of all the other factors involved: time, stress, anxiety, etc. Jumping into an interview cold does you no good. In the best case, it slows you down. In the worst case, it causes you to fail the interview.

Warming up will prime your mind and put yourself in a ready state to come in and crush that interview.

How to warm up

YMMV, but this is what works for me and a few people I know that are pretty good at interviews.

One hour before your interview, start the warm up.

You can use whatever you want: VS Code, LeetCode, pen and paper. Anything that works for you.

Choose 1-3 problems you already know how to solve and start working on them. This is key.

Back to the gym analogy: you don't warm up for squats with a load that leaves you busted and prevents you from doing the actual working sets. You load just enough to get yourself ready for the real thing. That's the goal with the coding warm up.

You choose exercises you already know to avoid wasting energy that can be used for the interview itself. You just need to get those brain juices flowing.

Another reason to stick to a problem you know how to solve is this: if you pick a hard problem and fail at solving it right before your interview, what do you think that's gonna do to your confidence? Probably not much good, right? So don't do it. Stick to what you know for the warm up.

And last, but not least, stop your warm up 15 minutes before the interview starts. Just step away from the computer. Go get some water, use the toilet, or stare at a wall if you have to. Use this time to chill. I like to play some chill music to help me get in the mood. Do this to help control your interview stress (we all get stressed, trust me).


  • Warm up before your interview so your mind is ready for the coding problems.
  • Start your warm up 1 hour before the interview.
  • Choose 1-3 exercises you already know how to solve and get cranking.
  • Give yourself a 15 minute break before the interview to relax.

That's all

Thank you for reading this far!
If you like this post, let me know on Twitter! I also post videos about this sort of stuff on YouTube, so go check my channel if you haven't yet.

Top comments (2)

onepercentgold profile image
Abdelrahman Elsayed • Edited

Thanks for writing this. I loved the gym analogy.

emadmokhtar profile image
Emad Mokhtar

First time to see these advices. Thanks Lucas to share this with us.