The ever-growing use of technology in society makes it clear that computer programming may be a valuable skill. But how do our brains learn to code? Cultural skills, like reading and math, typically emerge by repurposing brain networks that function for more innate purposes. Yun-Fei Liu and Marina Bedny, from Johns Hopkins University, tested whether this may be the case when people learn computer programming in their JNeurosci paper.
The researchers recorded brain activity in study volunteers with no programming experience before and after they learned how to code using Python. A neural network in the left side of the brain that is involved in logical reasoning was active while participants read about programming algorithms before any formal instruction or skill acquisition. Liu elaborates, "We showed the participants programming algorithms described in plain English prior to learning Python. You would think that the language network of the brain is important for understanding this information when it is presented this way. But the brain network primarily activated was the logical reasoning one." After learning Python, this network continued to engage strongly with programming code.
According to the authors, this work suggests that human brains repurpose cognitive areas involved in reasoning to learn and acquire computer programming skills. Does this mean that people who are better at logical reasoning are more adept at learning computer programming? Says Liu, "We haven't looked at a correlation between learning outcomes and neural responses. Currently, we are examining whether logical reasoning test scores can predict how well people perform in a computer program writing task."