Working with people is hard when you feel like people in your organization are incompetent, sloppy, holding you back, or even working against you.

Your manager is a dick. Your back-end team keeps making APIs you don’t like. The new guy who was supposed to be a senior developer broke production and you were paged while watching the game. Perhaps you’re dealing with a client from hell.

It makes you upset. If it were up to you, you would never choose to work with these people. You feel angry, and want to punch through a drywall. You find yourself morphing into Clint Eastwood in the movie Gran Torino.

The reason for entering this unproductive state of mind is evident: it’s much easier to think about our differences than it is to think about our similarities. Let me explain.

Ancient stoics had a couple of very good ideas to help stay calm even when working with the most unpleasant of people. Marcus Aurelius addresses this in his book Meditations: he suggests a morning routine involving negative visualization, and urges to recognize the similarities between you and the people who you feel so negative about:

When you wake up in the morning, tell yourself: the people I deal with today will be meddling, ungrateful, arrogant, dishonest, jealous and surly. They are like this because they can’t tell good from evil. But I have seen the beauty of good, and the ugliness of evil, and have recognized that the wrongdoer has a nature related to my own - not of the same blood and birth, but the same mind, and possessing a share of the divine. And so none of them can hurt me. No one can implicate me in ugliness. Nor can I feel angry at my relative, or hate him. We were born to work together like feet, hands and eyes, like the two rows of teeth, upper and lower. To obstruct each other is unnatural. To feel anger at someone, to turn your back on him: these are unnatural. Marcus Aurelius, Meditations

Stoicism is widely known for its perennial ideas. What was written 2000 years ago still holds true today.

But, can we modernize it a bit? Let’s try to translate Marcus’s morning routine into developer lingo.

When you wake up in the morning, tell yourself:

The software designed by my coworkers will be buggy, broken, undocumented and written in contexts whose traces have been lost forever. I will be managed by unreasonable bosses who lost touch with reality, and I will deal with abysmal implementations containing blatant security holes. While trying to catch aggressive deadlines set by my managers, I will continuously be running into unexplainable issues, halting my progress. Customers will be reporting problems that fall into the category of edge cases I would have never imagined.

Yet I have recognized my senseless boss and sloppy coworker have the same motivations as I do. We are doing this together to improve our and other’s well-being, and show the other what they haven’t yet seen. It’s foolish to be angry with my coworkers, as we are all subject to the same imperfections of reason.

The key takeaway is that the people in your organization who disappoint you are not inherently different from you, thus, to feel anger at your own kind, is unreasonable.

There is no need to escape your environment to find a sense of calm. When you lose your temper, you’ve already fallen behind.