Daniel Doubrovkine bio photo

Daniel Doubrovkine

aka dB., @ShopifyEng, @OpenSearchProj, ex-@awscloud, former CTO @artsy, +@vestris, NYC

Email Twitter LinkedIn Github Strava
Creative Commons License

Six months ago I failed a basic coding interview at a FAANG. Yes, I was a Principal Engineer, and yes, I was paid absurd amounts of money, yet I couldn’t implement a diameter of a binary tree as a “warm up” exercise, 10 lines of code.

The interviewer was very nice about it, and was equally surprised. You see, I’ve been coding for 35 years, and I am not “rusty” at it, which is a typical excuse for senior ICs bombing LeetCode interviews. At that time I was writing code every day. I simply froze, and couldn’t do it. All I could think of was “why the hell am I here doing this to myself?”. I couldn’t turn my brain around, apologized, cut the interview short, and, while I did ace several coding interviews at other companies for IC roles, went back to management for which I am, obviously, more qualified.

Did you just bomb a coding interview? Here’s some practical advice of how to deal with it.

First, keep your head high and do not let this negative experience get to you. It feels awful, but unless you are blogging about your failure to implement the diameter of a binary tree, nobody other than you and the interviewer will ever know. Most likely the interviewer was also a half asleep drone deep inside the borg, administering a coding puzzle every day to the next sucker, so they will forget about you the next day.

I see a lot of junior Engineers affected by failing at these. If you are recently out of college, it’s helpful to think of these interviews as a school test, such as an SAT. I never had to take SATs (my children did), but most European schools have oral exams where you get a ticket from a jar with the problem statement. I had slept through too many alarms to attend an 8 AM physics class around 1996 because of a grueling late night partying schedule, and only really knew maybe half the material. Luckily 2/3 questions in my ticket overlapped with those classes I did attend, and so I did well.

If you don’t like school and prefer video games, think of these interviews as Crossy Road. You need some skill, but mostly you just need some luck. There’s a set of problems you know how to solve, and a set you don’t. Practicing is important, but nothing helps like the fact that I was asked to implement an LRU Cache twice in the last decade in coding interviews. You also need to only cross one road. Failed? Try to cross half a mile down.

If you are a junior IC, remember that these LeetCode-style interviews are dumb and there’s nothing you can do about it. Fifteen years ago I wrote a viral blog post entitled GitHub is Your New Resume. Nothing changed since. In hiring from open-source at my last job at AWS I tried to swap the coding interview requirement for our team’s hiring for an offline evaluation of one’s open-source code. Because, you know, these are active open-source contributors and we are sure they can code! Naturally, I failed to change anything. I was told that we needed a consistent interviewing process to evaluate everyone the same way. And so we consistently hired people that could code on a whiteboard, a complete self-own.

If you are a senior IC, remember that you are not paid to write diameters of binary trees. You don’t really want to work at the company that gives you that type of problems at the interview. The job of a Principal Engineer is to have resounding impact on a time scale of ~1 year. You pick the most important unsolved problem and you solve it, long term. This may include prototyping a meaningful piece of software that changes the course of a business, or gaining support from senior leadership for a directional alignment for hundreds of people. It could be enabling teams in ways they couldn’t think of, and so many other ways to have the kind of impact that people with decades of experience tend to occasionally produce. None of it is the kind of code a junior Engineer an AI can crank out in seconds in 2025.

Speaking of AI, we have one chance to get rid of these stupid interviews now. It has become very clear that only companies that embrace AI will survive, so the best way to evaluate a candidate is to let them use AI, which gets rid of having to implement solutions to these problems in coding interviews.

Good luck with your interviews!