The Mindful Programmer
It has been a long time since I blogged about Mindfulness-Based Stress Reduction and meditation techniques. If you don’t know anything about this topic my blogs could be a first but very general introduction about that topic: https://blogs.sap.com/2017/11/20/mindfulness-moments-sap-teched-barcelona/ and https://blogs.sap.com/2017/08/25/how-to-cope-with-stress-at-work-and-to-keep-the-passion/. I used the last time to deepen my practice and found ways how to use it for my daily work. Here I would like to share my experience. Maybe you find it inspirational. In any way, I would like to read your feedback in the comment section.
Distraction as Default Mode in IT Business
From my experience, the typical day of an IT programmer is a series of interruptions: phone calls, emails, chat clients, meetings, questions from colleagues and urgent orders from superiors. Then there are interesting discussions on Twitter, maybe WhatsApp messages from friends, push messages from apps and so on.
I think this distraction is a natural consequence of the way we are working. In today’s work environments especially in IT, we have to collaborate to build, maintain and evolve IT systems. We have to share our knowledge and work together in IT landscapes that getting more and more complex with technologies that evolve very fast. When problems occur we have to react very fast which interrupts our schedule.
I always was an advocate for digital connectivity. In my company, I introduced intranet forums where developers discuss technical issues and I use them also as a channel for posting news about upgrades, newest features and warn about known problems with the technology. Later I introduced the first channels with technical topics in our company-wide instant messaging service. It is amazing to see how developers collaborate and find solutions for different problems within the shortest time. I don’t want to miss those technologies.
The Costs of Distraction
Distraction has its costs and science understands them very well. In my first blog post, I cited to scientific papers which prove it: “A wandering mind is an unhappy Mind” and “The Cost of Interrupted Work: More Speed and Stress” by Gloria Mark, Daniela Gudith and Ulrich Klocke. Their study said that we can‘t complete more than 50% of all our working tasks due to interruption. We can deal with this but it has its price: stress, frustration, time pressure and more effort.
I’m discussing a lot of coding issues with colleagues at work – this is part of my job. My impression is that digital natives code the same bugs as their older co-workers. Sometimes I asked why developers made those bugs and I get many different answers. Sometimes the requirement was too complex – and so was the solutions. Sometimes the colleagues were in a hurry because of the deadline. This is completely understandable and the same as driving: too high-speed causes crashes. But speed is not the only reason for accidents. The distraction causes crashes, too. That’s why using the Smart Phone is forbidden while driving in your car.
I would like to continue the analogy of car driving. When speed, distraction and complex traffic situations like slippy roads come together, the risk of an accident becomes very high. And these are exactly the way like many developers are working today. Often developers are creating new software while maintaining the old ones – at the same time. And even if managers are wise and reduce the number of different tasks many people experience constant distraction. For me, it is natural that a high number of bugs are coded even in critical applications. Our brain is just not made for keeping the concentration when while switching the mental tasks constantly. So I think this is one natural among many reasons that software systems are error-prone, have security problems and maintenance is much too high.
The Myth of the Digital Native
Some years ago, many people believed that this is the problem of medium-aged people like me. I grew up without eMail, Smart Phone, Social Media and instant messaging services.
Once, I was a student, I programmed a lot since I had to finance my studies. I worked in a mathematical institute and developed complex algorithms. In this time I developed programming habits that now are discussed as “Deep Work”. I could work for hours without any interruption and even experienced consciousness states which are now known as “flow experience”. In contrast to people who grew up with Smart Phones – the so-called digital natives – I am a lousy multitasker because my brain was shaped in a non-hyper-connected world.
Today we now that the myths of digital natives are completely wrong. When you google for “myth of the digital native” you will find many studies that question the myth. The first study I read about this topic was mentioned in my blog post. Here is a quote from the abstract:
“This article presents scientific evidence showing that there is no such thing as a digital native who is information-skilled simply because (s)he has never known a world that was not digital. It then proceeds to present evidence that one of the alleged abilities of students in this generation, the ability to multitask, does not exist and that designing education that assumes the presence of this ability hinders rather than helps to learn. The article concludes by elaborating on possible implications of this for education/educational policy.”
I think this is a strong indicator that digital natives experience the same problems with multitasking. Maybe for them, it is less obvious since they grew up in a hyper-connected world. So they are in contact with friends all the time, look at their posts on Instagram, schedule appointments on with messaging services and can use Streaming services like Netflix very time. This is a completely different lifestyle compared to the times where had run to telephone boxes for contacting friends while on being on the run.
Staying Connected Without Losing the Focus
One important aspect of the work of programmers is that while coding one is constantly making decisions. Let me give an example: “Should I code a new method or introduce a local class? The code gets too complex – should I refactor it? The unit test crashes because my colleague made a change in another class – should I wait for him or fix the problem by myself?” One other aspect of programming is the need for concentration. Software systems are inherently complex and unwanted side effects might occur. So avoiding mistakes needs concentration.
I believe that it is a necessary skill to be able to return to this state of concentration if a distraction occurs. This helps us to benefit from connectivity while working in an environment that is shaped by collaboration while being able to keep the focus on our activity.
Probably everyone has to find out his or her way how to do it. I know colleagues who listen to music or use headphones that reduce noise. Other people try to minimize interactions by reading eMails only twice a day and so on. In the last years I tried out meditation techniques and I would like to share my experience.
The Spinning Marble in a Bowl
The concept of mindfulness meditation is very simple: we are sitting and observing our thoughts, sounds, smells, and bodily reactions. Our mind is open. We use the breath as an anchor so that thoughts and perceptions do not carry us away. I consider the image of an anchor as more helpful than the word “concentration”. While coming back to the perception of the breath your mind will calm slowly down.
I think a wonderful picture of this is a marble in a bowl, which is spinning with high energy. The development of concentration is like slowing down the marble. In the real world, this is caused by the force of friction. The marble loses energy and after some time it stops curling. A distraction of the mind is giving the marble more energy so that it moves faster.
One effect of meditation is that you learn to slow the marble down. If there is some distraction, you will be able to return to your work by letting thoughts go if the distraction disappears. One aspect of mindfulness is to cultivate a certain resilience while your mind is still open. The trick is that one learns to observe perceptions intuitively without judging.
For me, the best way to learn this was a meditation retreat. In a meditation retreat, the schedule slows down your mind while still being alert. Since one is practicing silently (and of course is in digital silence), your mind doesn’t get any input. So it slows down. In fact, the mind is much more complex and there are other forces that arise. Sometimes unconscious thoughts will come to the surface of the mind will use any chance to get entertainment. But after three days it will usually come to rest like the marble in a bowl. Then you experience a kind of stillness and clarity. Your mind isn’t constantly disturbed and fragmented. One experiences the whole process and learns that the mind is usually repeating the same thoughts again and again. And the mind is also looking constantly for variety and change – which leads to distraction.
I won’t go deeper into the experiences of meditation retreats since they are often unpredictable and very personal. But from my experience meditation is a great way of keeping the focus. But therefore it is sometimes necessary to perform a soft reset of your analytical mind. But don’t be afraid, it is only for a short time that you switch from thinking into perceiving so that you come in contact with parts of your consciousness that are usually easily overlooked although they are close to you. And when you return to usual brain activity you will usually gain a new perspective since some brain tasks in a deadlock have been killed and some parts of your main memory got defragmented.
I believe that other techniques like Yoga or Tai Chi have similar effects. The technique is a little bit different since the object of concentration is the body and its movements. So I recommend that everyone should try out what is working best for him or her.
Summary and Discussion
Mindfulness Meditation won’t make you a better SAP developer. To perfection your skills you should engage in the SAP Community, visit SAP TechEd and SAP Inside Tracks and read some books. Mindfulness won’t also help you to solve organizational problems that cause permanent distraction.
But I think Mindfulness Meditation is a powerful technique one should learn to keep the focus even in difficult situations. It will be helpful to cope with the negative side effects of living in a hyper-connected world and especially for people working in the IT business.
I recommend not to practice that technique with a mindset of self-improvement. See is a chance to return to yourself when you start to feel that you have lost something – maybe it is your curiosity or your satisfaction. In this situation, many of my friends tried to compensate for it. In IT business compensation can sometimes lead to unhealthy habits: we eat too fast and too many snacks, drink too much coffee, stay too long at hotel bars while being on business trips and so on. When speaking with colleagues I often get the impression that they are not happy and don’t know why. In this kind of situation, I found a meditation retreat as helpful since it is a like soft reset. And it is also like a little adventure. So try it out. Statistics says that many people took benefit from it –so maybe it will help you, too.
Now I would be interested: Did you try it out? If yes, what was your experience? And if you don’t have any experience and if you are interested – what hinders you? What would help you to try out whether it works for you?