The Ten Rules of a Zen Programmer

By Christian Grobmeier

Source

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 won’t become faster or better, you’ll just spread yourself too thin. If you work too much you’ll become exhausted, make more errors and lose time jumping from one task to another. This is not only about programming; this is a general tip.

Kôdô Sawaki says: if you need to sleep, sleep. Don’t plan your software when you are trying to sleep. Just sleep. If you code, code. Don’t daydream—code. If you are so tired that you cannot program, sleep. Even known multitaskers like Stephan Uhrenbacher have decided to work singlethreaded. I had a similar experience to Stephan, when I finally wrote Time & Bill, a time tracking tool. My goal was to track my time so easily that I could do it even for small tasks like a phone call. Now I can create a few stopwatches at the beginning of the day and track my time with only one click. In the beginning it 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 a great new game in the Appstore.

Keep Your Mind Clear

Before you work on your software, you need to clean up your mind. Throw away everything in your mind for the time being. If you have trouble with something, don’t let it influence you. In most cases that trouble will go away. If the trouble is so much that you can’t let it go, don’t work. Try to clean things up. But when you start working, let the outer world melt away.

Something exciting on the mailing list? Leave it there. You can follow the exciting stuff later. Shutdown what fills your mind with shit: close Twitter, Facebook, your emails. You should even mute your phone and leave it in your pocket. You could say it is similar to item 1, focus. But there is one more restriction: don’t use these tools before work or at lunch. They connect you with the outer world and bring up some new trouble or things which require you attention.

Think like this: at most times your mind is pretty clear when you wake up at the morning. If it is not, doing 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. Don’t think it just takes a minute. It doesn’t.

You know it’s true.

Beginner’s Mind

Remember the days when you were a beginner or if you are still a beginner, hold on to that feeling. You have never learned enough. If you are already an expert, think of yourself as though you were a beginner every day. Always try to see technologies from a beginner’s mind. You can accept corrections to your software better and leave the standard path if you need to more easily. There are some good ideas even from people who don’t have your experience. Was there ever a software built twice the same way? Even if you copy software it is somehow different.

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 your quality as programmer? You? No. Others? Probably. But can you really compare apples and bananas? No. You are an individual. You cannot compare your whole self with another human being. You can only compare a few facets.

A skill is nothing you can be proud of. You are good at Java? Cool. Someone else is not as good as you, but better at bowling. Is Java more important than bowling? It depends on the situation. You probably 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 that you are a geek? Programmers with ego don’t learn. Learn from everybody, from the experienced and from the noobs at the same time.

Kôdô Sawaki once said: “You are not important.”

Think about it.

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 twenty years to become the partner of a company? Why aren’t you working as hard as possible just because it is fun? Hard work can be fun. “A day without work is a day without food” is a Zen saying.

There is no need to start being happy after twenty years. You can be happy right now, even if you aren’t a partner or don’t drive a Porsche. Things change too easily. You can get sick. You can get fired. You can burn out (if you follow all these items I guess the likeliness is low).

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

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

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

When you have no career goal, going away is easy.

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. Every day you work you need to try not to get on someone else’s 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 only for the things you can talk about. 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.

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. You are living only for yourself. You live alone and you’ll die alone. The world goes on even without you.

Avoid working in 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. Do you think people only work for free in theory? Consider the people doing Open Source in their free time. If you have subscribed to some project’s mailing list you probably know what conflict there is (sometimes). If you don’t have fun with it, 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 tracked the time I spent in Open Source projects and was surprised how much time I lost there—especially on projects I didn’t like so much.

Keeping this in mind, some people think they are only happy when they have free 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 every moment in your life is “fun”. If you can avoid situations you don’t like, avoid them. But sometimes there is need to do something really shitty. For example, manually copy/pasting stuff from your manager’s Excel spreadsheet 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 get a boring task. Zen Monks do not shy from their work either. They get up at 3am (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 muster. Whatever they do, they do it without suffering and they are (or should be) happy, because every second, even the moments where they are cleaning toilets, is a second of their life.

That being said: stop whining 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 was a hard worker—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, 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”. You are probably better off 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.

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 over you. It can even be doubted that you have control over you—but don’t 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? Worst case scenario he will fire you. So what? If you live in Western nations and if you are a coder (which is very likely if you are reading this) you’ll get another job.

I don’t mean say “No” to tasks like copying CSV Data to HTML. I am speaking of eighty-hour weeks and feeling your body break down. Or feeling that your kids 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”.

Do Something Else

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

There Is Nothing Special

A flower is beauty. But it’s just a beautiful flower—nothing more. There is nothing special about it. You are a human who can program. Maybe you are good. There is nothing special about you. You are of the same stuff as I am and all the others on this planet.

You need to go to the toilet 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 built them? If you do, is it important that you know? It’s not. Pyramids are there, or they aren’t. Nothing special.

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

If your company 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 poverty. They don’t care for 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 a Western country? Because you can code? No, there is nothing special about it. You can let go of your ego and live freely. Enjoy the colors and the smell of flowers. Don’t be too sad when the winter arrives 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 no company is so special that you need to be worried about the job.