views:

2739

answers:

36

If you could only ask 1 interview question to determine whether or not to hire a programmer what would it be?

Pretty similar to : what is THE best answer interview question...

+3  A: 

"Do you have a portfolio of some or all of your past work that I may examine?"

LarryF
+27  A: 

"Give me a list of questions you'd ask in an interview and answer them."

Jimmy
Heh. Like the guy who meets a genie and gets one wish, so he wishes for a thousand wishes.
Kyralessa
lol, that's too meta
hasen j
not really (entirely) intended to be meta -- its a good way to figure out what the candidate values (algorithms? design? good practices?) and its really telling to hear what people have to say on topics that they perceive as their own interests.
Jimmy
I agree. it's not a bad question. It shows the interviewee has to think.
Kevin
Bloody brilliant!!!
Owen
This is more of a management position interview, rather than a programmer interview, IMHO...
LarryF
This question leaves the interview completely in control of the candidate, which, if you know what you're doing, is great for the candidate. I don't know that it actually helps the interviewer out much, though.
Adam Davis
But what if the interviewee answers with "I would ask them for a list of questions that they would ask, and the best answer is "I would ask them for a list of questions..."..."? At the very least it would prove to the interviewer that they grasp recursion.
gnovice
+1 gnovice for saying "grasp" instead of "grok".
JasonFruit
Isn't this a recursive answer?
Hardwareguy
@kyralessa: It's more like the guy who meets aliens who offer to answer one question. he asks "What is the best question I could ask, and what is its answer?" after some consideration, the aliens answer: "the best question is the one you asked, and the answer is this one."
Brian Postow
@hasenj and @HardwareGuy, what's wrong with a meta/recursive answer?
Brian Postow
This isn't a question. It's a directive.
John
The question is for a question. This answer does not contain a question, so it is technically not answering the question. But that is just a Jeopardy-technicality.
Thorbjørn Ravn Andersen
A: 
  • How do you convince me that you have a passion of different technologies in programming?
  • How do you deal with bugs raised from your co-workers.
codemeit
I am no mathematician, but isn't that /two/ questions?
Geoffrey Chetwood
not if you put a -(hyphen) in the middle of them lol
Nathan W
+1  A: 

Depends on what you think is the most important quality (which also depends on what kind of work you do!). I think the most important one is innovation, thinking outside the box, etc, which requires a great deal of passion about programming. So I would ask a question that attempts to reveal how much passion does he have about programming.

hasen j
I can agree with this, but this is exactly what got me fired from my last job... They didn't want me to think outside the box.. They wanted a button-pusher, and I just couldn't do it. I worked on a Virus scanner for an AV Company. I got yelled at for things like suggesting we should scan PDF files
LarryF
+12  A: 

compare yourself to jon skeet

Steven A. Lowe
Jon Skeet is NaN. Comparison against him always returns false.
Andrew Rollings
@Andrew Rollings, wish I could +1 for comments...
ceretullis
now you can....
thomasrutter
Nan?? Don't you mean positive infinity?
Loren Pechtel
+25  A: 

Here is a typical problem we have. How would you solve it?

HLGEM
If you can only ask one, this has to be it.
Bill the Lizard
+17  A: 

I have actually asked.

"Explain to me what a mock object is?"

I used this train of logic. If someone can answer this question. They write unit tests, if they write unit tests, they are better than more than half of the developers who don't. Out of all the ones that write unit tests, knowing enough about mock objects to answer that question, probably puts them in the top 5 percentile of programmers. And anyone who cares about programming enough to write unit test and use mock objects, probably is a good programmer, concerned about doing things the right way.

I think of it this way, a developer who writes good unit tests and uses mock objects, is almost always a good programmer.

But, I'd feel pretty confident hiring a developer if they just answered that one question well.

