We all have our off days, they're particularly memorable when they coincide with the day of an interview. One of my fondest interviewing memories is from right before I had graduated from my undergrad and was looking for something to do after graduation. It was the only interview I've ever done where I didn't get an offer.
I had pretty good industry experience at that point in my career. I had experience at Princeton's Plasma Physics Labs writing data analysis software for nucelar fusion experiments, experience working on artificial intelligence and natural language processing at Google, had worked at a defense startup, and had over 7 years at a lawfirm. I could go on, but I'll stop there. I had done a little over 30 interviews, and had always gotten an offer (usually on the spot).This interview was different though. The company had flown me out to California and I checked in to my hotel at 3:00am the night before the interview. I woke up at 7:00am to hop on a train to Palo Alto for the day of interviews. I was horribly tired and jet lagged.
The way software interviews should work is that your resume will get you the phone call, but after that your resume shouldn't really be referenced again. At that point it's up to you to prove yourself, not write about yourself. I like it that way, I'm usually fairly good at introducing myself and talking about my past experience... but on this morning when my first interviewer asked me about myself I shook his hand and just said "I'm Steve Krenzel and am finishing up my degree in computer science and mathematics at Drexel University." I didn't mention anything about my past experiences, interests, or skillsets.
When I reflected on this at lunch, I knew that my brain was simply not awake on this particular day. What further confirmed this was that he had asked me to write a function that permuted the elements of an array, and no matter what I did I couldn't get it. This is a function that I've written hundreds of times and I couldn't do it at the whiteboard on this morning. I was actually embarassed. I almost felt like I was wasting their time at this point. I can write that function in 5 lines of code... I usually know it like that back of my hand, but on this particular morning I just couldn't get it. I was interviewing for a $100,000 a year job and couldn't write a permutation function. I couldn't even get in the ballpark of something even remotely right. Here is the code that I simply couldn't remember on that day:
def permute(xs, pre=): if len(xs) == 0: yield pre for i, x in enumerate(xs): for y in permute(xs[:i] + xs[i+1:], pre + [x]): yield y
My second interviewer had checked out my previous blog before we did the interview and mentioned how impressed he was with it. He knew my background so he immediately asked me a mapreduce question. It wasn't the simplest mapreduce problem, but one that I had dealt with before. But again... I just couldn't get the solution I was looking for. I came up with a solution that involved two mapreductions, but he said it could be done in one. I knew that it could be done in one, but my brain had simply shutdown. Fortunately, he knew that I was smarter than the interview led him to believe and seemed favorable to me.
At lunch I drank three redbulls, hoping it'd give me the energy that I was so desperately lacking. It had paid off and the two afternoon interviews went great. I flew through them, answering questions faster than they could ask them, and writing code like a fiend. I was finally having fun at the interview (which is a sign of a good interview). I knew that I had really goofed up the first one though, and kind of goofed up the second one. I didn't expect to get the offer, and I didn't get one. The last interviewer had walked around Palo Alto with me after the interviews though and we just shot the bull a bit. I think he had assumed that the other interviews went as well as his (he hadn't spoken to them at this point), and we were talking about projects that he hoped I would help with.
It's been about a year and half since, but I was reflecting on it the other day. I was reflecting on how 5 lines of code cost me an amazing oppurtunity (although I took a different job that was arguably just as good), but more importantly how misleading the interview was to those inteviewing me. It got me wondering how many interviews this happens at and if there are better ways to find good talent. I've got some ideas, but I'll save them for another time.
About the author
I'm Steve Krenzel, a software engineer and co-founder of Thinkfuse. Contact me at firstname.lastname@example.org.