# Good Abstractions Have Fewer Leaks

DevFeed: [Good Abstractions Have Fewer Leaks](<https://devfeed.tech/articles/good-abstractions-have-fewer-leaks-24940.md>)

Original publisher: [Read original article](<https://codeahoy.com/2016/05/06/good-abstractions-have-fewer-leaks/>)

Author: umer

Published: 2016-05-06T00:00:00Z

Content type: opinion

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Java](<https://devfeed.tech/topics/java.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Low Latency](<https://devfeed.tech/topics/low-latency.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [java](<https://devfeed.tech/tags/java.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

The article explains that software abstractions hide complexity through interfaces, frameworks, libraries, filesystems, and programming languages, but non-trivial abstractions inevitably leak underlying details. It uses Java garbage collection as an example: understanding the collector may be necessary to diagnose slow requests and optimize high-throughput, low-latency applications.

## Source excerpt

Abstraction is one of the greatest visionary tools ever invented by human beings to imagine, decipher, and depict the world. - Jerry Saltz Abstraction are all around us. We abstract things to hide details making it easier to see the "big picture" and help cope with the complexity. When I push down on the gas pedal, a lot of magic happens under the hood to move my car. But I don't have to know any of that. I only ever need to know that pushing on the pedal increases the speed and releasing it will decrease it. The gas pedal is a simple interface and that's what makes it so great. It has been with us for a very long time and it's here to stay. In software, like any other engineering discipline, abstractions are everywhere: the protocols, the frameworks, the libraries, the game engines, the file systems, even the programming languages we use everyday are abstractions of low-level languages. It can be argued that everything in computer science is inevitably an abstraction of something more complicated under the hood. The higher-level abstractions provide useful functionality in the form of a black-box, hiding all the complexity and implementation details. Except that it's not always so black and white. Software abstractions are never perfect and, arguably, are far from perfect. Abstractions are deficient when you have to understand the low-level details or peek under the covers to understand what's going. Consider Java's garbage collection process. It would have been great if I never had to think about how it works - after all, it was supposed to work like magic. But in reality, when a bug was reported that "requests are taking a lot longer to process", I had to go in and figure out that the garbage collection was slowing things down. One cannot optimize performance and avoid penalties without learning how the garbage collector works (at least not for high-throughput, low-latency applications). Joel Spolsky called this the law of leaky abstractions: All non-trivial abst