Reference: Prat C.S., Madhyastha T.M., Mottarella M.J., Kuo C.H. (2020). Relating natural language aptitude to individual differences in learning programming languages. Scientific Reports 10, 3817.
- A silhouette of a person working on a computer
As computers become more and more common in our daily lives, more people are learning how to successfully interact with them. Computer programming classes and coding classes, which focus specifically on learning the language of computers and how to have them run tasks, are increasing in popularity. But what makes a person good at programming?
Many people assume that good programmers are also good at math. Programmers in movies and books are often shown excelling in math classes. College students who want to take a programming class are often required to have first taken advanced mathematical courses. However, there is little research exploring if and to what extent math is important for understanding computer programming.
Many popular modern-day programming languages use relatively little math. These programming languages are more like human language structure than mathematical language: instead of mathematical equations, computer code uses ‘words’ and ‘grammar rules’ that resemble human languages. Given the similarities between human language and computer programming, what if it is language ability, and not math ability, that makes one excel at learning computer programming?
Chantel Prat and her colleagues at the University of Washington explored this question by examining how well people learned the programming language Python. Specifically, they investigated whether natural language learning ability predicted the ability to learn Python. They also asked whether other cognitive abilities, such as working memory and reasoning ability, were related to Python-learning ability. Finally, the researchers assessed whether numeracy, or the ability to understand and work with numbers, predicted Python-learning ability.
(2) An example of Python computer code.
Can you speak Python?
Participants with no prior programming experience were taught Python via CodeAcademy, an interactive platform for learning coding online. Participants were asked to create a code for a Rock-Paper-Scissors game and given a 50-item multiple choice test after completing the course to assess their learning. Participants also went through three sessions with standard assessments of cognitive capabilities to see what individual differences in aptitude predicted the ability to learn Python.
Out of all of the variables measured, language ability was the strongest predictor for the ability to learn Python. That is, participants who were skilled at learning languages also tended to do well learning Python. General cognitive ability also appears to play a role in Python learning: high reasoning ability and working memory led to higher success in learning Python. Numeracy did not play as large of a role in predicting Python learning success. This finding suggests that although some math ability is important, language ability is more important for learning Python.
The role of language in programming
Contrary to popular stereotypes, this research suggests that language ability is at least as important — if not more important — than math ability in predicting success in learning computer coding. The cognitive ability required to talk to other people is related to being able to talk to computers.
On a very basic level, this research helps explain what cognitive functions are important in learning basic programming. Our brains appear to assess programming more as learning a language than quantifying equations. One caveat to these findings is the type of programming language that was examined in this study. The Python programming language used in the study mirrors the structure of human language, whereas higher-level programming often relies on algorithms (a set of rules used to solve problems) that are closely related to mathematical reasoning. It is possible that more advanced computer science and programming concepts rely more on math skill than language skill.
Despite this caveat, the research described here has important educational implications. For a long time, people teaching programming classes have assumed that a strong background in math is needed to excel at programming. Findings from this research suggest that instead of math skills, universities would be better off evaluating the role of language classes in helping people learn computer programming. Given the importance of language learning ability for learning Python, perhaps certain coding classes should be taught more like a language class than a math class.
(1) Mohamed_hassan at Pixabay. Accessed 03.09.2020. Link.
(2) JohnsonMartin at Pixabay. Accessed 03.09.2020. Link.
[…] And I’m not talking about writing. I’ve said it before and I’ll say it again; programmers are not (primarily) mathematicians. They are translators and interpreters, especially in software engineering. It bemuses me just how […]
Comments are closed.