3 ms·
Abstraction to me, just makes it easy to delay implementation. There are sometimes when I need to use an interface now but it won't actually be implemented unti
by jacobwilliamroy 7y ago
Abstraction to me, just makes it easy to delay implementation. There are sometimes when I need to use an interface now but it won't actually be implemented until next week, when the client gets us our API key, or someone else finds time to do it. Using an abstraction means that I don't have to change any of the code that uses the interface, I just have to change the interface. This is also a good way to make a prototype that is easy to optimize, for example by abstracting a very costly computation, you can just focus on making that computation run faster without having to refactor every line of code where that computation is used.
- bitwize 7y agoMorty: Aw, geez, Rick, don't you think we ought to abstract away the low-level details here? Rick: Listen, Morty. Just bburpecause you wrap something in an abstraction doesn't mean the complexity "goes away". It just means you've put off dealing with it -- usually until it fails. And when it does fail, you now have another layer of shit to dig through to find the root cause. Walk into the fire, Morty. Embrace the suck. And think about how you will handle error conditions before you write the happy path.
- akkartik 7y agoThat's hilarious. Is it a real quote from the show?! (I'm the author of OP.)
- bitwize 7y agoNah, I made it up. I've noticed a tension between two dominant programmer archetypes in my career -- one naïve and inexperienced, but well-meaning and careful (the programmer I'm supposed to be), the other more experienced, but jaded by the passing of frameworks, methodologies, and other trends, who just wants to hack things into working order (the programmer I appear to be becoming as I age). They were pretty good fits for Rick and Morty. Quite coincidentally, the personas Microsoft used for their developer tools were called (in order of increasing experience) Mort, Elvis, and Einstein.
- dkarl 7y agoThis was/is a failure of pedagogy. I was taught abstraction as a virtue, embraced it, learned this lesson, and then noticed that the experienced programmers (not the pedagogists and professional authors) had been saying all along that until you had seen three distinct cases of something in the wild you were in no position to create an abstraction for it.