**[Short version]**

The software department is heavily under pressure for bad software quality and performance and too little delivery. In addition, the CEO has gets angry easily and is killing motivation. I tried everything I could think of, but the situation keeps getting worse. Any suggestions welcome.

**[Long version]**

I was promoted at the start of 2020 as head of (software) development in a mid-size German company. Software constitutes about 40% of the workforce. We are delivering a product which is used by all other departments (sales, project delivery, etc...).

However, our software has major issues: bad software quality, not so good code quality, bad performance, we deliver too little too late. Also, our developers are not very experienced. We have a lot of pressure from different departments (product management, sales, projects, CEO) to deliver more features and fix current quality issues. I am also trying to squeeze some non-functional features (end-2-end tests, better support from our more senior developers). So the teams are heavily under pressure.

And to make matters worse, while our CEO can be understanding and can listen, he has a temper problem. He'll shout at people, either directly or through our chat system. He really kills everyone's motivation (including mine), and it's often impossible to reason with him. As a result, nobody dares tell him what's really going on, and some people started hiding work, booking on the wrong ticket on purpose, giving an estimate they know is not correct, etc... I know he's a good person at heart, and tries to do what he thinks is best, but his behaviour really does not help.

I have been trying to turn this around ever since I started, but it keeps getting worse. What I tried:

* Solving one issue at a time: we have better processes, some end-2-end tests, smaller work packages, etc...
* Pushing back on requests, especially the roadmap: it worked to a very limited extent, and we won't be able to deliver everything we need to deliver - again.
* Talking to him directly: I tried that twice. First time, he listened, agreed I was right, and it helped for 2 weeks, before he went back to his old habits. I tried again by suggesting having an external consultant, he got immediately angry and said if we listened to him and did what he said, all would be fine.
* Ask a question on stackexchange.

However, the motivation is getting worse, the stress levels are going up, and I have the impression that if we don't turn this around quickly, we will reach a point where the (technical and non-technical) debt will be overwhelming.

I would rather not quit. I really like the company and my colleagues. We have a really good bunch of people that care about their job. Also, I enjoy my job, and I don't want to quit at the first issue. Not to mention I've only done this for 10 months only, so I still have a lot to learn.

At this point, I am not sure what to do any more. Any suggestions are welcome.