Question: I've been told that I am to be a team lead of an upcoming project. I've not ever been team lead before but the responsibilities are what you would typically expect, with revolving door of 3 to 4 other developers through the 8 or 9 months it takes to complete the project.

My problem is this: one of the developers who will no doubt be working on this project will be a problem. He has more experience than me, has called me an idiot several times in the past, and has told me that he has taken this job because he is a natural leader. He has expected to be promoted to a leadership position with every new project (which has not happened to date), and even once told me that I was to report to him, even though the actual team lead was under no such illusion. Moreover, I've both observed and heard from others that he is extremely unprofessional (watches non-work videos at client sites - with no head phones, dresses unprofessionally, comes to work late, makes inappropriate jokes, etc.) He took or attempted to take credit for my work or insights multiple times while I worked with him as a peer. My current team lead told me that she threw out 1/2 of this guy's code once he left her project because the quality was no good. I could go on.

My fear is that this guy will actively work against me, because he will resent having to report to someone that he considers an inferior, especially since I have been given this opportunity before him. I've successfully dealt with this type of personality as a peer or even reporting to managers like this in the past. I've not dealt with, or ever thought about, having to deal with this type of character who is reporting to me. 

My question is: what kind of strategies can I use to effectively and professionally deal with this? Especially now, before it has become a problem, is there any way to cut it off before it gets out of hand etc. If anyone has a similar experience how did they deal with it?

Answer: 
Remember that human relationships trump just about everything when it comes to human interactions. People behave irrationally, but they respond to their own emotions. You can use that to your own advantage -- not by being manipulative, but by being responsive (almost the same thing, i know, but the difference is in how it makes people feel).

First of all, **document everything** -- all instructions, all responses, all interactions. Don't make a big deal about it, and don't include make the record look subjective. You want to be able to show it to anyone without making them feel defensive. 

**Find out what people want**, and use that help them take appropriate action. Find out what your uncooperative co-worker would like out out of the project; what the picture of an ideal environment is in his head. Once you know what he wants, you may be able to tailor the working environment to accommodate it without disturbing everyone else. Often just asking someone what they want is enough to change their attitude.

**Don't invoke your authority if you don't want a fight**. Don't give an ultimatum unless you want them to be resentful. Don't back someone into a corner unless you want them to snap at you. Sometimes you want someone to get angry and leave, but that's not usually the optimal outcome. You're "in charge", which means you're responsible for setting the team's direction. But don't use that as a club to beat others down and then expect them to help you. In the end, you have to make the decisions, but you're better off making them feel like it was their idea.

For most people, being in charge is a means to an end, and not the goal. They want to be in charge so that they can have what they want. But if they can get what they want without the responsiblity of being in charge, then they'll gladly work for someone else. **Helping someone want what they have is just as good has helping them have what they want.**

And finally, if someone is a poor fit for your team, then they shouldn't be on the team. If they don't have the skills for the task at hand, then get them off your team.
I find a lot of the answers very cautious.

Remember *you* are responsible for your career no one else is. This means that by agreeing to work with this person you are saying that you are accepting this assignment and responsibility and that you will be able to manage the project (and this person) to its fruition.

If you don't think you can do it, then don't accept that responsibility: have him assigned to another project, or ask that they give you a leadership position on another project.

I know your question is about "how to deal with this person", but based on what you are writing it sounds to me that he is not worth any effort, you'll be busy enough proving yourself in this new leadership position.