As I step up to that whiteboard, my brain launches several spinning thought-processes that suck up the vast majority of my processing power. First thought-process: "Oh, no, what if I can't do this? What if I look stupid?". Followed quickly by: "Try not to hyperventilate! Hold it together, man!". And then several others: "My heart is pounding!", "I feel dizzy!", "My stomach, it's in knots and I feel nauseous - don't get sick in an interview!". I call these spinning thought-processes because they're sort of like processes running in different threads on a CPU. They run in loops. Now, of course, all of this makes it difficult to actually work on the coding problem posed by the interviewer. From the outside, from the interviewer's perspective, it probably looks like I've locked up. Stumped by the problem itself. When really, the posed problem is only getting about 10% of the mental CPU at this point.
How did all this start? Well, I think I've always had a propensity towards anxiety even in childhood. I can recall in high school having full on hyperventilating panic attacks in my senior year around that time when I needed to decide where to go to college, etc. Of course, at that time I had no idea what they were - I'd be taken to the school nurse and she'd have me lay down for a while and pretty soon it would pass. After I went off to college they didn't happen anymore. But then after college at some point when I had a job where I needed to travel some, I recall a particularly bumpy flight where I had that kind of feeling again - now I would characterize it as a panic attack. And a bit later I had some health issues that also caused similar anxieties to resurface. This was about 20 years ago. At some point it developed to the point where just driving to the store to shop became quite a challenge. By then I realized that these episodes were panic attacks. I read up on the topic and basically went through a lot of cognitive self-therapy and after a year or so I was able to drive without issues and life was good again.
I think I've always been a bit nervous in interviews (who isn't?) but a few years ago, I had an interview in a small, stuffy room with no windows. The interviewer asked me to code some algorithm on the whiteboard and I suddenly broke out in profuse sweat and... well, the whole thought process thing I outlined above took over. As I felt quite physically ill at this point, I had to ask for a 10 minute break. After the break I came back and gave it another try, but by then I was just too run down by all of the stress hormones rushing through my bloodstream and I had to just call it off and leave immediately. And that was, I think, the interview that triggered the association. Since then, I've had mixed results. Some interviews have gone OK. Others have been close calls, and still others have gone about as badly.
So why am I blogging about this in... public? Let me clarify that my motivation isn't to elicit sympathy or to somehow get a pass on interviewing. Interviews are kind of a necessary thing. Sure there are alternatives like auditions, but even then you need to have some kind of interview to figure out who you're going to audition. No, my motivation here is to try to take some of the power out of the anxiety. Part of the fear is that people around you will discover that you're having a problem with anxiety and that they'll judge you for that. Well, if I tell them up front, then that takes some of power out of that fear.
Strategies for copingIn some cases, I've noticed that perhaps low blood sugar has played a part, so I tend to take some kind of snack along - nuts, energy bars, etc. The brain uses a lot of glucose and needs to be well supplied in order to function well. Usually, an interview lasts about an hour and you get a little break in between - I try to snack some during those breaks.
Another factor can be endurance. I've definitely noticed that things are more likely to go downhill near the end of a day (or even 1/2 day) of interviews. So now I try to ask that a full day of interviews be broken into 2 half days instead. Sometimes I even think I should ask that a 1/2 day of interviews be broken up into even smaller chunks over a couple of days.
I also try supplements like l-theanine and GABA, but I can't exactly say that the results have been consistently good. I think they help take the edge off, but they certainly don't completely eliminate the problem.
Ultimately, I think I just need to practice more. Whereas I overcame anxiety issues related to everyday issues (like driving) in the past, it's a bit tougher to work through interview-triggered anxiety as you don't get an opportunity to interview every day.