John Sonmez
I'll take that as a compliment then =) I've only witten unit tests for 3 relatively small projects, but I know what mock objects is.
gnud
In actual fact, an awful lot of people who swear by unit tests have little or no time for mock objects. They have a nasty tendency to make unit tests much more brittle. I know this because I used to like them a whole lot, and then I had to break a whole bunch of tests at once.
Mike Burton
And conversely, a lot of people who've never written unit tests in their life could still put together a passable explanation of a mock object, merely from context and seat-of-pants.
GalacticCowboy
at least people who are good with the seats of their pants are preferable to people who blank out
Jimmy
Hate that top 5 percentile rubbish. Yes, probably the fact that they read ANYTHING to do with development sticks them in that area.Doesn't make them good. Reason I say this is people say that about me, and I don't know anything. Note: I know what a mock object is though :-)
Owen
Maybe they use mock objects not because they're "brilliant" but because they do everything "by the book", in other words, doesn't have passion and innovation.
hasen j
doing things "by the book" shows real passion. you do everything to be better programmer, even if you dont believe in it. design patterns are great, if you cant name them all you cant write programs.
01
Not sure that'd work. I know what a mock object is, but to me it seems like a poor way to test functionality.
MichaelGG
How can you assert that statement "They write unit tests, if they write unit tests, they are better than more than half of the developers who don't." Do you have evidence to back it up? If you can provide those info that would be great.
Shiva
I know what a mock object is, but I don't write unit tests. Don't you think there are a lot of people like me?
mquander
@the people who don't use mock objectsThe fact that you know what they are and could explain how they work at least indicates that you have investigated them enough to know whether they're a valuable edition to your toolbox. The fact that you've done this indicates that you have some of the virtues of a good programmer.
Jacob Stanley
@mquander definitely. I have very little unit testing experience, but could give an excellent explanation of what mock objects are and how they are used. Knowing what a mock object is != writes unit tests. But then again, knowing what a mock object is still distinguishes you as a decent programmer even if you've never done unit testing.
thomasrutter
I love this question and I'm stealing it. Thanks!
Jonathan Beerhalter
@Jacob: I know what I mock object is because I ran across the term while reading the django docs. I don't write unit tests in my personal projects.
hasen j
A: 

"Why should I hire you?" (Appropriate for nonprogramming positions as well)

Jim Anderson
+9  A: 

Tell me about the code you have written and shipped.

twk
+3  A: 

"Why do you think that you can do this job?"

However, I do not think that a single question is a good interviewing strategy.

Svante
A: 

What are your weaknesses?

nzpcmad
I personally don't think this is a useful question because there is no incentive whatsoever to answer honestly. Anyone can just say "oh I work too hard" or "oh I always put the company's interests first" and how do you actually gain anything?
Orion Edwards
Unless I am talking to some no brained HR girl straight out of uni with a tick list I DO answer this one correctly. And if the interviewer seems happy I didn't give a bulls**t response I know its a place worth working.
Owen
Dilbert answered this with something like 'I have a tendency to kill interviewers who ask really stupid questions'.
Jim In Texas
I like this question - anybody who doesn't look at me like I'm a moron for asking it - doesn't get hired!
Martin Beckett
+2  A: 

"Please elaborate on what aspects in your way of working you find are important in order to achieve high software quality".

Staggering and no real opinion - No hire. Given a good and elaborate answer, loads of information can be extracted, and the opinions can be weighed against company policy/values.

sharkin
+1 Insightful.
Joe White
A: 

What's a three-way handshake? And, why not a two-way handshake?

yogman
Isn't that the interview question they ask new young actresses in the California Valley? :) J/K (I had to try and keep it clean...) heh..
LarryF
I've been asked the question several times. But no one bothered to ask the follow-up (two-way handshake) question. It doesn't have to involve TCP SYN.
yogman
A: 

What is the average flight speed of an African Swallow?

Andrew Rollings
A laden African Swallow or an Unladen African Swallow?
Steve B.
This would be a good test of the candidates humor and personality.. and if he is well versed in the greatest movie of all time. Definately need to factor this kind of thing in to determine if I want to work with someone. +1
Simucal
Not bad. You'd learn about their communication skills, and about how well they deal with not-always-clueful management, by seeing how diplomatic they are in correcting your misquote. (grin)
Joe White
A: 

"What is your reputation on stackoverflow.com?"

In all seriousness, when I interview candidates I think one of the most important questions is the one that requires them to write real substantive code as their answer.

E.g. "How would you solve the following problem in [desired language]?"

To hit on a point made already in this post, the candidates that use unit tests when solving the code challenge as well as other best practices and coding styles (or lack thereof) will often tell you more about them as a programmer then a series of verbal questions. Or as they say a picture is worth a thousand words.

[EDIT] There appears to be confusion about what I'm stating above. When I ask candidates to write code, I give them a laptop with a standard IDE (they can choose between Eclipse, Netbeans, etc), access to the Java API documentation, and a lot of time to write/test/compile in order to show real code that works. Additionally candidates are told ahead of time (i.e. in the initial phone contact) that they will have this challenge with the above stated materials available to them. I'm assuming this response was voted down initially because it was thought that I ask people to write code on a piece of paper or whiteboard which is something I disagree with.

