• fonji@sopuli.xyz
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Then marketing comes around, asks to add google tag manager, and proceeds to make the client download 10TB of tracking librairies.

    At least node_modules don’t directly impact the browser.

      • jjjalljs@ttrpg.network
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        I don’t know about “fine”. It has a lot of weird stuff baked in. Hoisting. Unexpected type coercion. Too many ways to loop over something and I always forget which one is which. “There’s more than one way to do it” is kind of a recurring problem, come to think of it. Several function declaration syntaxes. Dot notation AND bracket notation for objects.

        Also it will forever bother me that object keys aren’t quoted.

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

        That should be, in my mind, { "hello": "world" } . It’s not. It’s { "foo": "world" }

        But if you want to do that, you need to do const bar = { [foo]: world }. Which looks like your key is an array with one entry, a string with a value of “foo”

        You also end up learning a whole framework, with its syntax and idioms, every couple years. Angular. React. Redux. Whatever.

        There’s also a lot of people who have never used anything else, and want to use javascript for everything.

        Javascript is basically D&D. Wildly popular. Full of legacy jank. People try to use it for anything even though there are better or more specialized tools.

        • Lemminary@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          2 months ago

          After reading the JS Bible and listening to a lot of Kyle Simpson, I don’t find any of those unusual or unexpected, but rather neat in the context of the language. And with enough practice, even the implicit return of an arrow functions jumps out at you.

        • SaharaMaleikuhm@feddit.org
          link
          fedilink
          arrow-up
          0
          ·
          2 months ago

          No need to convince me it’s shit. Also how do you end up only knowing Javascript? Who the hell starts out using Javascript of all the languages?

          • jjjalljs@ttrpg.network
            link
            fedilink
            arrow-up
            0
            ·
            2 months ago

            Anyone entering through web development. If you’re self taught or did a “coding boot camp”, it might be the only language you’ve used. A lot of places use it for backend stuff now, too

            • mindbleach@sh.itjust.works
              link
              fedilink
              arrow-up
              0
              ·
              2 months ago

              Lodash provides modular methods for working with arrays, objects, strings, and more.

              I dunno. If it makes everything Array-like act like a goddamn Array, I’m tempted to start using it.

              ‘What do you mean you can’t .map a Set? It’s iterable! Figure it out!’

              • vithigar@lemmy.ca
                link
                fedilink
                arrow-up
                0
                ·
                2 months ago

                You can though? mySet.values().map(mappingFunc) will create a new iterator transformed by the mapping function.

        • Phoenixz@lemmy.ca
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          JavaScript sucks but I’ll give it this one

          Arrays are complex structures with multiple values. Just because one looks like the other doesn’t make them the same object. It’s like taking two new objects form the same class, they look the same but work independently from eachother. I can add a value to one and the other would be unaffected, they’d both still be the same class

          • Shanmugha@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            1 month ago

            And I can’t take this one. I did not ask if an object referenced by a is the same object referenced by b, I asked if two empty collections of values are equal. And an empty bag can easily be substituted by another empty bag, there is no class/instance tricky business here. And the fact that in JS arrays are objects is again JS-specific insanity. Still I thank you for sharing your thoughts

            • Phoenixz@lemmy.ca
              link
              fedilink
              arrow-up
              0
              ·
              1 month ago

              Well it’s what you’d want but not what it does, for one, but for another: comparing scalars is very easy, comparing complex structures is not. To compare one array with another you’d need to iterate over each element, recursively.

              That JavaScript handles arrays as objects is also not bad, that’s just a language feature that you may like or not, not much can go wrong there. The reassignment of “this” or how JS handlesnumber comparison, yeah, that is infuriatingly bad

      • Phoenixz@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        Oh Hells no.

        JavaScript is NOT fine, it’s … I’m really trying to think of a word that will convey the shit that it is without triggering half the people on Lemmy into an aneurysm, but I can’t find it.

        JavaScript is by far the worst. I’ve been working with JavaScript for the past 6 days and I want to hang myself, it’d be a better fate than continuing

        • Hoimo@ani.social
          link
          fedilink
          arrow-up
          0
          ·
          2 months ago

          Yeah, I had some webpages archived and tried to use javascript to clean them up, but I ended up parsing it as xml through Powershell instead. I’ve done something with Python and BeautifulSoup too, a long time ago. Both much easier than JS, but somehow JS is designed to work with web pages? Make it make sense.

          • Phoenixz@lemmy.ca
            link
            fedilink
            arrow-up
            0
            ·
            1 month ago

            PHP was shit 25 years ago (like everything else back then) and I never bothered to look at it ever again but to this day I keep shitting on it because reasons

            You

      • i_stole_ur_taco@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        Excuse me, but it’s industry practice to always use PlusJs.

        Its just annoying that it has its own dependency on MinusJs.

      • nickwitha_k (he/him)@lemmy.sdf.org
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        Use the modulo operator? Nah. Need to import the isEven library and a ton of other unnecessary sub-50 LOC libraries “maintained” by a single dev to make their CV look more impressive. /s

  • bjorney@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 months ago

    > want to compile 50kb C++ console app on windows

    > 6 GB MSVC installation

          • Kazumara@discuss.tchncs.de
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            2 months ago

            Okay that’s fair. I fricked around with some C++ numerics BLAS header library (I think it was Eigen) on Linux before that was complicated and annoying too. The ARM Fast Models simulator was also a pain. Maybe I just don’t like C++ development now that I think about it.

            C mostly worked okay for me though. And I agree Rust tooling is nice, but admittedly I have not really worked on a big project in it.

    • arty@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      I keep seeing complaints from non JavaScript developers about their IDE not handling millions of files in a folder properly

  • andyburke@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    lol at 3/4 of a megabyte of Vue components being ok and thinking node_modules is the issue at hand.

  • WoodScientist@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    Depending on the design of its memory, a device with a full drive will literally weigh slightly more or slightly less than one with an empty drive. Charging the battery in all cases causes it to weigh more.