New research contradicts long held assumptions about coding
New research contradicts long held assumptions about coding
When you think of learning another language, you probably think of French, Spanish, or Chinese. But what about Python or Java? The two processes might be more similar than you'd think.
A recent study published from researchers at the University of Washington showed that language ability and problem solving skills best predict how quickly people learn Python, a popular programming language. Their research, published in Scientific Reports, used behavioral tests and measures of brain activity to see how they correlated with how fast and well participants learned programming.
For the study, 42 participants were recruited to try a popular online coding course through Codeacademy. They were asked to complete ten 45-minute lessons of the "Learn Python" course. From the 36 participants who completed the study, they were able to determine rate of learning and how well the students learned the lessons.
Before doing online classes, participants did a battery of tests designed to look at math skills, working memory, problem solving, and second language learning ability. During their online programming course, the researchers were able to track how quickly they learned and how well they did in the quizzes built into the online software. They also completed a quiz and coding task at the end of the study to look at their overall coding knowledge.
The researchers where then able to compare the test results from before and after the Python course. The goal was to determine how much of the differences in participant Python learning could be explained by their performance on the different pre-tests: how much did memory, problem solving, and an aptitude for numbers or languages influence how quickly they learned to code?
The participants learned Python at different rates, and had different programming abilities at the end of the study. The researchers looked at the relationship between the skills covered in the pre-test skills and the variability in how participants learned Python. They found that how well students learned Python was mostly explained by general cognitive abilities (problem solving and working memory), while how quickly they learned was explained by both general cognitive skills and language aptitude.
Language aptitude explained almost 20% of the difference in how quickly people learned Python. In contrast, performance on the math pre-test only explained 2% of the variability in how quickly students learned, and didn't correlate at all with how well they learned. Learning to code depended much more on language skills than it did on numerical skills.
Python really is another language.
Additional evidence for the importance of language skills came from electroencephalography (EEG) data. EEG is a method of measuring brain activity through electrical patterns that can be recorded through the skull. Prior to their online learning tasks, participants were given a resting state EEG, which measures patterns in the brain when the subjects were relaxed and doing nothing.
Electrical activity at rest has different patterns. One of these patterns is slow waves of electrical activity called beta oscillations. Past research has shown that high levels of beta oscillations at rest are linked with the ability to learn a second language.
In this study, high levels of these beta oscillations were associated with faster learning and more programming knowledge. While this finding gives additional support to the connection between language learning and learning to code, it's not clear (yet) how beta oscillations are related to learning outcomes, and more research is needed.
Taken together, these result make the case for language skills being an integral aspect of learning programming (or at least of learning Python), while math skills weren't very predictive of how well or quickly participants learned. This idea has important implications for the perceptions surrounding programming, which is often viewed as a "math intensive" field.
There are many assumptions about programmers, especially about who makes a good programmer. Women often feel they don't fit with the idea of a "typical" computer programmer. However, girls typically have higher language skills than boys on average. Since language abilities were shown to predict ability to learn programming, perhaps women should have more of a reputation for being "good" at programming.
It's true that some fields require both math and programming skills, but those aren't necessarily the majority of programming jobs available. Based on this study, the requirements for advanced math classes for every computer science major seem unnecessary, and increased flexibility over math requirements could help recruit and retain students.
Explicitly connecting language skills to programming and providing education options that don't require advanced math may help improve diversity, while still teaching students the programming skills they need. Indeed, "bootcamp" style options that are rapidly growing in popularity lead to programming careers without forcing calculus on their participants.
As programming becomes a pre-requisite for many jobs, it's time to question long held assumptions about pre-requisites for learning programming. Based on the results from this new study, universities and individuals should rethink how they characterize learning programming and what abilities play a role. There's a lot of people out there who "aren't math people," but they just might be computer science people.
It think this is silly on multiple accounts. I'll claim that there's not real thing such as a "language brain" or "math brain." I'll also claim that most people don't know what math is, and that their evidence supports a "math brain".
Math isn't about calculations/computations, it is about patterns. You get to algebra and think "what are these letters doing in my math" but once you get further you think "what are these numbers doing in my math?"
A great tragedy we have in math education is that we focus so much on calculation. There's tons of useful subjects that are only taught once people get to an undergraduate math degree or grad school despite being understandable by children. The basics of things like group theory, combinatorics, graphs, set theory, category theory, etc. All of these also have herculean levels of depth, but there's plenty of things that formalize our way of thinking yet are easily understandable by children. If you want to see an example, I recommend Visual Group Theory[0]. Math is all about abstraction and for some reason we reserve that till "late in the game". But I can certainly say that getting this stuff accelerates learning and has a profound effect on the way I think. Though an important component of that is ensuring that you really take to heart the abstraction, not getting in your own way by thinking these tools only apply in very specific applications. A lot of people struggle with word problems, but even though they might involve silly situations like having a cousin named Throckmorton or him wanting to buy 500 watermelons, they really are part of that connection from math to reality.
[0] https://www.youtube.com/watch?v=UwTQdOop-nU&list=PLwV-9DG53N...
Good code doesn’t just solve a problem, it solves it in a way that’s readable and modular.
I think the problem-solving part of coding requires math skills, while the organization part requires writing skills. The organization part affects the problem-solving part, because if you write messy code (that you can’t reread once you forget or extend without rewriting) you’ll quickly get overwhelmed.
Writing large math proofs also requires organization skills, since you’ll refer to earlier sections of your proof and may have to modify it when you encounter issues. But to me, math seems to have more “big steps”: sudden insights that can’t be derived from writing (“how did you discover this?”), and concepts that are intrinsically complicated so one can’t really explain them no matter how well they can write. Whereas programming has more “small steps”: even someone who’s not smart (but has grit) can write an impressive program, if they write one component at a time and there aren’t too many components that rely on each other.
Most coding doesn't need much of any math past boolean logic and very basic set operations. I'm much more likely to spend my time studying DB and interface schemas to understand how something works than doing a lot of mathy fiddling. Sure, some people write game engines and such, but even much of 3D graphics doesn't need anything more complicated than the first half of a linear algebra course.
Now we're getting into the "define maths" part of the discussion which is always where these discussions die. It can be argued that turning a kettle on and boiling some water is "maths" or it can be as narrow as "everything above basic arithmetic is logic, not maths."
So how much of programming is maths? Before we answer that, let's answer: How much of maths is actually maths? Because first we define maths, and then we define programming based on whatever that is, but until we have that first concrete definition this discussion cannot occur.
I will add that "it is taught by the maths department in college" is a flimsy argument, and frankly one the Physics department in particular would mock.
The difficulty is in how many relationships you need to keep in mind, not in how hard each of them are.
Just like in math.
BTW relational DBs are math.
> BTW relational DBs are math.
It's funny, reading the post you're replying to, I basically read it as
> I don't need math, I need <math, but by another name>
My teenage daughter used to complain about math, and I spent some time trying to explain to her that we use math every day... EVERY day. Now, when I see her do something that was math (even if it's not obvious it was math), I say "Math... every day". I say that a lot.
Also, yes, my daughter finds me annoying. But also funny; but likely not for the math thing.
> Whereas programming has more “small steps”: even someone who’s not smart (but has grit) can write an impressive program, if they write one component at a time and there aren’t too many components that rely on each other.
... In my experience, learning to write one component at a time (and try the code, and make sure it works before proceeding) is itself a skill that many struggle to develop. Similarly for avoiding unnecessary dependencies between components. Oh, and also being able to analyze the problem and identify separable components.
One of the most frustrating things about teaching programming, for me, is the constant insistence from other teachers that you have to maintain an "absolutely everyone can learn to program" attitude at all times. Many people who start to learn programming have misguided or confused reasons for doing so and - to say the least - could make much more effective use of their time developing other skills. (It's not a question of elitism; I'd surely flounder at some tasks that others find natural.)
I dislike "everyone can learn to program" because it conflates many, many levels of skills and expertise.
I very much think many people could learn the more advanced Excel Formulas, Power Automate and even simple Bash/PowerShell scripting to make their work more effective. I've met quite a few folks who had been intimidated out of trying who could do it.
On the other hand, how many people on this site could bootstrap a linux kernel on either very new or very old hardware? I know there are some, but they are certainly not the majority. I certainly won't be the first person to get linux and doom to run on a quantum computer.
But that is similar to other professions. Everyone with a largely functioning body can learn to turn a few planks and some metal parts into a functional shed door with some basic tools or to put up a decent brick wall that won't topple over in a month.
That doesn't mean everyone is qualified to pour concrete for a dam or a bridge foundation, or to re-do some historical work in original style.
What do you mean by math? Abstractions or calculations? The effort it takes me to do long division in my head matches the effort it takes me to follow some obtuse spaghetti code. See, I can get good and fast at long division in my head, but I may never understand the fundamental theorem of calculus. Some people are really good at mucking around garbage code (they have no choice, they get paid to), but what part of programming did they get good at? Obviously, some part of it, but nothing to write home about. Whenever I sense that I'm just getting practice at doing the equivalent of mental long division at work, that's when I always seek a new job. No amount of money is worth falling behind like that.
There is no such thing as a "language brain" or a "math brain" unless you show experimentally that those bunch of neurons can be grouped into two non-overlapping regions dedicated to "language" and "mathematics".
Mathematics itself is a human-made formal language that can be bootstrapped from definitions and axioms of logics and set theory, which have to be given in human language first.
Experienced mathematicians read formal theorems written in Greek letters off their blackboards as if it was normal English, suggesting they think about it like it was just normal English. This is not to say they cannot also view in front of their mental eye visual representations isomorphic with that language if they chose to.
Dyscalculia, dysgraphia and dyslexia can all present independent of one another, heavily implying that different processes govern math, reading and writing. To call them "language brain" and "math brain" is simply a useful fiction, whether they're actually separate piles of meat is irrelevant.
"language brain" or "math brain" are obviously non-scientific terms.
I think most people would agree that problem solving, expressing ideas in verbally, and expressing ideas in math are very different skills.
Yes, but there is a visual/spatial ability and a verbal/mathematical, and you can do maths with the visual/spatial ability or with the verbal/mathematical ability.
It leads to different styles of thinking and problem solving.
Yeah, the brain is a sparse MoE. There is a lot of overlap in the hardware of the "language brain" and the "math brain". That being said, I can discuss software concepts in a foreign language, but struggle with basic arithmetic in anything but English. So while the hardware might be the same, the virtualization layer that sits on top might have some kind of compartmentalization.
The other thing I don't like about this framing is the implicit false dichotomy. The best programmers I've met often have strong language and math skills.
Poetry is the art of giving different names to the same thing. Mathematics is the art of giving the same name to different things. (Henri Poincaré)
It's basically being good at "naming things", in particular abstractions.
"naming things" is really about "recognizing things" and/or "understanding things". It much deeper than just language.
> There is no such thing as a "language brain" or a "math brain"
Tell that to the people who designed the study, the people that approved the study, and the people that funded the study.
At the end of the day, the study set out certain criteria for assessing certain skill types/competencies and divided the people by those well defined criteria. I think it’s pretty hard to argue against the idea that people might have at least some level of aptitude for different types of activity and skill.
I think its worth noting the study did not actually make this claim, the news article did. I suspect the study authors would agree the term "language brain" or "math brain" is misleading.