Are software developers linguists, or are they mathematicians? Should computer programming appear as a language option on the school curriculum, or is it math? Despite decades of debate, the jury is still out.
However, some schools in the USA are now introducing the subject as a foreign language option, on the back of legislation being introduced by 17 states, to date. But despite years of examining the brains and behaviours of coders, researchers still can’t agree on whether they should approach the subject from a language, or from a math perspective. The scientific evidence has not been available to support or deny either camp’s standpoint. “We still have no fundamental understanding of how developers understand source code,” according to a team of neuroscientists, writing in a recently published paper. In “Understanding Source Code with Functional Magnetic Resonance Imaging,” leading researchers from American and German Universities have used MRI scanning technology to examine the brains of coders as they work, in an attempt to see which parts of the brain are being used during the process of coding.
“Understanding program comprehension is not limited to theory building, but can have real downstream effects in improving education, training, and the design and evaluation of tools and languages for programmers. If direct measures of cognitive effort and difficulty could be obtained and correlated with programming activity, then researchers could identify and quantify which types of activities, segments of code, or kinds of problem solving are troublesome or improved with the introduction of a new language or tool.”
In previous studies psychologists have looked at ways of measuring flexibility of thinking; of determining language laterality and dichotic listening. They have compared left and right hemisphere activity and considered the behaviour of programmers. And now they are using MRI scanners to monitor the brain activity of computer programmers and software designers as they work, to see which parts of the brain are most active when doing different coding tasks. With encouraging results.
The team of researchers previously mentioned have developed a tool that they hope software engineering researchers will utilise going forward: functional magnetic resonance imaging (fMRI). It has been used in cognitive neuroscience for a couple of decades but their recent attempts to use it to measure cognitive processes in the brains of coders have produced encouraging results, they claim.
Their experiments involved examining the brains of 17 undergraduates as they performed coding tasks, while undergoing an MRI scan. Each was given a piece of code to interpret at the same level of difficulty as the other participants, and each was given a test piece that enabled the scientists to establish differences in brain activity between error detection and interpretation of coding. The scientists found that different areas of the brain dealt with each problem differently, so they were able to identify the part of the brain that dealt particularly with coding interpretation. As a result they concluded that: “....for comprehending source code, five different brain regions become activated, which are associated with working memory, attention, and language processing - all fit well to our understanding of program comprehension. Our results indicate that, for learning programming, it may be beneficial to train also working memory, which is necessary for many tasks, and language skills.”
As far as the debate surrounding whether coding should be a language or math subject, the researchers involved in the fMRI experiment suggest that there is certainly more evidence now to support the hypothesis that learning computer programming uses similar brain activations to learning a foreign language.
However, the research was not conclusive and more work needs to be done before scientists can state categorically, one way or the other, that coding uses language learning skills more than math skills. The lines between the two are still blurred, as understanding of algorithm logic which involves mathematical skills is also required, in other aspects of computer programming.
This causes practical problems in terms of departmental planning, teacher certification and resource planning in schools. Where should the topic sit within the curriculum? Who should teach it? And whose budget should pay for it?
The real truth is more likely to be that there is an element of both skill sets required, one being more dominant than the other at different parts of the programming process. Good programmers have good natural language skills as well as a grasp of algorithm logic. But this particular study has provided some scientific evidence based on photographic evidence of brain activity and moved the debate on, for others looking to expand knowledge and understanding in the fields of computer science and software engineering, to add to.
Putting practical considerations to one side, the fMRI approach may also help identify what makes some developers stand out from the rest. There are a group of outstanding computer programmers who are referred to as the 10xers, because they can produce 10 times as much code, or work ten times faster, and to a much higher specification than others. They are the type of programmers that software companies are crying out for. By developing an understanding of what makes an excellent programmer, it may be possible to develop the skills that come naturally in these gifted individuals, in others.
Although not conclusive, the use of fMRI may open up this field of research to the benefit of those training computer programmers and to those developing software. The debate continues.