Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm practicing mindfulness since a few weeks, a popular form of secular meditation which concept is to focus yourself on the present moment. It works so great I don't understand why not more people are rushing into that practice.

It's useful for me because I've important responsibilities in several companies, and I have to manage a high level of pressure. Programming is still a large part of my daily occupation, but most of what I do and will do in the future is working with programmers, not programming itself.

That's what I'm questioning. As a programmer we use the past and plan for the future all the time very actively. Being in peace will certainly help with interpersonal interactions and communication, but the so specific intellectual task programming is?

Is meditation decrease our ability to do that, in profit of more peaceful and happy life?

Is meditation a good or bad thing for our programming abilities?

I will be very interested in the way to do meditation too. For example, I use breathing.

UPDATE APRIL 8 2011: just finished the 8 weeks Jon Kabat Zinn training (MBSR). While it's too early to measure benefits on my programming abilities, I can tell you it reduced overall anxiety significantly. I strongly recommend the program.

share|improve this question

closed as not constructive by Mark Trapp Dec 11 '11 at 17:56

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not sure how meditation uniquely affects programmers and developers. Surely any benefits apply to people in all walks of life. Please read the updated FAQ – ChrisF Jan 22 '11 at 11:18
@ChrisF: I'm specifically interested by experiences of programmers, other professions are irrelevant for my researchs. It's why it's uniquely affects programmers. I read the faq again and compared with questions of the past 24h to determine their uniqueness and many of them are concerned. I see your comment only on this one, why? – user2567 Jan 22 '11 at 11:42
It was the first one I saw this morning that I felt was borderline. I haven't had time to review every single post (nor shall I have the time), if there are others please bring them to the moderator's attention. – ChrisF Jan 22 '11 at 11:45
@ChrisF: you can go back in time for the last 7 days it's the same. The problem must be elsewhere. – user2567 Jan 22 '11 at 11:50
Why this has been closed? This is ontopic, constructive, not localized and VERY INTERESTING! – user2567 Jan 26 '12 at 9:23
up vote 75 down vote accepted


I've done mindfulness practices for several years since doing some DBT classes. They're not going to make you an instant algorithm whiz, jack up your lines-of-code-per-day by an order of magnitude, or let you code 24 hours a day non-stop.

But here are some things I've seen...

You become more effective at dealing with what's really going on

Would you try to install kitchen cabinets that are level and square and fit well together while wearing a blindfold and thick gloves? Would you drive on a crowded freeway while watching a TV set on your dashboard in front of the steering wheel?

We spend much of our lives distracted by thoughts of other times and places. But when we need to deal with things that are immediate, that's like a blindfold and gloves, or watching TV instead of the road. At times, it can be like trying to code while a dozen people are screaming at you.

Mindfulness helps us get rid of those cognitive distractions. So when someone comes to you with a programming task, you can actually pay attention and hear what they're saying, rather than the distractions in your head.

You develop mental self-discipline that helps you write necessary-but-boring code

Especially when bored, the human mind likes to jump around among thoughts like a puppy - sniffing at this, barking at that, rolling on the floor, and licking people it likes. That's fine if you're taking a nice peaceful walk outdoors, but is a terrible way to write code that is boring but just has to be done.

Mindfulness practice is like self-discipline weight-lifting for the mind. During a meditation session, you try to accept your mental puppy-ness and not punish yourself for it, but keep bringing your mental focus back to the meditation. Over time, your ability to concentrate increases, and so does your ability to crank out boring-but-necessary code.

You're much calmer when coding, and thus more productive

Our brains developed on the African savannah, where no matter what a hominid was doing, 10% of their minds needed to be watching out for cheetahs and lions to avoid being eaten. So when we think about other times and places, our minds often gravitate toward things that annoy or upset us: the deadline we might not be able to meet, the person we work with who's a jerk, the bad news that was on TV about something far away, or the disagreement with our significant other that morning. Those all tick over in the back of our minds while we're trying to program.

Mindfulness teaches you to try to be in the moment - and the truth is: Most of the moments of our lives are pretty damn good! Especially in first-world countries, 90+% of the time, we're warm, clothed, adequately fed, in a comfortable environment, and nobody's screaming at us and nothing's trying kill us.

So mindfulness practices help you take that 10% of your mind that's fretting about all that other stuff, and cranking out stress hormones and muscle tension, and quiet it down. You ignore the war in Whereveristan for the moment - which is good because you can't do a thing about it while you're at work - and look around and think, "I have a hot cup of coffee, a comfortable chair, the temperature's nice, and I have some code to work on. This is really pretty great!"

You take better care of yourself

A friend of mine who does a lot of physical work wanted to know about mindfulness, so we did what's called a "body scan", where you concentrate on feeling each individual part of your body, a few seconds at a time.

I first asked how he was feeling, and he said, "Fine." So we started, and in about twenty seconds, he was yelling, "OW! OW! My legs! My knees! Man, this really sucks! It makes me hurt all over! Why the hell does anybody do this?"

Of course, it wasn't the body scan that made him hurt. He was already hurting all over - he just had been ignoring it for so long he didn't notice it. After he'd done mindfulness practices a little while, he learned to be more careful about what he did, he figured out better ways to do his work that didn't hurt him so much, and it was amazing how much better he felt about life in general.

