August 24, 2006

Software as Gardening

Last night I was relating to a fellow software developer the frustration I had been feeling over the last few days during the process of refactoring some code to facilitate fixing a bug. We discussed the inherent complexity of building software and how it is quite unlike a discipline such as civil engineering.

So this morning, as I was waiting for a train and reading the Refactoring section of the classic book "The Pragmatic Programmer" by Andy Hunt and Dave Thomas, it was as if a wave of empathy poured from the following passage:

"Unfortunately, the most common metaphor for software development is building construction...

Well, software doesn't quite work that way. Rather than construction, software is more like gardening - it is more organic than concrete. You plant many things in a garden according to an initial plan and conditions. Some thrive, others are destined to end up as compost. You may move plantings relative to each other to take advantage of the interplay of light and shadow, wind and rain. Overgrown plants get split or pruned, and colors that clash may get moved to more aesthetically pleasing locations. You pull weeds, and you fertilize plantings that are in need of some extra help. You constantly monitor the health of the garden, and make adjustments (to the soil, the plants, the layout) as needed.

Business people are comfortable with the metaphor of building construction: it is more scientific than gardening, it's repeatable, there's a rigid reporting hierarchy for management, and so on. But we're not building skyscrapers - we aren't as constrained by the boundaries of physics and the real world.

The gardening metaphor is much closer to the realities of software development. Perhaps a certain routine has grown too large, or is trying to accomplish too much - it needs to be split into two. Things that don't work out as planned need to be weeded or pruned."

It's a very apt metaphor, and one which I'll take with me as I return to my refactoring task today. I think I've finished the splitting and pruning; hopefully it's now just a case of checking the soil and pulling out a few remaining weeds.

Posted to Software Development by Keith Pitty
Comments

I have always found that the key is not to get too focused on one specific area before you have a good view of the whole plan (interruptions for additions accepted (begrudgingly))

Posted by: steve at June 15, 2007 12:28 AM
Post a comment









Remember personal info?