Live data from Hacker News

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

lea.verou.me

181–190 of 391 posts

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

#181

Earlier quoted context omitted.

This thread for me looks like a narcissistic attention seeking rather than real process. She could simply start learning on datacamp - i went back to it after many years and it's perfect. Low level of entry, "box where you write python code and it runs", you don't have to install pandas, but course will teach you to do it if you want. She began this thread from saying that she started a few courses... Hard to believe…

Read the rest of this persons twitter, or their website for that matter. No I don’t think there is anything enlightening whatsoever about their experience “trying” to learn to program. They spent 10 minutes installing the interpreter, and then got upset for their social medial followers because they weren’t immediately able to write software to do something useful with their CSV. I cannot think of any other disciplin…

I think the problem here is that there's so many tutorials, articles etc telling people that if they want to do data analysis then the best way is to use Python without making it clear that this advice is predicated on you already having a programming education. If you start with a CSV file and want to do some analysis, without knowing programming, then you need to using a spreadsheet app, but this context isn't being reliably given to people. Instead they absorb a background assumption that "real" data analysis is based on programming and immediately drown when they try it.

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

#182
post #101
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…

>I don't wanna learn how programming building blocks work as I use them to build a lil rando pile, I want to learn how they work as I use them to build the actual house I want. Well, unfortunately some things are difficult, and knowing fundamentals helps you with those difficult tasks. I also don't complain that I can't learn to fly a plane by starting the engine with zero knowledge and learning while taking off. The…

This was my thought too. When learning to drive, I don't really care about what the clutch is or does, I want to know how I can go from my house to the shop, or my house to my friend's house. But I understand that I need to be aware of the components and processes that go into driving a car. I can't just sit in it and expect it to whisk me away.

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

#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 read through the article (fully expecting to find what you describe), I'm compelled to say that your summaries grossly mischaracterize the substance of the complaints actually mentioned by the author.

> a painful but necessary migration incompatibility is an unfortunate reality, the only alternative of which is to stagnate and never introduce/deprecate breaking features

Well, no. The module fiasco is 100% a consequence of really, really bad decisions on the part of the NodeJS folks. They created the preconditions that led to the demand for their solution. This problem/solution cycle is rife in the NodeJS/NPM world. The only way to deal with it is to opt out[1][2].

1. https://www.colbyrussell.com/2019/03/06/how-to-displace-java...>

2. https://news.ycombinator.com/item?id=24495646>

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

#184

This is a problem with all kinds of programming for new learners - actually writing some code is easy. But getting a development environment configured to actually allow you to start writing that code requires a ton of tacit knowledge. I find this to be the biggest hurdle to new joiners. When I was first learning in my grad job, my company did a terrible job of addressing this and threw us into a test project with no…

As a consequence what one should actually strive for, if one is aiming to become a professional software developer, is to have a good process for mastering these types of “configuration” tasks. Understanding why language ecosystems are organized the way they are, understanding the trade-offs involved etc. I believe, will make you a significantly more productive developer. It’s where I see a lot of junior developers p…

There's no mastering configuration tasks, because it's all arbitrary unilateral decisions made by randos and committees of randos. There's no logic to finding out which arcane formatted strings need to be placed where in which text files in which directories, otherwise every single thing fails out of the gate. I used to complain about having to spend my time on this even as a senior.

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

#185
post #156
post #151

I think it's a very bizarre assumption to think that running some code you found on the internet will just do exactly what you want right out of the box. That almost never happens.

They never even got to the point of running the code because of Node's bullshit, which is the point.

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 said _that_ is where we collectively set the bar? It's a false premise, and frankly it feels like toxic false entitlement open source maintainers are typically showered with.

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

#186
post #81

My experience also. As a backend engineer trying to create a front end app, the whole toolchain of JS, bundlers, minifiers, Typescript, React... is basically; works if you have one magical init script that wires up everything, and much more than you really need since its tailored for more complex apps, but if you need just simplest thing, like run Typescript app in browser, well, good luck with that! Hundreds of tuto…

Not only this. Try to change the app two years later. Dependencies gone, wrong NPM version, Webpack config depricated and what not.

That's why I like to use vanilla JS as much as possible. It will be maintainable years later.

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

#187

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…

The problems are all eminently avoidable, though. It's all death by a thousand cuts stuff.

