share
Stack OverflowWhat interview question weeds out 'bad' applicants?
[+45] [32] sparkes
[2008-08-21 13:04:16]
[ interview-questions business ]
[ http://stackoverflow.com/questions/19801] [DELETED]

We have a list of the best interview questions people have been asked [1] and the worst interview question you've been asked [2] but what question do you believe sorts the chaff from the wheat?

One you've been asked, one you've asked or one you wish the co-worker from hell had been asked. There's no magic bullet but is there one question you think helps the process?

[+65] [2008-08-21 13:11:02] Forgotten Semicolon [ACCEPTED]

What do you do to stay current in software development? Elaborate.

From this question, I'll be able to judge how passionate they are about SD. Did they say books? Blogs? Forums? Then refine, and ask which ones. What particular passages/posts/threads struck an interest for you?


if "MSDN" is the only thing they can come up with for a Microsoft focused position, I would view that as a bad sign - spoon16
What fraction of pro SDs do you think are passionate? I'd put it at about 20% where I work. Passion is good, but that's probably setting the bar a little high. - Christopher
Passion is a big one for me. You've gotta be passionate about development when you're doing AR/AP dev for a garage door company ... actually, AR/AP for any company (except your own) is hardly exciting. - Scott Bennett-McLeish
1
[+39] [2008-08-21 13:07:09] Ian Nelson

"What's your Stack Overflow reputation?"


(20) Bad answer: What's a Stack Overflow? - Damien
What number is a good number? ;) :) - acidzombie24
@[acidzombie24]: Jon Skeet + 1 - Steven A. Lowe
(3) I'd accept any answer that involved having visited SO. By now, to not have at least heard of the site shows a lack of involvement in any programming forum/community. - Ether
(3) Notice that very excellent programmers have in SO very low reputation. Also, notice that reputation only says how much the system trusts in you. - eKek0
(1) Followup question: "Did you get all that rep at launch before the daily rep caps on questions that would flagged CW now?" - SnOrfus
@Steven: Jon Skeet +1 is 1 in Perl... not too hard to achieve (for non-Perlies, a string is converted to 0 when used as an argument to + - DVK
2
[+26] [2008-08-21 13:21:42] AlexCuse

I can't find it at the moment (I'll do some more searching in a bit) but I recall someone's blog post a few months ago where the writer simply asked the applicant "what bothers you the most about other people's code" (or something along those lines).

The gist of it was that the "bad" applicants almost always would point out things like code formatting, and maybe slight syntax differences. The "good" applicants would point out things like what patterns could have been used, the KISS principle, etc...

This one has always stuck with me, and I've actually been asked it a couple times (maybe worded differently)

edit here is the blog post I referred to: The Perfect Interview Question [1]

[1] http://www.noop.nl/2008/04/the-perfect-job.html

(4) I did an interview recently in which I was asked "What do you take pride on things you have done?" and I answered on the lines of KISS... then they asked again. "What is a COMPLEX thing you have done that makes you proud?" After that answer, I was pretty much hopeless at this point.. =P - schonarth
3
[+16] [2008-08-21 13:15:19] Shaun Austin

I'm not sure if just asking questions can really weed out the bad candidates. It's very easy to learn a bunch of stuff to do with .NET and C# for example and repeat it in an interview. In fact there are literally thousands of sites listing "interview questions and answers" that are easily googleable.

I personally think you learn more about a person's abilities by giving them a programming task to complete. Nothing too hard but enough to stretch them, they don't even need to complete it but at least show how they approached the problem and what depth of knowledge they have. If it's possible to actually sit with the interviewee and get them to talk through their approach to the problem as they go, with you asking questions along the way, you not only get an idea of their technical abilities but also how they communicate and if they are likely to "fit in" with the team.

If that isn't possible for whatever reason then I would suggest more open-ended questions and scenarios to get them talking rather than strict question/answer.


(1) Remember that coding on a white board is much harder for the interviewee than it appears. I find that something as simple as FizzBuzz usually filters out the inappropriate candidates. FizzBuzz: codinghorror.com/blog/archives/000781.html - Don Kirkby
4
[+14] [2008-08-21 13:22:22] Kronikarz

This article [1], entitled "The Five Essential Phone-Screen Questions", by Steve Yegge, is a good read.

[1] http://steve.yegge.googlepages.com/five-essential-phone-screen-questions

5
[+8] [2008-08-21 13:50:32] Christian

I'm interested in whether a candidate is a good engineer, as well as a programmer. I ask two things that make it clear whether the candidate is real or not:

