Code And Kindness

A Blog About Software Engineering and Management Careers

Preparing for the Software Engineering Interview

Software engineering interviews can be tough, especially at large companies.  As someone who has interviewed many places, and conducted even more, I’d like to share some of my strategies going from starting the job hunt through the offer stage.  Another article will cover resume building and the actual content of an interview.

Create a Plan

The first thing you should do is figure out your interview timeline and plan.  If you have the time, I recommend leaving 2 months for the end-to-end process.  If you don’t have time and need to find a job as soon as possible, you can compress your timeline by focusing on studying topics you are rusty on and shortening your time between practice interviews. 

                In an ideal situation you want to interview at many companies, and there are a few reasons for this.  First, if you haven’t interviewed in a long time (or ever), you’ll want to plan for a warmup interview.  One way to approach this is to pick a company that you wouldn’t mind working for, but isn’t your dream company, and have your first interview there.  You should pick a company that is like your target company, so you get relevant practice. Even if a recruiter has approached you, you can go out and find another company to interview with to make sure you have that second offer. Make sure you take notes on what went well and what didn’t so you can practice.

Another reason to schedule a warmup interview is to increase your odds of multiple offers.  Negotiation is hard and can be uncomfortable.  It is a lot easier if you have multiple offers because you can use that as leverage to make each of the companies compete for you.  It is much more believable that you will walk away from an offer if they know you have an alternative.

                Finally, if you are on a tight timeline, having two companies race to get you scheduled will speed up the process greatly.  When I interviewed at Google and Facebook, they knew they were competing for me, so they skipped the screening interviews. And when Facebook found out I was in Seattle interviewing with Google, they scheduled my interview for that same week and offered to reschedule my return flight to make the timing work.  You will also find out the results from your interview faster, and if you get an offer, that process will also be faster.  It’s worth noting that it can be extremely tiring doing multiple interviews in a row, so proceed with caution.

If you can, schedule time off from work before your interview days.  You can study at night while you work, but interviewing can be mentally fatiguing, and you want to be as fresh as possible on the days when you are going through your interview loop so having a no study day can be refreshing.

Study

Once you have a plan (and ideally a set of target companies) it’s time to study.

Know the Basics

The first step is to make sure you understand the basics of computer science.  I know, I know, most day-to-day engineering doesn’t involve graphs and KD trees, but software engineering interviews are what they are, so you need to be prepared.  Sit down with a list of computer science topics and make sure you understand them. A great way to know whether you know a topic well is you should be able to teach it to someone. 

Some of the basic topics include:

  • Data Structures
    • Arrays and Strings
    • Binary Trees and Heaps
    • Linked Lists
    • Stacks and Queues
    • Graphs
    • Hash Tables
  • Algorithms
    • Searching
    • Sorting
    • Greedy algorithms
    • Dynamic Programming
    • Breadth and Depth First Search
    • System Design (Senior and Above)

To Big O or Not to Big O?

It used to be all the rage to ask someone a coding question and then ask them to calculate the Big O for the algorithm they created.  This seems to have gone out of favor recently, but it’s still good to know just in case (and you might even gain bonus points if you offer it up yourself).   If you are uncomfortable with Big O or pressed for time, you can just remember which big O notation matches with which algorithm.  It’s also handy to know because if you are doing an interview question and your solution is n2 or slower, you probably didn’t find the optimal solution (which is probably nlog(n) or better).

Practice Practice Practice

Once you’ve reviewed the basics it’s time to practice.  A lot of people I know have had success with sites like leet code.  I tend to prefer more structured sites like interview cake so that I can manage my time better.  On the one hand sites like leetcode have a lot more content and I you know where you want to spend your time they are great.  On the other if you don’t know where to start it can be overwhelming so a more structured site can help you focus on what matters most. 

You might think you just need to put in a certain number of hours to count as practice, but there are three important parts to remember. 

                First, make sure you are practicing the right topics.  It can be tempting to avoid subjects that you are uncomfortable with, but those are likely the subjects you need to practice the most.  Another common error is to skip topics because you think you know them well.  Try at least one problem from each area, you might be surprised and find out you don’t know a few as well as you thought you did.

                Second, pay attention to how you practice.  Are you going to be doing problems on a whiteboard during the interview?  Make sure you are comfortable working on one – do your practice on a whiteboard (or on paper if you don’t have access to one).  It can be a completely different feeling to code by hand than on a computer.  There are also some small things you don’t want to spend energy getting tripped up on, like how to insert a block of code on a whiteboard if you forgot a step, or making sure your handwriting is readable (even by you). 

                If you are going to be using online software to do your interview, you should practice that way.  You may or may not have autocomplete to aid you (which may be a good thing because usually interviewers in these cases will forgive minor mistakes).

                Regardless of what method you do, practice talking out loud when you do your work.  It is critically important that you communicate clearly during an interview, and talking while coding is not something that people are used to.  Furthermore, there is an art to communicate your thoughts clearly while at the same time filtering your internal rambling as you solve the problem.  If you don’t speak clearly or often, the interviewer cannot tell if you are stuck or making progress and will most likely assume you are stuck. Talking also makes the entire interview process seem more collaborative, which sends a good signal to the interviewer.

                Finally, make sure you review your practice.  Take honest notes on what you struggle with.  Practice is much more effective if you think about what you did so that you can focus and improve the next time around.

