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: 
I've been in the same situation many times, and the most effective method I know is **removing him from the team**. No serious company can afford conflicts in teams. According your description, he is not a team player.

If you really need to keep him, here is what I suggest (this apply to any team member):

* Don't consider him differently than the other team members. One of the biggest mistake is to consider him differently. This works particularly well with arrogant developers.
* When he makes you feel uncomfortable, angry, anxious, excited, [put any emotion here], remember that every thought you will have at that time will be biased by the emotion. It's better to wait for the emotion to disappear before analyzing and making decisions.
* When a conflict arises, try to take him in a face 2 face meeting. Don't do anything in front of the team.
* Listen to him *actively*, by asking *many* questions. Seek to understand him before trying to be understood.
* Ensure that decisions are made by the team with him included. His opinion should be as important as other team members opinion.
* When you are wrong, accept it. Sometimes, he will be right, like anybody.
* Be genuinely interested by him. This usually *unlock* difficult people. He must understand you are not a threat, but an ally.
**You need a Mediator / Judge**

(from a Soft. Dev. plus H.R. / psychology guy)

You cannot solve this problem by yourself. Whatever you do, "its already out of your hands", you require a person higher on your company with more authority.

I have seen several cases like that. That employee won't follow your guidelines, it doesn't consider you as "the boss".

Besides, even if he is right, and he should be given that job position, he must understand it wasn't your decision who is going to be the project manager.

In theory, it should be someone from Human Resources, but, in practice H.R. people try to be too much nice, so better find an admin. with negotiations skills, otherwise that guy will break your project.