The 10 rules of a Zen programmer

By Christian Grobmeier

UPDATE: You want a book on Zen Programming? Click here.

On a rainy morning I found myself sitting on the desk thinking about efficient working. Before I started as a freelancer I had some days were I worked lots but could look only back on a worse outcome.

I started with Zen practice back in 2006. What clearly came to my mind before a good while was: the old Zenmasters alredy knew before hundreds of years, how today programmers should work. Even when I don’t like these “be a better programmer” posts, I want to outline some of my thoughts from that morning. It shall serve me as a reminder, but if you have some ideas about it, feel free to comment.

1. Focus

If you have decided to work on a task, do it as well as you can. Don’t start multiple things at the same time. Do only one thing at one time. You’ll not become quicker, just you work multithreaded. If you work multithreaded you’ll become exhausted, make more errors and lose time to jump from one task to another. This is not only about programming, this is a general tip.

Kodo Sawaki says: if you need to sleep, sleep. Don’t plan your software when you try to sleep. Just sleep. If you code, code. Don’t dream away – code. If you are so tired that you cannot program, sleep. Even known multitaskers like Stephan Uhrenbacher meanwhile have decided to work singlethreaded. I have made a similar experience to Stephan and finally I wrote Time & Bill, a time tracking tool. Goal was to track my time so easily that I even do it for small tasks like a phonecall. Now I can create a few stopwatches at the beginning of the day and track my time with only one click. The outcome was a disaster: sometimes I just worked a few minutes on a task until I moved on to the next one. Now I am better. Similar to the Pomodoro technique I plan a few time slots and concentrate on them. No chatting, no sleeping, no checking out of a new great game on the Appstore.

Time & Bill Zeiterfassung

2. Keep your mind clean

Before you work on your software, you need to clean up your memory. Throw away everything in your mind for the time being. If you have trouble with something, don’t let it influence you. It is mostly the case that trouble will go away. If the trouble is so heavy that you can’t let it go, don’t work. Try to clear things up. But when you start working, let the outer world shape away.

Something exciting on the mailinglist? Leave it there. You can follow the exciting stuff again – later. Shutdown what fills your mind with shit: close Twitter, Facebook, your E-Mails. You should even mute the ringing of you mobile and leave it in your pocket. You can say it is similar to item #1, focus. But there is one more restriction: don’t use that tools before work or at lunch. They connect you with the outer world and probably bring up some new trouble or things which require you attention.

Think like this: at most times your mind is pretty clean when you wake up at the morning. If it is not, some sports helps (I do long distance running). If you feel clean and refreshed, go to work and work as well as you can. When you leave your work then you can fill up your mind with clutter. You’ll see it is not so much fun if you have a full working day behind you. Twitter and Co are consuming much of your energy. Do not think: it is just a minute. It is not.

You know it already.

3. Beginners mind.

Remember the days were you were a beginner. Or memorize, if you still are one. You have never learned enough. Think of yourself as you were a beginner, every day. Always try to see technologies from a beginners mind. You can accept corrections to your software better and leave the standard path if you need it more easily. There are some good ideas even from people who don’t have your experience.

Was there ever a software build twice, the same way? Even if you copy software it is somehow different.

4. No Ego.

Some programmers have a huge problem: their own ego. But there is no time for developing an ego. There is no time for being a rockstar.

Who is it who decides about your quality as programmer? You? No. The others? Probably. But can you really compare an Apple with a Banana? No. You are an individual. You cannot compare your whole self with another human being. You can only compare a few facettes.

A facet is nothing what you can be proud of. You are good at Java? Cool. The other guy is not as good as you, but better with bowling. Is Java more important than bowling? It depends on the situation. Probably you earn more money with Java, but the other guy might have more fun in life because of his bowling friends.

Can you really be proud because you are a geek? Programmers with ego don’t learn. Learn from everybody, from the experienced and from the noobs at the same time.

Kodo Sawaki once said: you are not important.

Think about it.

5. There is no career goal.

If you want to gain something and don’t care about your life “now”, you have already lost the game. Just act as well as you can, without looking at the goal you might reach after a long time.

Working for 20 years to become a partner? Why aren’t you working as hard as possible just because it is fun? Hard working can be fun. A day without work is a day without food is a Zen saying.

There is no need to start happiness after 20 years. You can be happy right now, even when you are not a Partner or don’t drive a Porsche. Things change to easily. You can get sick. You can get fired. You can burn out (if you follow all these items I guess likeliness is low).

