Abstraktioner i kode

Tyler Treat’s blog, “Brave New Geek“, er endnu en god blog om softwareudvikling. I “Abstraction Considered Harmful” tager Treat fat på en af de tilbagevendende udfordringer i softwareudvikling: Hvornår og hvordan skal man lave abstraktioner.

It’s kind of a cruel irony. The programmer complains that there’s not enough abstraction for a hard sub-problem. Indeed, the programmer doesn’t care about solving the sub-problem. They are focused on solving the greater problem at hand. So, as any good programmer would do, we build an abstraction for the hard sub-problem, mask its inner workings, and expose what we think is necessary for interacting with it. But then we discover that the abstraction leaks and complain that it isn’t perfect. It turns out, hard problems are hard. The programmer then simply does away with the abstraction and solves the sub-problem for their specific case, handling the complexity in a way that makes sense for their application.
Abstraction doesn’t magically make things less hard. It just attempts to hide that fact from you. Just because the semantics are simple doesn’t mean the solution is. In fact, it’s often the opposite, yet this seems to be a frequently implied assumption.
— Tyler Treat, “Abstraction Considered Harmful

This entry was posted in Development and tagged . Bookmark the permalink.

1 Responses to Abstraktioner i kode

  1. Pingback: Ruining narratives | Henning's blog

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.