I generally went with a question my friend told me, "what was the last non-work, non-school program you wrote?". The theory being that a person who has used programming for something personal was probably a better candidate since they saw personal value in their profession.
i HATE this question but its becoming more and more commonplace. I work hard, programming 40-70 hours a week, I solve all sorts of in work problems with ideas that I've come up with to make my daily work life easier. I barely touch a computer outside of the office. Does that make me a bad candidate for all programming jobs now?
I'm in the office 40-45 hours a week typically, I spend 20-30% of my time just thinking about the problems I am solving, or stuff like this, or following github projects, or other technology reading. I probably do about 4-5 hours of actual programming a day at work. My output during that time tends to match or exceed most of my peers in both quality and quantity.
The problem is getting people to understand more hours isn't the same as more productive output. Spending a couple hours thinking through a problem (or even prototyping) will usually save you more time down the road. This is true from simple data modeling to working through how to fit a system together.
As to the original question.. it is far from the only indicator of a person's own skill and drive, but it is an indicator. Especially in more junior level candidates. There's also the fact that the technology in use changes rapidly... and do you take the time to learn it... either out of your in-office day, or outside.