this post was submitted on 28 May 2025
1335 points (99.2% liked)

People Twitter

7166 readers
1623 users here now

People tweeting stuff. We allow tweets from anyone.

RULES:

  1. Mark NSFW content.
  2. No doxxing people.
  3. Must be a pic of the tweet or similar. No direct links to the tweet.
  4. No bullying or international politcs
  5. Be excellent to each other.
  6. Provide an archived link to the tweet (or similar) being shown if it's a major figure or a politician.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] brachypelmasmithi@lemm.ee 2 points 1 week ago (1 children)

Ooh, could you elaborate on that if possible? I have some vague ideas why JS is a scourge on the web but I've never looked into the specifics.

Do most of the issues stem from the language itself (which is held by effectively duct tape) or do they stem from how it is used?

[–] sxan@midwest.social 7 points 1 week ago (1 children)

Oh, there are better people than myself to belabor this particular point.

JS is a not-language that over-exceeded anyone's wildest expectations for popularity, and people have been playing catch up to try to turn it into a real language with things like TypeScript for years. It's not designed; it grew, like kudzu. Like poison ivy.

But the worst thing about JavaScript isn't really its fault; it's how it's been abused by web developers. The ecosystem is a toxic mess of security holes and abuse opportunities. The standard development practices resemble less real software development and more Jackson Pollock throwing paint at a canvas.

It's just awful. Everything about it is awful. Really good developers can create nice, well-structured, secure, efficient applications in JavaScript; there are 6 of those people in the entire world, and every JS developer thinks they're one of them.

[–] naught@sh.itjust.works 3 points 6 days ago* (last edited 6 days ago) (1 children)

I don't think you're entirely wrong here, but you make sweeping generalizations about programmers that I see a lot online that irk me.

Most developers I know have a few languages they're familiar with. A good developer uses the right tools for the job. When I work with my python shop I use that. When I need a quick webapp it'll be JS. If there's something that requires high performance I might try go.

Every language has pitfalls and vulnerabilities, but that really says nothing of their utility. Any flame war between languages is typically pedaled by dilettantes fueled by memes they don't understand (like javascript == memes)

take this admittedly ancient study of vulnerabilities divvied up by language:
https://www.zdnet.com/article/which-are-the-most-insecure-programming-languages/

In JS, you don't have to free memory manually. Nor in python. This (mostly) precludes a whole class of severe bugs/vulns, but those weren't relevant anyway because they're different tools for different jobs.

We can bemoan the gigantic js ecosystem, but we can also realize it is a fantastic resource for novices and veterans alike.

[–] sxan@midwest.social 5 points 6 days ago

you make sweeping generalizations about programmers that I see a lot online that irk me

I've been a professional programmer (like, paid, career) since 1995. I moved into management in 2012 and managed software teams and then development organizations. I've worked with a few good developers, a lot of mediocre ones, and a few truly bad ones. It is shocking how few career developers can't explain big-O notation or, even if they don't remember the terminology, do a basic time/space cost calculation for a piece of code. How many think hash tables are the fastest storage structure. How many will blithely write nested loops and recursive functions.

It's a bell curve, but IME anyone to the low side of the median tends to cause as much work for other people as they contribute.

So I don't causally use those generalizations; they're born out of 30 years of experience in industry.

As for JavaScript, there's no better proof than the web. Take any web page at random and odds are good there's going to be more bytes of JavaScript than content on the page. Or, run top and watch which application sits at the top of your CPU and memory use - I can almost guarantee that, over the course of an average day, the thing that burns the most electricity is going to be your web browser. Shit, I can be playing Factorio and see it using less CPU than a WebKit process, because some stupid web page I left open is spinning crappy JS code in the background.