1. Churn in something as basic as how modules work isn't common to every programming language, actually that's pretty specific to JavaScript. Java modules remained the same for 20 years, and when the 'new' module system came it's opt-in (you can pretty much ignore them and many people do because a 'new' module is forwards compatible and can be treated as an 'old' module as well).

2. They were only trying to use the browser because they had problems with Node and thought it'd be easier. The fact that there are security issues loading stuff written by the owner of the computer itself from disk is more an artifact of how browsers work and how they evolved than anything else.

3. The usability issue wasn't really with VS Code. It's that the default behavior of browsers on encountering stuff they don't understand is to ignore it and plough on regardless, so they got no error message and at that point were stuck. If they hadn't had Lee on hand their adventure would have ended here because Lee simply intuited what was wrong based on past experience. The fact that browsers routinely leave you looking at a broken page with either no error messages to help you, or a uselessly vague one, is a problem caused by (again) how browsers evolved, it isn't fundamental. More robust development environments don't have this issue. If something goes wrong you get an error, always, and it's usually helpful. You never just get nothing and are left wondering what happened.

4. The "bug" here is that you can't use TypeScript directly in a browser (why not? again, mostly complicated browser related tech politics that no beginner would understand), and the library in question doesn't advertise that it's using TypeScript properly. Even if the bug was fixed the user would still be stuck with TypeScript when what they need is JavaScript.

"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."

The guy wasn't a novice. He's introduced as " a great computer scientist, but not a JS person".

I think we're, as an industry, exceptionally blasé about usability problems in our tooling. These problems don't just waste the time of novices, they waste the time of people with 30 years experience, people who have been coding since childhood. The problems encountered in the article aren't the classic beginner problems like forgetting to add a semicolon at the end of a line. They're the result of accumulated lack of care for the overall developer experience. The root cause is a rampant culture of abusing tools for things they weren't ever actually designed for. JS modules are weird because JS was never intended to be a programming language for large scale projects, so it took decades for modules to emerge and then they were bolted on. Browsers refuse to do something as basic as load code from local disk because they were originally designed to render documents, TypeScript exists and requires extra work to execute because of the spec-driven approach browsers etc which in turn is due to their origin in rendering documents, etc etc.

The blog post is specific to JavaScript because these problems are specific to JavaScript and the way we (ab)use web tech.

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

#188
post #30

Earlier quoted context omitted.

It is not going to convince you that ESM modules are well designed... but this post explain a lot of the intricacies https://jakearchibald.com/2021/export-default-thing-vs-thing...

I read halfway through before my brain shutoff. I keep asking myself if all this complexity is necessary.

It is a shame because the whole "import namespaces from URLs" is a nice idea.

In my opinion they should have dropped the whole "live reference imports" which is a completely new concept to the language.

Personally I would have liked inline modules definitions à la Rust.

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

#189
post #162
post #81

My experience also. As a backend engineer trying to create a front end app, the whole toolchain of JS, bundlers, minifiers, Typescript, React... is basically; works if you have one magical init script that wires up everything, and much more than you really need since its tailored for more complex apps, but if you need just simplest thing, like run Typescript app in browser, well, good luck with that! Hundreds of tuto…

It is not quite hard to learn actually. You just need to go through the webpack Concepts section[0]. Documentations in the JavaScript ecosystem are quite good and explanatory compared to other languages (like Java). Not every front-end developers learn the internals of the tool they chose, like create-react-app. Most of them settled down if the solution "just work". [0]: https://webpack.js.org/concepts/

X is not hard, you just have to Y.

Be careful of these statements, you have to understand why a person says X is hard. The OP stated he did extensive work trying to get it to work and found it difficult.

You posted one link out of thousands. When talking about these things - its not like there's a problem with one solution.

There's one problem with thousands of answers that are frustratingly close to correct, but not correct.

That's why X is hard.

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

#190
post #168

Earlier quoted context omitted.

But are they building software tools that are useful and stable enough to distribute? That's the level of capability he is talking about.

That's not what the linked Twitter thread is talking about, nor is it how I interpret "make a quick app for yourself, or make something small to share with the world" or "make a quick application to accomplish a small task." Those things are eminently achievable without having to embrace the level of complexity that's so popular in professional software development. And I actually think the level of capability you're…

By "distribute," I didn't mean as a commercial product. I meant just sharing with other people. There is a huge difference between being able to tinker with Python/R and being able to make a package usable by strangers.
Post reply on HN