4 ms·
> What has finally been made clear is that it's okay to have difficult to code APIs, if the end result just works. So true and yet, we have all those crazy Jav
by pothibo 12y ago
> What has finally been made clear is that it's okay to have difficult to code APIs, if the end result just works.
So true and yet, we have all those crazy JavaScript frameworks trying to abstract everything away from developers. There's a lesson in there.
- venomsnake 12y agoYou cannot abstract away complexity. This is a lesson people relearn every 2-3 years or so. From the javascript frameworks - I use only backbone and jquery - first as a simple router, second for easy dom traversal.
- NeutronBoy 12y ago> You cannot abstract away complexity. This is a lesson people relearn every 2-3 years or so. This is so true. You can, however, successfully abstract away a bunch of boilerplate for common actions, and enforcing patterns. The key to a framework (and skill of the developer), is knowing when and how to avoid the abstractions.
- stupidcar 12y agoHearing web developers discuss the dangers of abstraction is just about the craziest thing in computer science. JavaScript and the DOM sit atop layer upon layer upon layer of abstraction that hides an absolute mountain of complexity around networking, memory management, hardware capabilities, parsing, rendering, etc. Believing you're somehow avoiding abstraction because you only use a couple of additional libraries on top of JS and the DOM is like insisting on a 99th storey apartment instead of an 100th storey one, because you prefer being close to the ground. You can by all means argue that all the big JS frameworks are poor abstractions. But a sweeping statement like "you cannot abstract away complexity" completely ignores the fact that web development as a field is only possible because of the successful abstraction of huge quantities of complexity.
- Svenstaro 12y agoWell you have to take something for a reasonable base, otherwise the argument becomes absurd quickly. We think of bare-metal (CPU-level) as our default base and take that for granted. But the CPU itself has many abstractions over physics, multiple levels of caching, branching prediction, some built-ins and so on. A modern CPU sits much deeper in the skyscraper that you describe but it's still nowhere near ground level. Similarly, since with web browsers we get what we get, we might as well consider that our reasonable base for web development, it's not like anyone is going to do that part differently any time soon.
- mreiland 12y agoI don't think anyone is saying the browser et al aren't abstractions. Think of it like this, no amount of abstraction will save you from having a network connection go away. That sort of use case adds complexity, and you can't get around it. The browser severely limits what you're able to do with the network connection, but at the end of the day dealing with the network is a complex beast. If you doubt, look no further than the HTML5 caching API's. The tooling around them is absolutely terrible, but even if it weren't there's an inherent complexity with that sort of thing.
- mhomde 12y agoI think you can... but it's really hard to design an architecture that's both powerful and easy to use. It's important to have different layers of abstraction and allow developers to develop at the level of abstraction needed to obtain the control they need. Often it's also a question of how things are composed, not just how much they're abstracted away. If you're use case dictates that you need to separately control something that's been composed into one thing then you're usually out of luck
- andars 12y agoTell that to the OS guys.
- EpicEng 12y agoJavaScript is, in and of itself, a massive abstraction.
- DanWaterworth 12y ago> You cannot abstract away complexity. No, you have a selection bias, you don't notice the abstractions that have worked.
- cwyers 12y ago> You cannot abstract away complexity. Oh sure you can. It just costs something. The most common tradeoff is that you abstract away complexity in favor of performance.
- demarq 12y ago> You cannot abstract away complexity that makes no sense. Perhaps what you meant is that there is a limit to how much a problem can be simplified.