Live data from Hacker News

Today’s JavaScript, from an outsider’s perspective (2020)

lea.verou.me

201–210 of 391 posts

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#201
post #183

The author encounters four problems trying to approach a programming task: 1) A problem common to every programming language (feature introduction/deprecation compatibility conflicts w.r.t. import/require) 2) A security issue around browser filesystem access (not-JS related at all: HTTP content-type sniffing) 3) A usability issue with the VSCode IDE (not JS related) 4) A bug in a single JS module Concludes this is al…

> Programming is a profession requiring learning from experience - if a novice doesn't have the patience to overcome very small speedbumps like this on a daily basis while learning a new domain, this might not be a good path for them. There's a lot of assumption packed into this statement. Those speedbumps used to also not be there—they were put in recently[1]. Also, having read through your comment first and then re…

> Those speedbumps used to also not be there—they were put in recently

> having read through your comment

It doesn't sound like you've read my comment at all: 3 of the problems I listed are not new at all. The one that is - modules - is a result of two colliding independently standardised implementations from one language (commonjs vs ecma).

> The module fiasco is 100% a consequence of really, really bad decisions on the part of the NodeJS folks.

I'd genuinely like to hear an elaboration on this. You may be right but just stating doesn't make it so (your two referenced articles are just people who dislike JS railing against it for its own sake, nothing really constructive)

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#202
post #197
post #185

Earlier quoted context omitted.

Is node.js giving the author bullshit or did they knowingly step into a field they are unfamiliar with, getting themselves involved with a package manager, a javascript runtime, a browser, and a local fileserver? As if you were able to instantly run whatever code you found on the internet back in the C++ days. It's bizarre. Not everything needs to have such a low barrier to entry that anyone can work with it. Who sai…

>Is node.js giving the author bullshit or did they knowingly step into a field they are unfamiliar with, getting themselves involved with a package manager, a javascript runtime, a browser, and a local fileserver? Node.js is giving the author bullshit. They were not unfamiliar with the field. They knew what a package manager was, they already had NPM installed. They were familiar with the architecture of the web and…

Well, I disagree with everything you say (especially calling this gatekeeping). You simply are unwilling to learn about the tools you're working with. I'm sorry we couldn't work it out. Best of luck!

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#203

Basically: How it feels to learn JavaScript in 2016 https://hackernoon.com/how-it-feels-to-learn-javascript-in-2... Original old-man-railing-at-modern-tech parody: https://circleci.com/blog/its-the-future/

Both of those inspired me to write what amounts to an homage, specifically about web development:

https://www.brycewray.com/posts/2021/01/easy-peasy/

. . . and, as I note in the opening:

> I do **not** pretend this is in the originals’ amazing league.

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#204
Beginners just run angular/react/vue cli and restrict themselves to first-class compatible dependencies that can be installed with one loine. This way, quickly creating something useful that is good enough is easy for the novice.

But yes, the plumbing the cli controls and sets up for you is insanely complex and overengineered.

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#205

Earlier quoted context omitted.

You've obviously thought about this quite a bit... Do you have any ideas as to how projects could avoid this problem?

I have, but to be honest I've forgotten a lot of the specific debates and their finer points. I don't have a single, definitive, clear solution -- as pointed out by others -- nobody does. It's not a simple problem. That doesn't mean that steps can't be taken to improve the situation, perhaps dramatically in some cases. 1) Enforced MFA to publish a crate -- credential theft is semi-regularly seen as an attack vector.…

Good answer. Here is one more, and I got to say I am really unsure why it isn't done this way: Check each update to a crate for the usage of a TCP / HTTP / UDP stack usage. There is absolutely no reason a crate for math (for example) should be introducing any of that in its code. If you catch something like this, you can be 99% sure it's malware.

Or even better, make crates request permissions for what kind of functions they can call, similar to the chrome plugin API. A graph crate doesn't need encryption, file opening or netstack permissions.

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#206
post #63

This thread is also a good read: https://twitter.com/Aella_Girl/status/1522633160483385345 Shows that a lot of people, ESPECIALLY programmers, vastly overestimate the competence of the average person when it comes to whatever they are an expert at. You may think that this person is silly - but that is tainted by your past experience of already knowing it warping what you think the baseline average knowledge level is…

That Twitter post seems a bit whiny. The expectation that a general purpose language, basically a huge professional toolset would be readily obvious to a non professional who doesn't even grasp the concepts of variables in imperative programming. If I would step in a wood workshop I don't expect I'll be able to produce much without first aquiring some basic skills. The OP thinks that being Goal oriented should give them magic abilities to understand the tools without learning them. A Very odd expectation...

This doesn't absolve Python though, the whole dependency story is rather bad and the language have many warts. But, The ecosystem can never be simple enough for someone like the OP while still be an OSS distributly developed general purpose seelanguage.

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#207
post #37

