If you were trying to hire a mechanic, would you first give them a sudoku puzzle to measure his "cleverness" (and then use that as a predictor of their car repair abilities)?
i think these are good. TELL the candidate they are trick questions. again, they are trivial. i was actually disappointed.
For more senior candidates, you definitely wouldn't want to waste everyone's time with brain teasers because if the high risk of a hasty rejection - a deeper probing into systems they've built and and designed in the past, with an angle on relevant problems for the business, along with the pair programming.
Surprise trivia / trick questions do not select for anything meaningful in respect to the day to day practices of any developer