It can be the same thing with non-physical things. Let's say your boss is a jerk but it's gone on so long you ignore it. Then you become mindful, and say, "Hey, wait, my boss is a jerk." So then you deal with it somehow (talk to him, change jobs, etc.) and then you're happier. Or at least you make a conscious decision to not deal with it, so you don't stress about it subconsciously.

You enjoy life more

Let's say you're eating some delicious cake. The two ends of the mindfulness spectrum are:

  1. Wow, what a great piece of cake! This tastes so good. I'm really enjoying this!
  2. I wonder what's on TV tonight. Probably nothing good - maybe I should rent a movie. If I rented a movie, what would I rent? Hmmm. I think I'd like a comedy. Hey, where'd my piece of cake go? I wonder if it was any good.

You learn more about yourself: what you are and aren't good at, what you do and don't like

Some folks describe mindfulness meditation as "going for a swim in the sea of me." I've discovered two things about myself and programming, in part because mindfulness practices have led me to pay more attention:

  • I love writing graphics code in C and C++. I'm really good at it, it exercises a lot of my talents like mathematics, and I enjoy writing the code and watching the result on the screen.
  • I hate developing web sites. While I love the result, and respect people who are good at it, it just ain't me.

Guess which one I'm concentrating my programming career on?

share|improve this answer
Simply amazing answer! I'm speechless. – user2567 Jan 22 '11 at 22:08
This deserves the "best answer" – zhenka Jan 23 '11 at 0:05
+1 This answer made me want to try meditation. I'd consider myself a decent programmer, but I can only focus when I'm focused basically. I'm constantly thinking at all times. This is a good thing in a way because when I'm doing something repetitive(not programming) I don't get bored, instead I think about other things and resolve problems. It's a bad thing because I tend to resolve non-programming problems when I'm trying to program. – Earlz Feb 12 '11 at 5:54
@Earlz: If you find you like it, you might also try some non-meditation mindfulness practices. You can find instructions online about doing all kinds of things mindfully, like eating a Hershey's kiss, drinking a cup of coffee, or washing dishes. And if you find you like that, check out "The Miracle of Mindfulness" by Thich Nhat Hanh; it's a great primer for becoming more mindful in daily life. – Bob Murphy Feb 12 '11 at 7:01

I am Yoga guy from the last 5 Years. I find that it is very useful in being in the present moment. What I like more about it is it increases productivity and problem solving skills, you get more done in lesser time. It also helps me be at peace with myself. I don't think it hurts programming abilities in any way, what it does take away is procastination and worry these are not necessary to write good code.

Yes it takes a little bit of aggression away and aggression(positive) is sometimes good.

share|improve this answer
Mindfulness practices don't have to take away aggression. I'm at least as aggressive than I was before I started doing them - I'm just much better at directing it well. – Bob Murphy Jan 22 '11 at 22:05

Absolutely. But take it from an ex-Neuroscientist who used to be as obsessed about psychology as I am now about programming: the western version of mindfulness, while does a good job secularizing and introducing the practice, does not go into as much depth as the sources of this practice -- the eastern philosophies.

I am not advocating Buddhism or Hinduism or Yoga, nor I consider myself one. However to truly understand and get the most benefits from Meditation and Mindfulness, you need to understand a lot of surrounding philosophy which is very important. It will take time, and most of the time you will get it wrong, this is normal. If you feel that something is not right about your ideas, results, or the practice, a lot of time it is because there is something you are doing wrong and you need to go back to theory. Just to clarify what I mean by philosophy has nothing to do with religious rituals, but more about surrounding thought like "The Eight Fold Path."

Some of the best sources to do so IMO is this website:

It is the most modernized version of Buddhism without any superstition on Monasticism. Gil Fronsdal is as good as it gets. He also has a free book available called "Issue at Hand."

If you want additional sources try Stephen Batchelor.

share|improve this answer
Interesting stuff. Who is that ex-neuroscientist? – user2567 Jan 22 '11 at 22:55
If you do explore the source of these idea, please be aware that there are A LOT of branches and sub-branches based on teachers and countries. Some are much more nonsense then others. Do not try to read wikipedia or googling it as you will get very bad new-age information that will turn you of. – zhenka Jan 22 '11 at 22:58
Ex-neuroscintist is me. But if I am not good enough : ) Sam Harris is a famous author/neuroscintist who is an active proponent. But he is most famouse for his ethic/atheist writings. – zhenka Jan 22 '11 at 23:00 this is a good example of what I mean. 8m segment of Sam Harris talk. – zhenka Jan 22 '11 at 23:02
Which books do you recommend? – user2567 Jan 22 '11 at 23:05

Definitly Yes

Well i think that any activity that allows you focus on what matters is always good. I personally prefer a more active way to focus, so i've been practicing Aikido for a year now and i can tell you that breathing techniques are quite appropiate when you need to focus on a aggresive environment (with aggresive i mean to concentration, like very noisi and crowded).

So keep up with your excercises, they not only help you with your work, it helps you enjoy more your life

share|improve this answer
do you mean "breeding techniques?" Yeah, those always help to chill me out. – Dan Rosenstark Jan 22 '11 at 23:12


I'm a proud Muslim and I'm most satisfied when I'am praying. This may be equivalent to your "meditation".

share|improve this answer
I saw a recent study that shows that people practicing religion are more happy than the rest of the population but more importantly live 7 years older than them! – user2567 Apr 8 '11 at 9:19