One of the first advanced concepts taught to people learning to code is abstraction, practicing taking logic and hiding it. Object-oriented programming articles and books frequently will encourage the reader to take logic and complexity and build simpler APIs around it. Abstracting and encapsulating that logic helps us offload cognitive burden and allows us to focus on other aspects of the program. Abstraction is useful. Abstraction is good.

Abstraction can only hide complexity for so long.

In my weekly conversation with Robert we were discussing potential solutions to some ungainly APIs. In the discussion of the design I found myself in a familiar predicament: maybe this API could work if we just found the right abstraction. The reason this concept is so difficult is because we have not found the right model, we must discover the correct abstraction and then this will all be easier!

Programming as an act of anamnesis

The concept posits the claim that learning involves the act of rediscovering knowledge from within oneself.

The delta-rs has a number of examples of this pathology. Multiple attempts by different people, myself included. All searching for ways to make a complex thing simpler.

Ultimately abstraction cannot hide complexity.

Hard things are sometimes just hard. Many abstractions are potemkin barely hiding the truths beneath, but in a complex system these characteristics simply cannot be hidden. Think of the simple Request and Response classes in any language for interacting with HTTP services. There’s HTTP 1.0/1.1/2.0 to consider, keepalives, compression, cookies, redirects, state, all manner of things that creep in from one direction or the other.

Kyle Kingsbury and his Jepsen work is a repeated reminder about the faults in our abstractions and consistent attempts to hide the complexities behind a Transaction or a Write or just about anything in a distributed system.

Abstractions are useful but they are never reality. They are instead images on the cave walls.

There is no one true abstraction waiting to be found. It simply does not exist. The entirety of the technology stack is filled with useful but ultimately fictional interpretations of reality.

One of our challenges as software developers is knowing when to accept the abstraction..

Sometimes complex things are simply complex.