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: Zen Programming: The Path Of Ruin « Grobmeier on Dart, Java, Struts, PHP and more

  • Pingback: 30 dni do opanowania zen programowania | log-this

  • Pingback: 禅道程序员的10条原则 | 倩碧的黄油

  • Pingback: 5 ways how a recruiter can piss me off | Grobmeier on Dart, Java, Struts, PHP and more

  • http://java67.blogspot.jp Java Geek

    One rule for some programmers are no rule :)

  • http://java67.blogspot.jp Rajiv

    Great points, very inspirational thanks for sharing knowledge.

  • Alessandro

    Beautiful post. Applicable to so many non-programming jobs!

  • Alessandro

    Beautiful post. Full of advice programmers and non-programmers should take alike.

  • ColinDNZ

    amazon.co.uk/What-Buddha-Taught-Walpola-Rahula/dp/1851681426
    I recommend this book for some more serious study. enjoy

  • Pingback: 10 принципов дзен-программиста | Айтисофия.рф

  • Pingback: Verimli çalışma – Programcıya 10 Öğüt | Ara , Bul

  • http://www.facebook.com/anthony.ruffino.56 Anthony Ruffino

    Your ‘legacy’? This last phrase took away from your argument quite a bit as it is an obvious non-starter. I do not think you really read this article with much care if you did not realize that legacy means nothing to the person whose article you are critiquing.

    In any case, if multi-tasking provides your brain with the variety needed to be able to preform tasks with-out burning out, then by all means, multi-task. If you are asserting that multi-tasking enables you to be able to preform tasks more accurately or more efficiently, then this is good for you and probably not the normal outcome of most humans. I would guess that you are actually asserting the ‘variety’ argument and as long as your work is accurate then this is great. If you do not care for efficiency and have no need to, then you are lucky and I congratulate you. If you do not care for accuracy, then you may be in the wrong line of work, although artistic and flawed video games may find a following.

    As for legacy, I came across this post by looking up people who are involved with the JSR. Mr. Grobmeier was highly regarded as a talented asset to the Java community.

  • Rahul Banyal

    great post

  • IronOwl

    Don’t ask zen monk because he is beginner also! We should all feel as beginner if I understood right (and I like this perspective).

  • blubber

    Great! Thanks :-)

  • grobmeier

    Definitely the right approach, I would say. Its a matter of perspective. If you think you are a beginner its great. If I think you are somebody I can learn from, it is a different thing.

  • Rafael

    I agree with points 1,5 and 6. I don’t agree with the rest. I guess I’m no “Zen Programmer” then but that’s ok.

  • HX

    I WANT THIS BOOK!

  • brad clawsie

    and here are the rules zen programmer’s MANAGER followed:

    1. fake it ’til you make it
    2. confidence > skill

    etc…remember you work in a corporation, not a monastery

  • grobmeier

    Life > Corporation. I can still give 100% at my company while I have 100% of my life with this approach. I am even better in my performance than ever before.

  • grobmeier

    It’s OK. :-) Thanks for reading and giving me your thoughts!

  • Manindra Moharana

    Really nice post! :-)

  • Marius Kubilius

    The excel copy pasting made me laugh :) why not just export to CSV and write a simple script to parse it into MySQL. When faced with problem try to solve it in most efficient way. Do not be yet another zombie in cubicle.

    And the hardest thing for me is to start doing things.

  • grobmeier

    It is just an example. Replace it with: “a freaking boring task which you cannot escape from”. Of course there are technical solutions. But the point is: sometimes you just need to do something boring or pointless. If that is the case, simply do it. No complaining

    I know what you mean with “start doing things”. I solve this by not thinking about the start itself; i always think as I would already be in the middle of something. If I start a new book, my feeling is: I thought about it a lot, its already 20% of the task. I already started.

  • brad clawsie

    right, but my point is that your organization may not be best served by pointless and irrational levels of (false) modesty. zen coder cannot share the value of his wisdom with others until he is ready to accept that he actually has some.

  • IgnoranceMustBeBliss

    You’re against nuclear power? You know coal power puts off more radioactivity and 1000x more waste…

  • grobmeier

    Are you referring to “Shut up”? How can you know what wisdom is and if you “have it”? The point is, think twice, before talking. Make contributions, instead of noise.

  • grobmeier

    In Germany we have the radioactive waste for 30 years and do not know what to do with it. There is simply no place to store them for the next 30.000 years. The kids of my kids of my kids will still deal with the problem. If something like in Fukushima happens (how likely was that event?) a lot of people have to sacrifice their lives. Even now there is radioactivity going unfiltered to the ocean. I agree, Coal is very bad too. Lucky there are other options. Portugal is based on 75% green energy. I believe with new technologies also come new business opportunities and jobs.

  • grobmeier

    Thank you. And yes, I fully agree with introspection and meditation.

  • SSK

    Really Nice Post :)

  • http://twitter.com/yyazlovytskyy Yuriy Yazlovytskyy

    Great. Thank you!

  • http://www.facebook.com/oleksandr.khlon Oleksandr Khlon

    Thank you for such a good post and philosophical approach!It was really interesting!

  • http://attackoftheandroids.com/ Mat Lee

    Great stuff. Things most of us feel but never put into words or fully realized.

  • http://twitter.com/SkilliPedia SkilliPedia

    I Sensei: -:)

  • Craig Sander

    Good stuff!

  • Alex Bonel

    Actually (for me at least), this article is not so about how to become more productive in your craft rather than how to see what is really matter. As a convinced orthodox christian I really excited that I’ve seen a lot of ideas in this post gotten from Zen which are intersect with the religion which I profess. I think that the main problem of nowadays world is that people are so addicted to things which are called “goods” that they don’t even think or forget that these things are not eternal and not so good as they are called.

  • grobmeier

    I agree. FWIW, I know a christ priest (catholic) who became Zen priests too. There is no conflict actually, as Buddhism is a religion without god. Also many values are the same as in Christdom, for example kindness and honesty. In Zen we are not asked to believe there is a God who will safe us; but it doesn’t prevent you from believing so and practice Zen at the same time. Please note, that meditation is also practiced in christ monasteries (I believe it’s called contemplation there). As you mentioned, it is about seeing the things as they are: objects in time, which will pass.

  • Trung