"Give me an example of something you did that turned out to be a mistake, how you fixed it, and what you learned."

I'm really only interested in what they learned: learning from our mistakes (bugs, design problems, deployment issues) is critical. I find only about 1/3 of candidates have a good answer. Nearly 1/3 haven't learned anything!!!

Next, I'll pick something "big" from their resume and ask them to describe it in detail. Often this shows the real deals from the ones with the padded resumes.

Only after all that will I bother with the technical questions. If they fail on the first two I'll end the interview.


6
[+6] [2008-08-21 13:44:31] Pete

I think that there are two things that quickly determine if the person is someone that would be good on our team.

  1. How do you keep current with your skills? Name 3 examples of something you've done in the last few months that shows that.

  2. Explain the difference between a class and an interface. What is polymorphism and how does it relate to those two?

There are other technical and personal questions, of course, but if I don't really get good answers to those two, the interview doesn't go very much further.

The first question is vital. Too many people allow their skills to get stagnant. The kind of person who is always seeking to make themselves better are the kinds of people that you can expect are going to give you a little something more.

The second question crosses many language boundaries and since OOP is at the core of almost all current language technologies, it tells you if the person has actually done any real programming in the past.


I have to disagree on the second one. I could write pretty good software without actually knowing the term polymorphism. As long as I know the mechanics behind it, I'll be fine. Back when I first started out OOP was new and I wasn't trained in it (I still am not) and I had people using this term and eventually I had to look it up, only to find out it was way simple and I was using it for years. - Jonathan van de Veen
You probably could write good software without knowing the term and I'd grant you could implement polymorphism without knowing that is what it is called. However, there are two things that I'd say here. First, it is okay to accidentally turn away a good candidate, but worse to hire a bad one. Secondly, if a developer reads a lot and keeps their skills current (point 1 in the answer), they will have come across this term. One would expect a football player to know that sending extra players at the QB is called a blitz... we need to know terminology (at least brush up before an interview). - Pete
7
[+5] [2008-08-21 13:10:55] KiwiBastard

I think direct correct answer questions aren't that useful. It's relatively easy to memorise bullet points about a language or framework before an interview.

I usually ask questions that require a bit of thought to answer by the applicant.

Things like:

  • what are your views on ....
  • How would you implement x based on assumptions y
  • describe the architecture of the current application you are working on - what are the strengths and weaknesses of it

8
[+5] [2008-08-21 13:28:13] Kristopher Johnson

A former boss used to ask what I thought was a very simple programming question: Write a function that swaps the two bytes of a 16-bit value. About 75% of the people we interviewed couldn't do it.

Another "simple" question: What is the hexadecimal representation of the decimal number 13? Most candidates had no idea, including a candidate with a Ph.D. in Computer Science.

These candidates were applying for C/C++ embedded-systems development positions, so low-level questions about bits and bytes shouldn't have been considered tricky.


Uh... create a temp copy, shift one copy left 8 bits, the other right 8 bits, OR together? Is there something I'm missing? 0xD? I've never done embedded, don't have much C experience, and have had my BS for less than a year. How do people have trouble with these kinds of questions? - Adam Jaskiewicz
(1) @Adam--Thanks! I'm writing those answers on my arm now for my next interview! - Nosredna
@[Adam Jaskiewicz]: if using C, how about short val = 123; char * ptr = (char *)&val; char ch = ptr[1]; ptr[1] = ptr[0]; ptr[0] = ch; - Steven A. Lowe
9
[+4] [2008-08-21 13:09:34] Nick Berardi

C#: If they say they've been using it for more than 3 years, drill them on the "new" keyword, in the polymorphic sense.

I am not even sure what you mean @Greg, and I have been using it for close to 7 years now. :)


e.g. "what does it mean to call 'new' on a class? what if there is no new() method defined there? what happens? what arguments are passed to that method, and in what class is it located? what do you get as a return value?" - Ether
I laughed. I cried. I remembered the time I was told, by a headhunter, that he needed people with five years of IA64 experience when the IA64 chips hadn't hit store shelves yet. - Ian
10
[+3] [2008-08-21 13:08:40] John Downey

I think asking someone what they do in their free time to better their understanding of technology is a good one. It is definitely a positive sign if they read blogs, contribute to open source, or tinker with projects. Beware those who can come up with nothing they do in their free time related to technology.


11
[+3] [2008-08-21 13:21:55] mmattax

IF the candidate is relatively young, or just out of college: I would ask a candidate to see some projects / code that they have worked on outside of work. If they can produce that, you know that coding is more than a job; rather it is something that they enjoy doing, and probably excel at it.