If you have someone available, do a mock interview with them.  Even if they don’t know the solution, they can still play the part and get you comfortable with the setting of being in an interview.  If you really want to monitor your progress, I’d even recommend recording yourself during the interview so you can look at anything you might be doing subconsciously.

The Interview

I won’t go into too much detail around the actual interview itself (more on that in a later article) but I do want to highlight some things. For each company you will likely have multiple interviews, sometimes consecutively.  After each interview, take a minute, breathe, and then think back objectively (and without judgement!) on what went well and what didn’t.  Don’t spend energy being upset or mad at yourself, focus on anything you did that you don’t want to do in the next interview.  Did you talk too fast?  Did you forget to write unit tests?  Also take notes of topics you need to go back and study before your next round of interviews.  Then put the interview out of your mind.  Don’t let the results of the past interview make you overconfident or overly anxious about the next one.  Treat them independently and go into each interview with a clear mind.

The Offer Stage

Have Multiple Offers

Try to line up your interviews so you have multiple offers coming in the same time. Having a backup offer can make you feel less nervous during the later interviews and give you a chance to practice and retrospect on what you need to improve on. It makes negotiation much easier and reinforces that you are valuable. If they weren’t sure about hiring you after the interview, companies will often use another offer as a signal that you have high value.

Know Your Target Level and Salary

It’s important to know your worth. If you are going into a well-known company, you can use a site such as levels.fyi to figure out salary target levels. If not, you still may be able to do some internet research to find salary targets for companies similar to the one you are interviewing with. It is almost always better to come in too high than to try and get more after you’ve come in low. You want to ask for “just enough such that a reasonable 3rd party wouldn’t think you are being unfair”. It can be tricky, but in negotiations it is often best to be the first to present a number because of what is known as the anchoring effect. For example, if they offer you $100,000, your counteroffer will be compared to that number, even if it is grossly below what you deserve. In United States hiring culture, it is usually the company that presents the first offer (though your current salary can kind of be thought of as the first “offer”), so I find it good enough to just be aware of the anchoring effect and not let yourself be limited by their initial offer, just remember to be reasonable.

Should I tell them my current salary?

The generally accepted answer is no.  If your current salary is lower than what they generally pay, then they will offer you less than their usual, knowing that you will most likely accept because it is more than what you currently make.  This effect can persist with people throughout their career, which is why some places like New York have made it illegal for recruiters to ask about current salaries.  It can be awkward to decline to provide information they ask for, but you can use that as a chance to anchor the conversation around the salary you want with a statement like “I’d prefer to focus on the value I will bring to your company, and at my level of experience I expect X salary”.

Interview The Company

Something that people often forget is that interviews should go both ways. You need to find out as much as you can about the company you are going to potentially work for to make sure it’s a good fit for you. Was the person interviewing you a jerk? That may say something about their culture. You should infer what you can with how the interviewers interact with you, but you should also think about explicitly asking about certain things such as:

What would my long-term career path look like?
How is the work like balance?
Does your company value quality and following good engineering practices?

Rarely will you ever get an answer to questions like these portraying the company in a negative light, but you can at least get a sense of their honesty. If they give an answer that’s completely detached from reality, it should give you a large pause. “While no company is perfect and we sometimes do have tight deadlines, we try not to make a habit of it and give people time to recharge” is a much better answer than “Sure our work life balance is great”.

Be Patient and Be Kind to Yourself

Interviewing is hard, it’s mentally exhausting, and you put yourself out there to be judged by people you don’t know. Be kind to yourself, forgive your failures, and beating yourself up won’t help you get where you want to be. Especially if you get a lot of rejections and aren’t seeing the results you want.

Take a break between interviews if you can. Depending on the situation you can usually ask for more time so that you have to finish up your other interviews withing cramming them together. Some recruiters will try and create a false sense of urgency to pressure you to accept their offer. See what the actual deadlines are and be transparent with them that this is a big decision, and you want the proper amount of time to make the right call.


I often schedule a massage or a relaxing day the day before my interview. If you have to travel, make sure to leave time to unwind and acclimate before the interview. And remember to keep at it, it can take a while and landing your dream job is a series of steps that don’t happen overnight. As my favorite forgetful fish used to say, Just keep swimming.