These types of questions are often used to gauge a candidate's passion and knowledge. Questions should, of course, be tailored to the individual's skillset. What you want to uncover is how passionate this person is about the platform or technology. How well do they know it? To achieve this try and form questions that require thought and an opinion.
This is why it's so important to know a little something about the platform the candidate is interviewing for. Many developers have expressed frustration when being interviewed by an individual who doesn't understand programming at all.
This article by Stevey Yegge focuses squarely on how to do a an effective SDE phone interview that will help you flesh this process out. Here is a brief excerpt that outlines his approach:
Coding. The candidate has to write some simple code, with correct syntax, in C, C++, or Java.
OO (Object-Oriented) design. The candidate has to define basic OO concepts, and come up with classes to model a simple problem.
Scripting and regexes. The candidate has to describe how to find the phone numbers in 50,000 HTML pages.
Data structures. The candidate has to demonstrate basic knowledge of the most common data structures.
Bits and bytes. The candidate has to answer simple questions about bits, bytes and binary numbers.
In the end, you are looking for deal-breaking knowledge gaps. Can this person program? Does he/she understand the technology? Moving forward, the question you need to ask yourself each time a person makes it to a face-to-face interview and fails is this--how could this have been uncovered on our earlier phone screening?
4. Surprise Them
You've committed to the face to-face interview-it's time to get them thinking. Lilly recommends, "Lego Mindstorm," a toy that combines Legos and programming. Using this simple toy can give you real time insight into your candidate's problem-solving skills. An interviewer would want to gauge their response, do they consider it fun, challenging or frustrating. The end game here is to see how the candidate thinks.
As we discussed earlier curiosity and problem solving skills are paramount. Seeing how the developer responds will let you know how they will react when they are faced with a real world problem. An applicant who maintains a negative attitude or states things like "what is the point" should raise some red flags for employers. "Some", says Lilly, "have just gotten up and left".