• Redkey@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    1 hour ago

    JS has saved me many hours of mind-numbing, error-prone manual keyboard work by giving me a way to hack together a simple bit of automation as a web page.

    Even when a computer has been ham-fistedly locked-down by an overzealous IT department, I can almost always still access a text editor and a browser that will load local HTML files.

    • arcterus@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      38
      ·
      5 hours ago

      For something you’re getting paid for, sure. But if you’re contributing in your free time for fun or whatever, presumably you’d prefer to use a language you actually like.

    • TeamAssimilation@infosec.pub
      link
      fedilink
      arrow-up
      31
      arrow-down
      10
      ·
      edit-2
      5 hours ago

      Real programmers will write in a way that user’s resources are not being wasted because you need a full browser, a JS runtime, and DOM juggling, to show even the simplest application.

      It’s not rare for simple JS applications to consume over half a gigabyte of RAM on startup, and way more CPU than their native counterparts. That this was normalized and even defended is stupid.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        21
        ·
        4 hours ago

        I think you’re thinking of Electron apps, but that’s not really a criticism of JavaScript, that’s a criticism of Electron. There are plenty of JS platforms that don’t require a browser/DOM. React Native is the biggest example. Also, GJS if you want native Linux apps.

  • SethranKada@lemmy.ca
    link
    fedilink
    English
    arrow-up
    34
    arrow-down
    4
    ·
    7 hours ago

    Feels the same whenever a project is written in python, but I uninstall it too.

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        23
        ·
        6 hours ago

        Personally, I find that (complex) software implemented in Python tends to be so unreliable that I typically don’t want to use it after all, but I only find that out after wasting a bunch of time learning the software.
        It’s just frustrating, especially if I come back to the software every so often, naively thinking that it’s been a few versions, so maybe they’ve fixed it. It’s always just different bugs, which still end up being too frustrating to use the software.


        To give an example, I like to compose music using Lilypond, which is more-or-less a programming language to create sheet music. And there is a program that’s supposed to give you a well-integrated workflow for that (i.e. an IDE), called Frescobaldi.
        The first time I tried it, playback of the composed music wouldn’t work.
        The second time, I couldn’t click on notes to jump to the respective code snippet.
        And I tried it again a few weeks ago and it just crashed immediately with an obscure error message.

        Instead, I’ve slapped together a script, which just opens the sheet music in my PDF viewer, the code in my normal editor and then uses a CLI tools to generate and playback the sheet music. And while it’s definitely not perfect, it has been working more reliably for me than Frescobaldi ever has.

  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    9
    ·
    7 hours ago

    Some of the best software is written in JavaScript.

    • Uptime Kuma
    • Immich
    • Supabase
    • VS Code/VSCodium
    • Ionic (what the Voyager Lemmy client is written in)
    • Expo/React Native (which powers probably a third of your apps)
    • arcterus@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      23
      ·
      5 hours ago

      This doesn’t really conflict with the post. They use and appreciate the software, so presumably it’s decent. You can write good software in any language, so it doesn’t prove that the language itself is good. IMO JS is a popular language, not a good language.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            2 hours ago

            I’ve never really found the type conversions that bizarre, unless you’re doing something weird like casting an array to a string or number. I don’t really use strange type casts, since I use TypeScript and avoid using the “==“ operator. What other things make it not good?

            • arcterus@piefed.blahaj.zone
              link
              fedilink
              English
              arrow-up
              4
              ·
              1 hour ago

              I mean, just the fact that you’re using TS instead of plain JS (and that TS even exists) should tell you that the language has issues…

              • hperrin@lemmy.ca
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 hour ago

                It’s just strict typing on top of plain JS. I like strict typing. Some people like loose typing.

                • arcterus@piefed.blahaj.zone
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  35 minutes ago

                  I’m pretty sure most people do not like JS’s loosey-goosey, who-knows-what-ur-gonna-get type system, which is why TS is so popular. Not really surprising since the bones of the language were basically spat out in a couple weeks. TS is a custom type system on top of JS, meaning it’s not just JS’s type system expressed through strict typing. They added a bunch of useful features like discriminated unions and so on to make using TS more pleasant than raw JS.

                  TS is actually usable (although NPM and the environment built around it still suck). It’s inherited a bunch of weird shit from JS, but the type system generally makes them bearable.

              • hperrin@lemmy.ca
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 hour ago

                Considering TypeScript is a superset of JavaScript, you certainly can. But, that generally means you’re using TypeScript poorly.

    • CeeBee_Eh@lemmy.world
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      6 hours ago

      Taking Immich as an example, there’s a lot of heavy lifting happening there behind the scenes in external libraries that are not written in JS.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        It’s written for Node and Svelte. But sure, just like nearly all other software, they use external libraries.

    • Oisteink@lemmy.world
      link
      fedilink
      arrow-up
      8
      arrow-down
      6
      ·
      6 hours ago

      So uptime kuma being written in JS proves what about the language?

      90% of the worst software and websites are made in js

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        1
        ·
        6 hours ago

        Well, all websites are written in JS (on the frontend), so I don’t think that’s fair. And I don’t think 90% of the worst software is made in JS. Even if you’re an Electron hater, Electron apps aren’t bad software, they’re just bloated. There’s tons of shit software written in C. I would guess a lot more than is written in JS, just because more software is written in C. C is also way easier to shoot yourself in the foot.

        Uptime Kuma (and others) show that JS can be used to make awesome software. The language doesn’t really hold you back, it’s just your own skill. If you suck at writing software, it doesn’t matter what language you use, your software will be shit.

        • The_Decryptor@aussie.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          16 minutes ago

          Well, all websites are written in JS (on the frontend)

          Not true anymore unfortunately, some sites are using frameworks compiled to WASM instead.

          e.g. X is apparently using Yew now.

          Edit: Ok the “apparently” is doing heavy lifting, since now I can’t find the original source I read about it. Turns out “X” is a garbage name with no searchability, only an idiot would use it.

        • Oisteink@lemmy.world
          link
          fedilink
          arrow-up
          6
          arrow-down
          4
          ·
          6 hours ago

          So any language is good as I can make great software using it?? IMO js is still a mess and NPM is really full of shit code to prove it.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            4 hours ago

            I didn’t say that. You can make great software in Brainfuck, but I don’t think anyone has ever said it is good because of that.

            People do make good software in JavaScript. Knowing JavaScript is an exceptionally useful skill, and JavaScript is pretty easy to become decent at. The learning curve for JavaScript is relatively low. As such, there are tons of JS devs, many of which want to make cool things. JavaScript is undeniably an approachable language. Whether you personally think it’s a good language doesn’t have any bearing on that, but that means tons of people are going to use it to make cool software. To me, its approachability is one of the many things that make it good.