I completely agree that "trick" questions only select for people comfortable with trick questions. It doesn't hurt if someone who is good at them that is on the team but let it happen organically -- and let it be a non-jerk, which is more important!
I completely agree that coding problems can be excuses for jerks to nitpick, and about the only "good" thing that could come out of such a situation is that the candidate learns that the company employs jerks and doesn't mind them talking to candidates.
However:
The whiteboard can be a welcoming tool if used right. How do you think, how do you talk about the problem, do you actually know the basics?
We use Java, C++, Python and Javascript. We do want you to know one of them. We don't care, in the interview if you forget or misname the name of a routine, or get the arguments backwards (you're not in front of a computer; you don't have to worry about your typing speed, looking up the name, unfamiliar settings on the machine you're in front of, house style etc). We don't care if you forgot a semicolon or even a closing brace, much less a #include. Use whichever language you're most comfortable from the set you'd be using in your job. The best "problems" should be less than a dozen lines, even without any fancy tricks.
We pick something boring, say from the standard library, and nothing tricky like a hash table. Really boring like floor(). If you can't figure out how floor() does its "magic" that's scary. If you need to look up how to balance a tree in place, that would be no big deal so don't put someone on the spot. If you claim to know python but can't print your outputm, that's bad. If you claim to know python and your indentation isn't clear on the whiteboard who cares?
I've told this story on HN before: almost 20 years ago I interviewed a candidate who wrote a routine to shuffle a deck of cards on the whiteboard (we use even simpler examples today). His program ended up elaborately coping the input to the output without shuffling. One of us asked, "Is that really a shuffle?" He said, "Oh I'm a fucking idiot" and fixed it. He was an awesome hire.
At one company we had a standard question (again, write XXX from the standard library) that had a special outlying case. Only one candidate got that, but we hired several people who missed it. Stuff like that can be caught in code review.
But I've interviewed several candidate who spoke well and claimed to know, say, C, but couldn't write "hello, world" in that language. Whiteboard caught it.