I've interviewed hundreds if not thousands of programmers over the past 15 years. I am coming from the perspective of a UK based internet infrastructure/software startups of 1-100 people, much applies to other situations but there are some cultural differences over size of companies, geography etc.

CV/Resume Stage (getting an interview)

* In your CV/Resume be clear about what you've achieved. What I look for is somebody who has achieved 'stuff'. Either in jobs, their education or their career. Try and display an ability to problem solve and make a difference. It doesn't have to be massive achievements, but if you word it properly it can sound impressive, but don't exaggerate. For each job position talk about what you accomplished, were responsible for. For your education, give a paragraph about your projects. Talk about stuff you've done in your spare time, taught yourself. As well as demonstrating what you've achieved it also helps steer an interview to stuff you will be strong about.

* If you struggle to talk about interesting things on your CV/Resume, then that is perhaps an issue. Write some code in your spare time, get involved with an open-source project etc.

* People form impressions within a few seconds of looking at your resume. Format and layout matters, but also make it easy for them to scan through it. For HR people this does often mean some relevant tech buzzwords, but put yourself in the position of someone recruiting for the job you're looking for. What would give them confidence?

* Don't hide details. I personally like to see dates of jobs/education and grades. If you had a career brake or dropped out of college, don't hide it, think about how you can present in a positive manner.

* Find interesting companies and apply direct to them. This saves recruitment fees for the company, but it also shows you are interested in them. Write a short covering letter that is tailored to them, and (without being smarmy) make it clear why you are a good fit for them. Sell yourself.

Interview Stage

* Take your resume, and look at what obvious questions might come up. Work out what you can address in your resume, and what you would answer when asked. Be prepared to admit short-falls rather than bluff your way through them, but be prepared to spin them to your favour.

* Be prepared to deal with the standard generic interview questions "where do you see yourselves in 5 years?", "what makes you enjoy your job?", "what do you like doing in your spare time?". In most cases when asked this sort of question, the interviewer is just looking to get your talking to find out more about you.

* Ask intelligent questions. This (if managed properly) helps the flow of the interview and allows the interviewer to feel in control. If you're tested on some technical thing and you don't know the answer, feel free to ask them 'if you don't mind could you just explain that to me?' rather than just shrinking into your seat feeling stupid when you don't know the question. An interviewer goes into the interview with 4-5 set questions in their mind, and if they spend 10 minutes explaining to an intelligent curious person the answer to one, they leave feeling good. If you just say "sorry - i don't know" and look sheepish, they move onto the next question, and mark you poorly on it.

* Get comfortable being put under pressure, explaining things on a whiteboard and coding whilst you talk. One can imagine some brilliant programmers who might get agressive if challenged, or who are not used to explaining their thinking as they go along.

* Most technical interviews involve some technical questions. Some will be detailed specifics (in this language how do you that?) for these there is little prep you can do bar knowing it. For others, there may be more generic questions. A class Microsoft question used to be something like "Why are manhole covers round?". Imagine an interviewer asking you that kind of question. If you just say "I don't know" and show no curiosity it won't reflect well. If you go into silence and think for 10 minutes it won't make a good interview. Learn to enjoy the question rather than feel threatened by it. Learn to think allowed and articulate your thought processes. Ask gentle questions like 'am i thinking along the right lines here?'. These questions are more designed to test your problem solving and analytical skills. The third type of question is open questions like "is garbage collection a good thing?" or "is agile the right approach to development". In this case the interviewer wants to have a balanced, rational, pragmatic opinion on the subject. Don't be shy with stating a view, but preface it with 'it obviously depends upon the specific application/product/requirement'.

* Understand the business of the company you are interviewing for. For example, if you're interviewing at Google for a product management role, expect to be asked questions like 'which search terms do you think think have the highest CPM rates?'. They don't want a perfect answer, they just want someone who can have an intelligent guess.

* Treat everybody you meet at the company with respect and confidence. You never know who are the decision makers, and don't underestimate the importance of the receptionist, junior-HR person in having some influence.

* Make an effort. Turn up on time. Dress appropriately. Understand the company.

* Don't take rejection personally. People tend to recruit in their own image. There are some companies where they you won't be a good fit, and you won't come across right, or fit in. To some extent it's a numbers game.