In my career as a developer I have run into a fair number of toxic people in my working life and it can be a pain to deal with. It can affect your work life and maybe creep into your home life and well make you very miserable.
I see on a lot of message boards like the work place stack exchange of people asking for advice in dealing with these problems. Each situation is different and sometimes ignoring the problem can just add fuel to the fire.
So I am going to run through situations I have dealt with in the past, some I handled well and some... not very well. A lot of these cases are not based on one person and I have purposely left detail out and been deliberately vague to protect the innocent and guilty.
This person tries to be your best friend, learns your secrets and well uses you and others to gain leverage in the company. I have come across this sort of person a few times in my career but in the interest of everyone's sanity I will go through my first run in. I was in my first year as junior programmer, the company was doing great well, we had won some big contracts and development was interesting.
I had another developer who started a few months after me and we hit it off instantly and became best buds, we did have some great times, we were put on the same development team and at first it went well but cracks began to show.
The "buddy" in question started to make snide comments to me and other guys on the team about me napping or falling asleep, not sure what they were referring to, I am quite a lively chap, quite energetic but it was true I wasn't as productive as them and so I shrugged it off, I didn't have years of experience as everyone on the team.
I look back now, maybe I should have confronted or at least asked them to offer some explanation. Next thing I knew I was being bumped down to another team. The development support team, it honestly felt like a demotion, it was a team that never went anywhere, the issues were first line support and if there was any development work it was minimal, I took it in my stride and at the time I felt it would make me a more productive developer.
Fast forward a year or so, I am back on the same team as my "buddy" now fully in their role as the manipulator, they now became the team lead and people were happy about my return and things started off well. However things again started to fall apart again however this time it wasn't me that was called out, we had a very experienced developer on our team who knew the domain inside out. The manipulator was again making snide comments about this developer calling him old fashioned and not appreciative of the cutting edge and they were bumped to the same support team I just escaped from.
The developer who replaced the departing developer breathed new life into the team, challenging the status quo, constantly suggesting new ideas but the manipulator thought this developer was a threat to the manipulator and well when we had our reviews. This own developer's boss said well we are not going to give you a raise because the manipulator feels you are a disruptive influence and this developer stopped being so enthusiastic and well eventually left.
The atmosphere on team went from being relaxed to fearful, I felt utterly useless, wasn't being productive and quite frankly the manipulator was putting ideas into my head that I was one letting the team down and I only found out about this later on but the manipulator would also make comments to other developers behind my back that I was a pretty useless developer and I belonged in development support and perhaps should leave development all together.
Well feeling useless and quite disillusioned I kicked off the job hunt, got a similar role at another company but had the matter of resigning...
I arranged a meeting with my line manager and he was shocked and scheduled a meeting with higher management with the CEO and they seemed shocked that I was going and in the heat of moment I said "Well I am pretty useless to you guys" and the CEO looked at me and said "No, we wouldn't be having this meeting if you were useless, think about your situation, we will accept your resignation but we will hold your position for a month, if you change your mind I am quite happy to forget about this resignation".
I ended up rejecting that job offer because the prospective job did not feel right and I was taken aback by the CEO's comment. I stayed at the company for another couple of years. Mine and buddy's friendship pretty much cooled at that point, mainly because a part of my staying negotiations I requested I be transferred onto another team and they took it as an affront.
My mistakes in handling this were, firstly, that I had no self confidence in myself, I was on the verge of quitting my developer career and going into testing. I let the manipulator's ideas get into my head and to be honest I believed them for a long time afterwards.
Secondly, I hated confrontation (and to a degree I still do), I should have confronted the manipulator, essentially the manipulator was a bully to get people to do their bidding and hated confrontation.
Thirdly, I should have spoken to management more often, I should have got their assessment of my skills (or lack of). The CEO evidently felt I was worth a meeting when I decided to jump ship.
My advice if you met a person like this, don't trust them, don't make yourself a target and if they are gunning for you confront them. Have confidence in yourself, it's easy as a junior to feel that you are not productive as others.
I am sure they are other mistakes or take aways from this, feel free to stick these into the comments.