DEV Community

Parker Phinney for Interview Cake

Posted on • Originally published at interviewcake.com

The 24 hours before your onsite coding interview

Feeling anxious? That’s normal. Your body is telling you you’re about to do something that matters.

The twenty-four hours before your onsite are about finding ways to maximize your performance. Ideally, you wanna be having one of those days, where elegant code flows effortlessly from your fingertips, and bugs dare not speak your name for fear you'll squash them.

You need to get your mind and body in The Zone™ before you interview, and we've got some simple suggestions to help.

Don't study all night—sleep!

Interviewing sleep deprived could be worse than getting drunk beforehand. Make it your mission to get a full night of sleep, because you want all the brain power you can get.

In fact, try to get two nights of good sleep before interviewing, since sleep debt lasts a few days.

As soon as the sun goes down, put down the practice problems and focus on relaxing. If sleeping isn't your strongest skill, try these sleepytime guidelines:

  • Exercise lightly earlier in the day.
  • Don't drink caffeine in the afternoon, and don't drink alcohol at all.
  • Avoid bright screens in the evening. Dim your screen once the sun sets.
  • Eat a light dinner, ideally one with noggin-friendly foods, like salmon, beans, and vegetables.
  • Before bed, turn on a boring podcast, listen to some calming music, or read a book.

The most important thing is to not stay up late practicing new or difficult problems. That'll only put your brain on a train to Los Anxiousness. Instead, you should…

Practice stuff you rock at

To cultivate your confidence, practice questions that you can already solve handily. Sure, feel free to start the day with a new problem, but by the afternoon you should be building momentum with the questions you know best.

Giving yourself a few wins like this helps your brain simulate a stellar session at the whiteboard. You'll go to sleep dreaming of data structures, and you'll wake up with a self-esteem stimulus that makes you stand out in your interview.

Imagine your best day

Write out the ideal version of your day. It's a positive visualization exercise. This might sound like some hippie shit, but it's something athletes and entrepreneurs do all the time.

The fun part is that there isn't a ‘correct’ way to do this. It's up to you! If you're not sure where to start, here's some inspiration:

  • Greet your interviewer(s). Play through some small talk. Maybe you make a little joke they find funny.
  • Crush your first question. The first question comes your way, and you write out the answer deftly. Your interviewer's face looks impressed.
  • Overcome a tough question. You get to a trickier part of a problem. You feel some adrenaline, but you keep calm. You ask a few clarifying questions and carry on to a solution.
  • End the day on a high note. Your last interview of the day involves talking to a director or VP, and the conversation is lively. You leave the building smiling and feeling great about the whole experience.

Visualizing a successful day will build your confidence. You're training your brain to expect success and feel more comfortable during your interview.

Walk through your problem solving process

Reinforcing problem-solving patterns goes a longer way than practicing new problems in the hours leading up to your interview. Notice how our coding interview tips article gives you a handy process for solving algorithmic problems:

  1. Brainstorm an algorithm. Draw out sample inputs and play around with them while talking and thinking out loud. Don't start writing code until you and your interviewer feel good about your algorithm.
  2. Barf out your algorithm in code. Focus on getting it all down first, and jot down notes next to the things you wanna go back and double-check later.
  3. Debug your code. Walk through your code with sample input, look for off-by-one-errors and other bugs.

This high-level, “What's my problem solving process” is great to keep thinking about the morning of your interview. And speaking of that morning…

Precompute your morning

Decision fatigue is real. It's why successful people like Mark Zuckerberg and Barack Obama always wear the same thing—to minimize the number of decisions they make each morning. Luckily, it's easy to avoid decision fatigue once you're aware of it!

Plan the boring stuff ahead of time. Here are a few suggestions to get you started:

  • Pack your bag. Include a snack and water bottle.
  • Lay out some nice clothes. Dress a tiny step above what others in the office are wearing (usually they'll be sporting jeans and a t-shirt).
  • Plan your breakfast. For your brain's sake, try to include eggs, berries, and avocado.
  • Choose your route to the office. Expect traffic. Scope out the parking situation if you're driving.
  • Tarantino your morning. Work backwards from about 30 minutes before your interview, and figure out what time you need to wake up.
  • Set an alarm (or ten). Remember that you want time in the morning to chill, eat a leisurely breakfast, and sip on a cup of coffee (if that's your cup of… tea).
  • Brainstorm a pump-up routine. Come up with a few things to get you stoked. If you're not sure what your morning pump-up routine looks like, we've got you covered…

Get pumped

The morning of your interview, you wanna get energized! The right pump-up routine should make you excited, confident, and ready to tackle your interview head-on.

Get your body moving. Do sun salutations and a few jumping jacks. Light exercise increases the blood flow to your brain and helps clear your mind.

Power pose and read your positive visualization. It might feel strange at first, but it works! You'll prime yourself to feel more confident heading into your interview.

Listen to pump-up music. If you're like me, the intro to Backstreet's Back should do the trick. If you're not like me (i.e., you're unwilling to admit you like the Backstreet Boys), you probably have an equally awesome song in mind.


Get the free coding interview crash course

Don't leave your interviews to chance. I'll teach you the underlying patterns behind the clever algorithms you'll need to come up with during tricky coding interview questions.

Send me coding interview tips »


Top comments (1)

Collapse
 
millebi profile image
Bill Miller

Useful addition:

When stymied with a problem you can't seem to get your head around; try thinking about how you would test it. Imagine the potential inputs (pre-processing/post processing too), error cases and success cases. What would the API look like? How would you break the problem down into individual functions that could be tested separately from the entire solution. How you'd test it will cause you to think about how the problem should be solved, but from a different direction... sometimes you can have an epiphany and then immediately solve the problem.

In many cases, interviewers are looking to see how you can solve problems and not always if you've memorized the compiler (personally "what would the compiler do" questions indicate a clueless interviewer, because any idiot can memorize how the compiler works, but may not be able to get HelloWorld to work). A problem that is concisely broken down and is possible to have unit tests is dramatically better than a problem that is one huge function. A problem with smaller parts can also potentially be optimized differently from a large solution.