Hacker News new | ask | show | jobs
by Buttons840 628 days ago
You suggest learning the mental model behind the system, but is there a mental model behind web technologies?

I'm reminded of the Wat talk: https://www.destroyallsoftware.com/talks/wat

Is it worth learning the mental model behind this system? Or am I better off just shoveling LLM slop around until it mostly works?

4 comments

The modern software space is too complex for any one person to know everything. There’s no one mental model. Your expertise over time comes from learning multiple mental models.

For example if you are a frontend developer doing typescript in React you could learn how React’s renderer works or how typescript’s type system works or how the browser’s event listeners work. Over time you accumulate this knowledge through the projects you work on and the things you debug in prod. Or you can purposefully learn it through projects and studying. We also build up mental models of the way our product and it’s dependencies work.

The reason a coworker might appear to be 10x or 100x more productive than you is because they are able to predict things about the system and arrive at solution faster. Why are they able to do that? It’s not because they use vim or type at 200 wpm. It’s because they have a mental of the way the system works that might be more refined than your own.

Of course there is. The DOM stands for Document Object Model. CSS uses the box model. A lot of thought went behind all these standards.

JavaScript is weird, but show me a language that doesn’t have its warts.

> JavaScript is weird, but show me a language that doesn’t have its warts.

False equivalence much? Languages have warts. JS is a wart with just enough tumorous growth factors to have gained sentience and started its plans toward world domination.

All languages have their warts. In JavaScript, the warts have their language.
JavaScript needs a Python 2->3 moment, but like 100x the damage
> Is it worth learning the mental model behind this system?

If you want to learn javascript, then yes, obviously. You also need to learn the model to be able to criticise it (effectively) -- or to make the next wat.

> am I better off just shoveling LLM slop around until it mostly works?

Probably not, but this depends on context. If you want a script to do a thing once in a relatively safe environment, and you find the method effective, go for it. If you're being paid as a professional programmer I think there is generally an expectation that you do programming.

Uhhh. I hated JS for years and years until I started to actually look at it.

If you just follow a few relatively simple rules JS is actually very nice and "reliable". Those "rules" are also relatively straight forward: let/const over var, === unless you know better, make sure you know about Number.isInteger, isSafeInteger, isObject etc etc. (there were a few more rules like this - fail to recall all of them - has been a few years since i touched JS) - hope you get the idea.

Also when I looked at JS I was just blown away by all the things people built on top of it (babel, typescript, flowtype, vue, webpack, etc etc).

That's a pile of tricks, not a mental model though.

A mental model might be something like "JavaScript has strict and non-strict comparisons", but there are no strict less-than comparisons for example, so remembering to use === instead of == is just a one-off neat tip rather than an application of some more general rule.

I was not trying to imply that this is a mental model. I was merely commenting on OPs comment about JavaScript.