6 min read

Meditation Can Make You a Better Software Developer

Meditation Can Make You a Better Software Developer

I  came up with the idea to write this article weeks ago and I took a note  of it. Although a constantly working background thread pushed me to  write this article since that day, I constantly procrastinated by  findings some excuses. My procrastination was an extremely normal-looking but confined mentality. Some flimsy reason.

From my opinion, most of the people in my country (Turkey) has prejudice for meditation. This  was the first perception I had in my mind. Also, I thought that when I  am writing an article it must be a long one so that everyone can read it. I saw it as the best way to offer a more satisfying content for the readers. This was my criteria for an article to be loved by the reader.  And since this article is about meditation and when you combine a bit of prejudice together with imaginary criteria for article standard I found  justified reason to procrastinate the writing.

As  you can notice from these sentences above, I am sharing the results of  my thought analysis with you, and while doing that I am feeling the  freedom to express myself without caring what you will think about me or  my thought system. I am meditating more than two years now and it has  greatly contributed to teach me how to follow my thoughts, analyze them  and be myself without caring what other people will think about me.  Besides seeing contributions in my normal daily life activities,  meditation contributed big time in my work environment or to be more  specific-in the software development process. I found some evidence about this and I came up with the idea of writing this article.

Especially in our country, many people think of the image below when we say meditation.

They  see meditation as a joke because we all have this image in our mind. Of course, when I say this, I am sharing my impression I gained from other  people. Since you are spending your valuable time to read this article,  you most probably think differently or at least you are trying to  better understand the meditation phenomena before judging it. Whatever.  

When we check the universal definition of meditation in its core it says that enjoying the moment and living this moment only without obsessing with the past and staying away from the anxiety that the future might bring is a great benefit for our mind. At the same time, it is about  realizing your own thoughts and certain values that make you who you are.

For  me, mediation is closing my eyes to observe my thoughts like they are  in a train passing by me and I am just an outside eye who observes,  rather than an activity you do by crossing your legs and putting your hands on your knees. To understand what type of person you are and the real reasons underlying your thoughts, you need to get outside your own head and see yourself with different eyes. Meditation makes this possible. On top of that, meditation made me realize some incorrect mental structures I had when I was coding software on my desktop and  helped me to make better decisions to become a better software developer by breaking the chains.

Meditation and programming decisions

Although  we don’t notice it, we are forced to make small or big decisions when we are sitting across the computer and coding. If we are defining a variable, we think about the name we plan to give to that variable so that other developers can understand its purpose when they read it. If  we are coding a function, we make lots of decisions about what should this function return, which parameters should it have, body length and etc.

These are the decisions that we only make while coding. How about software design? We have to make lots of decisions in this process as well. Which  features should the first version have, which design pattern we should apply and many others. We face a series of decisions when we refactor  the bad code inherited from others. You need to know where to stop when  you are refactoring. Again, knowing where to stop is an important  decision-making operation.

Actually,  what we call software is actually an entire decision made to create a solution to a problem, and to make that happen we use programming language as a tool.

Since our decisions will deeply impact the fate of the software, it is important to be aware of these decisions. Let’s give some examples of change in mindset arising from the awareness process that I directly see in myself and in other software developers as well.

The transition from perfectionism to “good enough” principle

Perfect is the enemy of the good — Voltaire

Perfectionists.  They want everything to be top notch but they always ignore the fact that nothing can be perfect enough. I was one of those people in the past. To be honest, for a long time I didn’t even know I was a perfectionist simply because I was not aware of it. In every software decision I made it was highly present. Let’s take feature adding  decisions as an example here. Because I always aimed to make the initial  software version as perfect as possible my thought process was based on adding as many features as needed to make it a full complete solution. I  was not aware that by adding lots of unnecessary features in the  initial version I caused stress to software developers by increasing  unnecessary pressure and by prolonging the software launch date. I also had problems with deadlines just like other software developers, and on top of all of this I was completely unaware of how big a role this perfectionism played on me.

You probably read in many places-for your first software version, it is enough to be “good enough” to go in front of your users. In a sense, engineering is taking this “good enough software” to maturity level with repetitive improvements. But no matter how much you read, you will not find the driving force for change until you realize the underlying reasons for your past decision. At this point,  meditation helped me by being more aware of my thought processes that over time removed a shadow from my thinking so for the first time I saw my decisions in much clearer way.

The transition to “being present” mind state

Software  developers want the solution they code to be a generic one to cover problems that might come up. But we always tend to ignore that future is ambiguous and we can never exactly know what it will bring to us. As end results we develop software based on assumptions “what will be needed in the future”. Creating solutions to more problems requires writing more codes. More codes mean more lines to read for software developers and more areas that might lead to new bugs. When the future  time comes (that we already made several assumptions about at the start)  we realize how wrong our thinking was but the damage is done. Now, we understand that those needs are actually our imagination and we end up with the mess that comes with the unnecessary codes.

Whereas,  if we have been aware throughout the decision making process at the beginning we would not make these mistakes over and over again. Now,  when any software developer (including me) starts a sentence with “users  might need x property in the future”, a trigger blows in my mind and I can see the coming danger :)

Don’t guess the future. Focus on what you have now and write a code for that.

I  can give a lot of examples like that but there is no meaning to make this a long post. I think you got the main point. The main purpose here is to realize the basis and reason for any of your decisions. To question our mindset and to understand it. I think that meditation can be of great help here. Of course, I am not saying do meditation to be a better software developer. You have years of experience with the software. We are constantly trying to be better and make less mistakes. The information necessary for change is actually hidden in our mind. The important thing is to take them out from that hidden place and to reach the awareness to make the related connections. Meditation is one of the things that help me in this matter. Maybe this will help you as well.