3 ms·
> Any language or system that requires highly disciplined and unintuitive patterns to make work is a flawed system. Things can seem unintuitive is when one's m
by CharlesW 7y ago
> Any language or system that requires highly disciplined and unintuitive patterns to make work is a flawed system.
Things can seem unintuitive is when one's mental model of something is different than what's actually happening. In that case one can choose to believe that one's mental model is perfect, or one can consider the possibility that one's mental model is incomplete and/or incorrect.
But that's learning, no? Everyone's mental map of almost everything is incomplete and/or incorrect. Consider that CSS is generally (the occasional implementation bug notwithstanding) doing what you tell it to do, and that if it's not doing what you'd expect, that there's probably an opportunity learn why your mental model doesn't match the reality of the abstraction.
> This is not unique to the front end. SQL is much the same way. Often in SQL there are Optimizations with no rhyme or reason.
There's always rhyme or reason (or bugs, sometimes). I have the pleasure of working with some of the foremost SQL experts in the world. When SQL that I've written doesn't work how I'd expect or as performantly as I'd expect, I inevitably discover that the problem is that my mental model is wrong and/or incomplete and eventually walk away with enhanced understanding.
- crimsonalucard 7y agoThe language itself should map to the mental model. It should be an obvious mapping. You learn the language you gain the mental model. With css, you learn the language the mental model does not follow. Many times the model that the language promotes is not what the developer needs so the developer creates patterns to deal with inefficiencies. This is a flaw. Sql abstracts the underlying model of procedural algorithms into a one line declarative expression. The language is designed to hide the model deliberately. However due to the requirement of optimizing queries one must optimize the procedural algorithms while working with an API that deliberately hides it. Thus in order to know which permutation of a sql expression maps to what permutation of procedural algorithm you must memorize arbitrary mappings or hacks. This is a huge design flaw. Your premiere sql experts are experts in using hacks to get around the flaws of SQL.