I've been doing some more interviewing recently as part of an effort to expand my team. One of the interviews I did today was for a developer, and as part of the interview I get the developers to debug some code. The debugging can be a little confusing because the code is written to behave in a non-standard manner and does some unusual things, but a good developer will work through it in about 5-10 minutes.

So today this candidate turns up and explains how he's done this, that and the other and how he gets on really well with people, listens to their ideas and so forth. I chat to him for a bit and then get him to do the debugging exercise. He gets through it in about 10 minutes which is pleased me however one of the fixes he did was overly complex. Being a fan of minimal code I ask him to do the fix in one line instead of the 6 lines he used and he got a bit annoyed with me, telling me that his code was superior because it handled all situations. Not a good sign so I simply hmmmed and made a mental note of it.

I then switched subjects and did a bit more of Q&A and with him, and a few minutes later asked him how he handles doing work he doesn't agree with. "Hypothetically," says I, "if we were to disagree on how to do something and we both thought we were correct, and I said to you that you had to do it my way, what would you do?"

The candidate gives me with a thoughtful look considering the situation and says "Well, if I thought you were going to check my code I'd do it your way, but if I thought you wouldn't check I'd do it my way and not tell you."

What a great response, and at least he's honest! Suffice to say, however, the candidate is not being progressed to the next stage.