Human beings and interviews, as a rule, are wonderfully unpredictable. You never really know what you're going to get. This might lead you to think that preparing for an interview is pointless, but that is about as wrong as it is possible to be. Preparation is your secret weapon. The interview might go any which way, but that won't matter if you are prepared.
“It usually takes me two or three days to prepare an impromptu speech.”
The well-prepared programmer brings a lot more than just technical readiness to an interview. No doubt there will be questions on data structures and algorithms, perhaps a few brain-teasers, and probably a coding exercise. But technical questions are just part of the interview. There will usually also be questions about teamwork, getting things done, and questions designed to see if you are a good match for the culture of the company. The interviewer might want to see how you handle stress, how well you communicate, and how you react to criticism.
If the interview was just about how well you code, you could do it online. Face-to-face interviews are much more than just a technical assessment. Although some companies like to give the impression that the “best programmer” will get the job, I can tell you first hand that being technically best will not always win you the job. This might seem unfair, but that, as they say, is life.
Every workplace is different. Companies ...