Thursday, May 27, 2010

Zen and the Art of Computer Programming

Asymmetrical Structure in Tension
Asymmetrical Structure in Tension, Berlin, 2010

I work in software development. I'm in a pretty intensive phase right now, working on a whole bunch of new stuff. It messes with my head, not unlike computer games. 

Working with computers is, in a way, the antithesis of Buddhism. While Buddhism is all anatta and sunyatta and paticca-samuppada, computers live in a crystalline world of precise definitions and hard edges. Even the flaws in the crystals almost always turn out to be precise, reproducible, quantifiable, and understandable. Something only exists if it's defined somewhere, right down to the last bit that gets flipped somewhere deep in the bowels of the nested abstractions that I'm working with. Conditions are either true, false, or null. Loops run their course and terminate. Recursive structures walk lattices of logic and either emerge with whatever they were designed to do, or hit bottom. Even the unpredicted, unthought-of situations resolve themselves, as error messages, halts, or occasionally more spectacular misbehaviors. There are no fuzzy edges; everything that exists has a precise, permanent, hard-edged identity. No question of anatta here!

Developing software puts me into compulsive mode. The design problems of constructing those castles of logic don't leave me alone. There are insights into what needs to be done, and insights into how it should be done, and the one feeds into the other. It's alluring and addictive, and tiring, and very hard to let drop. It also gradually wears me down; it sharpens my mind into a hard point where everything else becomes an irritating distraction; it interferes with my sleep patterns; it makes me difficult to be around.

Zen helps. It's almost a lifeline. When I'm sitting, those lattices of logic still spin around and nag at me; my mind is even busier and buzzier than usual, and I don't think I'm actually going anywhere much with my sitting, if indeed there is anywhere to go. When I finish, I feel a little better and more peaceful. 

Zen also helps with the frustration of just not being able to get some stupidly simple thing to work. I still curse at the computer under my breath and sometimes even out loud, but I haven't yet gotten near the kind of screaming, powerless rage of frustration I've sometimes had before with especially stubborn problems. I recognize the frustration and can, perhaps, let it drop a little, or at least not invite it in for tea. 

What I'd like, though, is to find a way to actually practice Zen while programming. It's relatively easy to do that, at least a little, when doing stuff like cooking or cleaning or cycling or walking the dog or even sitting in a meeting, but I haven't found a way to do it when having to engage my discriminating mind full-on with a software design problem. Software and sunyatta don't mix, at least not easily. Maybe some day...

No comments:

Post a Comment