I had a boss who said he is best developer in the world and he meant it.
He caused major outage when the code he developed and brought to the company as an asset failed. The code was to exchange SMS messages with an SMS gateway for Ukrainian operator. The messages were sent using mails. That was 15 years ago and not his fault, but his fault was that he received the XML messages and instead of using XML parser, he just parsed text by locating substring in a given line number from a given offset to a specified character.
So what happened is that they stopped pretty-printing XML messages in the responses.
When I pointed (with couple people around) that this is absolutely our fault (I did not say his, but everybody knew this), he started screaming at me that I am incompetent and that he was programming when I was shitting myself in a crib.
I left the same day.
I left companies suddenly on two more occasions:
- when working for a Swedish company, when they extended my contract and said they are very happy to have me but they can't pay me the same rate as my Swedish colleagues (I am Polish).
- when my boss charged at me to hit me after I refused to lie to management. He stopped himself with his fist 10cm from my face but that, for me, was game over.