At my first job, the environment was very stressful. For instance, as an android developer, we were expected to develop and QA applications in the number of 1 to 2 every few weeks. There was understaffing and developers were told to perform the workload of QA (testing other developer's apps). I could not work under this immense pressure and was fired like those before me.

at my second job, the environment was good, I was making good progress until I jumped in on a new javascript framework and decided to take leadership. There was different philosophies that emerged, I was more about delivering X feature before deadline, and the other manager was about not delivering X feature until code was completely refactored, even pushing the deadline, causing customer to get anxious. For instance, I had all of my work undone even though the feature was complete and working bug free because I did not use proper number of spacings or things were not refactored. CEO decided to go with manager's decision, I Was fired.

How do I deal with past jobs and reason for leaving in a job interview? I am thinking and thinking and I just can't think of a good thing to say. I really don't feel comfortable dropping the bombshell and saying things like how it really went down. I want to be positive and affirmative in my answer in dealing with questions regarding my past job positions.

I also don't know what the ex-coworkers will say about me if they followed through with references, even though I got assurances from my last CEO and the manager they will put in a good word for me, I really don't know how my story would match up.

Needless to say, I've almost very little confidence at this point of my career. I feel extremely stressed out just thinking about the how everything has unfolded and do not know how to explain this to an interviewer.

Update: I think looking back on both cases overworked and failing to take vacation when I needed to was the reason. I definitely do think that this is a responsibility on my part and I have wisened up about it. Part of my reason for this is that was unrealistic expectation of my abilities to cope with stress and continued work load.