I just have a conversation and ask them to tell me about a favorite code project they've worked on. Could be school project, previous job, whatever.
And just let them talk about it. I'll prod for more detail if I need to give a little nudge. Ask about problems they solved when doing it, etc.
The _only_ thing that I'm looking for in this process is whether or not the person is truly interested what they're doing. This comes through when talking about something they're excited to have worked on, seemingly small problems that they had to really work to solve, etc. Geeking out, if you will.
The single most important trait I've seen in programmers that I've worked with over the years is "level of interest". There's too much that you have to learn on a daily basis to be successful in this field. If you're not interested in learning new things and finding solutions to the problems that you encounter, you're not going to make it very far.
Beyond that and basic competence in the core skills that the job requires, I don't look for much more.
Thus far, everybody I've ever hired who has passed this little conversational test has been an excellent team member.