Watching the Brain Program
Interdisciplinary research team including professor at Chemnitz University of Technology analyzes brain activity in understanding program code for the first time - First-class publication in the journal Communications of the ACM
Press release by Saarland University (03.06.2020, https://bit.ly/2U5x0Kg) with material from Chemnitz University of Technology.
What goes on in the minds of programmers when they write software? This was the question posed by Prof. Dr. Janet Siegmund, Chair of Software Engineering at Chemnitz University of Technology, Prof. Dr. Sven Apel, Chair of Software Engineering at Saarland University and Dr. André Brechmann, head of the special laboratory for non-invasive imaging at the Leibniz Institute of Neurobiology in Magdeburg. To find out, the researchers used imaging techniques from the neurosciences and investigated which brain areas are activated when reading and understanding computer programs. Their amazing result: programming is like talking. They found out that the brain regions that are most active are those that are also relevant in the processing of natural language.
They have now published the results of their basic research in the renowned journal Communications of the ACM, which is published by the world's largest professional association for computer science. Lead author was Janet Siegmund from Chemnitz University of Technology. The findings could have far-reaching consequences for programming in the design of programming languages, programming education, or answering fundamental questions - such as what constitutes complicated or simple program code. The project was funded by the German Research Foundation (DFG).
New research approach - First brain analysis in programming
"The idea for our research question was born in Magdeburg during a joint meeting of researchers from the Leibniz Institute of Neurobiology and the Faculty of Informatics in Magdeburg," said Janet Siegmund. In several small and large pilot studies, supported by Prof Kästner (Carnegie Mellon University) and Prof Parnin (North Carolina State University), a versatile methodological basis was created. This effort was worthwhile, because in the meantime the methodology developed by Siegmund and her colleagues is on its way to becoming a standard and has already proven itself in international studies.
"Our goal was to develop a completely new approach to better understand the cognitive processes involved in programming," says Sven Apel from Saarbrücken. Siegmund, Apel, and Brechmann made the brain activity of programmers visible for the first time while they analyzed several lines of code. In doing so, the scientists worked together like a unit that complemented each other. While Brechmann, as an experienced neuroscientist, contributed his experience with experiments in functional magnetic resonance imaging (fMRI) and Apel, as an experienced researcher, contributed his expertise in software development, Siegmund, with her interdisciplinary expertise in psychology and computer science, acted as a link.
Research design on the way to the standard
For the study, the team used the subtraction method, which has proven itself in neuroscience: In this method, the test persons first work on a task in the magnetic resonance tomograph, for the solution of which they have to understand an extract of the program code. After a short rest period, they were asked to check a code snippet for simple syntax errors, which is a routine task for programmers, meaning it was not a question of understanding. This procedure was repeated several times. Subsequently, the images of brain activity during the processing of the routine task were subtracted from the images of the comprehension test - what remained were the brain regions that are of particular importance for the process of program comprehension.
To see what happens in the brain during this process, the team used a functional magnetic resonance tomograph. The image data clearly showed that the test subjects' left brain areas were activated, which are mainly associated with speech comprehension. "To our surprise, we could not observe any activity in the direction of mathematical or logical thinking," said the researcher summarising the results. "Our research suggests that speech understanding plays a central role in programming. The renowned Dutch computer scientist Edsger W. Dijkstra already expressed this assumption in the 1980s," Apel adds.
The research design developed has since been taken up by various research groups around the world and expanded to include additional aspects. The research team assumes that the results could also feed back into neuroscience by discovering new cognitive processes that differ, for example, from reading comprehension and logical reasoning.
The team led by Siegmund, Apel and Brechmann is now hoping to find out how the understanding of programmes differs between experts and beginners - whether they read and interpret programme code in different ways. They are supported in their work by Norman Peitek, Leibniz Institute of Neurobiology Magdeburg, who has already played a major role in the present study.
Original publication: Studying Programming in the Neuroage: Just a Crazy Idea? By Janet Siegmund, André Brechmann, Sven Apel et al. Communications of the ACM, June 2020, Vol. 63 No. 6, Pages 30-34. DOI 10.1145/3347093.
Further information:
Professorship Software Engineering, TU Chemnitz: www.mytuc.org/lpgg
Chair of Software Engineering, Saarland University: www.se.cs.uni-saarland.de
Combinatorial NeuroImaging Core Facility, Leibniz Institute for Neurobilogy Magdeburg: www.bit.ly/2U2vXKU
Contact:
Prof. Dr.-Ing. Janet Siegmund
Chair of Software Engineering
Phone: +49 (0)371 531 34310
e-mail: janet.siegmund@informatik.tu-chemnitz.de
Prof. Dr. Sven Apel
Chair of Software Engineering
Saarland University
Phone: +49 (0)681 302-57211
e-mail: apel@cs.uni-saarland.de
Dr. André Brechmann
Combinatorial NeuroImaging Core Facility
Leibniz Institutes for Neurobiology
Phone: +49 (0)391/62639-2161
e-mail: andre.brechmann@lin-magdeburg.de
(Author: Matthias Fejes / Translation: Chelsea Burris)
Matthias Fejes
05.06.2020