A free PDF of the complete guide is coming soon, sign up here and I’ll shoot it through when it’s ready!

Meditation, programming and YOU!

Who this is for

If you’re a programmer, or write code in any part of your professional or personal life, this guide is aimed squarely at you. It’s based on some simple premises:

  • You use your mind to write code;
  • All skills and capabilities can be improved with training -you have already done this many times in your life;
  • It’s possible to train certain capabilities of your mind – in particular concentration, and the ability to be aware of, and alter, your mental state – which will help you become a more confident, capable coder.

The main method of mind training I explain in this guide is commonly referred to as “meditation”, although you might find it helpful to think of it as “attention regulation training” – that’s basically what it is. The capacity to focus your attention is, I’m sure you’ll agree, crucial to outputting quality code, so it’s in your interest to train it.

Why programmers benefit from meditation

There are three big reasons to meditate if you spend any time writing code:

  • Meditation helps you stay focused and effective by training you to work with with inner and outer distractions;
  • Meditation mitigates the effects of stress by teaching you how to relax;
  • Meditation helps with FOMO (fear of missing out) and impostor syndrome (“I’ll never know enough to not be a fraud; I need to work super hard to be considered barely competent”) by teaching you to be present to your current experience and capabilities rather than unnecessarily dwelling in the past or future (sound familiar?).

Meditation as focus training

Anybody who has ever written any code knows it requires focus. Getting knocked out of flow can ruin your productivity. But distractions are real, and have a huge negative impact on getting things done.

A programmer can take ten to fifteen minutes to start editing code after an interruption [link]. By learning to recognise the distracted or interrupted state, it is possible to get yourself back on track more quickly.

Distractions come in two forms – external and internal. External distractions are to do with other people and the world around you; internal distractions to do with your own inner world – the world of thoughts and emotions.

Meditation helps you to work with distractions in two ways:

  • You generally become less agitated and more able to cope with external distractions in a non-reactive way
  • You learn how to navigate your own inner distractions of frustration, fear, anger and not-feeling-good-enough by learning how to observe when they are taking you out of focus, so you can bring yourself back on task.

Meditation as stress relief
The stress response is a response in the bodymind system in relation to a perceived threat. I wrote a long, detailed article about stress here.

The short version is – while a little stress isn’t harmful and can even be beneficial, chronic, long-term stress is a productivity killer and really not good for your long term health, or how you feel about the world in general.

Some of the strongest scientific research into meditation supports its effectiveness as an antidote to stress.

Meditation trains you to be present
The most important moment in your life is the one that you are living right now. The past is done, the future is uncertain and hasn’t quite appeared yet.

Our mind, however, often feels it would like to be anywhere BUT the present moment.

We’re constantly wishing we were somewhere else or someone else. We dream of futures where we have all the answers, or are the World’s Greatest Coder (I’m still waiting for my medal!). We remember easier times, or harder times, or any time that isn’t right now.

While the desire for improvement that this creates can be beneficial when it comes to providing momentum to improve our lives, when we’re caught up in this type of future or past oriented thinking, we’re missing out on all the goodness of the life that we’re living right now.

Us coders are lucky, in that the vast majority of us LOVE writing code. But we are still subjected to that nagging feeling that things will be better IN THE FUTURE or things were better in the past.

For example, the nagging feeling of being an impostor – that somehow, the current version of ourselves is somehow not good enough, that we’ll be found out as not having the right skills, that our knowledge is incomplete.

In either case, we wish for a future version of ourselves that will be better, rather than focussing on how amazing we actually are right now. Which means we’re missing out on that most important moment – right now.

For most of us, there are AMAZING aspects of our current situations that we’re missing out on by just not paying attention, or by giving these not-now thoughts way too much value!

Furthermore, a good programmer is deeply in touch with the ability to spot potential problems. The capacity to anticipate issues is a strength when applied judiciously – but humans are already up against a negativity bias – where about 80% of our idle mental effort goes towards pondering negative situations. At worst, the thinking mind of a programmer can become problem saturated, leaving no time or space for joy or fun or ease. Which is no way to live!

By teaching us to be present, meditation allows us to savor and enjoy the life that we are actually living rather than the imaginary life our mind is constantly creating or fearing. The moment by moment experience you are currently having becomes richer, more detailed and more meaningful. Your interactions with friends and colleagues can become lighter. Your capacity to stay calm under pressure. Your ability to show up for this life, lived right now, in this moment, is enhanced.

Why are you reading this guide?

I want to help you stay on track here. Something got you to click on the link and start reading this guide.

It might be that you have some difficulty that is getting in the way of you being able to write code.

Perhaps that difficulty has been there for a long time, perhaps it’s more recent.

Often it’s related to difficulties focusing, which in a large number of cases is to do with excessive stress.