Until these bad things happen, just work as well as you can and have fun with doing it. No reason to look at the gains of the collegs. No reason to think about the cool new position which you didn’t get.

After all, you will reach something. You’ll end up with nice memories, maybe a good position – and 20 excellent years. Every day is a good day.

If you ever come to the point were you think that working at your company is no fun at all you must leave immediately. NEVER stay at a company which does take away the happiness in your life. Of course, this is only possible in the rich countries, were people have the choice to go away. But if you are living in such a good environment, do it. Go away without regret. You have no time to waste, you are probably dead tomorrow.

When you have no career goal going away is easy.Zen Programmer Enso

6. Shut up.

If you don’t have anything to say, don’t waste the time of your colleagues. This doesn’t make you look wimpy. Everyday you work you need to try not getting on someone’s else nerves. Imagine if everybody would try this – what a great working place would that be? Sometimes it is not possible. Try hard, you will like it.

If you don’t develop an ego it is pretty easy to shut up and care on the things you have something to tell. Don’t mix up your ego with your “experience” and always remember: you are a beginner. If somebody has a good idea, support the idea.

7. Mindfulness. Care. Awareness.

Yes you are working. But at the same time you are living and breathing. Even when you have some hard times at work you need to listen to the signs of your body. You need to learn about the things which are good for you. This includes everything, including basic things like food. You need to care for yourself and for everything in your environment – because after all, the water you drink is the water which runs in the river. Because you are living only for yourself. You live alone and you’ll die alone. World goes on, even without you.

Avoid working situations you don’t like. Avoid working for free if it means you will have no fun and keeps you away from your bed. Let go what doesn’t make you happy. “Working for free” is just theory? Consider the people doing Open Source in their prime time. If you have subscribed to some projects mailinglist you probably know what heat there is (sometimes). If you don’t have fun with that – stop doing it. I know a bunch of people who work in an Open Source environment they don’t like. Again with Time & Bill I have tracked the time I spend in 0pen Source projects and was surprised how much time I lose there – esp. on projects I didn’t like so much.

Having this in mind, some people think they are only happy when they have prime time and can spend the evening with an xbox and some beer. While this is a good idea from time to time, it is not necessary that the whole time in your life is “fun”. If you can avoid situations you don’t like, avoid them (like I said above). But sometimes there is need to something really shitty. Like for example manually copy/pasting stuff from your managers Excel sheet into phpmyadmin. This can take you days, and it is really boring. It is no fun, but sometimes you need to do such stuff. You cannot always quit your job when you got a boring task. Zen Monks are not to shy with their work too. They get up at 4am (sometimes earlier, sometimes later, depends on the convent) and start meditation and work (they even consider work meditation practice). They have stuff to do like cleaning the toilets. Or working in the garden. Or as a Tenzo, they cook. They do it with all the care they can get. Whatevery they do, they do it without suffering and they are (or should be) happy, because every second, even the second where they are cleaning toilets, is a second of their life.

That being said: stop crying, if you need to copy/paste excel. Just do it. Don’t waste your energy with such things, they will pass. Become the best excel copy/paster out there instead.

If you suffer a heart attack, people will probably say: “uh yes, he really worked too much, he even worked for me for free at night”. Nobody can guide you to the other world. This last step is taken by us alone. You cannot exchange anything in this world. Not even a fart. So it is up to you to take care, in every second. If you die, you die. But when you live you live. There is no time to waste.

“Care” is a huge word in zen buddhism (and I think in every form of buddhism). I cannot express everything which needs to be said. it is difficult to understand the different meanings of “care”. Propably you are better with the word “awareness”. You must be aware of what you do, in every second of your life. You must be mindful in your life. Otherwise you waste it. But, of course, it is up to you to do so, if you like.

8. There is no Boss

Yes, there is somebody who pays you. There is somebody who tells you what needs to be done. And he can fire you. But this is no reason to give up your own life or to become sick of your work. Finally your Boss has no control about you. It can even be doubted that you have control about you – but don’t lets go down this path.
Back to your Boss: he can make your life worse if you allow him to do so. But there is a way out. Say “No” if you need to do something which makes you sick or is against your ethics. What will happen? In worst case he will fire you. So what? If you live in western nations and if you are a coder (which is very likely when you read this) you’ll get another job.Lotus Buddha by Jim Wisniewski

