My preference, by far, is to spend time discussing ideas and approaches to solving problems. I don't want to see code. I want to see into his/her brain. How do you think? How do you slice and dice a problem to try to get to core? How good are you at intuitively choosing a good data representation? Do you bring-up alternative approaches to optimize for size vs. raw speed or other parameters? What questions do you ask?
Anyhow, whether the person can actually write two lines of code or not can be ascertained by looking at prior work (if available). The most interesting aspects of a programmer --the real reasons you might not want to let him(her) get away-- have nothing whatsoever to do with how quickly they can write a bunch of loops or if they have memorized five sorting algorithms. Nah, the real value is in how they think. That's what you want to hire them for.
EDIT: Some of the best, most creative and versatile programmers I have known could not write code without a set of reference books next to them. Why? Because they don't have encyclopedic knowledge of the various languages they might use. They'd excel at dissecting data to reveal structure and representation and then choosing a good approach to solve the problem but more often than not had to have a library of various CS and language books around them to support their work. My point is that these people would have failed interview puzzles yet they contributed to and sometimes single-handedly drove projects that generated millions of dollars for the companies that employed them.