Coda: Learning From Structures Around Us

An Observation on Software Engineering From Our Environment

Doug Arcuri
HackerNoon.com
Published in
3 min readDec 4, 2018

--

A tree in the neighborhood.

Trees in my neighborhood seem to grow unnaturally. They appear as sick twisted living creatures. The reason for their ugliness is related to their proximity to electric utility lines. Their closeness is familiar in the northeast of the United States, where trees exist in the right-of-way, and extreme weather patterns are present.

Utility lines are at risk of falling tree limbs because they are vulnerable strung pole to pole. The result is the energy company must prune trees to precise distance specifications. Pruning reduces the risk of branches touching these wires and allows for repair access. When the weather is uncooperative, pruning keeps the lines protected. Yet, the result is ugly looking unbalanced trees.

The Science of Trees

In computer science, we use metaphors. The science is abstract, and construction is virtual. Most development, if we even call it this, cannot be seen or touched. Regardless, we need to communicate what we see based on our world. We have to describe what is efficient. We have to talk about maxima and minima, time, and space.

A binary search tree.

Searching for data is fundamental to our science. To do so, we organize the data with the structure. A tree is an abstract data type. It looks like a living tree, but upside down, as the root is at the top. We use trees to structure data so that it can be sorted and searched efficiently. Trees take on types, and flavors like real trees do.

An unbalanced tree is a metaphor to describe an unwanted structure. The structure is not optimal for searching the data it contains. Unbalanced trees are naively grown and trimmed. They begin to slow us down due to their unchecked height. They become too high on one side.

How To Balance an Unbalanced Tree

In saving customers from service interruption, power utility authorities trim left or right. They cut where the risk is significant. The result is unhealthy trees that are unsightly. They think that the tree is performing its function, but instead, it is sick trying to survive.

Courtesy: Google

There are ways to save the sick tree programmatically as it grows. Depending on the tree, we can transverse, rotate left, rotate right, or double rotate. We attempt to balance the tree so that it’s healthy. Its structure becomes more compact, more beautiful, and elegant than its current shape.

If the unbalanced tree has enough space in front of it, there is a way to solve their blight at the root. We cut down and start over. We grow the new tree intelligently on the next pass.

Learning Cues are Around Us Waiting for Leverage

The mutilation of trees to make way for utility lines invokes conflict. An abstraction of this observation would suggest that community and technology are in contention. If either is grown improperly, there is difficulty in remedying because both are supportive of one another.

Courtesy: Google

The beauty of computer science is we can invent and grow structures based on our physical observations. Ancient tree pruning techniques such as Topping or more modern technologies such as Drop-Crotching may apply to computer science. Utility lines that are strung or laid may also have their analog. How they work together may be of interest to research.

The message is to look around outside to learn and apply what we observe, virtually. Question if it could be a chance to translate a structure or system into leverage for beauty and efficiency. If we embrace the problem, there is a chance for an opportunity for structural invention.

--

--

Doug Arcuri
HackerNoon.com

New York // Writings that aim to be timeless, explore the human meta, and invoke thought. // Now, toys too. // Also see https://dev.to/solidi