Earlier quoted context omitted.

That old-man-railing-at-modern-tech parody was a great read

Now this inspired me to the great idea that we all should move to microservices in the browser, running as concurrent background tasks along a managed message bus, as soon as possible… (Functional programming and modules are dead, browser microservices are the future! We may even launch our web app in a fleet of redundant windows/tabs, by the this greatly improving stability!) ;-)

Write a system of service workers intercepting each other's HTTP requests and I think you can do it!

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#208
post #193

Earlier quoted context omitted.

I've started programming around 10 year ago without any Visual Basic code. There are so many more resources nowadays to get started programming, back in the day there was no way in hell you'd get something like repl.it where you don't even need to install anything. What stops you from creating the most simple html page and playing with CSS? That counts as programming to me, there's also scratch for people who are com…

A big issue is that 10 or 20 years ago the steps for creating a webpage were simple: just open notepad (or whatever) and put some HTML. Today you "gotta" install node, yarn, webpack, react. Then you gotta make a package.json and configure webpack. Or replace webpack with something called "crap". At least that's what all the "for beginners" tutorials that everyone recommends says! Nobody ever said I could just use not…

You can still do a webpage just like you did 20 years ago, inserting a couple HTML tags in a notepad.

Now the scope of what a webpage is capable of is infinitaly larger, and so is the complexity required for using all the new possibilities. If you want to use advanced stuff without learning the basics, than of course you're going to have a bad time.

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#209
post #183

Earlier quoted context omitted.

> Programming is a profession requiring learning from experience - if a novice doesn't have the patience to overcome very small speedbumps like this on a daily basis while learning a new domain, this might not be a good path for them. There's a lot of assumption packed into this statement. Those speedbumps used to also not be there—they were put in recently[1]. Also, having read through your comment first and then re…

> Those speedbumps used to also not be there—they were put in recently > having read through your comment It doesn't sound like you've read my comment at all: 3 of the problems I listed are not new at all. The one that is - modules - is a result of two colliding independently standardised implementations from one language (commonjs vs ecma). > The module fiasco is 100% a consequence of really, really bad decisions on…

> It doesn't sound like you've read my comment at all

Well, I did.

> I'd genuinely like to hear an elaboration on this.

You already alluded to it. NodeJS's take on modules (which are not CommonJS[1]) were never a good idea, and they were never standard, least of all in any sense that matters.

Too many people treat the NodeJS project and its associated silliness like it's the be-all and end-all of "JS". It's not. It's a single, standards-incompatible runtime packed with proprietary features leading to obvious pain points (like the module fiasco) that are foreseeable from a mile away.

Previously: https://news.ycombinator.com/item?id=31331358>

> your two referenced articles are just people who dislike JS railing against it for its own sake

Wrong. I happen to like JS. It's why a spent a huge chunk of my time (before NodeJS was even a thing) making sure that there were high quality JS docs available on developer.mozilla.org, and it's why I wrote that post diagnosing the problems with the NodeJS culture that can (and should) be fixed to repair the JS onramp to be friction-free the way that it was before (and repair JS's image from the damage done by the NodeJS project, cf OP).

But it doesn't sound like you've read them at all (nor does it sound like you're able to meaningfully separate JS from NodeJS yourself).

1. Isaac S: the best thing for me, and for node, and for npm, was just to go off the reservation and focus on the things that I knew mattered. Ryan basically always gave zero fucks about CommonJS anyway. One evening at Joyent, when I mentioned being a bit frustrated some ludicrous request for a feature that I knew to be a terrible idea, he said to me, "Forget CommonJS. It's dead. We are server side JavaScript."[...] we went pretty far off the reservation in v0.4, with the whole node_modules folder thing, and loading packages via their "main" field. Maybe we should remove those features, I'm sure that Node users would appreciate us being more spec-compliant!

Re: Today’s JavaScript, from an outsider’s perspective (2020)

#210
post #208
post #193

Earlier quoted context omitted.

A big issue is that 10 or 20 years ago the steps for creating a webpage were simple: just open notepad (or whatever) and put some HTML. Today you "gotta" install node, yarn, webpack, react. Then you gotta make a package.json and configure webpack. Or replace webpack with something called "crap". At least that's what all the "for beginners" tutorials that everyone recommends says! Nobody ever said I could just use not…

You can still do a webpage just like you did 20 years ago, inserting a couple HTML tags in a notepad. Now the scope of what a webpage is capable of is infinitaly larger, and so is the complexity required for using all the new possibilities. If you want to use advanced stuff without learning the basics, than of course you're going to have a bad time.

> You can still do a webpage just like you did 20 years ago, inserting a couple HTML tags in a notepad.

Yes, I agree. That's exactly what I said in several parts of my message. However I believe you missed the point and didn't notice the sarcastic tone.

Post reply on HN