One of the fastest ways is to ask about something they had to "fix" (use the word "fix") at their last job, or some problem in a pet project that they just figured out. This will sound like poetic license, but really good programmers have a light that flares when they start talking about that. They immediately are back in the trenches, telling about how they couldn't figure out some nasty recursion error or some server problem that was untraceable. Usually their hands start getting animated; they loosen up.
I couldn't care less about the problem OR the eventual solution. I couldn't care less if he used an open source module to write some new code last week or if he thinks CouchDB is super amazing.
What I really want to know is how they think.
When you have a programmer who lives in code, he (or she) swim through problems like they are physical objects. They find passion in killing bugs and making code more efficient. I can hire a hundred people who can recite what the Gang of Four is or write a bubble sort. I can't hire guys who care about whether their own code can be improved.
But this is just one way. There are lots of ways to tell.