Thursday, April 29, 2010

Interviewing As A Service


I have been interviewing candidates for a Java spot and I have been using an interviewing technique that has proven extremely effective.

So often we hire a programmer and within the first week we find it was a mistake. Wouldn't it be great if we could learn in the interview what we would know after week-one?
I used to just give a written test that get's increasingly difficult and measure where they break.

But I have learned that many people can pass a hard test, even if they don't really know the stuff.

Here is what I have been doing -
First thing is the warm up - how are you, did you have any trouble finding the place?

Then just to take off the edge (and formulate first impressions) - what are you working on currently (or what was the last project you worked on?)

Next an easy question - what is a classloader - should answer something like "loads classes", although I am amazed how many candidates don't! Additional details such as delegation, initialization are all a plus, especially if the discussion is accurate.

Now comes the main part...
Write a thread that will concurrently write the system time to the system output log every 5 minutes.

I watch them do that. Did they sleep or wait? Did they struggle with the while loop? Did they use a variable or did they hard code "true" in the while loop? If a variable, did they declare it volatile? Did they synchronize?
If not, give them hints - this code will throw an IllegalMonitorStateException - what can you do to prevent it?

Watch them develop a few programs in this fashion. I might even walk out of the room "to use the bathroom" for a few minutes, to afford them some solitude.
(If they are not up to snuff I tell them so nicely, make a recommendation about something they should read to increase their bar, and send them on their way.)

Then another problem - implement the following method:
/**
 * Prints key=value for each entry in the supplied map
 */
public void printMap(Map map) {...}

Did they use the keySet or the entry set? Discuss the advantages of either/

If they get through that, give them a real architecture problem currently in the works, and collaborate with them on the solution.

Finally the closing - "What value can you bring to this initiative", "What would be your biggest concerns about joining our team", "Do you have any questions for me?" - Listen for any show stoppers.

A successful candidate will finish in 90 minutes.

I find this technique really separates the men from the boys, and can be used at any level and any programming language - Java, .Net, SQL, etc

It makes sense to have an "interviewing" department where interviews are dispatched as a service - "please give this candidate the core java interview" or "this candidate gets the .Net for MS Office applications interview."  This would ensure that every candidate hired adheres to a firm-wide measurable standard for whatever level he or she is  hiring.