‹ BackHN Continuity

Thread

The JavaScript Midlife Crisis

56 points · 75 comments · maroun-baydoun

  1. hn_submit · · focus · HN ↗
    JavaScript is an abomination that never should've been left alive.

    And yes, I ask myself the question: "Who in his right mind would run JavaScript on the server and even write business logic in it?" Lots of idiots in this world it seems. JavaScript is the reason our text editors need 16GB of RAM to run these days and a simple weather app 1GB.

    In the ol' days assembly programmers probably could've written the weather app in a couple of KB (that's a MILLION times less memory people).

    1. MiroslavPokorny · · focus · HN ↗
      Exactly!

      In todays of multi processors, its seems completely backward to adopt a runtime that is limited to a single thread.

      1. suplexer · · focus · HN ↗
        JS has Web Workers in the browser and Worker Threads module in nodejs for parallelism. Most apps don't need to them to be fast, but many slow apps would be less slow if Workers were used more often.
        1. MiroslavPokorny · · focus · HN ↗
          Node is a single thread per process.

          While other languages leverage sharing memory amongst multiple cpus, node requires a process per CPU.

    2. suplexer · · focus · HN ↗
      A programmer that can write a small efficient weather app in assembly can also easily do so in JS. Especially writing it in a c-style imperative way.

      Modern Javascript has many low-level facilities and a great VM. You're conflating the low, average skill of the JS community to what the language is capable of.

      1. shimman · · focus · HN ↗
        People say this yet still are served some of the worse performing apps from supposedly the "best" corporations in the industry.
        1. suplexer · · focus · HN ↗
          Low average skill unfortunately includes them as well. I say unfortunate because, like the build tool developers, they serve an outsized audience with their poorly written apps.

          But, to be fair, large tech corporation have many other roadblocks to better software quality, well before you reach testing individual skill levels. Moral decay and office politics to say the least...

        2. hn_submit · · focus · HN ↗
          I can relate to some "dumbing down" of developer tools and languages. Java and C# are examples and those are fine. But JavaScript?!

          Employers are absolutely fixated on gutting developers' salaries and going so far as to building their entire business on molasses by using JavaScript.

          1. pjmlp · · focus · HN ↗
            I really hate that several vendors when moving from PaaS to SaaS, have dropped their Java and .NET SDKs, and now the only thing they have is Next.js integrations.
      2. hn_submit · · focus · HN ↗
        We shouldn't be using scripting languages for anything but animating something on a web page. The idea behind NodeJS is idiotic. We shouldn't allow low-skilled programmers to write server software.

        If A.I. code generators put a stop to this then it will have served its purpose IMHO.

    3. LoganDark · · focus · HN ↗
      From experience... It was really amazing to share TypeScript protocol definitions between the server and client. The client side would get all the autocomplete and intellisense and typed goodies, the server side used a compiler extension called typescript-is to validate the request bodies in one go, using the types as the source of truth. I loved not having to duplicate the validation logic in a separate way and manually maintain it to be consistent with the types. To this day I think that was the most natural way I've ever written a server-client pair and to this day nothing's compared, even supposedly cross-language things like protobuf. Ugh, TypeScript is so good at what it does. Sometimes I hate the lack of nominal types, but it really is up there with Rust as one of my favorite languages.
    4. agos · · focus · HN ↗
      come on, you can do better than hurl insults at fellow programmers
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.