-
Unexpected but informative: What fixation-related potentials tell us about the processing of confusing program code
Authors:
Annabelle Bergum,
Anna-Maria Maurer,
Norman Peitek,
Regine Bader,
Axel Mecklinger,
Vera Demberg,
Janet Siegmund,
Sven Apel
Abstract:
As software pervades more and more areas of our professional and personal lives, there is an ever-increasing need to maintain software, and for programmers to be able to efficiently write and understand program code. In the first study of its kind, we analyze fixation-related potentials (FRPs) to explore the online processing of program code patterns that are ambiguous to programmers, but not the…
▽ More
As software pervades more and more areas of our professional and personal lives, there is an ever-increasing need to maintain software, and for programmers to be able to efficiently write and understand program code. In the first study of its kind, we analyze fixation-related potentials (FRPs) to explore the online processing of program code patterns that are ambiguous to programmers, but not the computer (so-called atoms of confusion), and their underlying neurocognitive mechanisms in an ecologically valid setting. Relative to unambiguous counterparts in program code, atoms of confusion elicit a late frontal positivity with a duration of about 400 to 700 ms after first looking at the atom of confusion. As the frontal positivity shows high resemblance with an event-related potential (ERP) component found during natural language processing that is elicited by unexpected but plausible words in sentence context, we take these data to suggest that the brain engages similar neurocognitive mechanisms in response to unexpected and informative inputs in program code and in natural language. In both domains, these inputs lead to an update of a comprehender's situation model that is essential for information extraction from a quickly unfolding input.
△ Less
Submitted 17 April, 2025; v1 submitted 13 December, 2024;
originally announced December 2024.
-
Tapping into the Natural Language System with Artificial Languages when Learning Programming
Authors:
Elisa Madeleine Hartmann,
Annabelle Bergum,
Dominik Gorgosch,
Norman Peitek,
Sven Apel,
Janet Siegmund
Abstract:
Background: In times when the ability to program is becoming increasingly important, it is still difficult to teach students to become successful programmers. One remarkable aspect are recent findings from neuro-imaging studies, which suggest a consistent role of language competency of novice programmers when they learn programming. Thus, for effectively teaching programming, it might be beneficia…
▽ More
Background: In times when the ability to program is becoming increasingly important, it is still difficult to teach students to become successful programmers. One remarkable aspect are recent findings from neuro-imaging studies, which suggest a consistent role of language competency of novice programmers when they learn programming. Thus, for effectively teaching programming, it might be beneficial to draw from linguistic research, especially from foreign language acquisition.
Objective: The goal of this study is to investigate the feasibility of this idea, such that we can enhance learning programming by activating language learning mechanisms.
Method: To this end, we conducted an empirical study, in which we taught one group of students an artificial language, while another group received an introduction into Git as control condition, before we taught both groups basic programming knowledge in a programming course.
Result: We observed that the training of the artificial language can be easily integrated into our curriculum. Furthermore, we observed that language learning strategies were activated and that participants perceived similarities between learning the artificial language and the programming language. However, within the context of our study, we did not find a significant benefit for programming competency when students learned an artificial language first.
Conclusion: Our study lays the methodological foundation to explore the use of natural language acquisition research and expand this field step by step. We report our experience here to guide research and to open up the possibilities from the field of linguistic research to improve programming acquisition.
△ Less
Submitted 12 January, 2024;
originally announced February 2024.
-
Correlates of Programmer Efficacy and Their Link to Experience: A Combined EEG and Eye-Tracking Study
Authors:
Norman Peitek,
Annabelle Bergum,
Maurice Rekrut,
Jonas Mucke,
Matthias Nadig,
Chris Parnin,
Janet Siegmund,
Sven Apel
Abstract:
Background: Despite similar education and background, programmers can exhibit vast differences in efficacy. While research has identified some potential factors, such as programming experience and domain knowledge, the effect of these factors on programmers' efficacy is not well understood.
Aims: We aim at unraveling the relationship between efficacy (speed and correctness) and measures of progr…
▽ More
Background: Despite similar education and background, programmers can exhibit vast differences in efficacy. While research has identified some potential factors, such as programming experience and domain knowledge, the effect of these factors on programmers' efficacy is not well understood.
Aims: We aim at unraveling the relationship between efficacy (speed and correctness) and measures of programming experience. We further investigate the correlates of programmer efficacy in terms of reading behavior and cognitive load.
Method: For this purpose, we conducted a controlled experiment with 37~participants using electroencephalography (EEG) and eye tracking. We asked participants to comprehend up to 32 Java source-code snippets and observed their eye gaze and neural correlates of cognitive load. We analyzed the correlation of participants' efficacy with popular programming experience measures.
Results: We found that programmers with high efficacy read source code more targeted and with lower cognitive load. Commonly used experience levels do not predict programmer efficacy well, but self-estimation and indicators of learning eagerness are fairly accurate.
Implications: The identified correlates of programmer efficacy can be used for future research and practice (e.g., hiring). Future research should also consider efficacy as a group sampling method, rather than using simple experience measures.
△ Less
Submitted 13 March, 2023;
originally announced March 2023.