I think the type of problem and structure we use for interviews is bad. Let the candidate code alone without you watching. Give them internet access. Come back in an hour or two, or let them do it remotely or as a take home. This is more like our real jobs; and gets rid of cutesy "do you know this algorithm?" questions, which many whiteboarding problems are. Instead of going for pure data structure / dp / search / sort algorithms, have them implement things like business rules.
The problem's not even that I'm bad under pressure, and in fact I've repeatedly been told the exact opposite by people who've worked with me. The problem is specifically about doing a programming performance in front of an audience, in an interview rather than co-worker context. I'm god-awful at that unless I'm heavily prepped for exactly what's going on. No tools? I'll forget basic syntax, yes even in "a language I chose". Let me use tools? I'll forget how to use them, or get self-conscious and avoid things I'm not entirely sure will work, overriding my own muscle memory. It's a very specific problem but I doubt I'm the only one who absolutely can do the job just fine, but is also entirely capable of coming off like a complete "faker" in an interview.
[EDIT] to make matters worse I can talk about programming just fine in that setting, which probably adds to the "he's some kind of social engineering genius who learned to sound exactly like a competent programmer while somehow also not learning a single thing about programming" impression. It's not usually an issue, but I'm quite sure I've reinforced some interviewers' notion that it's a good thing they do whiteboard screening because they're overwhelmed with lying applicants, and that I was one of them.
I've met one developer who couldn't do their job, and he moved into a pre-sales role shortly thereafter.
Everyone else was fine and did a good job but send them unprepared to a random interview on any given day of the week and I'm sure it'd be another one of those "well we dodged a bullet there".
The signal to noise ratio is Garbage.
Sure a "whiteboard interview" basically optimizes for people who can actually pass whiteboard interviews rather than people who can do the job.
But to claim that there is a NON-NEGLIGIBLE number of people who basically become 100% ignorant when under the stress of a whiteboard interview BUT are excellent employees in any other stressful situation is, to say it in nice words, [requires citation].
And if one really has this apparent rather unique type of handicap, then better mention on CV to try to get some empathy from the hirer, or just _train_ to avoid it. Yes, most people do _train_ for the express purpose of passing interviews.
Tech interviews are remarkably scattershot in the form they take (outside well-known big companies), and are unusually anxiety-generating, even in the notoriously anxiety-filled field of interviews. Describe what one might (emphasis on might, part of the problem is that it's so often a surprise) expect in a tech interview process to some people outside the industry, and gauge their reactions. I definitely think it's likely they have even worse signal-to-noise ratio than is commonly thought.
[EDIT] Certainly I find it far less plausible that there's an absolute army of people out there, dwarfing the count of actually capable programmers, who are brilliant con-persons but too dumb to figure out that that skill itself is more valuable than programming, outside the top couple percent of programming jobs by comp, and apply it more directly to business roles that actively want it.
And I'm quite confident it's not the interviewer. Usually the panel is quite anonymous when it comes to calling a "bullshit" candidate. We ask panel persons individually to avoid the "no one wants to contradict someone calling X bullshit'" effect.
I don't think tech interviews are _any_ worse than the ones outside. If anything, we have less standardization than other industries. I work for a engineering company first (software second) and the engineer interviews are basically _manufactured by HR_ (not engineers).
In this scenario, having someone literally be unable, in 2 hours, to replicate the first example code of some library, when they have access to almost identical code in the docs, is a pretty good filter.
The problem is when you apparently _forget_ the syntax for a function declaration in a programming language you claim N years of experience in your CURRENT position. This is just absurd. Our you suddenly get completely stuck with counting odd numbers on a sequence or the like. And this happens surprisingly frequently. I just cannot believe you can have this type of anxiety (I am extremely shy myself) outside your first or maybe second interview.
Languages like C that have a single official for loop syntax are a bit easier to remember, in part because it's a syntax I have previously used on a whiteboard rather than exclusively in actual code.
So if a candidate can't write a loop on a whiteboard, maybe let them try in a non-IDE text editor, or have them glance at a formal grammar for the language as a refresher that won't give away the game to someone who can't actually code.
And if I start showing them an EBNF grammar for the language, now that's TWO languages that you will show you don't remember rather than one. I find this even more absurd; you don't remember anything of the syntax of the language you used at work for years, but you think you can rediscover it from the FORMAL language specification in a whiteboard?
I've had candidates who seemed incredibly accomplished when talking them, who showed amazing looking demos and could talk at length about them. But when given a task to do on the computer, given 2 hours alone to sit and code, couldn't do even the first part of the exercise - despite it being something you could literally copy and paste from the documentation that we gave them a link to!