Perhaps the code is flowing from your fingertips, and you want to keep it that way. You’ve had periods of struggle before and are curious about how they might be avoided or minimised.

Or it might be that you are already smashing it in life, but want to level up in some way.

It might be plain old curiosity. Perhaps someone you trust told you that meditation would be useful to you.

Whatever it is, make a mental note of it right now. Perhaps write it down on a piece of paper. Keep it somewhere you can see it.

Whatever you take from reading this and trying out some of the techniques, you’ll be able to assess whether or not it has been useful for you.

If it’s useful, keep doing it. If it’s not immediately useful, stick with it before making your mind up completely – most good things take a little time to figure out.

Do this now (video – breathing exercise)

Video containing a breathing exercise + feedback


Why I wrote this guide

My mind has malfunctioned in spectacular fashion on a number of occasions (thankfully, and mostly thanks to the techniques I describe here, not for a while!).

It’s hard to write code with a malfunctioning mind.

For me, those periods of malfunction were the result of excessive stress in my life. They showed up as the symptoms of extreme anxiety – a constant worry I wasn’t good enough, fear about the future, muddled, excessive thinking, insomnia and so on.

If this sounds like you, there’s a good chance that some of the material in this guide might be able to help. I’m not a therapist though, so if you suspect some deep underlying mental health stuff, seek one out – I’ve done it several times and am a better human because of it. No shame. Please email me if you want help with this.

I’ve navigated my way out of those malfunctions a number of times. In fact, my life has improved in a number of significant ways since those experiences.

I went from stressed, anxious and unfocused, unable to write code and barely able to do my job, to happy, lighthearted and focused, working on projects that I care about and with a newfound capability to deliver.

None of the tools I’ll explain here are complex or mystical. All are practical and require not much more than somewhere to sit quietly for a few minutes.

My programming history

I got my first computer at the age of 10, a ZX Spectrum, in 1988 (yes I’ve been around a while!).

I still remember coming down to the sitting room where my father had hooked it into the TV (imagine that!) on the morning of my birthday. I fell in love with its rubber keys and their mysterious symbols. I was enthralled by the ability of those keys to make stuff happen on the screen!

A teenage life of writing “choose your own adventure” games on my Atari ST and my friend’s Amigas was followed by the decision to study Physics at University.

I had to code throughout, becoming expert in being terrible at C programming quite quickly. It was the early days of Google (I graduated in 2000) and the world of the web was widening in front of us.

I finished my degree, and instead of doing a PhD in Physics at Oxford, I decided I’d prefer not to be in a lab all my life, and took a Masters in High Performance Computing (basically, what were called supercomputers, still used to do computational physics and other science stuff).

Five years at the University of Edinburgh building apps in science, as well as exploring the Grid (or what would become the Cloud… much better branding!) was followed by a segue into the commercial world, where I’ve mostly stayed ever since.

I’ve programmed commercially on both .NET and Java stacks, PHP and a number of its frameworks, all the fun front end stuff (the recent explosion of JavaScript has been quite amusing – who knew?) and a heap of back end scalability (we just called them “Big Databases” before the whole big data thing came along…).

I’ve worked in investment banking and other financial services, online travel, property, digital agencies. I’ve done startups, corporates, consultancies. I’ve been coder, tech lead, head of development, agile coach, ScrumMaster and so on. I like to think I know a bit about code!

My mind came with me through all of these experiences. My mind kept me able to meet all the demands placed on me. I wish I’d learned to value it sooner!

Why I started learning meditation

Life is mysterious and wonderful and tragic. I’m not here to philosophise about that right now (well, maybe just a little) but – shit happens, and some of it’s bad.

When I was 27 I lost my father (he passed away from cancer), which, to say the least, was a BIT stressful. Actually it made me completely anxious at times, which manifested in extreme hypochondria.

I literally thought everything was going to kill me (which is ironic, since the one thing that’s guaranteed about life is that, yes it will kill you eventually – so why worry? Ok no more philosophy…)

Someone important in my life at that time saw how anxious I was, and suggested I tried meditation. I was skeptical, for many reasons that I’ll address later, but I gave it a go. I used some guided audios by a guy called John Kabat-Zinn and had quite a bit of success (I stopped thinking I was going to die all the time for starters, which was pretty cool!).

I learned two things. If you leave this guide with nothing else, remember these:

  • There can be a BIG difference between the contents of your thought stream, and the reality of the world. It turns out you are NOT your thoughts and you can cultivate an attitude towards them where they stop being such a dominant, noisy pain the ass (but you can’t eliminate them, and you certainly don’t need to – we’ll talk about this later…)
  • A few minutes of attempting to focusing on your breath, slowing it down and feeling it in your body can give your nervous system the prompt that it needs to get out of anxiety mode, and just, you know, relax for a hot minute!

Why I started teaching meditation

