Coding Problems from Programming Job Interviews
So it&#x27;s almost HN cliche to complain about these sorts of questions, and that&#x27;s a fairly earned failure, but I just want to reiterate that these sorts of questions are one or two orders of magnitude more meaningful than the nebulous questions you sometimes see, &quot;estimate how many auto mechanics serve Portland&quot; or &quot;I shrink you to the size of a pea and throw you in a blender, how will you survive?&quot; or the like.<p>At the core, what you should be doing if you want to hire properly, is to take a break approximately 10-15 minutes into the interview. Go get a bottle of water or something. During the next 1-5 minutes, jot down on a piece of paper your initial impressions of the candidate, your suspicions and biases.<p>Some studies show that based on folks viewing the first five minutes of an interview, they can usually predict the outcome. One can interpret that in several ways, but the more cynical is to just say that most interviews are exercises in confirmation bias: you get some suspicion of the candidate, you spend the rest of the interview looking for evidence of your suspicions so you can feel good about your eventual predetermined decision.<p>If you want to do better, it&#x27;s very simple: do what a scientist does and flip this on its head. Write down your suspicions and then <i>try to disprove them</i>. You think that this person is too egocentric for your company? Then ask them to talk about how they have worked with others, ask what they&#x27;d do if a coworker was struggling with a personal issue, try to gather evidence that they can actually be compassionate and empathic. You think that this person cannot program their way out of a bag? Throw them a softball programming question like FizzBuzz. You think that they have encyclopedic knowledge of algorithms? OK, then ask them to implement a Dijkstra&#x27;s algorithm and if they don&#x27;t know what that is, a breadth-first traversal.<p>What people are really sick of is that people use these tools as crystal balls into their own psyche: You as an interviewer tend towards &quot;he got QuickSort wrong!&quot; if you subjectively didn&#x27;t want him in your company, &quot;she got QuickSort almost right, except for some finagling around the pivot!&quot; if you subjectively did want her. What&#x27;s missing is <i>deliberateness</i>: choose what you want to know deliberately, choose the question deliberately to satisfy some goal: either saying &quot;yeah my hunch was wrong about that, they did pretty well&quot; or else &quot;no, I really tried to give them every opportunity to show me that they can code and even trying to give them the benefit of the doubt I am still unconvinced.&quot;