Chris B.
Does anyone else find writing real code without a keyboard and outside of a decent IDE to be almost unfair?
dlamblin
I don't - I think it's important to be able to think in code. If you can't write the code down when you're done thinking it, you weren't really thinking in code. Besides, when I'm reviewing that sort of thing, I make allowances for the sort of minor slip-ups that autocompletion and compile errors would point out.
JasonFruit
+2  A: 

I personally hate the canned questions that are pulled out of a book and that check if a subject learned something in CS101 or from a website.

If I ever get to interview a developer, I would present him with one of several complicated lower-level design issues that I had to tackle in the past, and see how he thinks. There is no correct answer, but it's easy to see bad issues, different philosophies, etc.

My rationale is that if I can't trust that person to do design instead of me, why would I want to delegate to him so I don't micromanage him?

Uri
+8  A: 

"I am only able to ask you one question for this interview, so why should I hire you?"

The correct answer:

  • Ahha! I understand your dilemma. And I know just how to convince you; because I know what I would want in a coworker, and how to interview him!
  • Here is some random programming problem like FizzBuzz that is trivial. I shall solve it.
  • Here is some non-trivial programming problem like designing a database. I shall begin to solve it, and you shall see from my fumbling about that I don't know the answer. But I expect to come up with a reasonable attempt towards it!
  • I enjoy reading programming blogs. I shall spout out some topics covered recently on a handful of them, I'm sure you read them also, so you will recognize the topics and know I am not bullshitting you!
  • I shall explain some programming or programming-related topic, like security, obscure C obfuscation, or router configuration that I am interested in, so you understand I am passionate about technology!
  • Finally, I will explain why your company looks interesting and why I want to work here.
Tom Ritter
+1  A: 

How do you add value to the business and/or customer?

Steven A. Lowe
Don't know why this was downvoted. When I contract people, I usually ask them this question. You're getting hired to provide value, be it expertise or something else, so this is a legitimate question.
nickohrn
Probably because of the "by what process". You would seriously try to use that kind of pointy-haired doubletalk on a coder?
Joe White
@[Joe White]: hmmmm. I could wonder what kind of coder wouldn't know what a "process" was! But I think I see your point; question edited.
Steven A. Lowe
"by writing the code that they buy"
Carson Myers
+1  A: 

"Tell me about your passion for programming."

OK. So technically that's not a question. But anyway. The rationale is that I really wouldn't want to hire a programmer that doesn't have a passion for the field. And by asking the candidate to elaborate some on the subject I also get a chance to judge their communications skills and get a feel for how honest they are. I value both communication skills and honesty as high as passion.

PEZ
+4  A: 

I always ask the interviewer "Tell me about a particular problem in your previous project that was interesting or challenging and how you went about solving it." I use this to see their level of passion, what kind of problem they think is interesting as well as their communication skills. It often leads to full blow discussions where I can poke and prod in may directions. Sometimes it is hard to tell what the individual really worked on on a team project, how they debug, how they research etc so I try to get them describing a real world sitation.

I subscribe to the theory that I want someone with intelligence, ability and PASSION. I want to see that they really think this stuff is fascinatin and it bothered them until it was fixed.

Marcus Erickson
+1  A: 

"If you could only ask 1 interview question to determine whether or not to hire a programmer, what would it be?"

To ask the question, you first have to know the question.... good recursion
DFectuoso
And the correct answer to this question is, "I would ask, 'If you could only ask 1 interview question to determine whether or not to hire a programmer, what would it be?'".
thomasrutter
+5  A: 

