Tech interviews can be fun for the interviewer right until you start to conduct them at an enterprise scale. When your schedule finally gets packed - you know it's time to do something about it!
One approach is to fail-fast - ask a couple of basic questions and if you're not happy with the answers - then that's it for today! In our case many interviews got shortened to 5 minutes after this. But still finding questions that allow for an unambiguous wording and consice answer is a challenge, so here are our top picks.
Luckily not all our interviews last only 5 minutes, some go on for 1.5 hours and over a 100 questions. But there is a good correlation between these basic questions and an overall interview result.
1. Suppose we have some List class from the standard library. We want to cover it with unit tests. What tests would you write?
In 2020 good automated testing is paramount and this is one way to verify if your candidate ever tested at scale. Best people will easily enumerate 15+ test cases in 1 minute.
Bonus points: and now let's test some ThreadPool class!
2. You server app got stuck - it doesn't answer to requests and stopped writing logs. How would you analyze the problem?
Basic devops skills is a must for backend developers these days, otherwise it ends with everyone pointing fingers and the server getting stuck over and over again.
Perfect answer takes about 10 seconds to name 3 shell commands to get the info and 50 more seconds to tell a story about how it didn't help on some project (good story earns bonus points!)
3. Two objects with equal hashcodes are put into the hashtable. What will happen?
Like the old joke goes: Computer science is built upon 3 ideas - cache, hash and trash. And as strange as it may sound this one is quite close to life.
First you develop you app in the most straighforward way until you hit some performance problem. In order to overcome it you develop some sort of caching solution - and it helps! But then your userbase grows further and cache is no longer enough, so you shift to some hash-based algorithm in order to keep up the pace.
Eventually it doesn't work either and then you start looking into some really weird approaches. Just make sure you have good understanding of hashing concept first!
4. Two database transactions try to update a single row. What will happen?
Nearly all apps work with data concurrently. Better make sure that developers actually understand what this means in practice.
Bonus points: what will happen if one transaction was deleting the row and another one tried to update it?
5. SQL time! Suppose we have a query with left outer join - the task is to rewrite it without using outer joins.
SQL beginners solve easy tasks writing complex queries while pros solve difficult tasks using basic ones.
Proficiency with language can be easily demonstrated by being able to rewrite any query in 2-3 other ways.