Language skill a better predictor of coding ability than maths

By Sian Williams Page. Posted

Participants learnt Python while wearing a specialised headset that measures electrical activity in the brain. Image credit: Justin Abernethy/U. of Washington.

New research has shown that aptitude for learning foreign languages is a stronger predictor of learning to program than basic maths knowledge. The study, led by Chantel Prat at the University of Washington and published in Scientific Reports, examined various aspects of adults’ cognitive abilities, including language and maths skills, while they learned to code in Python for the first time.

The researchers tracked how quickly participants proceeded through programming tutorials, how accurate their code was, and how well they understood the programming language. Language aptitude was found to explain variance in all three measures of skill, once other areas of cognitive ability were accounted for. Numeracy was found to explain variance in learning rate only.

Cognition and language aptitude are greater predictors of learning than numeracy. Image credit: Prat et al./Scientific Reports

In many schools, a certain level of maths attainment is often a prerequisite for studying computer science. While Prat’s study was carried out on adults, its results raise questions around this widespread practice. “I don’t have a good reason to think the predictive utility of language, numeracy, general cognitive abilities or neural metrics would change in young learners,” she says.

“Learning programming languages in and of itself doesn’t require knowledge of linear algebra,” she explains. But maths remains an important skill in many applications of programming. “I think the thing to keep in mind is that programming is still primarily taught in computer science and engineering departments. I don’t have the expertise or the data to suggest that complex math isn’t required for computer science. In fact, I strongly suspect that there are many aspects of engineering that do rely on math!”

The researchers chose to carry out the study in Python because of its close resemblance to English structures such as paragraph indentation and its use of real words rather than symbols for functions. Prat believes, however, that her results will carry over to more complex languages, such as Java. “I believe we’ll find that the programming languages that are anecdotally perceived as being intuitive or easy to learn or read may be those that most resemble human language structures, and learning those languages may be most strongly predicted by language aptitude. However, all programming languages emulate human communication structures and so I do think the relationship between language aptitude and programming aptitude will show up with different languages and in different learning environments. It’s a question we want to pursue empirically.”

UK Educator


If you’re a UK-based teacher, volunteer, librarian or something in between, we'll send each issue free to your door.



Just want to read the free PDF? Get each new issue delivered straight to your inbox. No fuss and no spam.


From £6

If you are UK-based but not involved in education, you can get hard copies by buying back issues.