I have a hard time believing that you can't detect that someone has absolutely no clue about programming just by asking about his past projects, drilling down on some specific technical challenges he encountered during those projects, quizzing him about his preferences for programming languages, libraries and stuff like that.