Settings

Theme

Increasing abstraction is directly proportional to decreasing software quality

2 points by aligajani 9 years ago · 8 comments · 1 min read


It is my observation that if you use a shit ton of abstractions, wrapper libraries, frameworks, so on, your software gets crappier. This is from experience, too. Whereas, if you build something from scratch, that is, reduce reliance on abstractions, the software quality in the long run is more stable. Thoughts?

pattrn 9 years ago

The best code I've seen uses abstractions to decouple itself from the libraries and frameworks it uses. I don't see any references to libraries or frameworks within the codebase, except in thin layers at the outskirts.

The worst code I've seen uses 1,000 frameworks and libraries without abstracting its communication with them. It calls their API's directly, inherits from their classes, and passes their domain objects to its own API's.

Abstractions should reduce complexity, making code more robust and simpler to understand. It doesn't always work out that way, especially when abstractions have poor names, but it can. If abstractions truly decreased productivity, then machine-code programmers would blow everyone else away with their speed and efficiency.

P.S. I have a deep respect for machine-code programmers.

bjourne 9 years ago

True, but within reason. For example, if you program in Javascript, you either build your own shitty DOM-library or you rely on a solid one like jQuery.

In general I would say your claim is much more true than it is false because a piece of software with too many abstraction layers and wrappers is orders of magnitudes harder to fix than one which doesn't have enough of them.

mailslot 9 years ago

You might have seen some very bad abstractions. In my experience, they almost always make code more flexible, if designed & implemented sanely. My $0.02.

  • aligajaniOP 9 years ago

    Yes, this was my observation, but I see a pattern with the modern engineering workflow. It's convoluted. What could be done with basic npm scripts is now Webpack, so another abstraction that the beginners have to smash their head against, all in the pursuit of making a basic todo app. Not lying, I use these tools myself, but I try to survey a technology before using it. I ask myself the questions a) is it stable, by looking at any major GH issues and b) can I do it better natively and do away with using a library.

ekvintroj 9 years ago

<sarcasm> Sure, that's why OOP failed. </sarcasm>

  • aligajaniOP 9 years ago

    OOP is for helping to "engineer" software with hierarchies. What I referred to is framework/library level abstraction. Referring to Hipsters. Hard to scale, bad software, because one doesn't know the underlying technologies they're using. I mean, I am not saying use C, but try to do it natively. Most people use underscore because of some functions that are easily doable in vanilla.

    • ekvintroj 9 years ago

      Let me think if I get it, for example, you say "use vanilla javascript instead of CoffeeScript", because if you don't know how to javascript works, you shouldn't use any abstraction over something that you don't know how works, right?

      I agree with that.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection