To me the best filter questions have these features:
1) Obvious: If the question is failed, even a non-technical hiring manager understands how bad this is.
2) Fast: Quick to ask, quick to answer. Everyone agrees in advance that if it's failed, we can shorten the rest of the interview.
3) True negatives: Some bad candidates might pass the test. But no good candidate will fail.
4) Real: Write real code live in any programming language. Emphasize that perfect syntax is not important.
I've helped interview candidates for student positions, programming teacher positions, junior and intermediate programmer positions. It is shocking to some how often people fail filters like this. My current favourite:
In any programming language, write a program that prints the numbers 1 to 100, except if the number is divisible by 3, then print "turtle" instead. Example:
Well formalized, I fully agree with that list. It's applicable to pretty much every field by just finding a question that fits all those 4 points (with the obvious alteration of #4, depending on the field, e.g. for a mathematician "perfect notation is not important for this interview" for example).
1) Obvious: If the question is failed, even a non-technical hiring manager understands how bad this is.
2) Fast: Quick to ask, quick to answer. Everyone agrees in advance that if it's failed, we can shorten the rest of the interview.
3) True negatives: Some bad candidates might pass the test. But no good candidate will fail.
4) Real: Write real code live in any programming language. Emphasize that perfect syntax is not important.
I've helped interview candidates for student positions, programming teacher positions, junior and intermediate programmer positions. It is shocking to some how often people fail filters like this. My current favourite:
In any programming language, write a program that prints the numbers 1 to 100, except if the number is divisible by 3, then print "turtle" instead. Example:
1
2
turtle
4
5
turtle
7
...
100