this post was submitted on 25 May 2024
-77 points (14.7% liked)

Programming

17655 readers
192 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

JavaScript is a language that's easy to learn and has a gorillion features shoehorned in, to varying degrees of success. If you're relatively new to programming (just got done learning Python/Java) there's bound to be something new that you learn from JavaScript due to all its extra added features. Though these extra features are cool, over time you will slowly learn of the flaws that JavaScript has, and you will begin to associate "easy to learn with cool features" as the worst mistake that the language made. So, surely the answer must be to reduce how easy things are to learn. You will start to worship anything that excludes the less experienced and has cool features - for example Haskell or JS Frameworks - and you will denigrate solutions that seem too "simplistic and dirty". You will point to examples like C or Adobe Flash, citing that they have must have security vulnerabilities because they're accessible and so stupid people must be creating footguns with them. You will completely neglect the ways in which they're poorly designed and you will completely ignore the positives of both. Fundamentally, you will refuse to acknowledge that it's possible for software to be accessible and to be designed well at the same time.

Today, the internet is a dumpster precisely because of this false equivalency. It would be easy for Google to remove the guardrails from WebAssembly in some sort of public testing version of Chromium, allowing WASM to support fun little runtimes with 10x the safety of Flash. Artists could use software packages similar to the old Adobe Flash suite in order to make cool things again, expanding beyond the Neocities pages that are currently trendy. Over time, we could improve WASM environments to be incredibly safe, have interesting specialized runtimes and make super cool creations, a development model which basically already worked with HTML and CSS. But, because people still think accessible === vulnerable, we will never have that, and so every site will have the same hyperminimalistic slop look, and artists will be pushed onto the same shitty platforms to do nothing exciting in formats that have existed for centuries.

Programmers learned the wrong lesson in the 00s - that everything needs to be gatekept to protect people from themselves. The actual lesson was that designing things properly can let anyone make anything. Sure, the DOM doesn't satisfy people's need today, but it used to be excellently designed for its task - that's why it could let anyone build something amazing

top 22 comments
sorted by: hot top controversial new old
[–] [email protected] 49 points 6 months ago

That's a lot of weird assumptions in one post.

[–] [email protected] 49 points 6 months ago (2 children)

If you're relatively new to programming (just got done learning Python/Java)

I've been working in python for 6 years and am always learning new things.

Whatever is the opposite of imposter syndrome, I think you have it.

[–] [email protected] 13 points 6 months ago (1 children)

I doubt it is even possible to be done in learning e.g. Python.

[–] Carighan 11 points 6 months ago (1 children)

Python in particular is a language that his weird dichotomy of being easy to pick up, and yet no matter how many years you spend with it, you never feel like you even grasped all the basics. Nevermind advanced stuff.

[–] [email protected] 1 points 6 months ago

That'll happen with every language, there's always more to learn.

[–] [email protected] 5 points 6 months ago

Whatever is the opposite of imposter syndrome, I think you have it.

Dunning-Kruger effect?

[–] [email protected] 37 points 6 months ago (1 children)

This is the worst second-hand embarrassment I've experienced in quite a while. I can't imagine working with someone like this.

[–] [email protected] 12 points 6 months ago

I mean... let's just hope he isn't doing this professionally.

[–] [email protected] 35 points 6 months ago

It would be easy for Google to remove the guardrails from WebAssembly in some sort of public testing version of Chromium

Google is not the authority on WASM, W3C is. Google diverging from the standards and removing any guardrails would result in "This page only works in Chrome" kinda bullshit we've seen before

[–] [email protected] 31 points 6 months ago (2 children)

Easy to learn? Sir, who's your dealer because they're selling you some strong stuff...

[–] [email protected] 48 points 6 months ago (2 children)

"C is accessible" is not something I expected to read today

[–] marcos 33 points 6 months ago (2 children)

"People complain about C's security issues because it's too easy to learn" was absolutely not on my bingo card either.

The same for "Javascript frameworks exclude the less experienced".

[–] [email protected] 15 points 6 months ago

People complain about C's security issues because it's too easy to learn.

Wat. That is...one of the opinions of all time, for sure.

[–] [email protected] 2 points 6 months ago

C is a pretty simple language and relatively easy to learn. But it's a lot harder to be proficient with.

[–] [email protected] 3 points 6 months ago

Aren't they teaching C in kindergarten?

[–] [email protected] 9 points 6 months ago (1 children)

console.log() is really easy to learn, but what happens after that is a complete "wtf"

[–] [email protected] 4 points 6 months ago

Pretty much. Not to mention so many nonstandard libraries are used...

[–] UnfortunateShort 25 points 6 months ago (1 children)

If you gonna rant, please make it at least comprehensible. You went from "JS is flawed" to "everyone is wrong these days" within three paragraphs like wth.

I also highly disagree with your premise that people think 'simple is bad'. Things that are complicated are usually complicated for a reason. C++ for example is complicated, because it grew over decades. Rust is complicated, because it tries to be secure, capture mistakes at compile time, while allowing for concurrency and memory management, and at the same time be very efficient and give the programmer much control. It's hard if not impossible to achieve all these goals in a language without making it complicated.

Go on the other hand is not complicated, because Google engineers saw C++ and wanted to make something less complicated - and thus they created a simpler language. This is an example that goes directly against your argument, together with many other modern languages and frameworks that were created for reasons like this. But notably and more importantly, the most popular languages are simple. Python, JS/TS, Java - These languages are all relatively easy to use.

I won't pretend that I get you bit about WASM since I have little experience with it, but as far as I understand it is primarily a vehicle allowing to use programming languages for the web that weren't designed for it. And as far as I'm aware you can do quite sophisticated things with it, so where exactly is the problem? Putting guardrails in place is rarely a bad thing, because they are easy to remove but hard to establish retroactively.

[–] [email protected] 3 points 6 months ago

I want to say I think they are talking about how great it would be if we could kick JavaScript to the curb and just use WASM for everything. I'm kind of in the same boat.

However, WASM currently doesn't have direct access to things like the DOM, if I recall correctly (this might be the guardrails the OP was referring to?). So, it's only really good for things that are heavy on the CPU. But, as a counterpoint, I don't think it's from a lack of effort from anyone's point. The last thing I remember reading was that there were still a lot of things being worked on to make it happen.

Quick Perplexity search:

There are proposals and efforts underway to allow WASM to eventually call DOM APIs directly, without going through JavaScript. The main one is the "Interface Types" proposal which would allow WASM to bind to Web IDL interfaces.

Another related proposal is WASM GC (garbage collection) which was announced at Google IO 2023. This will allow WASM to share the same managed heap as JavaScript.

[–] [email protected] 12 points 6 months ago

Flash was considered unsafe because it allowed malicious actors to write malware.

[–] [email protected] 3 points 6 months ago

It feels soo absurd, but I’m currently kinda drunk soo it’s maybe me 🫥

[–] [email protected] 1 points 6 months ago

@DanTDM

"you will begin to associate “easy to learn with cool features” as the worst mistake that the language made."

No JS Dev has ever behaved that way.