Ade Miller, a development lead on my team, has a nice blog entry about interviewing for a job at Microsoft.
Like Ade, I am also frustrated by candidates that appear to come into an interview completely unprepared. There is a pattern of preparation you should follow in my opinion: day to day preparation, followed by some good cramming before the interview. My pattern of preparation is kind of based on my college habits. In college I was an English major. During the semester I would do all the reading required for the class--typically several novels, a bunch of short stories, etc. Before the final, I would do a marathon re-read of all the material to refresh my memory.
Applying this pattern to interviewing:
Day to Day Preparation
You should always be honing your skills and keeping them sharp. First and most importantly, do excellent work in your current job. There is no way you can "fake" or "cram" excellence if you are not really paying the price to be excellent in your current job. Keep up to date on the latest trends and developments in your field. I would say to try to read at least one technical book a month. Also, sharpen the skills that are currently being "underused". For example, as a development manager, I don't get as much time in the code as I used to. I try to find some coding projects to do on the side at home to keep my skills sharp. If you are a developer wanting to do more management, ask for opportunities to manage projects at work and maybe start reading from the abundant number of management titles out there.
Starting a couple weeks before the interview, cram through a good book on data structures and algorithms. If you aren't writing code every day in your current job, spend extra time on your "home projects" to get your brain thinking in code.
This may sound really silly, but practice coding on a white board or a piece of paper. If you haven't written code on a whiteboard, it's going to feel awkward and affect your interview should you get asked to do so. Better to get the jitters out at home. Pick some questions for yourself from algorithm books or other sources and try to answer them on a whiteboard--don't cheat during this process and try to look at an answer. Just answer the question as best you can. It will become clear as you work through the problem which areas you aren't sure about--write down the little questions that come to your mind as you do this exercise (like how do I release this memory, what is the proper syntax for this or that). Then after you've answered the question the best you can on the whiteboard, go back and read up on the questions that came to your mind as you did the exercise. Then pick another problem to solve and repeat until you start to feel comfortable.
Following this pattern will at least get you an interview where you won't be thrown out simply because your basic technical ability is in question. Hopefully, the interview will then be able to focus more on your long term potential and this is where "being excellent" in your current job will shine through.
Oh, and by the way, my team is interested in excellence 🙂