12
[+3] [2008-08-21 13:16:22] Barrett Conrad

I actually find how people use language is one of the best indicators. When interviewees avoid technical terms and cultural/community lingo, I usually associate that with limited experience or a lack of confidence. On the other hand, jargon bombing is a dangerous sign as well. Much like the old adage that if you can teach it you know it, anyone who can keep up a substantive conversation on a technical topic, like you would have with a successful teammate, without being lead is strong candidate.


13
[+3] [2008-08-21 13:06:28] Nick Berardi

How many tables are needed for a many-to-many relationship in SQL? Or another way to say this is. Create a schema on paper for a many-to-many relationship between Students and their Courses.

If the applicant just looks at a diagram that shows --- they will think this is all that needs to be done. When the obvious answer is 3 tables.


14
[+2] [2008-08-21 13:06:44] Greg Hurlman

No interview should only include technical questions/answers, but for developers in this day and age, you do really need to ask questions to make sure that they can back up the knowledge they claim on their resume... WAY too many people bending the truth these days not to do it.

It depends on the technology, but a few off the top of my head:

  • C#: Drill them on the "new" keyword, in the polymorphic sense.
  • ASP.Net: Ask about the page lifecycle events - at what point ViewState is loaded into a page, when events fire for controls on the page, including dynamic controls
  • SQL: Describe the differences between inner/full outer/left outer/cross joins, and when you would use each

For example, assuming they knew that C# had a different use for "new":

public class parent
{
    public void myFunction() { }
}

public class child : parent
{
    public void myFunction() { }
}

Given the above code, will it compile (yes, with a warning)? How do you clear the warning (add the "new" modifier to the child function definition)? When would the parent's version of the function be called vs. when the child code would be called?


lol - though i know what the 'new' keyword is for in this context, i would object to overriding a non-virtual method in a subclass without at least adding a method in the child to expose the parent's now-hidden method... this smells like a bad design to me ;-) - Steven A. Lowe
ok i use C# and consider myself one of the 'good eggs' and I had never come across this. all of the questions you asked i would figure out with 10 minutes on google, on the job. none of those questions tell you if i'm any good. - Dustin Getz
This to me is an example of a bad question since it has at least two possible answers. What is wrong with fixing the warning by adding add 'virtual' to the parent and 'override' to the child? I would have thought that was the proper fix. - jussij
@Greg, it's called the new modifier, not keyword. If you're going to ask a question in an interview, please ensure you get the terminology right. - Ashley Henderson
Or, point that out & pass the question - if you're just assuming things without question during an interview, that tells me something else entirely, and still not good. - Greg Hurlman
15
[+2] [2008-09-15 21:48:54] enricopulatzo

"What books have changed the way you work and why?" is a favorite of mine. Since so few developers seem to read books these days actually getting an answer to that question that has any depth will be a good start for determining sheep from goats, so to speak.


16
[+1] [2009-02-16 04:13:23] utku_karatas

I haven't tested this on anyone but I think you can weed out a bad applicant for a coding position simply by asking to implement an iterator for a tree data structure.

Possible responses would be..

  • attempting to use a yield expression if the language permits. (Great!)
  • trying to implement a recursive/non-recursive solution. (OK-ish)
  • fail to come up with any solution (major doubt about his/her skills)
  • doesn't even know what an iterator or a tree is. (straight to the airlock :-))

(2) depth-first or breadth-first? - Steven A. Lowe
17
[+1] [2008-08-21 13:53:42] Rob Z

I think that the type of question that you ask is likely going to relate to the level of the position you are interviewing for, but there are some general questions that you can ask that should apply to all levels. For example:

  • "What are your thoughts on [LATEST TECHNOLOGY EVERYONE IS TALKING ABOUT]?" - This question can give you an impression of how current they are with what the "state of the art" and if they have been keeping up with the changing times. Likewise, if they aren't familiar with it the reason that they give can be quite enlightening.
  • "Describe some programs that you have written on your own?" - This can apply to both single person projects at work, or at home and can lead to some very enlightening follow up questions (ex. "Do you use version control for you hobby projects?") that can give some insight into their work habits and technical interests.
  • "What references do you commonly refer to throughout the day?" - You would hard pressed to find anyone that doesn't use any references what so ever, so where they turn to for answers can also be enlightening.

Then, depending upon the position the person is being interviewed for you can start looking at more specific technology based questions. However, as some other posters have pointed out, just because you have been working with a language for awhile doesn't mean that you know everything about it, so you should be a bit forgiving if they don't answer everything off the top of their head.

