Metaphors for Programming: Gardening or Architecture

Roel M. Hogervorst


Categories: blog Tags: 100DaysToOffload programming mlops

I’ve been going over some notes/highlights I took over the years. Because just saving them is ridiculous, but that is what I did. I ’ve learned1 you need to connect quotes to topics, to things you want to write about.

Anyways, in 2016(!) I highlighted this

The Pragmatic Programmer: From Journeyman to Master (Andrew Hunt and David Thomas)

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. Rewriting, reworking, and re-architecting code is collectively known as refactoring.

Makes me think about gardening as metaphor for many things: maintaining your personal knowledge system. But gardening as metaphor for programming is absolutely right! It is about maintaining stuff.

In machine learning operations it is just the same. If you build a recommendation system that works just fine, you need to maintain it by updating the frameworks / python versions, by incorporating new features by depreciating features that no longer are available etc.

A few pages further (p240):

You might want to explain this principle to the boss by using a medical analogy: think of the code that needs refactoring as a “growth.” Removing it requires invasive surgery. You can go in now, and take it out while it is still small. Or, you could wait while it grows and spreads—but removing it then will be both more expensive and more dangerous. Wait even longer, and you may lose the patient entirely.

Slighty related, this page <> has example (class) names for programming to help you choose names. it also has nature and architecture names.

I’m publishing this as part of 100 Days To Offload. You can join in yourself by visiting, post - 21/100

Find other posts tagged #100DaysToOffload here

  1. connecting notes and rewriting in your own words with the aim of creating new prose is part of the zettelkasten or slipbox method. ↩︎