last day (15 days later) » 

10:07
50
Q: How appropriate is the interview question: "Show me a piece of code you like"?

ZeksI recently interviewed a candidate at our company and asked him Show me a piece of code you like, yours or something you snatched from the internet The candidate was not really able to properly answer that, just fumbled around aimlessly and unsure of what to make of this kind of response...

Perhaps the candidate is proud of a piece of software but to produce it on the hoof is not fair - also copyright has to be taken into account
Please put yourself in the candidates shoes.
I did, before asking the question. I'd be perfectly ok with such question
In my experience as an interviewer, some questions I've thought were perfect were difficult for everyone to answer, even the folks that were stellar in every other way. Those types of questions, the ones that nobody ever comes close to producing the type of feedback you're hoping to see, should be left alone. You might try refining the question, or bounding it in some way, or ask the candidate to be prepared with something prior to arriving for the interview. Try it a few more times in different ways and see whether it can get what you want to hear.
Did you give notice to the candidate in advance, so that they could spend some time looking for something?
No, but I should have, really. I was not the one to talk to him about the upcoming interview, they just dumped him on me. Though he did have his laptop with him, and was kinda ready to show what he did on his previous job which is why I asked the question thinking he has something interesing on him.
10:07
You could just ask "Tell me about a piece of code you like (were proud of/shows off your ability)" instead. Then interviewees wouldn't have to magically produce source files during an interview. And it seems you're not actually interested in the code itself anyway, but in the candidate's enthusiasm and how they judge code quality.
I thought being enthusiastic/proud of your code/job is supposed to be a good thing, right? I could argue the opposite as well. I have observed developers stand by their code proudly insisting it is superb when it crashed our servers 11 times. Passion? Good. Pride? Dangerous
Even if the candidate had something in mind, it's quite likely he wouldn't have access to the code from his lap top (or the legal right to show it to you!)
Pride in a piece of software? Sure! Let them tell you what they loved working on, or what end product they made that's awesome. But pride in a piece of code? That's not something you want, ever. Code is simply a means to an end, not something to be proud of. Detaching yourself from your code is the best way to avoid biases that make you keep bad code, or keep in something that doesn't work (but you spent so much time on it, and it's so elegant, and...). You want people who will throw away their "best code" as soon as it's no longer relevant / productive etc.
I am proud of the quality, stability and maintainability of my products. I am proud of meeting deadlines. I am proud of ease of use of interfaces and APIs. Code? It's only a tool I use to reach my aims.
10:07
I think the question gets to an important point; if the candidate can identify good and bad code.
Wait, wait, I'm sorry, you're asking this kind of question, on the spot, to someone in a geeky/introvert profession? Have some damned respect, let them know to bring a copy of this code beforehand. You're going to get "deer in the headlights" reactions to this otherwise.
There are endless code repositories on github. I think I would like an applicant who has read enough of the source code of popular libraries to have found something that they could point to as exemplary.
If someone "likes" his code, he should go see the doctor No need. Just go to the QA desk next door. They will put some sense back into you.

last day (15 days later) »