• Aesthesiaphilia
    link
    fedilink
    351 year ago

    I mean you’ve just translated from a language most people don’t speak to a different language most people don’t speak

    • @Zeth0s
      link
      10
      edit-2
      1 year ago

      A simpler language many people know (math) to one of the imfinite dialect of a language most people don’t speak.

      Left representation is definitely more readable and understanded by more people

      • @beefcat
        link
        0
        edit-2
        1 year ago

        I don’t know about that, I know a lot of successful programmers who never took calculus.

        The barrier to entry for programming is considerably lower today than it was even 15 years ago. Lots of kids, myself included back in the day, were learning basic control flow in languages like C, Python, or JavaScript long before taking advanced math courses in high school.

        • @Zeth0s
          link
          2
          edit-2
          1 year ago

          Where I grow up sum at least is thought in all high school. Final exam in many high school (mine included) must have at least exercises on integrals, that are just infinitesimal sums.

          If one went to high schools, 90% they know these symbols. Very few of them can program.

          Programming doesn’t require math, but scientific computing, algorithms and hpc do require understanding of linear algebra, as computers “think” in linear algebra

          • @beefcat
            link
            1
            edit-2
            1 year ago

            It was never required in my school district, where the minimum requirement was Algebra 2.

            But the popularity of this post kind of proves my point. There are a lot of programmers out there who readily understood the for loops on the right, but not the sigma notation on the left. Pretending their experience is invalid cuts us off from a potential avenue to help more people understand these concepts.

      • @[email protected]
        link
        fedilink
        -1
        edit-2
        1 year ago

        Left representation is definitely more readable

        Hard disagree. The right can be read linearly. You know, the way humans read.

        I sucked balls at precalc, but I’m pretty decent at programming. I suppose, with enough practice, one becomes “fluent” in mathematical notation, but the C-style language definitely reads more naturally. The mathematical notation is what I’d call “too much abstraction.”

        and understanded by more people

        I don’t know the stats, but I have to imagine, by this point, there are more programmers than mathematicians.

        • @Zeth0s
          link
          2
          edit-2
          1 year ago

          Sum and product are high school curriculum in many countries. Where I grew up sum symbol is curriculum in all high schools including trade schools.

          Regarding readability, this case is just the definition… Problem of for loops is that they become unreadable very quickly, so quickly that most of the modern languages focused on readability discourage use of for loop exactly for readability, replaced by list comprehension or map. Once you have a real world case, sum sign become incredibile more readable. That is the reason why the meme is not how one implement a sum in real world program. The corresponding in a modern, readable language is something like

          sum(x) # x is a list or generator
          prod(x) 
          

          that is the mathematical notation