Excellent tip for interviewers of geeks

It’s so obvious you have to wonder why people haven’t been doing this for years now…

Witten proposes an incredibly simple and good way to evaluate a potential employee’s code skills during the interview. Instead of asking arbitrary code questions ask them to send in a code example they’re proud of before they come in and actually go over that code with them during the interview.

This is a much more realistic test for exhibiting coding prowess than some sort of artificial string manipulation problem. Additionally, and this is a hugely important point when performing any interview, it tends to put the candidate at ease to talk about their very own pre-written code, so they’re not sweating bullets and thereby giving you an inaccurate reading.

When you do go over someone’s code with them during an interview, here are the sorts of questions to ask:

  • How would you explain this code to someone unfamiliar with it?
  • Why did you make this particular design decision here?
  • What are some trade-offs involved with this design decision?
  • How would you go about profiling this code?
  • Can you think of a way to optimize this particular section?
  • How would you change things if the requirements were altered in this particular way?
  • Seriously, man, tabs for indentation?

Basically, ask all the same sorts of questions you would normally ask after a candidate solves a stupid string manipulation problem on the whiteboard, but instead ask those questions about the candidate’s own pre-submitted code, written on a proper computer with the use of a proper compiler.

There’s another benefit to this that Witten doesn’t mention in his article and that’s the opportunity to observe what happens when you challenge that persons decisions. How do they react when you say “do you really think that was the best way to tackle that? Wouldn’t it have been better to …” Even if you don’t really believe it better to do it a different way it’s a situation that will come up and you want to know that the person is going to be able to handle criticism well and be willing to work on alternate solutions to things.

Like I said, why haven’t we been doing this for years?