{"id":84498,"date":"2019-06-07T15:17:51","date_gmt":"2019-06-07T15:17:51","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=84498"},"modified":"2019-06-07T15:17:51","modified_gmt":"2019-06-07T15:17:51","slug":"improving-tech-with-compassionate-code","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/opinion\/career\/improving-tech-with-compassionate-code\/","title":{"rendered":"Improving Tech with Compassionate Code"},"content":{"rendered":"<p>\u201cCompassionate Coding\u201d is a term coined by April Wensel and a matter close to my heart since I learned about it a bit more than a year ago. If you need more information, check her <a href=\"https:\/\/compassionatecoding.com\/\" target=\"_blank\" rel=\"noopener\">website<\/a> and follow her on <a href=\"https:\/\/twitter.com\/aprilwensel\" target=\"_blank\" rel=\"noopener\">Twitter<\/a>. She\u2019s the real expert and is available for workshops and talks.<\/p>\n<p>So, why compassionate coding? What is it all about?<\/p>\n<h2>Suffering in Tech<\/h2>\n<p>There is a lot of suffering, especially in the tech industry, but also <strong>caused <\/strong>by the tech industry. We can witness this suffering on several levels every day:<\/p>\n<p>One of the most prominent recent examples of suffering caused by tech is probably Facebook and its immoral treatment of private data, <a href=\"https:\/\/techcrunch.com\/2018\/09\/27\/yes-facebook-is-using-your-2fa-phone-number-to-target-you-with-ads\/\">like using phone numbers which were meant for two-factor authentication to target ads<\/a>.<\/p>\n<p>Speaking of social media, <a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S0747563212003160\" target=\"_blank\" rel=\"noopener\">studies <\/a>show that the use of social media and, most likely, its optimization to keep people\u2019s attention leads to an increased acceptance of racist and other extreme views. One <a href=\"https:\/\/ideas.repec.org\/p\/cge\/wacage\/373.html\" target=\"_blank\" rel=\"noopener\">study <\/a>even suggests a link between the use of social media and hate crime against minorities, in this case, refugees in Germany.<\/p>\n<p>While the rise of AI is surely a huge success for the tech industry, its products like autonomously driving trucks put whole communities at risk and we mostly lack appropriate answers to the \u201cdisruption\u201d our technology creates. And who isn\u2019t concerned about their smartphone listening in on conversations?<\/p>\n<p>Suffering exists on other levels, too, even on a very personal level. Think of the language we often use in our job:<\/p>\n<ul>\n<li>Luser<\/li>\n<li>RTFM!<\/li>\n<li>Too stupid to use it<\/li>\n<li>If you don\u2019t get this, you have no business in coding<\/li>\n<li>This codebase is a nightmare<\/li>\n<li>PEBKAC (Problem Exists Between Keyboard And Chair)<\/li>\n<\/ul>\n<p>I could continue the list endlessly. There are dozens of examples for suffering in tech, even to the point where the term \u201cnerd\u201d is used to describe the stereotype of an unempathetic jerk.<\/p>\n<h2>What is Compassion?<\/h2>\n<p>How does this relate to compassionate coding? What does compassion have to do with suffering? What <em>is<\/em> compassion?<\/p>\n<div class=\"background-color--grey--1\">\n<p class=\"color--blue--6\" style=\"text-align: center;\"><em> The feeling that arises when you <strong>are confronted with<\/strong> another\u2019s suffering<br \/>\nand feel <strong>motivated to relieve<\/strong> that suffering.<\/em><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>This is the definition of compassion by <a href=\"https:\/\/greatergood.berkeley.edu\/topic\/compassion\/definition\" target=\"_blank\" rel=\"noopener\">Berkeley<\/a> (via <a href=\"https:\/\/www.youtube.com\/watch?v=HPFuHS6aPhw\" target=\"_blank\" rel=\"noopener\">April Wensel<\/a>). In short, compassion is about reducing suffering, and compassionate coding is about reducing suffering in tech<\/p>\n<p>This definition shows that compassion consists of two aspects:<\/p>\n<p>To see or notice suffering \u2013 \u201care confronted\u201d \u2013 \u00a0and to take action to change it \u2013 \u201cfeel motivated to relieve\u201d.<\/p>\n<p>I love how this first aspect embraces a mentality of curiosity, of constant learning and exploration, something we developers are pretty used to. We love exploring things; we are used to constantly learning and increase our knowledge about a variety of topics.<\/p>\n<p>To see and be confronted with another\u2019s suffering requires us to learn to notice suffering first. This often means walking in each other\u2019s shoes; it means to develop a sense for how other people feel and experience situations. It also means to understand why <strong>we<\/strong> feel the way we do.<\/p>\n<p>After being confronted, compassion wants to take action \u2013 this is again very natural to developers from my experience.<\/p>\n<p>Some examples:<\/p>\n<ul>\n<li>I see the suffering of new colleagues when they need to understand my code and take action by documenting it.<\/li>\n<li>I see the suffering of people who have to maintain my code \u2013 which can also be my future self \u2013 and take action by applying good coding practices and simple design.<\/li>\n<li>I see the suffering of my customer when facing bugs in my software and take action by establishing automated self-tests. (Oh yes, testing is compassionate!)<\/li>\n<\/ul>\n<p>One step further:<\/p>\n<ul>\n<li>I see and understand the underlying suffering of that specific request of my customer, which helps me to take the right action and develop a fitting solution.<\/li>\n<\/ul>\n<h2>Where to Begin with Compassionate Coding?<\/h2>\n<div class=\"background-color--grey--1\">\n<p class=\"color--blue--6\" style=\"text-align: center;\"><em> I wanted to change the world. But I have found that the only thing <br \/>\none can be sure of changing is oneself.<\/em><\/p>\n<p style=\"text-align: center;\"><strong>Aldous Huxley<\/strong><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>It all starts with us, with practicing self-compassion.<\/p>\n<p>There are many situations which can cause suffering in ourselves. Let\u2019s assume we made a mistake and are now beating ourselves up, often using a language which is very judgmental and overall negative. \u201cI\u2019m so stupid, what was I thinking when I wrote that? This is incredibly crappy code.\u201d<\/p>\n<p>I don\u2019t know how many of you know the <a href=\"http:\/\/agileretrospectivewiki.org\/index.php?title=The_Prime_Directive\" target=\"_blank\" rel=\"noopener\">prime directive of the agile retrospective<\/a> (via <a href=\"https:\/\/www.youtube.com\/watch?v=JFSJYa3f0TM\" target=\"_blank\" rel=\"noopener\">April Wensel<\/a>). For those who don\u2019t, it reads quite interesting<\/p>\n<div class=\"background-color--grey--1\">\n<p class=\"color--blue--6\" style=\"text-align: center;\"><em>Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand.<\/em><\/p>\n<\/div>\n<p>This directive contains some very significant aspects:<\/p>\n<ul>\n<li>It assumes positive intent.<\/li>\n<li>It accepts failure as part of an ongoing journey and assumes growth and change<\/li>\n<li>It defines very clear boundaries because it acknowledges that there are things which are not under our control like the resources available or the situation at hand.<\/li>\n<\/ul>\n<h2>Boundaries<\/h2>\n<p>Let\u2019s look at this specific aspect of boundaries because it is \u2013 in my opinion \u2013 a very crucial and not so obvious part of compassion.<\/p>\n<p>Boundaries define our fields of responsibility. Like a fence around a garden, they define what we own, what we are responsible for, and what we are not responsible for. We are responsible for what we can control.<\/p>\n<p>In order to become self-compassionate, we first need to clarify what is inside and outside of our boundaries:<\/p>\n<p>Can we control the situation at hand? Can we control the resources \u2013 do we own them? Maybe.<\/p>\n<p>But do you know what we have absolutely no control over?<\/p>\n<p><em>Past events and actions! <br \/>\n<\/em><\/p>\n<p>They are completely out of our control; we can\u2019t change them, and the agile prime directive embraces this fact very nicely. The past is not inside our boundaries; we can\u2019t change it.<\/p>\n<p>This does not mean that we are not responsible for the consequences of our actions, but it helps us to clarify our possibilities. What is inside our boundaries are the steps we take from the things that happened. We can own up to those actions and take over control. Understanding our boundaries can be exceptionally relieving and is also very effective because it helps us to focus on the things we can control and change. When we embrace this mindset, the language in which we talk to ourselves will probably change from a judgmental to an observational tone.<\/p>\n<p>Yes, we did the best we could, given the circumstances. How can we improve the situation so we can act differently in the future? What additional resources can be acquired? How can we improve our knowledge or skills? Which things are inside our boundaries and can be changed? Where can we ask for help when something is not inside our boundaries?<\/p>\n<h2>Compassion Towards Others<\/h2>\n<p>Let\u2019s try to adapt the principles of compassion to others:<\/p>\n<p>I recently had a challenging situation when <a href=\"https:\/\/twitter.com\/Pazus\" target=\"_blank\" rel=\"noopener\">Pavel<\/a>, whom I like very much \u2013 and don\u2019t worry, I asked for his permission to share this example \u2013 one of the main contributors of utPLSQL version 3, became active again after a break and wanted to contribute to the java-api.<\/p>\n<p>Since I took over responsibility for the java-api a year ago, I\u2019ve spent a lot of my free time adding new features and refactoring parts of the code.<\/p>\n<p>Pavel\u2019s suggestion was something along the lines of &#8220;The current Java-API contains several code-smells, and we should rework the whole thing.&#8221;<\/p>\n<p>This did something to me. I felt a massive amount of anger and was unwilling to accept any suggestions at this point. I had the immense urge to go all in and justify everything I had done, and push back on where he had been during the last year \u2013 you probably get it.<\/p>\n<p>The question is: why?<\/p>\n<p>He didn\u2019t offend me personally or my work specifically, but he wasn\u2019t very compassionate.<\/p>\n<p>I guess most of us used the term \u201ccode-smell\u201d in some form or other. I certainly did and was convinced to be very objective and professional by using it. But if we look closely, \u201ccode-smell\u201d is not objective at all without additional context \u2013 it is not even clear. It\u2019s a judgment, not an observation and most humans don\u2019t react very well to judgments<\/p>\n<p>Consider this alternative: &#8220;If we make sure these classes are immutable, we can reduce the risk of unexpected change of state. I also have some ideas about how we could change the architecture to increase the usability of the public API.&#8221;<\/p>\n<p>I am pretty sure this wouldn\u2019t have triggered the same reaction.<\/p>\n<p><strong>\u201cBut Samuel, you are so sensitive! You are so easily offended\u2026<\/strong><\/p>\n<p>\u2026learn to handle radical and critical feedback!\u201d<\/p>\n<p>This might be true. The thing is: it doesn\u2019t matter.<\/p>\n<p>Whether or not I am overly sensitive does not matter, it doesn\u2019t change the way I feel. Other people might experience things differently, react differently, but that has no impact on my feelings in this situation. This is especially true in situations in which we feel attacked, where our analytical thinking is naturally oppressed.<\/p>\n<p>How others take our feedback is nothing we can control. If we upset someone, we do so, no matter if we are right or if we intended to upset someone, or if we think our counterpart is acting overly sensitive.<\/p>\n<p>If we choose not to be compassionate, we must be aware that we are often actively lowering our chances to get what we want. Compassion and kindness do not only reduce suffering, but they also boost the likeliness to get what we want<\/p>\n<p>So, can we agree that it was all Pavel\u2019s fault that I got angry, and it\u2019s obvious that utPLSQL\u2019s java-api will never get a change anymore?<\/p>\n<p>Let\u2019s talk about boundaries again.<\/p>\n<p>Are my feelings inside Pavel\u2019s boundaries? They are not. They are inside my boundaries. I am responsible for my anger. What\u2019s not inside my boundaries are other people. We can\u2019t control other people, and we can\u2019t choose that other people treat us the way we want. But we can choose how to react and what actions to take.<\/p>\n<p>I have to admit that I\u2019m not very good at understanding my feelings and keeping calm and reflected. Being in an asynchronous conversation helped me immensely to deal with this situation because I had time.<\/p>\n<p>I found out that the thing that mainly caused my anger was not the \u201ccode-smell\u201d but the suggestion that \u201cwe\u201d should \u201crewrite the whole thing\u201d. I noticed that I felt that my boundaries of the time I am willing to invest had been violated.<\/p>\n<p>My answer \u2013 due to the extra time I could take \u2013 was something like this: &#8220;I appreciate your motivation to contribute. However, I think I don\u2019t get your vision, but I\u2019m looking forward to seeing your implementation of the changes you have in mind.&#8221;<\/p>\n<p>After understanding the cause of my suffering, I could set boundaries in a way that made it clear I wouldn\u2019t invest my time into Pavel\u2019s ideas as long as I couldn\u2019t share his vision.<\/p>\n<h2>Saying \u201cNo\u201d<\/h2>\n<p>We often think that compassion and kindness equal saying yes to everything. But that\u2019s not true:<\/p>\n<p><strong>Compassion means to say \u201cNo\u201d if we can\u2019t say \u201cYes\u201d without resentment.<\/strong><\/p>\n<p>Does this sound egoistic? Think about it this way:<\/p>\n<p>There is so much relief when you can be sure that the person you ask for something will help you freely and without resentment, without attached debt, out of pity or in a condescending way \u2013 or just honestly say \u201cNo\u201d or \u201cNot now\u201d!<\/p>\n<p>That\u2019s also the reason why being compassionate is not being fake-nice. Fake-nice can\u2019t say no, compassion can. But it does so in a way which minimizes suffering.<\/p>\n<h2>What They Want to Forbid<\/h2>\n<p>When I told my best friend about that idea of compassionate coding and passed him an article by April about why <a href=\"https:\/\/compassionatecoding.com\/blog\/2019\/4\/17\/its-time-to-retire-rtfm\" target=\"_blank\" rel=\"noopener\">it\u2019s time to retire RTFM<\/a> (a great article, I highly recommend it) his reaction was like &#8220;Look! They want to forbid us from using RFTM, too! That\u2019s so social justice warrior!&#8221;<\/p>\n<p>I can see the suffering behind his fear; no one wants to give up on things that they\u2019re used to, and we are also very likely to repeat what we experienced ourselves. But the article doesn\u2019t forbid anything; it just explains why the use of RTFM is probably harmful to all participants and that there are more effective alternatives to achieve the goals you usually want to achieve by using \u201cRTFM\u201d.<\/p>\n<p>The truth is: compassionate coding won\u2019t forbid anything, because it won\u2019t force an opinion upon you. It\u2019s not a political agenda, it\u2019s not about judgment and \u201cyou are wrong\u201d. It\u2019s actually the opposite of dogma.<\/p>\n<p>Compassionate coding might, however, educate you to notice things you did not notice in the past. It might eventually show you how some of your actions cause suffering for others or yourself. And it will be honest about that. It might even start to change you. Which can be very scary<\/p>\n<p>Empathy and compassion can be grown by practice.<\/p>\n<p>Maybe, by practicing, we will begin to care for things which were not in our focus before. Maybe we will be able to make a difference so people who gave birth to a stillborn will not receive pregnancy ads. Maybe we will be able to improve the help that suffering people get from our apps. Maybe our ability to see the suffering of the world around us will encourage us to invest our energy into projects like <a href=\"https:\/\/fab.earth\/\">FABE<\/a><\/p>\n<p>Compassionate coding can be dangerous and scary because it can widen our horizon and raise the urge to take action.<\/p>\n<p>But I want to encourage you: Compassionate coding is not about being perfect. Otherwise, I would\u2019ve given up already. It is about trying and learning, about change and curiosity.<\/p>\n<p>If I caught your interest, I would love to <a href=\"https:\/\/twitter.com\/der_pesse\" target=\"_blank\" rel=\"noopener\">connect with you<\/a> and share experiences or leave a comment here.<\/p>\n<h2>Let\u2019s make tech more compassionate!<\/h2>\n<p>This article was originally published at <a href=\"https:\/\/cleandatabase.wordpress.com\/2019\/05\/08\/intro-compassion\/\">Clean Database Development<\/a>.<\/p>\n<p>Improving Tech with Compassionate Code<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is quite a bit of suffering within tech and caused by tech, from poorly commented code to shaming someone who asks a question on a forum. In this article, Samuel Nitsche explains why compassionate coding is a better way to go. &hellip;<\/p>\n","protected":false},"author":318946,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[45105,53],"tags":[],"coauthors":[55932],"class_list":["post-84498","post","type-post","status-publish","format-standard","hentry","category-career","category-featured"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/84498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/318946"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=84498"}],"version-history":[{"count":16,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/84498\/revisions"}],"predecessor-version":[{"id":84500,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/84498\/revisions\/84500"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=84498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=84498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=84498"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=84498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}