3 ms·
People do this because on one hand they want something better but on the other hand are limited to zones of comfort, as in familiar patterns. There is a psychol
by austin-cheney 1y ago
People do this because on one hand they want something better but on the other hand are limited to zones of comfort, as in familiar patterns. There is a psychological measure for this called uncertainty avoidance.
As for myself I have learned to avoid certain things that only induce complexity and as result feel confident I can build almost anything in JavaScript/TypeScript. Here are my zones of avoidance.
* DOM abstraction. Working with the DOM is stupid simple, so don’t use unnecessary abstractions to make it something it isn’t. Sometimes I do find the DOM is missing important features so I will extend the DOMs API with original methods, such as getNodesByType.
* No OOP. I avoid classes and inheritance as entirely unnecessary. Functions and objects are all I need for architecture.
* Know your platform. In the browser it’s the DOM and Web APIs. In Node it’s their direct module APIs. Get comfortable working as close to the platform as possible. It’s less to troubleshoot later.
* Avoid unnecessary string parsing. This includes things like querySelectors, innerHTML, and a lot of insanity from framework template systems. This is by far one of the two biggest performance boosts.
* Preference WebSockets over HTTP. This also dramatically boosts performance and significantly reduces application complexity.
- keepamovin 1y agoI appreciate your comments here. Your insight is always valuable! Thank you. I also have a purity or “web grain” mindset towards the web platform. It’s nice to see someone else share that sensibility, even though I know it’s not a super uncommon thing to appreciate and utilize the design of the web system as is.