• masterspace@lemmy.ca
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    7
    ·
    edit-2
    4 months ago

    People dislike JS because it’s packed full of moronic footguns and technical debt.

    Lol, no it’s not. The literal only footgun is the truthiness aspect of equality and using ===, and it’s really not hard to figure out and avoid. Especially given that linters will automatically flag it for you.

    TypeScript is better, but at the end of the day it’s just an illusion. Add an any anywhere, which will happen, and you’re back to square one.

    It is extremely easy to not let any slip into your code, you do this little thing called review code before merging. Crazy, I know, but by just following the most basic software development practices it turns out you can also avoid other basic junior mistakes! Wild right?

    And lmao, oh my god the web ecosystem is ass because a framework for producing robust complex applications isn’t just an html and CSS file? Lmao bruh, tell me you’ve never coded in a different language without saying you’ve never coded in a different language. You think a .csproj or a .gradle file is simpler and more intuitive?

    You’re mistaking basic junior programming mistakes for issues with the language.

    • Mia@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      13
      arrow-down
      3
      ·
      edit-2
      4 months ago

      Lmao bruh, tell me you’ve never coded in a different language without saying you’ve never coded in a different language.

      I’ve been a software developer for over 10 years, on both on the front end and the back end.
      I’ve worked with jQuery, React, plain old DOM manipulation, god damn PHP. I’m not new to web development.

      Outside of web technologies, I’ve worked on nautical charts processing software and microcontroller firmware in C, C++ and Rust.
      I’ve worked on native GUI applications with C++, Java and C# using JavaFX, WPF, GTK, Qt.
      All under strict corporate standards.
      I also work on compilers and rendering engines in my spare time.

      So no, I’m not a “junior programmer” making “basic junior programming mistakes”. Your favourite language is ass.
      You shouldn’t immediately jump to the conclusion that someone has never written a line of code only because they say so.
      Sorry if it hurts your feelings, but even senior developers, web or otherwise, say it. I’m not the one swimming against the current, you are.

      And lmao, oh my god the web ecosystem is ass because a framework for producing robust complex applications isn’t just an html and CSS file?

      Alright, let’s do a little experiment, shall we? Let’s try and create an empty electron app with React and TypeScript.
      A quick create-electron-app and some configuring TS, ESLint and WebPack later we reach a whopping 3_087_725 lines of code. 3 million lines. ~700MB.
      This all requires a linting step, a pre-compilation step though tsc, multiple additional translation steps through webpack for older ES versions.
      All of that for an empty page on a webview.

      This is batshit crazy. And I come from fucking CMake for crying out loud.
      There is nothing robust about this, the slightest misstep and your sourcemaps are fucked.
      Whoops the author of left-pad decided to pull it from npm - half the JS ecosystem on its knees.
      Whoops the author of is-even one day decides it’s a stupid package to need - half the JS ecosystem on its knees.

      Web developers are standing on a crumbling, fermenting pile of shit. Get over it.

      With that said, you can still enjoy JS and all the web stuff, there’s nothing wrong with that…

      • masterspace@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        8
        ·
        4 months ago

        Sorry if it hurts your feelings, but even senior developers, web or otherwise, say it. I’m not the one swimming against the current, you are.

        Lmao bro, I don’t think I’m the one with hurt feelings given your unhinged credential boasting and several paragraphs of unprompted bitching about electron.

        You make basic JavaScript mistakes that should be caught by linters, and certainly by any intermediate to senior level reviewer. Get over it and learn to be better and not make basic mistakes.

        • Mia@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          7
          arrow-down
          2
          ·
          edit-2
          4 months ago

          You seem to confuse “people making mistakes” with “a language that is designed in such a way that those mistakes are not only common, but integral part of the experience.”

          I’m not saying I make such mistakes, I say the design is crap. It’s not a skill issue, it’s a design issue. People say null pointers were a mistake. I’m inclined to agree. Not because I get a null pointer exception every five minutes, but because there are better ways to handle cases like that.

          You said I was a rookie, I proved you wrong.
          You said there was nothing crazy about web application complexity, I provided you with a common, glaring example. There’s nothing unhinged in saying “look I installed Electron and React and not my project has 3 million lines of crap I have to worry about”.
          Everything else was just emphasis for the sake of it.

          But when you don’t have a valid argument, you resort to personal attacks. Maybe it’s you that should learn to be better.

          • urshanabi [he/they]@lemmygrad.ml
            link
            fedilink
            arrow-up
            1
            ·
            4 months ago

            Hi, I don’t really code besides computation stuff in Python. You seem to be really knowledgeable, could I ask, what does the future of the web look like? Is it Rust and WASM? Or will JS and TS always have a place even a decade from now?

            • BatmanAoD@programming.dev
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              4 months ago

              The fairly unique thing about the web is that the tech stack is pretty much entirely dependent on what browsers are “winning” at any given time. There are web standards, but Chrome steamrolls them regularly (either by ignoring them or by pressuring the committee to standardize what they want). This is why browser monoculture is bad, and why people recommend Firefox and other non-Chrome (or really, non-WebKit) browsers, as a matter of principle.

              So right now, with Chrome’s dominance, Mozilla’s struggles, and the extremely slow progress of WebAssembly and WASI, it definitely feels like JavaScript will remain dominant for a long while. But since Chrome does support WebAssembly and Google participates in WASI, and since there’s no fundamental reason why WASI can’t eventually provide everything that JS does today, there’s good reason to expect the JS stranglehold not to last forever.

              And the great thing about WASM/WASI is that, since it’s designed as a compilation target rather than a language, there won’t be any remaining reason for a single language (such as Rust) to dominate. Rust got an early lead in WASM because they put the effort into making it a viable target platform for the compiler, and because it’s the kind of language that attracts people who dislike JavaScript (such as myself). But there’s no reason a different language couldn’t rapidly become the most commonly used WASM language if, say, a web framework in a previously-niche language becomes popular. (After all, Rails, a back-end framework, is what popularized Ruby.)

              Edit to add: I say “fairly unique”, but in fact there’s a very analogous situation with C: https://faultlore.com/blah/c-isnt-a-language/

          • masterspace@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            3
            ·
            edit-2
            4 months ago

            I’m not saying I make such mistakes, I say the design is crap. It’s not a skill issue, it’s a design issue.

            That’s what people with skill issues tend to say.

            You learned how to write == in every other language, but you can’t figure out === in typescript?

            You’re bitching and whining about a tiny syntax issue that enables backwards compatibility for literally every web site ever created.

            You said I was a rookie, I proved you wrong.

            You apparently still bitch and whine like a rookie. Maybe work on your emotional maturity if you want to come across as an experienced senior and not just a Reddit-read edge lord.

            You said there was nothing crazy about web application complexity, I provided you with a common, glaring example.

            No, you didn’t.

            There’s nothing unhinged in saying “look I installed Electron and React and not my project has 3 million lines of crap I have to worry about”.

            Yes, there is, given that the vast majority of web applications run in this thing called a web browser, and you decided to instead choose the project example where you install a whole web browser alongside operating system shims into your project.

            • Mia@lemmy.blahaj.zone
              link
              fedilink
              arrow-up
              6
              arrow-down
              2
              ·
              4 months ago

              That’s what people with skill issues tend to say.

              Not that’s what people who can recognize genuine architectural defects and aren’t blind fanboys say.

              You apparently still bitch and whine like a rookie.

              Only to your eyes since apparently pointing out genuine problems is whining. It’s okay for people not to like the stuff you like. And no, using a few swear words for emphasis doesn’t make someone immature, nor does listing what one has worked with for context.

              You learned how to write == in every other language, but you can’t figure out === in typescript?

              …you still haven’t realised that === is not what I have a problem with have you? It’s literally a non issue. In fact, equality in general is a non issue. It’s the wonky standard library, lack of proper support for binary operations, serialization and almost everything being an afterthought that I have a problem with. Does it prevent me from using the language and write proper, stable software? No. But it’s not good.

              you install a whole web browser alongside operating system shims into your project

              Except that amounts to a mere ~180_000 lines of the 3 million. Did a plain create-react-app without Electron, still over 3 million.

              Now, since it’s impossible to have a genuine conversation if the other party’s response is “haha you suck” to any genuine, documented criticism, are you gonna grow up or are you gonna keep acting like an offended 13 year old who can’t find a better retort?

              • masterspace@lemmy.ca
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                4 months ago

                Not that’s what people who can recognize genuine architectural defects and aren’t blind fanboys say.

                That’s what people say to people who don’t raise valid criticisms but just go on unhinged rants about how credentialed they are.

                …you still haven’t realised that === is not what I have a problem with have you? It’s literally a non issue. In fact, equality in general is a non issue. It’s the wonky standard library, lack of proper support for binary operations,

                Wonky standard library? Name your issues.

                Lack of proper support for binary operations? Like Jesus Christ you also frustrated by a lack of direct access to the assembly instruction set? Do you know why those arent properly supported? Because it doesn’t come up for 99.99% of software developers, and for those who do need to do bitwise math and manage memory directly, you have the entirety of Web Assembly available to you.

                serialization and almost everything being an afterthought that I have a problem with.

                As opposed to other languages where the entire concept of functional and async programming were implemented after the first version? Name your specific criticism of how JavaScript implements serialization that you don’t like.

                Except that amounts to a mere ~180_000 lines of the 3 million. Did a plain create-react-app without Electron, still over 3 million.

                Who the fuck cares? Do you know how much easier it is to parse through and find a problem in 3 million lines of JavaScript code then it is to try and figure out what part of the millions of lines of closed source compiled code that make up Java or C# or whatever other language you like?

                You’re also using a deprecated project, and you’re checking against the dev version with dev dependencies, not the final minified version. Oh my god look at how big this Java project is before I compile it, what a nightmare!!1!1!1!

                You’re the one who came into this thread bitching like a Reddit edge lord about the most popular language and the most successful cross platform development platform in the entire history of programming, I’m the one saying it’s no worse than any other major languages and is better than many of them.

                But no, I’m sure it’s the millions of successful developers and users who are wrong. Everything is shit but you amirite?

                • Mia@lemmy.blahaj.zone
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  edit-2
                  4 months ago

                  Oh my god look at how big this Java project is before I compile it, what a nightmare!!1!1!1!

                  When shipping to customers, all code is your responsibility, dependency or otherwise. A bug or a security vulnerability, which aren’t rare in the JS ecosystem, is your responsibility whether you wrote the code or not. Customers don’t care if someone else wrote it, it’s your product, you are to blame. Thus, the less code, the better. Less moving parts also means more stability in general.

                  the most popular language and the most successful cross platform development platform in the entire history of programming

                  But no, I’m sure it’s the millions of successful developers and users who are wrong.

                  People can be successful with things that aren’t perfect. It’s often a matter of being the first, not being the best. Something can be popular and still not be good, momentum is hard to stop. If JS’s own creator saying so in the last few years can’t convince you of that, I don’t know what will. Flash at one point was the most popular. It was still flawed, and a liability, but I bet that doesn’t hurt you as much to hear.

                  Everything is shit but you amirite?

                  Quite the contrary. I have flaws like everybody else, but at least I don’t deflect every single criticism of stuff I like because in can’t fathom it not being perfect. It’s fine, use it. Maybe one day you’ll find a platform that’ll make you realize there’s better stuff out there.

                  But I’m done arguing with you. I should have known by the tone of your first reply that this wasn’t going to be a real discussion, just you being butthurt because someone said something negative about your favourite language. Go get butthurt somewhere else.

                  • masterspace@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    edit-2
                    4 months ago

                    You still havent actually articulated a single criticism that’s not a vague generality, after coming in like an edge lord ranting about it like it’s the devil spawn.

                    And yeah bud, all the code you ship is your responsibility, which is why building on open source code that you can fix whenever you need is far preferable to building on a closed source compiled black box like most languages.

                    People can be successful with things that aren’t perfect. It’s often a matter of being the first, not being the best. Something can be popular and still not be good, momentum is hard to stop. If JS’s own creator saying so in the last few years can’t convince you of that, I don’t know what will. Flash at one point was the most popular. It was still flawed, and a liability, but I bet that doesn’t hurt you as much to hear.

                    Lmao, one salty dev, vs the literal millions of seniors developers and fortune 500 companies who disagree and choose to use it.

                    Again, if it’s a liability name how, if your argument is “oooo open source scary, there’s no way to verify it, I’ll trust Oracle to give me a closed source compiled library that’s sure to be flawless”, I’m going to laugh in your face. Supply chain attacks are a problem, they are not an unsolvable one or even a particularly difficult to address one compared to the benefits of open source.

                    Quite the contrary. I have flaws like everybody else, but at least I don’t deflect every single criticism of stuff I like because in can’t fathom it not being perfect. It’s fine, use it. Maybe one day you’ll find a platform that’ll make you realize there’s better stuff out there.

                    Try and quit bitching about tone and vague bullshit you heard on Reddit and articulate an actual real world problem that you have with it on a day to day basis. You came in here screaming it’s shit like the devil’s spawn, all I’ve done is ask you to explain why and point out why issues like equality comparison, converting to 32bit for bitwise operations, and it being open source, are not big deals for most devs.