Lessons learned from failed programming interviews

OK, so you have decided to take the chance for applying for a position at Google, Facebook or some of the other top tech companies ? One thing to do first is: do not repeat the mistakes of others. Call it a bad carma or bad luck - things do not always happen as you expect. I will share my bad experience with these types of interviews hoping you (and me) will not make the same mistakes in the future. I will not disclose any interview questions - there are tons of them throughout the Internet. 

So it all started with a phone interview with Google. The guy from Zurich was not in the mood for making an interview I and I was not very prepared prior to the interview - it was as if the preparation was the least priority at that time considering a lot of other tasks I was dealing with at the time apart from my regular job as a programmer (remark 1: consider interview preparation with high priority and remark 2: avoid multitasking if possible). The questions seemed quite straighforward and relatively simple to code but even one badly selected data structure or not-so-well devised approach can turn you down during the coding phase (remark 3: refactoring may not be simple in a shared text document , it may cost you significant time and cause unnecessary confusion) - so first of all explain your idea in the clearest possible way without having any additional question marks in your approach - do not rush with coding or even giving pseudo-code - it is better to describe the idea in steps with some relative analysis on the average/lower/upper bounds on time/memory limits of the selected approach. Failing to do this due to lack of concentration/preparation results in a not-so-straight-forward implementation of the solution even in your favourite programming language - this is what happened this time. Considering the fact that at the time I did not consider failure as an option I was very upset (remark 4: be ready to accept failure and learn from it - not only in coding interviews but in life as a whole - it will make you feel better).

A few months later I was contacted by a Facebook recruiter and since the opportunity seemed interesting (at the time I was working on a corporate social network that was quite similar in terms of features to Facebook) I thought it would be a Google-alternative for working with smart guys and tackling difficult problems that would impact millions of users. The first interview passed quite smoothly - in about 37 minutes I managed to chat with the interviewer and solve two (in my opinion) pretty standard algorithmic problems in code. Next I was contacted by the recruiter inviting me to an on-site interview at Facebook. I this stage I did not prepare for the interview but I was feeling very conforable being interviewed on the phone - the guy was polite and the discussion on my previous experience prior to solving the problems gave me confidence. I was feeling great knowing that I will have at least one month to get a preparation on a number of problems of different complexity in timus.ru, topcoder.com and several other online grading systems. HOWEVER the process of issuing a traveling passport and a B1 visa took about two months and by the time I was just about to get the required visa I was informed for the good or bad by the recruiter that hiring decision must be made in about two weeks time so I had to be interviewed in skype. At this point I was quite dissapointed that I didn't have the chance to see the headquaters of the company and have an on-site interview but that was it - skype interviews. I had three interviews with there different guys - each of them asking me one question. At this point I failed again to express clearly the approach in two of the three interviews which resulted in a very similar situation as the one with the Google interview (although I managed to solve the problems with ease - I did dummy mistakes in the coding part). After these three interviews (four in total) I was rejected (remark 5: Even if you leave in country with high bearacraucy - try everithing possible to get your documents for an on-site interview on time - it is much different than a skype interview). I this point I was thinking: AM I SO DUMB REALLY ? I mean - I have been always able to solve whatever problems came to me - even if not the smoothest possible solutions at times - stubborness takes place in many cases (although I have never had the practice of participating in programming contest prior to the university). This will be a question that many of you will be probably asking as well. 

At this point I decided that I will do a lot of preparation a try for a second time at Google - with no possibility of repeating my previous mistakes. However prior to starting any preparations I was refered by a friend for imo.im and although I have made my decision about preparing for Google - I decided it would be an interesting opportunity to work for a start-up in Sillicon Valley (and of course if the job is not quite interesting/challenging - just to switch to another one), but guess what - after two phone interviews, no preparation from my side and being quite overloaded with other tasks - I was rejected (remark 6: do not take an interview when under pressure with other tasks and remark 7: do not distract yourself additionally when you have already have a solid decision what you want to do in the future). 

All of this taught me some very good lessons I intend to apply in the near future. And remember - never give up but rather - always improve.

Disclaimer: Taking such interviews unprepared or tired may make you feel VERY DULL. So - PREPARE, PREPARE, PREPARE and do not ruin your normal lifecycle by doing last moment or late night coding.