Oh hell where do I start?

some stories that bump up in my mind: (Initially I wrote 3 paragraphs but it was quite therapeutic so I kept going)

1) I was working in a company I co-founded and was the tech lead (wrote most of the codebase). After some time we had our product deployed and the team (mostly juniors) were quite comfortable with the stack. I was invited to participate in a very interesting project (personally) and had to move to France for a year or so. After some months, the CEO wanted to grow some new features. I couldn't work because of not having time and legal terms of the current contract. I suggested hiring a senior dev to lead the new features. They hired a brilliant guy (technically speaking) and all went well (in terms of budget and deployment). After finishing the project there and not wanting to stay in France, I asked to come back to my company (I still had lots of shares) and both CEO and team were very pleased with my return. The new lead was not. Comprehensible. I was really trying to not step in his feet and work mainly as Ops and R&D, letting him do the Dev part. Äfter a while some strange things started to happen:

* I lost merge and push permissions to the repositories without prior warning.
* He started to CR my code and overwrite with his 'corrections' after office hours. It started with dumb stuff such as whitespace/identation and ended with major rewrites.
* He started to profile my code and compare to his own version that he had done in the weekend. ( code that should be run once a week in a cron, should be correct, not fast)
* started to convince people that I was slacking off when I went out for lunch earlier or something like that.
* He tried to insinuate that I was interested in one of the programmers sexually. (In that moment, the CEO had to investigate this) (I wasn't doing anything wrong) (Later, some coworked showed private slack messages of him being extremely biased on finding bugs and errors on females code (or code that was wrongly commited in the name of females))
* And the last drop was him putting his own copyright header on EVERY SINGLE FILE in EVERY SINGLE REPO of the organization (I admit that I laughed when I saw the .gitignore and travis files with copyright). Probably scripted. When called out on this, tried to sue the company saying that we stole his code. In court we showed the git history and all was settled.

TLDR: Very smart people can be very mean and dumb when afraid.

2) Leading a 4 person team (me + 4) on writing the backend for a load intensive project. We wrote everything in 6 months. Tested, optimized, clean code. I was very happy. Close to launch date, we had a meeting with business and frontend to show the state of the project. During my 2 hour presentation, the frontend lead was coding furiously in his laptop. When I ended, he got up and asked why we took so long, if he could make an mvp in node in 2 hours, then demonstrating it working. I believe that I spent close to 2 minutes speechless just staring him wondering how he could just be so cynical. The business guys were in a mix of baffled about how genius this guy was and kind of pissed off with me. I then explained about testing, deploying in scale, performance, etc but for them it was just techie bla bla bla... very frustrating.

TLDR: when you are working in a project, work with the team not against it, please. let's focus on having the best product.

3) New company, working on building backend pipeline for intensive data analysis. That jerk from 2) was hired as 'culture lead front end' or something like that. His job was to give lectures on trendy frameworks and how they were amazing, buying beer (???) and making the team tight together (ok, but wtf). It started with hoodies and cups (ok), then going out for pizza or beers (ok too), then hackathons from time to time (ok, but didnt like pressure to going to them) (It would be better if it was paid time or the code was Open Source or nothing work related). But then he started to make some college frat stuff: going to clubs, pressuring the younger and nerdier guys to pick up women, then most of frontend (15 guys) started to use the same style of haircut and clothes. When I found out that they had done that zuckerberg thing of rating women of the company, I sent a company wide e-mail denouncing it (it was a company private repository and made during a company hackathon). The CEO wasn't very happy with my vigilante attitude. The backend team was very nice, still friends with them.

TLDR: please leave college level douchbaggery in college.

4) Working on the energy industry, doing network protocols. Knowing shit about electronics. Had a quite tight schedule (6 months aprox). From time to time, I needed the electronics team to test the protocols, give me some feedbacks, you know, working with me... They did test but it took them 2 weeks aprox. for every iteration. No answers/messages from the team until they finished testing. I couldn't know if they didn't received the email, if they ignored it, if they scheduled it for some day... I sent lots of emails and called and everything, just ghosting... I complained a lot with their lead and later with the CEO. The answer I got was always that they had stronger priorities. And that I was responsible for that working, not them. Since the protocol was written for the in-house electronics, I had to have their feedback. Their lead living in germany wasn't helping either, since I was being called during night (like 1-3 am) to do 'briefing meetings'. The pay was very good, only thing that made me stay until launch.

TLDR: Maybe I am programmer/computer-scientist/agile and not an engineer/waterfall. But ghosting is so mean. Like, so mean.

5) Current job(CTO and co-founder of a small startup): For heaven sake I don't have any major complaints: Guy next to me don't stop shaking his leg and making sounds with his hands and overreacting when something works or do not work. The UX dev has this habit of just saying loud 'hey guys have you seen X????' And starts to talk about X for 20 min straight. Junior devs asking questions before I can even take my headphones out, making me ask them to repeat the question and totally breaking my flow. Considering asking for a private office ( not sure if possible).

TLDR: Thank current team for being so nice. We have in our 20 person team people from work 1) and 3). The CEO is the same of the company 1).