• Zeth0s@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    1 year ago

    That’s absolutely the opposite for me. Math language is extremely good in summarizing extremely complex logic in few lines. We have huge ML projects with a looot of logic, that can be summarized with either 10 lines of math or 100 lines on English overwhelming cognitive complex.

    Math is the best language we have for logic.

    This meme is the proof, left representation is more concise and clearer than the for loop, and therefore allows for easily represent much more complex logic, while for loops become quickly unreadable (map and reduce are for instance more readable)

    • maegul
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      2
      ·
      1 year ago

      This meme is the proof, left representation is more concise and clearer than the for loop

      Except you know what the left side is saying already. That’s a language and a phrase in that language you know well. What about people who don’t?

      • Zeth0s@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        1 year ago

        And what about people who don’t understand a for loop? Who is the strong majority? You are underestimating the complexity of programming language specific syntax. What is for, i++, {}, *= for uninitiated?

        • maegul
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          1 year ago

          Code is something you can play with in a variety of environments and get an intuition for through experimentation. Its a system you can inspect and manipulate and explore yourself. It’s also a language which you can use yourself and create your own abstractions incrementally if helpful.

          Ideally better syntax would be used for learning, a Python style rather than C style for loop for example, in which case you’re starting to get toward natural language.

          In the end though, I’m not putting programming languages on a pedestal here. I’m saying mathematical notation ought not be thought of as the only way to express and understand mathematical ideas, especially for the purposes of learning, on which some of the points I made just above are relevant as is the link I provided further up. Whatever efficiency it can bring, it also brings opacity and it’s inevitably useful to be prepared to provide other expressions of the equations or systems.

        • beefcat@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          1 year ago

          The difference is, a for loop is one of the first things any new programmer learns. Anybody with any programming experience can understand the examples on the right, as they follow the same C-like syntax used by a majority of modern programming languages. Kids used to figure this stuff out just learning to customize their MySpace pages.

          Few people learn what the symbols on the left mean before they start taking higher math courses in high school, nearly 10 years into their formal math education.

          This isn’t to say one way is better than the other, both examples are built for different use-cases. But I wouldn’t be surprised if in 2023, there are more poeple alive who understand the for loops than sigma notation.

          • Zeth0s@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            1 year ago

            Few people? They are high school level where I grew up. Literally everyone with high school diploma must understand at least the sum. In many high schools the final math exam must include at least one integral, that is the infinitesimal sum.

            Programming on the other hand isn’t thought in most schools

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

              Programming is taught in cheap educational microcontroller kits aimed at 12 year olds. You can find them in the STEM section of just about any toy store. This idea that few people ever learn to code before calculus seems crazy to me, most of my peers were at least writing simple scripts by middle school. This is because programming is much more easily self-taught than other STEM subjects, and can be used to solve more immediate everyday problems kids who grew up with computers might seek to solve.

              I’m not saying everyone learns to code before they learn higher math. I am saying that you shouldn’t be surprised that the comparisons in the OP have proven popular and insightful for a lot of people, because there are a lot of us who learned to code first.

              They are high school level where I grew up. Literally everyone with high school diploma must understand at least the sum.

              My school district in Utah did not require any math credits beyond Algebra 2 at the time I graduated. trig and calculus were classes I took because I wanted to. But Utah’s STEM requirements are woefully inadequate in my book.

      • Kogasa@programming.dev
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        It would really, really suck if we had to do math with for loops instead of sigma notation. It’s egregiously common. It’s also just not that hard to learn. For example, you can look at this meme and pretty much know how to read it.