• GTG3000@programming.dev
    link
    fedilink
    arrow-up
    50
    ·
    11 months ago

    I’m with the right answer here. / and * have same precedence and if you wanted to treat 2(2+2) as a single unit, you should have written it like (2*(2+2)).

    • sushibowl@feddit.nl
      link
      fedilink
      arrow-up
      73
      ·
      11 months ago

      It’s pretty common even in academic literature to treat implied multiplication as having higher precedence than explicit multiplication/division. Otherwise an expression like 1 / 2n would have to be interpreted as (1 / 2) * n rather than the more natural 1 / (2 * n).

      A lot of this bullshit can be avoided with better notation systems, but calculators tend to be limited in what you can write, so meh. Unless you want to mislead people for the memes, just put parentheses around things.

      • GTG3000@programming.dev
        link
        fedilink
        arrow-up
        13
        ·
        11 months ago

        That’s fair. Personally, I just have a grudge against math notation in general. Makes my programmer brain hurt when there’s no consistency and a lot of implicit rules.

        Then again, I also like Lisp so I’m not exactly without sin.

          • GTG3000@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            11 months ago

            I know what video you linked even without clicking lol. Yeah, I can agree there. Although my only experience with music was “try to learn guitar, get distracted because ADHD”.

            • Jarix@lemmy.world
              link
              fedilink
              arrow-up
              3
              ·
              11 months ago

              The rocksmith game might help you.

              Even guitarhero/rockband will help you with using your fingers and will help when you want to try a real guitar. Muscle memory might not be great but for someone who is just doing it for fun it will be helpful getting your fretting and strumming coordination. And them being games might help fend off the adhd enough to keep you motivated to pick it up again after putting it down

              • GTG3000@programming.dev
                link
                fedilink
                arrow-up
                1
                ·
                11 months ago

                I appreciate the sentiment, but I really don’t have time for another hobby.

                I did accidentally become a DM for not one but two DnD groups recently.

            • AngryCommieKender@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              11 months ago

              I started with piano, technically, but I was 3-4 years old, and don’t remember any of it. I can sit a piano and make it sound good, but I can’t play sheet music on it. I switched to violin in second grade, and then just learned how to play everything except for rhythm guitar, and piano. Chords mess with my fingers. Strangely enough my ADHD allowed me to super focus, but I never got the hang of sight reading, so I mostly play by ear, but no one can tell.

              I can even play a didgeridoo, and that required me to learn circular breathing.

      • Ultraviolet@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 months ago

        The problem is whether or not that rule is taught depends on when and where you learned it. Schools only started teaching that rule relatively recently, and even then, not universally. Which of course makes for ideal engagement bait on your hellsite of choice.