No offence

  • quadrotiles@reddthat.com
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Ok, admittedly I was using typescript but honestly, I really enjoyed using JavaScript. I kinda feel like people who shit on it have never used it much, or aren’t very experienced, or it just wasn’t to their taste and they’re jumping on the hate train that the others like to conduct.

    (I also understand this is a joke dw)

    • Primal@beehaw.org
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      My feelings toward JavaScript depend on the context in which I’m using it. I really like JavaScript in a React app or Next.js, but I don’t care for it in Views and Razor page in .NET web applications, though it’s getting better.

    • gamer@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I kinda feel like people who shit on it have never used it much, or aren’t very experienced

      How much experience do you have? (and don’t even think about lying; this is the internet)

      • quadrotiles@reddthat.com
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Definitely 2023 years worth of experience. I taught Jesus himself JS. Which, fun fact, doesn’t stand for JavaScript, but stands for JesusScript. I would never lie on the internet.

        (4ish years lmao)

        • gamer@lemm.ee
          link
          fedilink
          arrow-up
          0
          arrow-down
          1
          ·
          1 year ago

          4 years isn’t enough to hate javascript. Either those 4 years are entirely in JS, in which case it’s all you know and thus you lack perspective. OR, you spent e.g. 2 years with a different language and only 2 in JS, in which case you don’t have enough experience with JS to have an informed opinion.

          Don’t worry though, we all started our JS hating journey like that. Give it a few more years and I promise you’ll be able to hate javascript like the masters.

          • maltroth@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            10ish years here, I don’t hate js. The more modern tools, frameworks and typescript makes it awesome to use for frontend stuff.

          • quadrotiles@reddthat.com
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            I never said I had a total of 4 years experience, only that I had 4 years of JS experience.

            But yes, I will work on honing my hatred. I hope to one day gain a seat at the JSith council and achieve the rank of master.

    • hglman@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      C is back at HQ with 2 Stars and enough political capital to serve till they die.

      • Unicorn 🌳@mander.xyz
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        1 year ago

        C is old, ubiquitous and still does not have a good replacement for its low-level cross-platform usecases, so I’ll believe it when I see it 😄

        • Rodeo@lemmy.ca
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Ada has been around since 1983 and is objectively superior. Yes I will die on that hill.

          It’s too bad programmers are all such egotards they think they can write bugfree programs in C, while whining about how “restrictive” a safe language like Ada is.

        • Hazzia@discuss.tchncs.de
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          I’m not too familiar with C, but I was under the impression that C++ was deceloped as a superset to C, and was capable of everything C could do. Is that not the case?

          • abessman@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            I mean yeah, if you restrict yourself to the C part of C++ it can do everything C can. But then you’re not getting any of the advantages of C++.

            Once you start using things like classes and templates heavily, your program will quickly outgrow low-end hardware.

    • pazukaza@lemmy.ml
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      1 year ago

      Come on, Javascript is pretty nasty. Trying to read that shit always gives me brain tumors. Why do they need to wrap every fucking thing in a function inside a function inside a function that is passed as a parameter to a function inside another function?

      Like, bro, you know people are meant to understand what you just wrote?

      It just gives too much freedom and people forget they need to write code that is easy to read for people who aren’t totally familiar with the code base.

      They even bring that shit into typescript. Like they are already using a language that is meant to fix that shit and they are like, nope, let me create 5 nested functions just because.

      • NotSteve_@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Can you give an example of the multi nested functions? I was a TS dev for a while and don’t remember anything like that. Unless you mean the promise callback functions. Those were a mess but luckily we’ve mostly moved away from those

        • pazukaza@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          People creating functions as objects inside of other functions. A few days ago saw a person create a function with two object functions inside, then passed one of the functions as an argument to the other function. Then returned the second function.

          It’s hard to find such a mess in other languages. Yeha, functions as objects are cool. Closures are also cool… But why abuse that shit?

          • NotSteve_@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Ahh I remember that sort of JS programming from way back. Do people still do that?? You can just create a class now

    • Kryomaani@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      1
      ·
      1 year ago

      While true, there are some languages that are the wrong tool for every job. JS is one of them. I’ve dreamt of a future where web frontends switched to something sane but instead we got stuff like typescript which is like trying to erect steel beams in quicksand. For web frontends I can understand that historical reasons have lead to this but whoever came up with node thinking JS would be a great backend language has a lot of explaining to do.

      • ParsnipWitch@feddit.de
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        I am also interested if anyone can tell me the exact time in our history when JavaScript turned from “Don’t you ever use that anywhere on your websites!” into “It’s basically every website”.

        • abraxas@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          It was when better sandboxing came out and the only valid complaints about javascript became invalid.

          I was there. It was a good time.

          • abraxas@lemmy.ml
            link
            fedilink
            English
            arrow-up
            0
            ·
            edit-2
            1 year ago

            I happened to be a fullstack developer when the transition happened, so I saw it firsthand. I would say it predated V8 by a year or two. By the time V8 came out, I was already writing plenty of (simple) javascript for applications.

            I would say it was more about plugged security holes and Ajax becoming more viable for real-world use. The “don’t ever use javascript” rule came from people disabling javascript because javascript was being used for malware. V8 was a part of that transition and growth, but at least in my memory not the shot that started it all.

            There were developers (and books) pushing Rails+Ajax pretty hard in 2007, a full year before V8’s first release in September of 2008.

            • salient_one@lemmy.villa-straylight.social
              link
              fedilink
              English
              arrow-up
              0
              ·
              1 year ago

              You’re right! I stand corrected and thank you for sharing. There were already big JS apps (notably, Gmail in 2004) before V8 came out. Yet, am I wrong to think Node.js started the JS obsession that lasted for a while?

              • abraxas@lemmy.ml
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 year ago

                I think that’s a hard question. Node definitely helped evolve it. The idea of isomorphism was slow-growing (and yes, originally pretty rocky), but foundational to what we now see as web development. But if I really had to describe the start of the “JS obsession” by my experience, it would be the AJAX explosion, which led to the advent of the “web-based app”. That very first moment of realization that yes, you can do anything on the web. It might be hard for a developer who started after that time, but functionality used to be relegated to windowed and console apps. In that world, you could imagine how useless javascript must have seemed - why do I need to write code to give “functionality” to what was basically seen as a remote pdf?

                But then, I think there’s no surprise to the fact every big company under the sun has some critical contribution to server-side javascript. Back then, most of the dev world were using Perl, Python, Ruby, PHP for their web backends (Java, VB, and C# were used, but too damn hard to write in). At best, those languages were non-ideal but reasonably comparable to javascript. At worst, some of those languages (Perl, lookin at you) were worse than javascript at all the reasons people make fun of javascript now.

                It took a while to kick Rails off the “next big thing” podium, but it was pretty quick that Node was showing offerings that were just better than Perl-catalyst or early Python-Django. It’s funny, Rails was the one with fancy ways to ship javascript from server routes (what a shit show that tech was) back when Node was establishing new best practices on non-isomorphic web apps. I remember when Hapi first came out, backed by Walmart. I then went from being a node hobbiest to believing it was the future. 1 year later I was running a scrappy little node team and we had this little $10M+ telephony app (of all things).

  • dontblink@feddit.it
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    May i ask why everyone hates JavaScript so much? It’s not ironic it’s a real question, i can’t really get it, is it just because it doesn’t have types? Or there’s more?

    • oktupol@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I believe the amount of hate and mockery Javascript receives is heavily skewed, simply because almost every programmer who is active today has at least some experience with the language, and with more users there are also more people capable of complaining about it.

      I work with languages that are much worse than Javascript, yet they don’t receive nearly as much hate because hardly anyone uses them.

      One that comes into my mind is ABAP:

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

      It’s wild that Python is getting a shoutout over javascript despite being an even bigger loosely typed mess.

      I think it’s partially because Python has a reputation as being a serious language for serious people because it’s popular amongst data scientists and academics, whereas Javascript is still seen as being popular amongst script kiddies and people building crappy websites for $100 / pop.

      That being said, most of the time i hear javascript jokes at work they’re pretty tongue in cheek /ironic / the dev isn’t really hating on it. I have heard a dev or two make those javascript jokes with a more serious critical tone, and everyone tends to ignore them and not engage because they’re pretty clearly just haters who have a general tendency to dislike popular things.

      • AGuyNamedMay@programming.dev
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        1 year ago
        1. What lol, python has type hints (ie gradual typing)
        2. Python is absolutly not popular at all in academics lol, most over there use haskell/ocaml/c
    • jjjalljs@ttrpg.network
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      It has a lot of gotchas and an unstable ecosystem.

      A lot of basic stuff is confusing of weird. How do you loop over an object? There’s like five ways. How do you declare a function? There are two very different ways that behave differently, and the new one has like five variations in its syntax that can throw you.

      Here’s an example of something that continues to bother me:

      const foo = "hello";
      const bar = { foo: "world"}
      

      What do you think bar looks like? If you thought it had a key of “hello” and a value of “world”, that’s sensible but wrong. It has a key of “foo”. Object keys don’t need to be quoted in JavaScript. If you want the key to be a variable you have to write it like { [foo] : "world" }. Which looks like a list.

      There’s a lot of this kind of stuff in the language. Small things that once you know you can work around, but are still weird, annoying, and prone to causing errors.

      The standard library historically hasn’t been very good. This has lead to many libraries being maintained by the community. But the community is fickle, and the quality of libraries is not guaranteed.

      The standard library was bad at some basic operations, so underscore was created. But then someone made lodash, and most people (but not everyone!) moved to it. But then the standard library caught up some more, so maybe you don’t need either? When you start working on a new-to-you project you don’t know what you’re going to get.

      Dates were a mess so momentjs got big, but now that’s deprecated. Move to datefns, which has a completely different interface.

      Node releases a new major version every six months. Every six months! Python has been on major version 3 for years and has no plans for a version 4, for comparison. The constant version releases is a potential source for headaches.

      In my experience many libraries are kind of fast and loose with major releases, too. It can be a pain to keep up, especially if you have peer deps.

      The debugger is kind of bad. Sometimes it will pause but you typically can’t like treat it like a repl. Python’s, for comparison, blows it out of the water.

      Many things are async in JavaScript. Sometimes you don’t expect a particular call to be async or you forget, and you have a bad time. The async/await keywords were a godsend. The giant stack of “then…then…then…” was not fun. Combine with the weak debugger and you have an extra bad time. I bet there are a lot of console.log(“code is here”) debug calls out in the wild because of this.

      For your actual front end view layer, react is the current hotness. But older projects are still out there with angular, backbone, probably some with just jQuery. React isn’t terrible but how long is it going to be king? What breaking changes are they going to put out in the next version? The ecosystem is unstable.

      Also redux kind of sucks. Not a fan of global variables. I think the community has moved on from redux though? Again, the ecosystem is unstable.

      In my experience there are many developers who only know JavaScript, and they want to use it for everything. It is the dungeons and dragons of languages. Much like how it is frustrating when your friends want to run a cyberpunk murder mystery in Dungeons and Dragons, it can be frustrating when your team wants to write everything, even your backend, in JavaScript.

      We had browser tests at one job. They’re a very synchronous thing. Open the browser, load the page, enter name and password, wait for login. We had all of this written in python working fine, but people wanted to switch to a JavaScript toolset. Sorry, I mean they wanted to switch to JavaScript but there were three different browser testing tools the different teams wanted to use. Because the javascript ecosystem is like that. After a more candid talk with one of the guys I knew personally, he admitted it wasn’t because JavaScript was the best tool but rather he didn’t want to use python.

      I can’t authoritatively say this is typical, but in my experience I’ve had a lot of resistance from JavaScript devs using other languages. Again, I think it’s like DND. DND is a unnecessarily complicated game full of exceptions and gotchas. If that’s what you learn first, you probably think everything is like that, and why would you want to go through that again? But of the popular languages/games, javascript/DND are exceptional for their weirdness.

      In fact, thinking about it for more than a minute, my current team lead is a JavaScript main and he’s great. Super willing to learn other languages and has never been pushy. So it’s definitely not everyone.

      The stack traces tend to be kind of bad. In production shit is probably minified so you might get “error on line 1, column 4737373”. In other contexts you may get a few hundred lines of node_modules to sift through before finding your actual code.

      At least jest and (react) testing library aren’t bad. Mocha + chai were annoying. Enzyme is not great. Again, things change rapidly. You might join a company and find they’re still using mocha and enzyme, and switching never gets prioritized. If JavaScript made things better without breaking changes or swapping to an entirely new toolset it wouldn’t be a serious problem, but the standard mode seems to be “fuck it let’s make an entirely new tool”.

      The lack of type hints isn’t great. You can use typescript but that’s a whole new set of stuff you have to set up. Python also doesn’t have types but they managed to add them as an option without making us switch to like TypeThon. But that’s not the JavaScript way. If you’re not making a breaking change are you really doing JavaScript?

      I could go on, but my cat is getting up to some bullshit and I need to see what he’s screaming about. Probably not JavaScript.

      tldr:

      • standard library kind of bad
      • ecosystem unstable and of variable quality
      • unpleasant personal experiences with JavaScript developers wanting to use it for everything
      • dontblink@feddit.it
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Gotta say thar for someone who is currently following a JavaScript course this is pretty descouraging ahaha

        I gotta say i also fell in that category of people trying to use JavaScript for stuff that is not exactly JavaScript suited. For example i’m writing a little script that changes markdown links in some files using the fs node, this is probably better suited to do in bash or other languages but the first thought was: i know a bit of JavaScript and that took a lot of time, what would be the point of learning a new syntax with all the stuff i will have to learn only on js!

        • jjjalljs@ttrpg.network
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          If it makes you feel better, many of the things you learn in JavaScript will be helpful in other languages. You already know what functions are, for example, so you don’t need to relearn that. Even though JavaScript has some weirdness about functions.

    • fiah@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      it has a lot of cruft and gotchas and lacks a good standard library (which is why npm is a thing). That means there’s a lot of bad javascript code out there and a lot of people who have had bad experiences with it. But, if you take care to not shoot yourself with the included footguns and you know your way around npm, it’s a perfectly fine language for its purposes in front- and backend development IMO

    • Iteria@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Because it’s inescapable. Web development is by far the most common type of programming work and even if you’re a backend developer you tend to have to touch javascript at some point, so everyone knows the pain of javascript’s foot guns and javascript has a lot.

      The fact that it’s mandatory to do your work invokes bitterness in people. For backend, you can kind of switch around until you find a language you like. For frontend, it’s javascript or nothing at all.

      Javascript as a language is very out of sync with other commonly used languages. Its footguns are very easy to run into. As a result you have a lot of rituals around just not shooting yourself in the foot. The rituals, libraries, and frameworks around avoiding Javascript’s foot guns have been very shifting and changing. Of course, because the javascript ecosystem changes far faster than other languages, there are a lot of rakes for developers to step on to add to the naturally existing foot guns.

      Javascript as a language probably shouldn’t be the sole language of the internet for a variety of reasons. It’s a very hateable language because of how easy it is for newbies to make new terrible code and how common it is. Until something like WASM takes off, the downpour of hate for javascript will continue.

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

        Javascript as a language is very out of sync with other commonly used languages.

        How so? Moving back and forth between Typescript and C# / Java is pretty natural imho, as long as you understand the compiled vs interpreted differences.

    • monk@lemmy.unboiled.info
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Let me suggest a simple exercise for you.

      1. Print “Hello world!” to stdout in Javascript.
      2. Show me the standard that guarantees that everything you’ve used exists and works as intended.

      I’ll wait.

      • masterspace@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Show me the standard that guarantees that everything you’ve used exists and works as intended. I’ll wait.

        I think you fail to understand the very basics of web development if you’re operating on the assumption that everything you need is always reachable.

    • Redrum714@lemm.ee
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      1 year ago

      Glad C++ will be the one step on it cause it deserves it. I’d take PHP over that shit any day

      • LeFantome@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Well done.

        That is like a colleague farewell card that says, “Four years already? It seems like only six months with all that we have accomplished.”

        • superbirra@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago
          • loosely typed: python is the same

          false

          • bad package manager: python is infinitely worse

          don’t think so but ehy…

            • jerkface@lemmy.ca
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              1 year ago

              Objects have strong, definite types that never change. Variables do not have types and can store [a reference to] any Object.

            • static_motion@programming.dev
              link
              fedilink
              arrow-up
              1
              arrow-down
              1
              ·
              edit-2
              1 year ago

              You clearly have no idea what you’re talking about. Python is strongly typed. What is is is dynamically typed, also known as “duck typing”.

            • min_fapper@iusearchlinux.fyi
              link
              fedilink
              arrow-up
              0
              arrow-down
              1
              ·
              1 year ago

              Yep last time I tried python, it’s type checker was so, so much worse than typescript.

              Everyone I’ve met saying python is better turned out not have used modern JavaScript/typescript.

              • Joe_0237@lemmy.ml
                link
                fedilink
                arrow-up
                2
                ·
                1 year ago

                I’m sure that’s the case, but the meme is not making fun of typescript, its making fun of his dad: JavaScript, maybe for not comparing to his son: typescript

    • Rodeo@lemmy.ca
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      Afaik JavaScript only runs in a browser. If you want to make a desktop app your only option is something like electron.

      For example, you can’t make the equivalent of a bash script with JS, but it’s trivial with python. I don’t think you can do system calls at all with JS.

    • Valmond@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Python is cool IMO, got loads of libraries and gets your little app up in notime.

      Not for larger projects though.

      JavaScript is like the unsafest language I have touched in the last 20 years, yikes!

      Still would use it as a web front end instead of python ofc.

      • Hazzia@discuss.tchncs.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        I’ve only used python as a bash alternative for scripting, even though I’ve heard it’s capable of more. Can you explain what makes it bad for larger/frontend projects?

        • jflorez@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Before 3.9 the lack of type hints made it a nightmare for large projects. Strong typing is, among other benefits, a way of self documentation and helps IDEs with auto-complete. If I use Python I always use type hints and if I have to use JS sigo with Typescript instead

          • pazukaza@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Python without type hints is torture. I always need to have the fucking docs opened for anything, and if the docs are bad you’re screwed, get ready to read the source code. Like fucking hell man, just let me autocomplete this shit…