I am not sure why programming should even be considered as beneficial for Math learning. Isn't the question the other way around? - Should Math be beneficial for programming? Math is a tool (for everyone except for 0.000001%, who could use it as an occupation) to use somewhere else. While programming technically is also a tool, it's a tool which is also an occupation for millions of people. So we better make sure that teaching of Math benefits programming, not the other way around.
It’s surprising because (anecdotally), math students in college consistently have a much easier time learning computer science than other students. I’m not sure if there have been studies on this, but it was remarkably consistent when I taught first year CS.
Yeah that’s a bit of a chicken vs egg problem though, isn’t it? It’s like how physics students routinely have the highest LSAT. If they were already towards the top of their class upon entry, it’s not surprising to see them doing well in comparison to their peers.
As a math major who studied CS: Math I encountered in CS classes was always something I'd encountered earlier and had well in hand so I could focus on the CS specifics. My classmates only studying CS, conversely, often struggled with the math side of things.
I'd imagine that + some sampling bias (math majors almost universally love complex abstractions and algorithms unlike almost any other major) feels like it would explain it?
Mathematical proofs and computer programs are isomorphic, so it's not unreasonable to start from the premise that with the right guidance, many skills would transfer.
> Mathematical proofs and computer programs are isomorphic
I've heard this multiple times and it always misses the point.
Isomorphisms exist whenever we focus on particular structural features of mathematical objects, to the exclusion of irrelevant characteristics. For example, all completions of "the" rational numbers are isomorphic with respect to the structure of ordered fields, be they equivalence classes of Cauchy sequences, Dedekind cuts or something else. But they're clearly not isomorphic as sets.
Similarly, all n-dimensional F-vector spaces, for fixed n and a field F, are isomorphic as vector spaces. That doesn't mean they're all the same - 4-dimensional vectors and 2x2 matrices are very different things, for example.
Mathematical proofs and computer programs are isomorphic from a very specific point of view, namely type theory (which doesn't even apply to dynamically typed languages). That doesn't translate into mathematics necessarily being useful for all other aspects that are important in computer programs, nor into computer programmers having a good understanding of how proofs work.
Nice catch! :-) I am not sure how many people are actually doing Math for a living. Between Academia, some agencies, selected hedge funds and few other places. Few hundred thousand?
If anything, programming helps someone appreciate math more, which in turn gives additional motivation to learn. For some people, it's not fun to learn math and only be able to apply it on paper. Some of my earliest Visual Basic programs were a quadratic equation solver, a Fahrenheit/Celsius converter, and something that drew a guitar fretboard.
Another benefit is that getting programs to work made me more systematic with my math and pay attention to all the variables/equations required to solve something. I've had colleagues who would derive something and share their formulas, not realizing there are missing things, because they haven't tested it in code.
I found programming to be exceptionally helpful when learning trig. I was able to not just understand a few examples, but really generalize the concepts and relate them.
That was an experience that really stuck with me, and I must say I'm kind of surprised at many of the naysayer opinions in this thread.
To this day I'll fire up a REPL to explore some math ideas. Maybe I'm weird and am just more programming minded than most, or my prior programming helped.
My personal experience is, that when I code something mathematical, it sticks. If I had learned math stuff this way, I would know much more today, than I do.