Other's have provided answers that I have upvoted as a matter of must. The reason I write another answer is because what I want to say will probably not fit in a comment, and because something has to be said about how a good programming job interview can be like.
In the first good interview I remember, we talked, a lot, without a hurry. First for an hour, on the phone, about object oriented design and the pros and cons of implementing it in C++. Then, on site, I spoke with several people about their software development practices, integration, testing, version control, and configuration management, about teams and responsibilities, about technology and about design. It was a whole-day interview that included lunch with the folks that interviewed me. In hindsight, it was all about if I would productively fit in what they were already doing.
Ever since, the good interviews have all been long, one to two-hour conversations about software development. There have been no problem-solving questions, no puzzles, and no coding challenges.
If I were to interview someone for a programming job today, I would proceed in the likes. I'd request opinions about a breadth of topics, and leave depth aside:
- Which are your programming language preferences? Why?
- How to approach exception handling?
- Aren't the benefits of layered design a myth?
- Isn't continuous integration a burden to efficiency?
- Whomever wrote a piece of code should own it, Right?
- What do you do to get into "flow".
- How should reported defects be included in a project plan?
- ...
Those are questions with more than one answer, and they are all about topics about which a software developer should have an informed opinion. I wholeheartedly agree with the answers that mention previous real problems experienced as a conversation topic (not as questions).
The more scientific studies about effective software development since Peopleware say that the best programmers are those who understand the dynamics of software development, even if they don't have the highest IQs. I'd rather take a rookie that is eager to learn than someone with n
years of experience that boil down to 1
year of experience repeated n
times. My personal bias is towards candidates that tend to think outside the box, and at the same time know how to fit into the current (my) box.