Impact of programming on primary mathematics learning
sciencedirect.com
sciencedirect.com
Actually, my first reaction when I heard of Scratch was -- why are these poor kids forced to learn something they will never use in the future of their lives?
The paper got one thing right -- it doesn't make any sense to design visual language deliberately for kids education. It's like saying -- kid, you are so naive so you have to do visual programming, even though it is slow and inefficient. If you are the kid, will you feel good?
If I have to choose a programming language for kids, I will choose LOGO.
Code for visual! Not visual for code!
A few weeks ago he rediscovered Scratch. It's a completely different experience. He started out following tutorials like he was with Roblox, but quickly made the metal leap to altering and enhancing the tutorials. Adding sound effects, changing values. Restructuring and reconstructing for loops to do what he wants.
Now he is breaking problems down and solving them one at a time. Setting a goal and working out how to achieve it. I think that's a far more valuable skill at this stage.
https://www.youtube.com/watch?v=uNjxe8ShM-8
/s
This is actually my first time looking into the platform. It's interesting to have the ability to peek into the "code". Though I initially felt I agreed with an earlier comment in the chain, "just start with something real", I see my own path with Lego's NZXT visual programming language in Scratch. The visual element seemed to help me build a mental model much better than lines of code, at the start.
I left it up on 18 for others to try and break. Thanks for sharing.
Exactly. I withhold cycling, they'll use a car later; I withhold bow and arrow or .22, because they can just get a real rifle later; I withhold picture books, because all real books have only text; I withhold flag football, because it's real only with concussion; if my 3yr old cannot hold the axe to split wood, fuck him, certainly I won't get him anything he can handle already; a toy grocery shop? where's the fun when milk can't spill or spoil? Playset 'Doctor'? Real surgical grade anesthesia and scalpel is where it's at. Play with a plush tiger? Not on my watch he's not.
That allows them to focus on the logic of their programs.
A 10yo might be fine starting by typing programs in from a manual (what I did) but nowadays people want to introduce programming to 6yo kids.
debugging errors has a lot to do with programming
typos are a kind of bug
When I was 10, I started programming in BASIC ... we're talking about simple expressions and statements.
Me, too! On the Acorn Electron.
My son will turn 6 soon. I think he's ready for Scratch (or at least Scratch Jr) but I'm not sure he's ready for BASIC. I guess I could him a printout of some code and see if he can type it in without errors...
Edit: added last sentence.
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?
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.
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.
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.
0.000001% of 8 billion is 80 people. Your math is off by a few orders of magnitude : P
I made some matrix helper functions, and loops through some of the standard stress/strain/failure criteria and so on, with some fully set up problem solvers etc
For tests, I did the hard part, figuring out what matters and what to check, then delegated the math to my calculator. Saved like an hour on a variety of open-textbook tests
If I was better with my calculator in jr high, I could have done a ton with it there too
Programming is most similar to algebra; anyone studying both at the same time can't help but see the obvious connection.
At least in the USA, algebra is typically taught in 7th, 8th, 9th, or 10th grade, not 4th or 5th. Fourth graders are usually more concerned with more foundational topics as multiplication and division.
The same study in 8th or 9th grade would actually be interesting. Or on advanced fourth graders that are studying Algebra I. Or if you followed up years later to see if once the same children are in 8th grade, they have an easier time with Algebra I.
Long after, programming then came along and taught me:
* Variables are used to store data, including data of my choosing. Algebra never taught me that.
* Variables can hold values besides just numbers. Algebra, and daresay math classes in general, never taught me that.
* Variables can have math operations applied to it, and variables can be not-numbers. Therefore, things that are not numbers can have math applied to them. Literally nothing in math academia taught me that.
I honestly think this recent push to teach kids how to program is a symptom of and response to long-standing failures in math academia. Kids hating math has become an age old stereotype, and I think there's some basis in reality for that. Namely, math academia /fucking sucks/ at giving context to the math that we ask kids to do.
Programming gives some of that vital context, which in turn vastly improves the chances that someone will see the value in math and be inclined to learn more about it.
That's because it's not true in mathematics (or declarative programming) the way it is in imperative programming. In mathematics, variables are sometimes just placeholders substitutable by a particular expression, sometimes they establish relationships between inputs and outputs (e.g. "f(x) = x^2") and sometimes they're even objects in their own right (for example in polynomials).
> * Variables can hold values besides just numbers. Algebra, and daresay math classes in general, never taught me that.
> * Variables can have math operations applied to it, and variables can be not-numbers. Therefore, things that are not numbers can have math applied to them. Literally nothing in math academia taught me that.
Not sure why you're angry at "math academia" here when every undergraduate math degree will teach you plenty of maths that isn't (exclusively) about numbers, e.g. group theory, topology, graph theory, ...
Do you mean "math education", maybe, instead of "math academia"? If so, I would share your criticism, at least in part.
So what you're saying is variables store data.
For some reason math academia absolutely failed to teach me /what/ variables are. Don't tell me to "solve for X", tell me what the bloody hell is a variable, why it's important to me, and what I can do with it. Programming told me, math academia didn't.
>Do you mean "math education", maybe, instead of "math academia"? If so, I would share your criticism, at least in part.
Math academia and education are one and the same as far as I'm concerned.
No? That's really not what I said. If I give you a polynomial in x and ask you to find its zeroes, that x is not really storing any "data".
> Programming told me, math academia didn't.
Except programming just told you what variables are in imperative programming, which is only indirectly related to what they are in mathematics (or even in functional programming).
> Math academia and education are one and the same as far as I'm concerned.
Then your criticism is unfounded because it doesn't pertain to actual "math academia".
It's fine if you don't care about how variables are used in maths, but you can't blame maths education for not telling you about a programming concept.
Questions like "I give you a polynomial in x and ask you to find its zeroes" in textbooks and from teachers tell me fucking nothing as regards why I should bother to spend my precious time learning any math. Inevitably I might temporarily memorize some of it for the express purposes of passing some tests, but it's getting unloaded immediately afterwards because it's not important.
Programming, as I've already said, taught me the hows and whys of why math is important long after the student phase in my life, and I sorely wish someone or something in all of math academia would have taught me all that back then.
No other academic subject faces the amount of hate math gets, because their importance are all immediately obvious. Language? Communication is important, a matter of life and death. Social studies? Becoming a functional member of society is a matter of life and death. History? Learning from our past enriches our lives. The sciences? Of course it's important to understand how the universe and everything within it is made and works.
Math academia is a resounding failure because it only ever seems concerned with teaching the results. Fuck the results. Teach me the process, the vital context illustrating why I should bother to learn math. I don't need math to know I have two hands and ten fingers, show me how to do mindblowingly amazing things with math instead.
It's this critical lack of context that leads to people hating math, because we can't relate math to our lives with the way math academia teaches it. I will criticize math academia every chance I get until this is addressed.
It's not the job of a professor of pure mathematics to teach kids mathematics in school. That's like saying that it's Stephen King's job to teach people how to read.
> Questions like "I give you a polynomial in x and ask you to find its zeroes" in textbooks and from teachers tell me fucking nothing as regards why I should bother to spend my precious time learning any math.
The problem with mathematics is that it's so versatile as a tool that it can be used many different contexts, but no teacher can predict which contexts are going to matter or be accessible to you.
That said, it is not my experience that you're never told why certain things are useful. In my experience, most people just forget those examples, because when they're 16, things like "businesses have to solve large systems of equations to optimise their processes" or "this function models the pattern of growth of a population of animals (or of an epidemic outbreak)" don't really mean a lot to them either. But those things are far from useless in real life.
> Programming, as I've already said, taught me the hows and whys of why math is important
I feel that you try to view all of mathematics through a programming lens, but mathematics is important to a whole range of other disciplines, such as physics, economics, social sciences, etc. Programming gives you a view into mathematics, but it's usually a narrow view.
> No other academic subject faces the amount of hate math gets, because their importance are all immediately obvious.
Math does tend to stand out (at least in the West; it is my understanding, that in many Asian societies, maths is valued much more, because the societal value of it is more evident), but every subject gets that "hate" to a lesser extent. There's no lack of complaints from people not understanding why they ought to read Shakespeare in school, or why they should care about "all these people that are long dead".
> Math academia is a resounding failure
Your very own job wouldn't exist without "math academia".
I already said that I agree that there are deficiencies in mathematical teaching (especially at the school level). It's not unreasonable to want to devote more time in school to applications of maths than to its techniques. But that blanket anger you seem to have towards mathematics as a whole is wholly unjustified.
> show me how to do mindblowingly amazing things with math instead
The "mindblowing" stuff you can do with maths, such as cryptography or machine learning, can only be understood by means of studying highly abstract and, at first glance, "useless" maths.
Math is an amazing academic subject, not the least because it's the language the universe is written in, but none of that sheer sense of wonder is ever conveyed when it comes to teaching math to students. That's what I'm angry about, and of course I would love to not be angry eventually too.
My take is:
Good education should be personalised.
The main challenge for programming education is to let the student build the motive for coding, asking questions: why should I program? what can I do with codes?
To do music live coding can be one motive. But in the end, I want to let them know, they can have any kind of motive.
Motive/curiosity first. Math, or programming is just the method they will employ, not the goal. Perhaps with the motive, they can pick up math/programming more efficiently using "traditional activities".
Eg. I observed that students who took a computer-aided Linear algebra course had almost no true understanding of where numbers go in matrix multiplication. Like the fact that for matrix A, and vector x = (0,..0,1,0,..0), where 1 is in the i-th position, the operation Ax picks out the i-th column of A. They had to compute this every time.
x = y + 1
x+= 2
would leave them thinking y would get modified or worse. They knew the words "assignment vs. equality" but they didn't really understand what was going on despite that mantra being hammered on in lectures, because of that which (unfortunately) was not said, which is mental model: there are boxes in memory, assignments put things into memory, and that in a program, there is a progression of steps, where each step modified state...that is, the mental model of a state machine. Their mind still worked in the sense of mathematical statements you see in a physics or math class or calculation, that each statement is a statement of truth simultaneously, and there is no "sense of time" or series of steps that have an order, much less the concept of a state machine. That's why, even if they knew somehow that x could change value, they didn't get that the second line was an instruction that only had to do with the box labelled x and would not have any effect on y, because that was another instruction, and these weren't statements of truth.I feel like may be part of it may be the confusion from the conflation of conventions here, but given my work with him at the time, I do not think an assignment operator (like := ) would help because a program being a series of steps and the concept of state being modified over time is something you have to internalize, or worse unlearn if you're a bright physicist who's never programmed.
For me, I have (and I had to) made that distinction in my mind because at some point in my learning long ago just to make sense of the difference in my mind. To be honest, I don't think that difference was ever really taught to me explicitly.
You are forgetting about functional programming, which has no assignments, only bindings that are immutable — just like in math. And your program is one big expression that is being reduced by a computer.
I wonder what would happen if your friend started with, say, Haskell.
They might get confused as soon as they saw "do"-notation which, while technically only being syntactic sugar over monadic functions, still ends up looking an awful lot like a sequence of operations being performed one after another.
To me it was always much more similar to some combination of learning a language and learning the linguistic rules of that language in great detail to the point where you have a metalinguistic understanding of it. Then, math would be an adjunct but very separate component that could be manipulated by the programming language.
Please read this fascinating book: https://dickgrune.com/Books/PTAPG_1st_Edition/
Parsing, generating phrases, understanding (analysis), etc, are all studied in applied math.
My interest in the comment was whether learning programming is like learning for natural languages or mathematics. At least one study shows that both intuitions about learning programming turn out to be wrong lol:
https://boingboing.net/2020/12/30/study-finds-brain-activity...
Haskell, for one example, is much closer, the definitions in Haskell are very math-y: let this = that in what; f x = z where z = g x y. Even list comprehension in Haskell is much more like the actual math notation than what is implemented in Python.
I work with fairly large code base(s) with tons of legacy, as of late. In my case, I do the detective work - find alleged culprits, link them, present evidence, prove, etc.
I guess in next study one should do MRI for detectives and programmers working on legacy code base. ;)
The Curry-Howard isomorphism wants a word.
A correct (error-free) computer program written in any language (even javascript) would be equivalent to a correct mathematical proof.
It's a bit mind-bogglingly profound, but that's the beauty of the Curry-Howard correspondence.
Is it? How do you know?
Are you seriously wrestling with the proposition that computing is a subfield of mathematics?
My intuition here is strong. I am deficient in maths and struggle with formalisms in computing. All my competent programming family & friends who program are mathematically literate. Those who program in functional languages especially so.
But your point though tersely made stands: it deserves to be demonstrated rather than just asserted. Certainly there are proponents of the theory language faculty matters more than mathematical ability.
I am also 44 years into an uninterrupted career in CS and networks. I still believe it's a strong indicator of skill and ability to have the maths chops I don't
I'm using anecdata? You said your argument was just 'intuition' a second ago and then gave some anecdotes about your mates.
Can you reference the statistics, studies and the data supporting the theories of mind?
If you want to disrate my responses because you feel they lack quality, go ahead. I see little signs you actually want to consider this possibility, where I am open to the question "which is more important, language or maths"
https://scholar.google.com.au/scholar?q=the+role+of+mathemat...
https://scholar.google.com.au/scholar?q=the+role+of+language...
or you could drill down in the royal society review of computer science education
https://royalsociety.org/-/media/policy/projects/computing-e...
For me personally it seems rather obvious that learning theory is a prerequisite for being good at practice, not the other way round.
For everyday web development, you hardly need any serious math in my experience. However, 3d game engine development won't get you far without proper knowledge of math. Same goes for algorithms. Graph theory applied brings you a lot of super powers in certain CS domains, which you cannot reach without Math knowledge.
I think that at the intersection of Math and programming lies a lot of magic. Mazes, generated art are examples. SQL has so much more to offer, if you understand Set theory. Fraud analytics is another topic that is quite easy to handle with Graph databases. Even Arrays are nothing more than a defined Set. Functional Programming is in my experience way easier to grasp, if you understand functions like in Calculus/Analysis and not how some web programmer explains it.
It is not black or white and of course great mathematic guys are not necessarily great programmers. On the other hand, I have seen a lot of code in some areas, that would seriously benefit from better Math knowledge. ;)
Math is hard. It is a niche, however can be very fascinating, especially in the fields of generative art.
That put me off math for a long time. In retrospect I wish I had stuck with it to get to the more interesting parts. In the end though, having not done that, I’m not really sure that math and programming are interchangeable skills as some here are asserting.
Personally, I /fucking hated/ math as a kid. The numbers were meaningless to me because nothing, neither the teachers nor the textbooks nor anyone/anything else, ever taught me what the numbers meant. "Solve for X and tell me what Y is" they said, "How many apples do you have if you hold one in each hand." they said. Pointless.
It was only after I got into programming, incidentally of my own self-taught volition, that all those numbers suddenly had meaning and I truly understood the value of math.
"54 / 36 = ?" is meaningless to me, but "screen_width / 2" and "screen_height / 2" to figure out the center point of a monitor do have meaning, and my mind was blown with a sudden astronomical understanding of the world.
Perhaps the most mind shattering moment was when programming made me realize I could apply math to things that aren't numbers:
"apple" + "orange" = "appleorange"
Mind. Fucking. Shattered.
So programming is amazing at teaching math, at giving math crucial context to keep a kid's mind interested, but teaching programming itself will not teach math.
Computer Science has many parts that are heavily connected to, dependant or even built on math.
And lastly, computer science has not that much to do with programming.
The majority of programmers, software engineering workers and computer scientists don‘t seem to be able to grasp the difference.
(FWIW I was unable to pursue a CS degree for this reason. I came out of high school without the right math pre-requisites for the Canadian university system. I got a career in software development nonetheless... and 20 years on I have never really needed to use any of the math they demanded I take... Even after 10 years @ Google I still get the odd door closed on me because of my lack of a CS degree... I might be a little bitter as a result)
• Compared to traditional activities, programming did not benefit mathematics learning.
• A negative though small effect of programming on mathematics learning was found.
• High-road transfer from programming to mathematics is not self-evident.
• Visual programming languages might distract students from mathematics activities.
Some fields such as graphics programming and machine learning do apply advanced mathematics, but you are likely to use a high level abstraction that wraps the hard parts.
Which also conveys the level of math (primary math) being evaluated against.
So, the fact that your practice of a very complex version of a skill also improved your ability to practice the simpler version of the skill isn't really surprising.
Coincidentally, my understanding is that many mathematicians find such deeply formal proofs hard to follow, compared to more informal ones. It would actually be interesting to know if your proofs have become more or less satisfying to a practicing mathematician after your experience with Isabel and HOL.