I still find it amusing and curious that “meditation teacher” is a life role I hold. I’m extremely glad of it, because the value I’ve seen these simple practices create in people’s lives continues to amaze me.

I started teaching meditation for primarily selfish reasons! I had finally realised that my life was better when I meditated. I was more focused, clearer in my thinking, less emotionally reactive, felt more creative and I hit states of flow much more easily.

I had wondered for a LONG time how to make a meditation practice work for me (hands up if this has been an issue for you?).

One day, I decided the best way force myself to show up for regular meditation practice was to set up a group in my office and play the teacher! If people were dependant on my being there, it was much more difficult for me to avoid meditating myself! And it worked….

I started being invited to speak about and guide meditation practices in different parts of my life. As I realised I was being lead down the teaching path, I deepened my own meditation practice with a series of retreats and trainings with a number of different teachers.

These days, I still spend a good chunk of my life building software systems. I work on my own meditation app. And I teach about ten public, drop-in guided meditation classes every week here in Sydney, Australia, as well as numerous private seminars, talks and other events for a variety of companies and organisations.

It’s a gift to live a life that allows me to share the benefits of meditation practice so regularly and with so many people. I see this guide as an offering to the wider coding community. Please enjoy!

unHelpful beliefs about meditation

Mediation is becoming quite a mainstream activity. Nevertheless, it carries some cultural baggage that I’d like to address.

Some of the commonly held views about meditation can put people off from trying, or are just not useful when actually learning how to meditate.

That baggage is slowly being shed. I’d like to address several of the common misconceptions held about meditation

The myth of the silent mind

A programmer’s most valuable tool is their mind. Being able to break down complex problem domains into deterministic steps that can be followed by general purpose computing machines is basically what we get paid for.

Thinking is non-optional for a programmer. Silencing the mind is not really an outcome we’re looking for in our programming careers.

I teach meditation to many people every week. Many people come to meditation seeking respite from an overactive, busy mind (often at 4am or just before bed…).

Most have the idea that meditation somehow means “stopping thinking” or silencing the mind, for the whole period of meditation.

Many new meditators quit at the first hurdle, because they have the experience of trying to meditate and feeling they have failed because their mind maintained some degree of activity during the process. (Has this happened you?)

Trying to stop yourself from thinking is really really difficult. If I tell you right now not to think of, say, pink elephants, what do you find yourself thinking of? How hard is it to stop?

While it’s true that extended periods of mental quietude are a likely outcome of a dedicated meditation practice, it can be an obstacle to learning how to meditate to focus on this as an outcome.

The good news is that there is no need to silence the mind to benefit from meditation – thoughts within meditation itself are not a bad thing at all. There is no need to stop your thoughts or for your mind to go blank, so if this is something that you have been concerned by with previous attempts to mediate, then you can safely drop this idea right now.

One of the side effects of meditation is that, with practice, you develop better relationship with your thoughts. You become more adept at recognising useful and less useful thoughts.

Most people find that the intensity of thinking diminishes, thoughts can slow down and thinking becomes clearer – but it never needs to stop completely!

Some people treat meditation as a game of “stop all the thoughts” – a bit like whack-a-mole. That’s not a fun or useful game to play. The game we’re playing here is different. I explain a better way to approach meditation below, in the section on the Standard Meditation Algorithm.

Spirituality, religion and mysticism

I’ll put it out there early on – meditation practices are central to the mystical branches of most major religious practices in some form or another. However, meditation is a state of being accessible to all people regardless of their religious beliefs.

I actually think that it’s quite interesting that different cultures at different times have discovered practices that share really important characteristics. But it’s really not necessary to take on all that cultural baggage to benefit from meditation.

I’d like to make it clear from the start – my worldview is generally rationalist and scientific. I embrace evidence based practices and critical thinking.

I’m not a member of any spiritual or religious organisation. I have studied and worked in physics and computer science – I’m more likely to take a materialistic worldview than not in most situations.

Although I’ve dived deep into the philosophy and practices of Buddhism and yoga in particular, I approach each with a skeptical mind and have no patience for some of the more outlandish claims made by these and other spiritual paths.

That said, if you have an existing spiritual or religious path, it’s my opinion that you can safely blend meditative practices within your existing frameworks, if you are willing. Anyone can meditate regardless of whether they’ve been to a church, temple, mosque or any other place of worship recently, or indeed ever.

Modern meditation is be a secular practice that is more concerned with getting to know more about yourself and how you operate in the world.

You can choose to embrace it as a tool for self-awareness and self-development, rather than needing to involve yourself in a grand quest for spiritual knowledge (although if that’s your aim, feel free to try it on too! But we won’t be getting into that in this booklet).

How to meditate – the Standard Meditation Algorithm


Want to read more? I’ll send you the complete PDF of The Ultimate Guide to Meditation for Programmers if you fill in this form!