No offence

  • lowleveldata@programming.dev
    link
    fedilink
    arrow-up
    36
    arrow-down
    3
    ·
    1 year ago

    ah yes programming languages are jokes themselves, and not the programmers using the wrong tools for the wrong job

    • Kryomaani@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      10
      ·
      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
        7
        ·
        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
          5
          ·
          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
            2
            ·
            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
              1
              ·
              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).

      • lorgo_numputz@beehaw.org
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 year ago

        I’ve commented to my cow-orkers that “Typescript is the bag they put over Javascript’s face so you don’t have to look at it anymore.”

    • pazukaza@lemmy.ml
      link
      fedilink
      arrow-up
      2
      arrow-down
      3
      ·
      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
        3
        ·
        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
          arrow-down
          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
            2
            ·
            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