4 ms·
Some abstractions don't seem to give anything useful at all other than homogeneity across code bases and slightly nicer looking (but not simpler) code, and yet
by BigJono 7y ago
Some abstractions don't seem to give anything useful at all other than homogeneity across code bases and slightly nicer looking (but not simpler) code, and yet they still see wide use.
- ryanbrunner 7y agoIf "nicer looking" aids readability and more understanding of what the domain logic is trying to achieve, that's a pretty substantial win in my book. One advantage of homogeneity is that it allows you to not have to think as much about how something was implemented, and focus on why that code exists and what it's trying to accomplish at a high level.
- stcredzero 7y agoSome abstractions don't seem to give anything useful at all other than homogeneity across code bases and slightly nicer looking (but not simpler) code This is of tremendous value to big companies. This lets them move to newer languages and platforms more easily when the time comes.
- BigJono 7y agoFor sure. It's also very good for onboarding (and better utilising cheaper/less knoweledgeable devs by constraining them, but people don't like to admit that). The flip side is that abstractions (usually in the form of external dependencies) can only add complexity to the software, which has a detrimental effect on development effort. These "pointless" (but not really) dependencies we're talking about are the same as useful ones, but instead of weighing the cost against a more direct benefit (whatever the library gives), you're weighing it against these more indirect benefits, which is much harder. In my experience most people just give up and go with whatever sounds good, which is usually "use whatever people are familiar with". That subset of tools grows and grows over time, and if you just always go with the defaults, eventually you're going to end up stuck in the mud, because nobody is weighing the cost of your abstractions.
- stcredzero 7y agoThese "pointless" (but not really) dependencies we're talking about are the same as useful ones, but instead of weighing the cost against a more direct benefit (whatever the library gives), you're weighing it against these more indirect benefits, which is much harder. Facades and the various "layer" style abstractions aren't pointless. The whole point is to add a layer of indirection, for the benefit of being able to switch out underlying dependencies. The whole point is to make it easy to migrate off of a dependency.