Finally, I think that the ultimate interview question is to have the interviewee sit down at a workstation that is configured the same as they would be working at on day one and have the write a simple program. Ideally, the program would have some component in it that they need to look up so you can also see how they react when confronted with something they don't know off the top of their head.


I disagree with the first point. You can't keep up with every single new technology that comes to the marketplace so you have to make choices if you want to be any good at anything. Also I don't put everything I looked at at some point on my resume. That only contains things I actually worked with. - Jonathan van de Veen
@Jonathan - It would have to be specific to the person and the position that they are interviewing for. For example, a web developer could reasonably be expected to have at least read an article or two about a language such as Ruby on Rails even if they haven't actually used it yet. - Rob Z
18
[+1] [2008-09-15 22:11:38] Gilles

What programming projects have you done that are not on your CV?

If the answer is none or school projects only, this person is probably not passionate about programming. All good programmers I know have made dozens of various scale projects in their free time, some of which they might have even forgotten that they ever did.


(2) I used to program in my free time. Not anymore! It is needed for reading novels and watching movies or the occasional TV show. - Zan Lynx
19
[+1] [2008-08-21 13:08:17] ninesided

What is the difference between an inner and outer join in SQL?


20
[+1] [2008-08-21 13:16:41] Kibbee

What is an SQL Injection attack, and what are the various means of protecting against them.


21
[+1] [2008-08-21 13:17:11] Mark Ingram

Any of the following might be good:

  1. What is virtual inheritance?
  2. How would I delete the following variable: int* pVar = new int[512];
  3. What do the following "const" declarations mean? const T* const pMyVar;
  4. How do I find out if a number contains the binary flag 0xFF?

so what is "virtual inheritance"? and in what language does it apply? - Steven A. Lowe
I'm not sure whether these are intentionally things that sound like questions, but aren't, or not? e.g. Virtual inheritance would mean that you can override the inheritance to change it, and I've never seen a system that allows that - which might be why it's a good interview question. Or, maybe, the question is around the difference between virtual members and non-virtual members of a class, which is also a good interview question, but less interesting. - Bevan
Or, it could be asking for an explanation of what class Derived : public virtual Base means, what it's good for, and when you would or wouldn't want to use it. (It's a C++ thing, for reference.) - cHao
22
[+1] [2008-08-21 13:31:51] Guy Starbuck

On the StackOverflow podcast, Jeff and Joel suggested that as an interviewer, going in having no set questions but just running through the resume is a bad thing. But in my role, I'm usually the technical interviewer, and I like to do just that -- I want the candidate to explain, in their own words, the architecture of each project they have worked on, and where the good, bad, ugly aspects of the architecture and the code were, and what they would do differently.

The other thing I am always listening for is a real understanding of OO principles. I have found that if someone has used interfaces, inheritance, etc. in their work, and knows intimately how to use them and talk about them, that is a sign that they have a really good grasp of software development in general.

This is the approach I use for interviewing junior to mid-level developers, and I have had a really good track record with it succeeding.


23
[+1] [2008-08-21 13:38:53] Scott Bennett-McLeish

I've found that when in the situation of having a Human Resources person and a techie / IT manager etc. it can be effective to alternate between HR questions and IT questions. This can be a good way for the candidate to shine or alternatively come unstuck if they've been hanging on with their up to this point memorised list of ASP.net-isms.


what's an HR question? "how many sick days do you take each year"? - Steven A. Lowe
HAHA ... no. More like this: "can you describe a situation where you were working in a team and a conflict arose, how did you resolve it?". - Scott Bennett-McLeish
24
[0] [2008-08-21 13:22:05] Eric Z Beard

@Greg

Given the above code, will it compile (yes, with a warning)?

What warning?

Checking knowledge of new vs. override is one of the things that I ask. Sadly, many .NET developers with years of experience can't answer the question.


I never really liked shadowing and object, but sometimes it is needed. The funny thing is that I am a C# guy and I think that the way that they do it in VB is much clearer. New is such an overloaded term. - Charles Graham
25
[0] [2008-09-15 22:13:31] rp.

Explain, generally, what the differences are between a value type and a reference type.

rp


26
[0] [2008-09-15 22:26:34] Ryan Delucchi

Ask fundamentals about the internals of basic data structures or constructs within the language (or languages) that applicant is expected to know. "Writing code" over the phone is tricky but a lot of the basics can still be covered. Understanding Hash Tables, Binary Search, and a sense of run-time efficiency are good examples.

If given the opportunity for a face-to-face screening: Ask an open-ended design problem. That is, do not simply ask the candidate to "Make a class with member A, B and C that does X". In other words, instruct the candidate to write a class that satisfies a list of constraints. Even if the open-endedness of the question leads to confusion, how the candidate seeks clarification and thinks through the problem, when it is presented in this way, can be very revealing.


27
[0] [2009-05-21 07:46:37] James

Strangely enough: in the language of your choice, write function to solve <simple task A>

For instance: given two arrays, return an array containing all elements common to both arrays.

Great: solves it efficiently (O(n) solution, assuming proper hashing) Good: solves it better than brute force O(n lg n or better)) Eh : solves it with an O(n^2) loop (better than nothing) Bad: manages to botch it in some way unimaginable.

While the above is admittedly a very simple question, it's surprising the number of people who can't solve it. If you have a clue, you solve it in < 5 minutes and we move on to better topics. If you can't, it's telling.


I can solve that, but there may be some duplicates in the resultant array. - Nosredna
28
[0] [2009-05-29 21:06:41] Tom van Enckevort

Two questions that our company tends to ask is to write a random number (<100) in binary and after that do the same in hexadecimal.

It is surprising to see how many applicants cannot do this, though it's one of the most basic things that a developer should know (as in, have learned it in uni but not necessarily use in their daily job).


29
[0] [2009-11-10 23:27:08] whybird

I had an applicant once who looked fine on the CV, and then I asked him this:

"In any languge you would like, write a function that takes a string input and returns the same string reversed."

My plan was to look for things like forgetting about terminating /0 chars, would it work with a zero-length string, unexplained oddities of approach, and even if they got everything right asking them if they could see the bug in their code just to see what they would do. It worked great.

This one guy, however, turned up, and actually just plain couldn't do it. At all. Had no idea where to start. Couldn't even write a pseudocode version. It was excruciating (especially for him; I made him suffer at trying it a bit.) My associate said to him "You do know this is a programming position, right?".

It was surreal, and shows how you can't trust a CV at all.


30
[-1] [2008-09-15 22:01:01] Garth Gilmour

A great indicator is the length of time people spend answering open-ended questions.

E.g.

  • Do you have a favourite design pattern and if so why?
  • How has the first programming language you learnt affected how you approach others?
  • When would you consider a piece of code as being complete?
  • What features do you think should be in the next big programming language?

If they are still going after 15 mins then you have a winner :-)


I would be much more impressed if they'd give me a good answer on all of these in under 4 minutes. I know I can: - I don't, because I like to think outside of the box. - I started with QBasic and happily it didn't affect me. - If it has any needed comments, is reviewed, unittests pass and the testdepartment OK's it. - C# 4 should have dynamic (oh, it does? That's cool). - Jonathan van de Veen
31
[-3] [2008-11-30 04:34:03] Steven A. Lowe

I don't bother with obscure language questions or general CS knowledge unless interviewing someone with very little experience. Instead, I go through their resume and for each significant "achievement" such as "wrote a whizbang processor in language foo" that they list I ask the following questions:

  • What business need did this solve or business benefit did this provide?
  • What return on investment (ROI) did the business reap from your solution?
  • How was the ROI measured or estimated?

In general:

  • If they don't know then they're code monkeys
  • If they do know then they're developers

[I prefer developers over code monkeys]


I disagree. Many good developers will follow a planning but then the product is not sold or the business case is bad thought about and that is not their job. They just developed what they were asked for. - Daniel Daranas
"They just developed what they were asked for" is the mantra of the code monkey. ;-) - Steven A. Lowe
You are right, it is the mantra of the code monkey, however most of us do just that. Most of us are not invited to the business meetings (unfortunately) and asked if this particular feature makes sense. Most of us are asked "How long will this take?" and then promptly given 2 weeks to implement. - ra170
@[ra170]: I understand and sympathize! I would hope that more businesses would realize that their programmers cannot evole into good developers - which I view as a combination of programmer, designer, system analyst, and business analyst - until and unless they are exposed to how the business works. On the other hand, passive acceptance will not advance your learning opportunities either, so ask questions whenever you can ;-) - Steven A. Lowe
I'm actually surprised that this answer isn't downvoted more - or flagged as offensive :-) - Steven A. Lowe
One is not always in the position to ask questions. Sometimes some people are very secretive about projects and development. Why? Good question, I think it might be related to job security. For some reason (and I'm not going to name the company) some developers manage our managers and directors, not officially, but you can see what's happening. - ra170
32