What does it take to be a modern-day coding whiz? Stellar math skills might be one of the first things to come to mind. But a new study published this week in Scientific Reports suggests there’s more to coding competency than the ability to crunch numbers.
Lead author Chantel Prat, a neuroscientist at the University of Washington, has spent years studying how brains learn. She had an inkling that people with strong language skills might also be good at learning computer programming — an idea that has been mentioned in a handful of prior studies, but has fallen short on data, especially in recent years.
So Prat and her colleagues recruited a group of native English speakers with no coding experience to take an introductory course in Python, a popular computer programming language. They took scans of their brains and gave them written tests to measure their aptitude for a variety of skills, and compared the results to how easily they learned to code. The researchers found that language aptitude, memory and reasoning play a bigger role in predicting how well someone will pick up a computer language — not how savvy they are with numbers.
The data give a starting place for researchers like Prat to better understand what makes a person good at programming. She’s optimistic that these results could spark new discussions about who should learn to code.
“Learning computer programming languages is still primarily offered in the environment of an engineering [or computer science] department,” Prat says. “Perhaps that is no longer the only environment where that is applicable, and there are other ways to teach programming languages that might relate to broader audiences.”
Before starting Python lessons on Codecademy, a popular website that teaches the basics of several coding languages, Prat and her colleagues had the 36 participants undergo a brain scan to look at patterns in their resting brain waves.
Prat had used this same technique in a 2016 study to predict how well adults would learn a second language. The brain scan was able to predict, with up to 60 percent accuracy, how easily participants would pick up French.
After their brain scans, participants in the new study took written tests to measure their aptitude for language learning, numeracy, problem-solving and memory before diving into coding for the first time. Researchers followed along as they took 10 45-minute Python lessons, each of which concluded with a quiz. They tracked how quickly the participants completed each section, and took note when participants requested hints or solutions on the tests, in order to see how well they grasped the topics.
While numeracy, which the researchers call the “mathematical equivalence of literacy,” did correlate with a faster rate of learning, it was not a strong predictor of how well participants would learn Python overall. Rather, language aptitude, memory and reasoning had stronger correlations with learning rate, accuracy and recall of the material.
Read more: Everything Worth Knowing About How We Learn
But that isn’t to say coders don’t need math, Prat says. Rather, the math that coders need to write programs is less about numerical calculations and more about a skill that’s important across many disciplines.
“I think what people think is math is really problem solving,” Prat says. “[It] isn’t really so much about numeracy.”
Brains That Code
There’s still much more to understand about how the brain learns to code — and why some people are better at it than others. Prat says she’s planning follow-up studies to analyze bilingual coders and people who aren’t native English speakers.
Other languages, like Java, C++ and ARM, which aren’t as easily readable as Python, might pose greater challenges for new learners, but the current evidence for that remains anecdotal.
“No one’s actually even put someone through Python training, and put another group of people through Java training, and shown that one is harder or easier,” Prat says.
It’s also unclear how well learners will progress as they learn to use more complex algorithms and solve challenging problems that weren’t covered in the beginner Python course. Learning a second language, Prat says, often relies on declarative knowledge. Instead of having a flexible understanding of how to use the language in every scenario, a beginner will rely mostly on memory to grasp words and concepts. Which students successfully become “fluent” in Python is not yet clear.
But to Prat, the main takeaway is that coding isn’t just for “math people.” As user-friendly languages like Python continue to become more popular, it gives educators an opportunity to reframe whom coding is for, and how it’s used in a variety of professions.
“You can’t develop a science of teaching without a science of learning,” says Prat.