Interview Stories
Jeff Atwood, of Coding Horror, posted (link) recently on the surprising results of administering small coding tests while interviewing developers for job. You can check out his post for the details, but the gist of it was that most people, in fact a shocking percentage of applicants, could not code a solution to the problem.
This got me to thinking about my own experiences going through interviews and the curveball questions I've encountered. So here are some of my most memorable interview moments:
The Oregon Trail (Do you want to ford the river?)
Curve Rating: Barry Zito 12 to 6 Slow Curve
Setup: Further demonstrating the ill effects of too much Diet Coke on memory, I cannot remember when I encountered this question. The premise was that there was a group of survivors on an island and they need to cross a river. There were more of them than could fit on the raft, so multiple trips were necessary. I had to allocate people on the raft based on a series of rules such as Rob and Kimberly have to stay together, Jack hates Sawyer, etc. And the fierce island natives would attack the survivors if it took too long.
Making Contact? At first glance this problem looked like it could be trouble. However, like that 12 to 6 slow curve, if you recognize it, you can make good contact. After I concentrated for a bit to identify and map all the rules, the rest was plug and churn. I actually really enjoyed solving this one.
My Strings are Better Than Your Strings
Curve Rating: Randy Johnson Backdoor Slider
Setup: I tackled this one during college for an entry level programming job. The task was easy to describe: write a method to compare two strings for equality (character by character) in C.
Making Contact? This was the question were I really learned that you should be prepared to talk about anything you put on your resume. Most of my CS classes were in C, but by my senior year I was coding mostly in Java and taking a lot of design classes, so I was a little rusty. By the time I got my head back into my C mindset, it was already too late, my time was up. I had an off by one error and did something wrong with the zero terminator. So like a fastball speed curve, I only got a weak swing in on it.
A Train Leaves Boston at 1pm Going 50 mph, Another Train...
Curve Rating: Matsuzaka Gryoball
Setup: I faced this question during an interview for a summer internship with Microsoft while I was in college. The basic setup was 2 runners on a race track. One starts ahead of the other and in inside position, the other is a little bit faster. When do they catch each other?
Making Contact? Much like the mythical Gryoball, this question was unhittable for me. I was not prepared for a question like this and despite taking differential equations in college, I just never liked or really got trigonometry. I tried in vain to remember the sine, cosine, etc. formulas that would have made solving this possible. Right before I ran out of time I started just trying to get a ballpark approximation by throwing out some guesses.
NOTE: My apologies to fans of baseball who may have been both strangely attracted and repulsed by my forced analogies. Also, the string question in C is roughly analogous to Jeff's FizzBuzz problem, but I like the FizzBuzz version a lot better. Seems to me to be a more pure test of programming than the C one which is highly dependent on the vagaries of C syntax and behavior (which if you want a C guru is really important, but otherwise is just annoying).