DEV Community

cartmann68
cartmann68

Posted on

Why abstractions are good

Have you noticed how our world is built on abstractions? Abstractions are everywhere. We have abstractions in code - one library depends on another library which depends on another and so on. But it's not just code. We use abstractions every day. Every time you plug something into a wall outlet - you are using an abstraction, a huge electrical infrastructure with its own abstractions, completely invisible and hidden from you. When you drive your car, you don't operate with gears and wires, instead you turn a key, push a button, turn the steering wheel. You don't care how it works - you don't even want to know how it works. You're using abstractions to get where you need to go.

A World without abstractions and dependencies

Imagine a world without abstractions. Let's say you wanted to build a house. You'd need tools and materials but if you couldn't rely on abstractions and depend on the work of others, you would need to create all the tools and materials yourself. Just think of how much work goes into making something as simple as cement. You need limestone, clay, sand, and gypsum. But in order to get those things you need quarries, explosives, heavy machinery, fuel, trained operators, safety systems, transportation. And each of those depends on even more things. It's almost an infinite chain of dependencies.

If you were building a house without using any dependencies, you'd need to create your own tools. Think of how many things are involved in making a power drill - motor, a chuck, a trigger, a shell. A motor needs magnets. Those magnets alone require an entire industry: mining rare earth metals, crushing ore, separating the elements through complex chemical processes, sintering them at high temperatures, machining them, coating them so they don’t corrode.

In software development, a function relies on a library, that library relies on other libraries, all of it runs inside an environment, which depends on system libraries, which itself sits on top of an operating system, which depends on hardware, which ultimately depends on silicon and the physical world underneath it.

The real world depends on abstractions, an almost infinite supply chain of dependencies. And that’s the whole point: none of us could ever build anything meaningful alone. We stand on top of the work of millions of people we’ll never meet, quietly building layer after layer so the world feels simple on the surface. Abstractions are what let us make progress. They let us create without having to reinvent the entire universe first.

Once you see that, you start appreciating the hidden scaffolding underneath everything — and you realize how impossible life would be without it.

Top comments (0)