Thursday, April 20, 2006

Zen and the Art of Software Development

I first read Zen and the Art of Motorcycle Maintenance, by Robert M. Pirsig, almost twenty years ago, before I got involved with computers. I just finished re-reading it and found new relevance to the Art of software development.

While Pirsig weaves together many themes, one thesis is that we do not exist in a dualistic world of mind and matter or subjects and objects. Rather, there is a third entity, Quality, that is independent of the others.

We recognize Quality when we see it, but we cannot define it. We can only describe attributes of subjects or objects that provide evidence that Quality was present during the creation process.

Gumption is the glue that connects one with Quality and ensures that the objects that we create manifest our connection to Quality:

Gumption is the psychic gasoline that keeps the whole thing going. If you haven’t got it, there’s no way the motorcycle can possibly be fixed. But if you have got it and know how to keep it, there’s absolutely no way in this whole world that motorcycle can keep from getting fixed.

So what do Quality and gumption have to do with software development? Without them, you can't build great software. The trick is to start with plenty of gumption and control for everything that tries to take it away.

A gumption trap... can be defined as anything that causes one to lose sight of Quality, and thus lose one's enthusiasm for what one is doing.

Pirsig goes on to elaborate on several, common gumption traps, which he classifies into setbacks and hang-ups. I'll paraphrase and elaborate to connect Pirsig's examples from motorcycles to the computer world.

Setbacks consist of careless mistakes, intermittent failures, and parts problems. Anyone who has been around software for a while has deleted a critical file on a production system or broken a piece of code that used to work. Those are careless mistakes. Troubleshooting mysterious problems that do not appear to fit any pattern is also common. Integrating third-party components that are too expensive, aren't compatible with the rest of the system, and/or don't work as advertised is par for the course.

Hang-ups can be further broken down into value traps, truth traps, and muscle traps. Value traps consist of rigidity, ego, anxiety, boredom, and impatience. Truth traps basically involve being trapped in dualistic yes/no logic, and not being able to see the value outside of clear yes/no answers. Muscle traps consist of inadequate tools, bad surroundings, and something Pirsig calls "muscular insensitivity."

I had some trouble mapping muscular insensitivity to the software world, where there are no threads to strip and finely machined surfaces to damage. I liken muscular insensitivity to understanding the subtle characteristics of a system and its sensitivity to changes.

The software world talks about things like process, methodology, and best practice as ways of ensuring quality deliverables. These are really tools to help keep you from loosing gumption, and therefore help you from loosing sight of Quality. However, if you don't have sight of Quality in the first place, all of the processes and best practices in the World won't help produce great software.

No comments: