Apart from breathing, eating and sleeping, my two most enduring interests in life have been programming and meditation (physics is a close third).
As someone who uses his mind to make my living - which is a fundamental truth of coding life - I'm fascinated by how my mind works, and sometimes doesn't work as well as I'd like, and what I can do about that. Meditation is part of my exploration.
I've coded professionally for around 18 years. I've practiced meditation for around 13 years in some form or another and have been teaching it to programmers for the last five. Below I'll tell you why I think meditation can make you a better programmer.
(Aside - as a programmer, I think of meditation as a tool to train certain qualities of your mind - in particular your attention and awareness. You don't need a particular spiritual outlook to benefit from meditation. I consider that question in detail on my blog here).
An extended version of this article, with a complete picture of how all of this happened, can be found on www.codingmindfully.com.
There is no such thing as a distraction free life. As a programmer, I have to deal with distractions from two sources:
- external distractions - co-workers and other humans, slack messages, emails, random noises, world events, youtube. Many of these can be dealt with via removal of the source, but they can't be eliminated entirely
- internal distractions - generally, your own thoughts and feelings - the endless thought streams that you get caught up in, the way you feel about coding (frustrated, lost, angry, joyful and so on). These are a little harder to escape.
The standard meditation algorithm basically looks like this.
When meditating, your attention wanders off countless times, and you restore it countless times. As a result, meditation teaches you the cognitive skill of re-focusing your attention when it wanders. A typical meditation session is really about learning how to do this (people think it's about staying focused; it isn't, it's more about learning that you're distracted and pulling yourself back - such a valuable skill in this distraction crazy world)
Meditation helps you handle stress. An excessively stressed body and mind are (a) not sustainable (b) not the best condition to be in while trying to produce your best work.
A little stress can help you focus for a short while. A lot of stress over a long time, has the opposite effect, scattering your focus and killing your productivity.
Meditation works to soothe the nervous system, often leaving the mind and body more relaxed than before.
Read more about stress in this article on my blog here.
I'm pretty sure most of us have had the experience of being stuck on a horrible coding problem, leaving it aside for the day, and somehow it solves itself overnight/while doing something else/in the shower - right? That's creativity in action, and it is definitely related to focusing on something else for a while.
I've taught meditation to hundreds of people and a common reflection that I hear is how often meditation makes people feel more creative - especially when it comes to seeing the solution to problems in their life.
Meditation helps you tap into your inner creativity. Ideas often flow, problems seem to solve themselves.
Because meditation works to soothe your jacked-up nervous system, meditation helps you better able to handle your emotions, meaning you can handle frustration and anger in a more graceful way, meaning you'll be less of a jerk to co-workers and those you love (including yourself).
I have been learning about meditation for many years. It's the only other activity apart from coding (and maybe physics) that has captured my attention for such a long time. I practice pretty much every day, and have been teaching people how to meditate for around five years. I'd love to help you learn too.
If you visit my site, and sign up for my list, I’ll send you three things completely free:
In this article, we’re going to explore why young programming languages with modern features can’t be adopted quickly. Additionally, we’re going to take a look at one exceptional example that got specific parameters right to be both young, modern and mature, just ready for adoption at small and big scale.