Programmers as gardeners

raulvillares

Raúl Villares

Posted on June 27, 2017

Programmers as gardeners

Some time ago I read an interesting article by musician Brian Eno titled “Composers as Gardeners”.

The basic idea of ​​Eno is to rethink to way to compose music, going from a process in which the composer designs all the details of the piece in advance, to one in which she gives a small initial boost and let the music evolve by its own. In Eno’s own words:

[…] I had assumed that music was produced, or created in the way that you imagine symphony composers make music, which is by having a complete idea in their head in very detail and then somehow writing out ways by which other people could reproduce that. In the same way as one imagines an architect working. You know, designing the building, in all its details, and then having that constructed. […] a new paradigm of composing. Changing the idea of the composer from somebody who stood at the top of a process and dictated precisely how it was carried out, to somebody who stood at the bottom of a process who carefully planted some rather well-selected seeds, hopefully, and watched them turn into something.

This idea stuck in my head and now that I’m practicing Test Driven Development, it has returned to the foreground to point out to me that this programming technique fits Eno’s philosophy.

Architects

When we code the unit tests after the main program (if they are coded at all) we are like the composer stood at the top of the process. This position forces us to have a global and precise vision of what we want to build. This idea (inherited from the infamous attempt to resemble the development of software to other engineerings) is unrealistic and ends up generating convoluted, rigid and fragile systems.

Gardeners

However, if we follow the TDD, we become that gardener who plants the seeds and observes the growth of them, watering or fertilizing when necessary.

We only create a class when some test asks for it (compilation error), we only codify a method when it is necessary to pass a test that had previously failed.
The production code (of which before we started we only had a general idea) emerges test by test like the shoots of a plant. And the design is the most natural and organic, since it has arisen from what the system demands at any moment.

Other people have found the metaphor between gardening and software development to be convenient:

So I’m going to try to be more and more like a gardener and not an architect. As Eno himself says, they are at least equal in dignity.

P.S: This article has been written listening to Discreet Music continuously.

💖 💪 🙅 🚩
raulvillares
Raúl Villares

Posted on June 27, 2017

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Programmers as gardeners
tdd Programmers as gardeners

June 27, 2017