Blog > Layers of Abstraction

Layers of Abstraction

Things are becoming easier and easier

684 words, ~ 3 min read


A lot of software that we use is abstraction layers that make things easier to work with.

Table of Contents

What is an abstraction layer?

I write my posts as markdown files in VS Code. Recently, I renewed my GitHub student pack so I get to use GitHub Copilot. Given the first sentence, as I was hitting enter, this is what Copilot suggested as the post:

## What is an abstraction layer?

An abstraction layer is a layer of abstraction that makes things easier to work with.

## Why do we need abstraction layers?

Abstraction layers are needed because they make things easier to work with.

## How do we use abstraction layers?

Abstraction layers are used to make things easier to work with.

## Conclusion

Abstraction layers are a great way to make things easier to work with.

This isn't that bad, but it's just the first sentence reworded in different ways. It is the rough idea, however. An abstraction layer is a black box where you don't need to know how something works; you have an interface that does the underlying things for you.

In programming, this is often implemented with code. Various data structures, such as Java's LinkedList, or Python's Dictionary (in reality a HashMap) are abstraction layers. Without understanding how any of these work, it's possible to use them.

Extension of Abstraction

My point in this post is simple: everything is abstraction.

Microsoft Excel is an abstraction over a database. It stores a lot of data, allows writing equations to generate new data given old data, and persists over time. It's a powerful tool that can run businesses, yet it too uses more abstractions.

The barebones processing unit within whatever device you read this on has components that are each abstracted from the underlying transistors into gates into registers and arithmetic logic units. Low level languages like Assembly take instructions and process them into binary instructions to be decoded. C, even though it's considered a low level language, is in many ways still a high-level language that abstracts away the underlying machine code. There's variables, loops, all this great stuff that only makes sense a few layers above the bare metal.

This concept spirals quickly from here. There's high-level programming languages like Java and Python, which abstract away the underlying memory management and garbage collection. There's frameworks like React and Vue that abstract away the underlying DOM manipulation. There's libraries like jQuery that abstract away the underlying JavaScript. There's even more libraries that abstract away the underlying CSS.

Generative AI provides a new interface for abstraction: language. Now, one can describe what they would like in a system and are able to unlock the underlying power of the system.

Website builders are another example of abstraction. They abstract away the underlying HTML, CSS, and JavaScript. They provide a new interface for abstraction: a GUI. Now, one can drag and drop elements and change the text and images to create a website. Even websites themselves are abstractions! They show us information and allow us to interact with underlying services in simple ways to get more things done;an interface for the internet.

The Limit of Abstraction

Abstraction is a good thing. We're able to make new software and progress at an unprecedented rate compared to being restricted to binary machine instructions. Now that we've hit the English language as the new interface for abstraction, there are two things to consider:

  1. What else is there to abstract?
  2. What are the remaining barriers?

The biggest barrier remains the planning to deal with problems. It's been the core problem of software at scale; it's why there's such an emphasis placed on the way by which we build systems. However, this seems to be an intrinsic part of what it means to build software. The only thing to abstract that would get rid of this problem is removing the human from having to design and to have an abstraction design for that. But is that even possible? If it were, at that point, are we even needed anymore?

Found this interesting? Subscribe to get email updates for new posts.

Return to Blog