Saturday, February 15, 2014

Interviewing for the anxious programmer

Hi. My name is Phil and I have situational anxiety related to technical interviews - specifically, the coding part of the interview. Now, of course, everyone has this to some extent, but maybe I should clarify: I panic when the interviewer says "Could you code this algorithm on the whiteboard". And when I say panic, I mean PANIC: racing thoughts of doom, impending death, doubt about my abilities, dizziness, difficulty breathing, feeling like I'm gonna pass out - the classic panic attack.

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 coping

In 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.

10 comments:

Unknown said...

Two related thoughts on this: 1. When I start a new job hunt I always expect to burn the first interview I get. That means I try not to let the first interview be for a job I'm super excited about. 2. Try to mix in some interviews with companies that you aren't excited about about. It'll give you practice with less stress. And you might learn that you like those places more than you thought.

Unknown said...

I am often on the other side of the interview wondering what I can do to help the candidate relax. In these situations, what could an interviewer do to help you?

Just my own perspective: Communicate to the interviewer that anxiety is getting the best of you. Most can relate and are accommodating.

adam h said...

I agree with Josh. Just tell the interviewer your are nervous as hell because you really respect the interviewer and job. Take a deep breath, count to three, take another deep breath. Slow yourself down. Smile at the interviewer and give it a go

Unknown said...

I have similar anxiety issues. Try following the advice from this book, it's all common sense health stuff and no self-help mumbo jumbo: http://www.amazon.co.uk/The-Depression-Cure-Six-Step-Programme/dp/0091929814

Bill Sempf said...

I've been developing software since 1992. The last time I coded an actual algorithm was in college. When an interviewer asks me to show how I would code a binary search tree, I politely tell them that we aren't a match and end the interview.

I recommend the same for you.

That made sense in the 80s. Today, no.

Just A. Developer said...

@Bill: Actually, I disagree, the interviewer(s) have every right to ask algorithmic questions like that. The purpose of my post here was not to say they shouldn't. The purpose was to say that I (and many others, apparently) have this anxiety issue - mainly I was just trying to raise awareness. Those of us with dealing with these issues need to work through them and part of the way I'm working through them was to write this article.

flute1982 said...

I'm intrigued being a musician and the husband of a software engineer who has similar issues. Did you have any musical experience growing up?

One of the reasons so many people fight to keep music in schools is because it helps in situations like this. In band or orchestra class you're taught to be able to handle performing in front of a group - of course then you're playing an instrument but the teachers ultimate wish is for you to be able to translate that to the job market when you're in those types of performance situations.

Maybe trying something as benign as taking piano lessons or something else where you have to do something out of your comfort zone - where you have to perform for a person you don't know very well in any given week - in something that's different from your typical area of expertise - would help.

On the one hand, you'll be nervous as hell to start when performing for your teacher until you get used to the idea; on the other, you'll be more nervous about the subject of music (or whatever new subject you're taking on) than you would about your area of expertise. So when it comes time to do a technical interview, it might not feel as daunting a task.

Just a thought...I deal with performance anxiety...both myself when I was younger and then with my students who deal with it now...

Unknown said...

Phil,
Reading this post was like looking into a mirror. I've struggled with severe anxiety in assessment situations all my life.
Diet, meditation, breath control and mental rehearsal make no difference at all. The only thing that's really had any effect is a beta blocker prescription from my doctor.
I know people can be reluctant to medicate stress, and rightly so, but I think an occasional pill for important situations is justifiable. I take Propranolol, which has almost no side effects, and makes a dramatic difference for me. It works by preventing mental anxiety from affecting your heart rate or breathing, which breaks the feedback loop whereby you get yourself more and more anxious.
I recommend you try it if you think it might help you. It's not a replacement for working through things psychologically, but sometimes you need a solution now rather than later.
Either , good luck with future interviews, and thanks for the post.

Unknown said...

I agree something as complex as a binary tree search is beyond what is needed in an interview. A trivial code problem is perfectly reasonable though.

I can't speak for all interviewers, but when I ask a programming problem I am looking to see how the candidate solves problems. It is surprisingly enlightening as to how they think. So far, I have not found any other way to elicit this information.

I am not looking for the most elegant or efficient solution. I mostly want to see them work through the problem.

Do you have a better approach to eliciting this information without asking the candidate to do problem solving?

Just A. Developer said...

@flute: I was in band in Jr. High for a while. But other than that, not so much music background.

@Stephan: Yeah, I'm really hesitant to go down the medication route. Others have recommended Xanax. But my concern there is that I don't need to take it on a regular basis and I don't want to have to take it on a regular basis. ie. I don't want to say, hey, this feels really great I think I should just go on this stuff all the time? Does that make sense? I was able to work through earlier episodes of situational anxiety (such as connected with driving or standing in lines) by using what amounts to cognitive therapy (basically trying to change the self-talk and break feedback loops) and I think I will be able to in the interview situation as well, but I realize it could take longer to get that kind of practice.