I don’t mean to say “No” to tasks like copying CSV Data to HTML. I am speaking of 80 hours weeks and you feel your body breaks. Or if you feel that your kids could need some attention too. Or if you are forced to fire people just because your Boss doesn’t like them. Or if you are a consultant and get the job to develop software for nuclear plants (some might say it is perfectly fine to work for nuclear power companies – it is against my ethics and serves as an example) or for tanks. You can say “No”.

9. Do something else

A programmer is more than a programmer. You should do something which has nothing to do with computers. In your primetime, go sailing, fishing, diving. Do meditation, martial arts or play Shakuhachi. Whatever you do, do it with all the power you have (left). Like you do at your worktime. Do it seriously. A hobby is not just a hobby, it’s expression of who you are. Don let anybody fool you, when he says hobbies are not important. Nowadays we can effort having hobbies. I have recorded several CDs and wrote fantasy books (the latter one unpublished, I must practice more). These things have made me to the person I am now, and finally they have led me to Zen and this blog post. These days I practice Zen Shakuhachi. It is a very important aspect to my daily life.

10. There is nothing special.

A flower is beauty. But it’s just a beauty flower – nothing more. There is nothing special around it. You are a human who can program. Maybe you are good. There is nothing special around you. You are of the same kind as I am or all the others on this planet.
You need to go in the loo and you need to eat. Of course you need to sleep. After (hopefully) a long time you will die and everything you have created will be lost. Even pyramids get lost, after a long time. Do you know the names of the people who build up a pyramid? And if you do, is it important that you know? It’s not. Pyramids are there, or not. Nothing special.

Same goes to your software. The bank is earning money with your software. After you leave, nobody remembers you. There is nothing wrong around it. It is the flow of time. Nothing you should be worried about it. If you are living after the first 9 rules, you’ll see that this last project was a good and funny project. Now it’s simply time to go on and concentrate on something else.

If your comapany closes because of financial problems, no problem. Life will go on. There is no real need for an xbox, a car or something else. Most people on this planet live in deepest poorness. They don’t care about an xbox, because they would be glad to get some food or even water.

So… why exactly are you special? Because you had the luck to be born in the western territory? Because you can code? No, there is nothing special about it. You can let go you ego and live freely. Enjoy the colors and the smell of flowers around. Don’t be too sad when the winter comes and don’t be too happy when spring comes back. It is just a flow. Keep it in mind when somebody denies your application. Because the company is not so special that you need to be worried about the job.

Disclaimer

I am not a Zen monk. I am just practicing and learning. Please ask your local Zen monk if you feel there is something you need to understand deeper. Of course I can try to answer on this blog, but well, I am just a beginner. Anyway I am glad about your comment and if you would send a tweet with this pages url if you liked this post. Thanks for reading!

The Zen Programmer Book

Due to the high interest of this blog post I have decided to publish a book on Zen Programming. Click here for more information. If you want to stay up to date with the books progress, please subscribe to this mailinglist. Only Zen Programming news will be sent in irregular intervals. You can unsubscribe at any time.

News about The Zen Programmer:



