Skip to main content

Gardening, Weeds, and Code

· 3 min read
Wes
Man of Mission

;

Imagine walking out on a warm, sunny morning, the rays of the sun reflecting back to you the beautiful view of a well kept garden. Days, no.. weeks, have been spent toiling atop the ground in hopes that efforts are rewarded with the pleasant display of new life taking root and reflecting back beauty. As you traverse your well planned, cultivated space, you reach another section - a place disregarded, untilled and left alone, as bare earth.

It hasn't been on your mind to tend to this area, it has seen no love or effort put forth recently. There have been some green things growing, yet as this area is of little interest, not much attention has been paid to its existence. And then, not long after as your ventures bring you here again, a sudden shock travels through your body, as your eyes see a towering weed reaching 10 feet into the sky. This weed was not planted, never watered, never tended to or given love. And yet it came to be, and not just that - but as one of the largest growing things in your cultivated garden of zen.

This was my experience walking through my patio this morning. It's impressive how large this plant has become, with how little attention it ever received. If only my tomatoes could perform this well. My mind began asking: what is a weed? Where do they come from? And why must they intimidate my other plants so much?

We can probably agree that a weed is somewhat unusual in the sense that it can appear out of nowhere with seemingly little effort, spread as quickly and prominently as a virus, and works against our sincerest efforts in maintaining a particular landscape. Naturally, it made sense to connect this to working with software.

Anyone who has spent time developing software can appreciate that at a certain point, a codebase can become a living organism. We even seek to personify our code, assigning mythical names to particular parts of it and cultivating certain behavior from it. Long hours spent toiling in the dirty, messy, and dark lines of code in hopes that, if well loved, it will reward our efforts with many pleasant results. If our codebase is our garden, then what would a weed be?

Well, drawing from our largely semantic analysis earlier, I think we can identify three specific traits it should have. Something that is birthed without much intention. Something that has the potential to spread. And lastly, something that can cause harm to our ideal environment. What examples in your codebase come to mind?