4 ms·
Micro-libraries anywhere else are everything you said: building blocks that come after a little study of the language and its stdlib and will speed up developme
by foul 2y ago
Micro-libraries anywhere else are everything you said: building blocks that come after a little study of the language and its stdlib and will speed up development of non-trivial programs.
In JS and NPM they are a plague, because they promise to be a substitute for competence in basic programming theory, competence in JS, gaps and bad APIs inside JS, and de-facto standards in the programming community like the oldest operating functions in libc.
There are a lot of ways for padding a number in JS and a decent dev would keep an own utility library or hell a function to copy-paste for that. But no. npm users are taught to fire and forget, and update everything, no concept of vendoring (that would have made incidents like left-pad, faker and colors less maddening, while vendoring is even bolt in npm and it's very good!). They for years copy-pasted in the wrong window, really, they should copypaste blocks of code and not npm commands. And God helps you if you type out your npm commands because bad actors have bought the trend and made millions of libraries with a hundred different scams waiting for fat fingers.
By understanding that JS in the backend is optimizing for reducing cost whatever the price, becoming Smalltalk for the browser and for PHP devs, you would expect some kind of standard to emerge for having a single way to do routine stuff. Instead in JS-world you get TypeScript, and in a future maybe WASM. JS is just doomed. Like, we are doomed if JS isn't, to be honest.
- orhmeh09 2y agoCould you link to somebody who is teaching npm users to "fire and forget?" Someone who is promising a substitute for competence in basic programming theory? Clearly you and I do not consume the same content.
- foul 2y agoThis is just a discourse based on "I need to churn out something, I need that fast and I didn't start in the web game when Backbone and E4X were solid corporate choices". If you are not in a hurry, work in a solid team and have a good attention span, a lot of clickbait idiocy around JS may not happen. It's just that the lone inexperienced guy is one of millions inexperienced guys who are taught the wrong ways everyday. I'm presenting you one of countless examples: a lot of coding bootcamps teach React, maybe with TS, maybe with JS. Enter react-create-app. https://github.com/facebook/create-react-app https://github.com/facebook/create-react-app The docs are a link, while the commands you can copy and paste are laid out at 9th row in the README. That will become a habit for a junior.
- ivan_gammel 2y agoThe whole web stack must die and be replaced. JS, CSS, HTML, HTTP are huge cost center for global economy.
- edwinjm 2y agoYou can use Flutter now. Go use it. Stop whining.
- smitty1e 2y agoThe four abstraction layers reflect the reality of technological drift over time. Even stipulating a Wand of Internet Technology (WIT) that could produce the One True Stack (OTS), two things remains undone: - fixing all the old stuff (or does OTS emulate it all?) - precluding further drift (or does OTS end all that?)
- ivan_gammel 2y agoThose are not the Problems, just common problems with known solutions (Migration Path and Let-It-Go).
- foul 2y agoI think that it's ugly but okay-ish right now. What is very very bad is the tooling, and someone should remember people that Facebook and Google do things that serves Facebook and Google-scale needs (billions of users, thousands of devs working asynchronously, no time). What I end up thinking (maybe i'm wrong) is that node.js must be nuked out of backend and on frontend maybe some of the devs should use either a number of libraries under 15 and write custom code for the rest, or use a language that transpiles to JS like TS, flutter, nim, Go or what have you. Maybe JS should be nuked out of tooling too, sometimes it's actively damaging and sometimes dead slow. Use something else if wrangling asset files are a problem. If you want a DX where backend is frontend, you must use the only three mantained languages that can do that without trying to actively damage you or users, which are a Smalltalk (like Pharo), a Lisp (like Clojure/Clojurescript) or Java.
- 2y ago