What does compassion have to do with coding?

Software may be built on machines, but it's built by, with, and for human beings.

Thankfully, people working in tech are starting to recognize the importance of understanding the feelings of others in developing software. For example, the code school Dev Bootcamp includes a track on Engineering Empathy as part of their curriculum, and empathy plays a major role in user-centered design approaches

You don't, however, hear a lot about compassion in the tech industry. The term “compassion" might even be off-putting for some. It may be perceived as a sign of weakness or something only relevant in religious contexts.

Nothing could be further from the truth. Compassion is a sign of incredible strength, compassion is something everyone can cultivate, and compassion has the power to heal the tech industry.

For those of us working with software, we need look no further than our day-to-day work interactions to see opportunities for the application of compassion in order to achieve serious gains in happiness and productivity.

What is compassion?

The Greater Good Science Center at Berkeley defines compassion as follows:

the feeling that arises when you are confronted with another’s suffering and feel motivated to relieve that suffering.

The same article notes the distinction between empathy and compassion:

While empathy refers more generally to our ability to take the perspective of and feel the emotions of another person, compassion is when those feelings and thoughts include the desire to help.

Compassion takes empathy a step further and inspires real action to alleviate suffering. As we know in the tech industry, execution is often more important than the best intentions, so we really can’t stop at empathy if we want to make a difference; we must embrace compassion.

But what does that have to do with coding?

As exciting and rewarding as life as a software engineer can be, coding can be frustrating. We may suffer while troubleshooting mysterious errors, decoding arcane documentation, arguing with coworkers, redoing work because of miscommunication, or dealing with legacy code. And those are just a few examples—the high incidence of burnout, depression, and anxiety in the tech industry indicates that suffering is a rampant issue.

That’s where compassion comes in. We don’t have to take for granted that we must continue to suffer. We can take steps to address common types of suffering.

Whether it’s permitting more flexible schedules, allocating more resources to projects, facilitating better communication, or simply providing positive encouragement, engineering leaders, especially, are in a position to help their team through compassion.

There are also many opportunities, however, for individual engineers to alleviate the suffering of their colleagues, whether through writing cleaner code and better documentation or showing patience and understanding when a coworker falters.

We also can work on cultivating compassion for coworkers outside of our engineering team and for the people using our software.

Perhaps most powerful of all, is the ability to show compassion for oneself. Self-compassion is essential to unlocking our ability to cultivate compassion for others.

What goes through your mind as you’re struggling to figure out some problem or debug some error in your code? Do you think, “I’m such an idiot—why can’t I figure this out?!”

What if instead of berating yourself, you could take a moment to recognize that you’re suffering, accept that everyone suffers like this sometimes, and give yourself the encouragement you need to continue on?

As Kristin Neff, a thought leader in the area of self-compassion writes,

When faced with our human imperfection, we can either respond with kindness and care, or with judgment and criticism.

We have the choice, so why not choose kindness toward ourselves and others?

Why does it matter?

In business, we’re all rightfully concerned with the bottom line. So why should we spend any time on this touchy-feely compassion thing?

Compassion affects employees’ well-being, and that affects productivity.

A study by Jane Dutton of the University of Michigan found that employees exposed to compassion "demonstrated more positive emotions, such as joy and contentment, and more commitment toward the organization.”

Kristin Neff has written about the benefits of self-compassion:

Positive emotions...tend to broaden our attention so that we notice useful details and have creative ideas, meaning that we maximize our thinking, decision-making abilities, and coping skills.

Attention to detail, creativity, decision-making and coping abilities—those all certainly sound useful to engineers!

The future

We’ve only scratched the surface of the potential for compassion to transform the tech industry.

Look out for more articles on specific strategies to apply on your software development team! You can sign up below to be notified when they come out.

Compassionate Coding also offers in-person workshops on cultivating compassion on your team with the ultimate goal of happier people writing better software.