I was recently asked this questioned by a talented developer:
I've been a developer since 2007. I'm a solid developer with good experience. I've got a great opportunity for a new position coming up but I'm concerned about the tech interview. But I freeze like a deer in the headlights when asked to write code in front of people.My resume is accurate and reflects my skills and experience.
How do I prove I'm competent when I have this tendency to choke on tech questions when I'm put on the spot?
This is a great question. From my own perspective, and my early years specifically, I suffered from the same affliction. Back in those days it was the dreaded C++ test.
The best and most technical interview that I have ever had, one of my first infact, was far more searching and demanding than a set of examination questions. The very long interview wanted to establish how I thought and designed code - about for instance about memory runtime, funcs, strange pointer indirection etc. Very advanced topics.
On reflection this is a far better approach to recruit talent.
But returning the question, to level set, note that the individual was not concerned that they don't have the skill. Their skills ARE up to the task. It's a case of anxiety around the live aspect of the tech interview.
I would always start with honesty. Talk to the hiring manager or the HR person. Offer to show them lots of code, your repos, examples. Offer to share more code than you'd ordinarily need to, as a way of making it clear you have nothing to hide. Everyone has something, be it anxiety, issues with public speaking, etc. Trying to hide an issue can make it worse.
Perhaps you could do a coding test where you *walk them through existing code* and explain. Explain to them that you have anxiety about whiteboard coding, BUT you want to make sure they get an accurate picture about your skill.
Also, practice! Talk to a friend and have them interview you and and have you code live. Folks don't ordinarily code live with an audience, so it's understandable why you might freeze or not perform at your best. If you don't do something often (like code live in front of an audience) then, darn it, do it often! Practice.
Understand also that the interview may also want to see how you react under pressure. Do you get visibly angry? Wilt? Fall back on first principles? Denigrate yourself? Apologize? These reactions can be as important as your actual code. Usually interviewers are looking for thoughtfulness, analysis, patience, calm, and humility.