>This doesn't work, because candidates can (and apparently do) lie.
I have not found this to be the case. I ask people about specific projects they have posted and sometimes look through the code together and ask them about the time-space complexity of function they've written.
Maybe you're just encountering test-anxiety.