I swear, I was just dealing with this a week ago. “Excuse me, Mr. Interviewer. I can either answer your questions about what’s going on here or attempt to fix the last let of this code. Which is more valuable to you?” Proceeded to use silence to fix code. Puzzle solving uses the uninterrupted brain.
And just the other day, I had the SQL schema question to design a schema … for a calendar! Worst interview question I ever experienced, honestly. Nearly no one designs calendars and they’ve got lots of ways to trip you up because recurring events are exciting. (Also, when I did design something decent with two tables and was asked to query both with a single SQL statement my interviewer didn’t understand UNION but that’s another matter.)
I like take home projects augmented with short exercises to verify that I’m not a plagiarist who’s incompetent at code. If you want to assess my puzzle solving capabilities let me play a Zachtronics game like SpaceChem or the like.