2 ms·
> Aaron Hsu gave a talk about this In it he mentioned that abstraction is bad, which was also mentioned in the previous K discussion. I still really struggle w
by magicalhippo 7y ago
> Aaron Hsu gave a talk about this
In it he mentioned that abstraction is bad, which was also mentioned in the previous K discussion. I still really struggle with that belief.
I find abstractions essential to mentally manage the complexities of the overall solution. For example I just implemented some REST calls at work, and when coding a GET or a POST call I don't want to think about the gritty details of how to conjure up an OAuth token from the multiple supported ways just so I can stuff it into the HTTP headers. I far prefer to know that the passed OAuth token provider abstraction (interface instance) will provide a suitable token if asked nicely.
Though perhaps he must mean something else than what I mean by abstraction. After all, the APL sample code he showed is abstracting away quite a lot by way of the various operators and whatnot.
- hcarvalhoalves 7y agoI believe our industry overuses the term "abstraction", and incorrectly. You're probably right that he meant something different by it. In your example, the OAuth token provider is concrete, and not having to know the details of OAuth would be an example of encapsulation. Abstraction would be deriving general rules (of authentication, perhaps?) by drawing from the OAuth example, and by induction being able to generalize for anything not OAuth specific.
- magicalhippo 7y agoSo wouldn't a further abstraction be to introduce an auth provider that returns a set of HTTP header values to be used, or something along those lines? I could then implement the OAuth auth provider based on the OAuth token providers interface I got now. And this would allow me to not think about how exactly the auth is done at all, just that it is done somehow. Isn't this the layers of abstractions mentioned? If so, how is this bad?