I've asked "What is your editor of choice?" I don't really care what the answer is (as long as it's reasonable) but I'm suspicious of anyone who doesn't have an opinion.

Of course, I'd want to know more, but that question seems to eliminate non-programmers.

Jon Ericson
+5  A: 

"Are you willing to work for a company that will make its hire/nohire decision based solely on your answer to one question, and why or why not?"

Either that, or:

"Describe your single greatest triumph as a programmer."

The answer will tell you a lot about how they work, their philosophy in approaching and solving a problem... or if they don't tell you anything useful, that tells you a lot too.

GalacticCowboy
Isn't the first one TWO questions?
Thorbjørn Ravn Andersen
+8  A: 

"Tell me about some of your personal projects, something you have done outside of work/school".

I think this question is a great indicator on the quality of the interviewee. Simply having a personal project shows a passion and enthusiasm for development outside of simply collecting a paycheck.

I have asked this question in the past and have used it as my main deciding factor when choosing between two equally qualified candidates.

nrich
i dont know, i dont like to talk about that. i just think its personal.
01
I dislike managers who think a worthy employee should be someone who works on web development in their spare time too. I think it discriminates against excellent employees who happen to know how to switch off at the end of the day, or who have a family (or dare I say a life). I do happen to spend of a lot of spare time working on my own projects, but that's none of an interviewer's business, and I certainly don't want to give the impression I'm open to being available 24/7.
thomasrutter
I agree with ABCDE and thomasrutter. I avoid any questions about hobbies, off-hour computing activities, etc unless they bring it up themselves. How they spend their personal time is their business, not mine.
kenj0418
@thomasrutter: I actually think this is a very good question, and it doesn't imply being open to work 24/7, quite the opposite, it might mean you're less open to work extra because not only do you have a life, but also side projects that need their own time. or, maybe you'll waste the company's time, working on a fun side project instead of the boring business project that the company runs.
hasen j
A: 

"Are you a giraffe?"

Seriously, some candidates for coding jobs will say "yes" to this. It's quick way of eliminating compulsive liars.

finnw
And if they respond "Yes Sir!", that tells you something else. :)(Cadet forces?)
Arafangion
+3  A: 

"Why can't I ask more than one question?"

Assaf Lavie
A: 

Something to the effect of: "Give me an example where you fixed something you didn't like in a way that was elegant, where elegant means minimal effort for maximum gain."

http://jrothman.com/blog/htp/2009/01/how-do-you-hire-for-innovation.html

One or more of those would suffice.

MSN
A: 

Write some code [for some arbitrary problem].

I can't count the number of times I've gone fifteen or twenty minutes through an interview with the candidate giving good answers to the kind of "soft" questions seen in the other reponses (even something like "what is a mock object?"), only to ask a coding question that requires them to write on the whiteboard and realize that the interview is over.

Nowadays, I always ask a question that requires code up-front, even if it's something stupid like "write a function that returns the index of a given value in an array". You'd be amazed at how many people fail at such a simple task.

Ross
+1  A: 

"What are your answers to all the questions Joel Spolsky would ask if he was interviewing you?"

http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html

sjbotha
+8  A: 

If left alone in a room with a tea-cosy would you try it on?

Martin Beckett
Very nice, it's a pity there is no +1 FUNNY. :)
Arafangion
I like to know if a candidate can survive my sense of humour!
Martin Beckett
If they ask "wtf is tea-cosy" are they hired?
kenj0418
No - we don't want colour spelled wrong throughout our code.
Martin Beckett
And wtf is "tea-cosy" i mean for real?
gath
"Well, if this wasn't an interview, then yes, totally. But as this is an interview, probably not, I wouldn't want to mess up my hair". (Note: I shave my head B-)
Brian Postow
@gath: It's a (passive) device for keeping a tea pot warm. Basically, it is thermal resistance applied to the tea pot usually in the form of stuffed textiles.
Daren Thomas
A: 

Defend the choice of technology X when technology Y is a better/ more practical choice.

eg:

  • Defend the choice of MOSS 2007 as a CMS rahter than Sitecore
  • Defend the choice of Windows application using Java over WinForms/ WPF

A good programmer should be able to justify a technology/ language choice even if they personally don't believe it's the best one

Slace
Are you sure you aren't thinking of lawyers?
Doug McClean
A: 

I would ask the candidate to explain the whole process of garbage collection, because I think knkowledge of memory allocation/ reclaimation is a very import aspect of programming which cannot be ignored.

Rashmi Pandit
+1  A: 

This question works decently well for new college grads:

Explain the code you wrote 2 weeks ago.

Many students are not able to explain the design choices they made in the code they just wrote. If their answer ultimately boils down to, "Well, because that's what the teacher told us to write, don't hire."

Sean Turner
A: 

Why did the multi-threaded chicken cross the road?

JP Alioto
Schrödingers Chicken?
Thorbjørn Ravn Andersen
A: 

You should not have to ask a question, that fact that the person is there means your interested. Maybe he's interviewing you...

eschneider
A: 

similar to Jon Ericson's question: "What's your favorite programming language and why?" I'm suspicious not only of anyone who has never thought about it, but also of anyone who actually HAS one. People who try to fit round pegs into square holes can be a problem...

Brian Postow