Follow me on Twitter :-)

  • Pingback: The 10 rules of a Zen programmer « Sometimes I ponder

  • http://netzwerg.ch Rahel Lüthy

    Fantastic post, thank you!

  • http://www.grobmeier.de Christian Grobmeier

    @JLR: interesting question. With your hands tattooed you’ll definitely have drawbacks when looking for a job. Most people look for your clothes and if they can send you to a customer. With tattoos many people will think you cannot go to a customer. This is true for many people. If you work for a startup and if you are pretty skilled, people might tend to ignore your outfit and ask for your skills only. This might be true or not. There are many nitpickers out there. Anyway, you can’t know how your life will develop and who you’ll meet. Personally, if you are a nice, fresh guy with good ideas, I probably would employ you with tattoos (if I would have the money).

    There are some monks who refuse to shave their heads when they enter a convent. They say: why should we need to shave our heads? We can imagine very well how it is and we are here for Zen practice, not for outfit. The best answer I ever heard on this was: you can never know how it is to shave your head until you have shaved it.

    In your case, you’ll never know how it feels to be the tattooed guy without having tattoos. Just before you become an artwork yourself, ask why you want it. Because a “wish” is nothing which lasts forever. If you decide to do it, then you must prepare that you never regret your decision. You’ll wear this for all of your life and it will change you (people will communicate different to you – at least this will change you because you have different experiences). Never you should regret your decision – don’t stick with the past. Don’t be afraid for the future. Monks have no money, they will survive day by day asking people for food. There were even monks in bad times in Japan like in the WW-II.

    Just another inspiration: in Japan people wear tattoos too – in most cases they are tattooed in a way they can hide their body art with a t-shirt.

    As a last word: it is your life. Your life is now, not tomorrow and not yesterday. Just don’t overrate tattoos (-> There is nothing special)

  • Pingback: Sunday Selection 2012-02-12 « The ByteBaker

  • JR-Fire

    Thank you for this.

  • Pingback: Zen Mind, Beginner’s Mind – as applied to coding | Facticity

  • Pingback: Guest Post - Christian Grobmeier | AgileZen Project Management Blog

  • _lost_programmer

    Thank you.

    Your words cut me deep.

  • http://www.vladimirbujanovic.com Vladimir

    Really nice article. Thank you.

  • Jeremy McMillan

    Thanks! I have kanji for right concentration on my bulletin board as a reminder, and your article has breathed new life into it :)

  • Pingback: Artigo – The 10 rules of a Zen Programmer « Code Mundi

  • Miguel

    Excellent post. Congratulations.

  • Jeff

    Thanks for posting your thoughts. Thought provoking viewpoint.

  • Alexander

    wow, great post that makes my day.
    Greetings from México!!!!

  • http://www.opwernby.com Dan Sutton

    There’s something else, too: if you can’t hold the whole thing in your head, you’re thinking badly. That tiny little flag variable you use over there is just as important as that massive control loop you use over here. No piece of information is any more or less important than any other. If you start assigning importance to things, you’ll lose the model in your head: instead, view everything as having no importance and you’ll remember all of it.

  • http://www.grobmeier.de Christian Grobmeier

    @Dan Sutton: Interesting. I will think about it.

  • http://@acazsouza Acaz

    Awesome!!! I imagine these throughts in your head.

  • http://n/a Tami Henry

    Are you serious???? It’s okay to have an Entrepreneur spirit and work hard. Hard work is important. Having goals is important. This article/post places the emphasis on doing your own thing, your own way and in your own time … even at the expense of others. There is a total lack of consideration in this article; very self-centered even though it preaches against having an ego. So which is it? You are a dreamer? Or you are a doer? In my experience, the dreamers usually eat the doers leftovers.

  • LlamaStyle

    How about some zen concentration on proof reading? Mindfulness. Care. Awareness.

  • http://www.grobmeier.de Christian Grobmeier

    Even with proof reading my level of english is not good enough to provide post without spelling/grammar errors. If you would like to help me, I am open to your corrections. Btw the book will be corrected by a subject specialist.

  • Ken

    In 3. I like “Even if you copy software it is somehow different.”, because I’ve encountered this.
    I’ve got code to find answers. I’m finding duplicate answers. Don’t see how I’m getting answers. Set up a workaround to not add answers that are already found. That works. Review code. See nothing wrong. Put in write statements to a file to trace the logic. (No debug capability) Bug disappears. I’ve done this before and when I remove the writes, the bug reappears and eventually I find the bug.
    This time, remove the trace logic, correction logic, and code works perfectly. Just like I thought I had written it.
    I’m baffled, but my code works. Shake my head and move on.

  • Ashokkumar

    Very nice article.
    I will try to follow.

    Thanks,
    Ashok

  • Pingback: Las 10 reglas del trabajador Zen | Alpha's Manifesto

  • Pingback: Linkflood 20120301 – OpenData, Zen programmer e Android-x86 | Rainbowbreeze

  • http://www.grobmeier.de Christian Grobmeier

    @Tami: you seriously got something wrong. Of course it is OK to work hard (a day without food is a day without work). You can even have goals. What I mean with “there are no career goals” is, that you should not stick with them. Some work 60 hours a week to reach a goal in 10 years. They are suffering but say:”in 10 years my life will become better”. Unfortunately they might die in the 9th year and have missed their life. Your life is now, even when you work hard. Your goal should not control your life, when are dying then there is nothing more unimportant than that you have reached the role of a “product manager”. Anyway, you can reach your goals without sticking with them, taking them too important. Just do the best you can. But with awareness. Not with the pain of a goal hunter.

    Ego. If you don’t have an ego as a programmer, it is more likely that you help your co-workers when they are in trouble. It is more likely that you enjoy your life and that others like you.

    Own time: right. It is my time. Not yours. If my Son needs me because he is sick, I will help him. I will do this even when you (as my Boss) don’t make enough profit. My life is more important than everybody else code.

    In my experience my code and my customer service became LOTS better since I respect my body and mind. Customers say I am more nice and focused. I have learned that I am not a business machine but a human. Since then my business is more successful and I a feel better, because I do not waste my time.

    My coworkers have not told me that i have become egocentric. I help them where I can.

    Hope it clarifies things a bit. If you have more critics/questions please let me know (you can even write me an email if you prefer).

  • Pingback: Compilado de enlaces « programacion@droope

  • http://mikelopez.com Mike Lopez

    Nice article and definitely worth thinking about.

    As for #5 – There is no career goal, I wish to add something. I am in total agreement with the author on this but I think it needs a little more explanation so as to avoid confusion. In the end, I hope it will help the other readers.

    I think it is OK to have a career goal and work hard for it as long as you are happy doing it. After all, every hard work that points you towards the direction of achieving your goal is hard work that must be done and I personally will be very happy doing that hard work because it brings me one step closer to achieving my goal.

    Now, if you are unhappy with the hard work you are doing, then think about it. Perhaps you are not happy because it’s not directed towards your goal. Or perhaps, you have to rethink your goal. Is your goal so mundane and one that makes no sense in the end (i.e. making millions of dollars so I can be rich)? Or is your goal of greater importance (making millions of dollars so I can help my family, my community and my country)?

    Even Zen monks work hard as mentioned in this article and they are happy doing it, yes even cleaning the toilet, because it is directed towards their goal of achieving enlightenment.

    Cheers!

    - Mike

  • Pingback: 10 reglas zen de programador

  • kaka_ace

    thanks for your views that are sharing in the blog, i learn something from your views, “be a beginner :-)

  • Pingback: Reflections on the Zen Programmer blog post. « Grobmeier on Dart, Java, Struts, PHP and more

  • Joel Z.

    Thanks…

  • Angela

    Thank you, really

  • Pingback: 禅道程序员的10条原则 - 博客 - 伯乐在线

  • Pingback: 禅道程序员的10条原则 | web标准学习—小辉博客

  • Pingback: 伪技术博客 » Blog Archive » 禅道程序员的10条原则

  • Pingback: 禅道程序员的10条原则 « My Blog

  • soli

    I think you to say this
    《道德經》
    《易經·系傳》
    《大學》

  • Pingback: 禅道程序员的10条原则 | vicenteforever

  • Pingback: 禅道程序员的10条原则

  • Pingback: 禅道程序员的10条原则 | 水中雨

  • Pingback: 禅道程序员的10条原则 | Xohao's Blog

  • http://joseruzafa.es Jose

    Excellent post, I have wanted to leave the book :) I think it should be essential reading this post, as many programmers are introduced both at work, they neglect the other parts of your life that are equally or more important .

  • http://hi.baidu.com/kxn308/home KXN

    very nice.

  • Pingback: 禅道程序员的10条原则 | 蜗牛知识

  • Ryan

    I agree most of the points of this article, and even some of them help me get rid of blue mood recently.
    However, there’s one point I can hardly agree with: I don’t think it is responsible for a programmer leave his or her work at once when he or she feel unhappy or sick about it. Although it may seem free and easy, it is not a responsible behavior.

  • http://www.grobmeier.de Christian Grobmeier

    I didn’t say one should leave when he gets a boring task. I speak of “wrong loyality”. There is no need to burn out for anybody. There will always be boring days or days in which one is not happy. Being unhappy is part of life as being happy. You are never happy/unhappy for the whole time. But can always leave when the boss is doing things against ones ethics. There is no need give up (mental) health. There is no need to commit suicide because the job is to heavy (look at the despair in Foxconn). In fact, its in the responsibility of the company leaders to create a friendly, healthy and positive environment for the employees. In addition the company is responsible not only for profit, its also for the greater good. I refer to Atlassian, which looks like it is such a great company. People I have met from there would accept many boring jobs before they leave.

  • Pingback: 禅道程序员的10条原则 | Micro Blog

  • marcus

    thanks.

  • Pingback: 禅道程序员的10条原则 | 技术作坊

  • Pingback: 禅修程序员十诫 | Micro Blog