Detecting and comparing brain activity in short program comprehension using EEG

Program comprehension is a common task in software development. Programmers perform program comprehension at different stages of the software development life cycle. Detecting when a programmer experiences problems or confusion can be difficult. Self-reported data may be useful, but not reliable. More importantly, it is hard to use the self-reported feedback in real time. In this study, we use an inexpensive, non-invasive EEG device to record 8 subjects' brain activity in short program comprehension. Subjects were presented either confusing or non-confusing C/C++ code snippets. Paired sample t-tests are used to compare the average magnitude in alpha and theta frequency bands. The results show that the differences in the average magnitude in both bands are significant comparing confusing and non-confusing questions. We then use ANOVA to detect whether such difference also presented in the same type of questions. We found that there is no significant difference across questions of the same difficulty level. Our outcome, however, shows alpha and theta band powers both increased when subjects are under the heavy cognitive workload. Other research studies reported a negative correlation between (upper) alpha and theta band powers.

[1]  F. D. Silva EEG: Origin and Measurement , 2009 .

[2]  Pavlo D. Antonenko,et al.  Using Electroencephalography to Measure Cognitive Load , 2010 .

[3]  Joshua de Leeuw,et al.  jsPsych: A JavaScript library for creating behavioral experiments in a Web browser , 2014, Behavior Research Methods.

[4]  Chih-Ming Chen,et al.  Web-based reading annotation system with an attention-based self-regulated learning mechanism for promoting reading performance , 2014, Br. J. Educ. Technol..

[5]  Yu Yan,et al.  Understanding misunderstandings in source code , 2017, ESEC/SIGSOFT FSE.

[6]  Pavlo D. Antonenko,et al.  The influence of leads on cognitive load and learning in a hypertext environment , 2010, Comput. Hum. Behav..

[7]  Karen S. Quigley,et al.  Brain: Electroencephalography and Imaging , 2000 .

[8]  F. L. D. Silva,et al.  Event-related EEG/MEG synchronization and desynchronization: basic principles , 1999, Clinical Neurophysiology.

[9]  G Pfurtscheller,et al.  Graphical display and statistical evaluation of event-related desynchronization (ERD). , 1977, Electroencephalography and clinical neurophysiology.

[10]  Carole R. Beal,et al.  EEG estimates of engagement and cognitive workload predict math problem solving outcomes , 2012, UMAP.

[11]  R. Bickford,et al.  The relationship of head size to alpha frequency with implications to a brain wave model. , 1978, Electroencephalography and clinical neurophysiology.

[12]  John Sweller,et al.  Cognitive Load Theory , 2020, Encyclopedia of Education and Information Technologies.

[13]  W. Klimesch EEG alpha and theta oscillations reflect cognitive and memory performance: a review and analysis , 1999, Brain Research Reviews.

[14]  I. Gere,et al.  Multimedia: Differences in cognitive processes observed with EEG , 1999 .

[15]  J. Karhu,et al.  Theta oscillations index human hippocampal activation during a working memory task. , 2000, Proceedings of the National Academy of Sciences of the United States of America.

[16]  S. Raghavachari,et al.  Gating of Human Theta Oscillations by a Working Memory Task , 2001, The Journal of Neuroscience.

[17]  W. Klimesch EEG-alpha rhythms and memory processes. , 1997, International journal of psychophysiology : official journal of the International Organization of Psychophysiology.

[18]  W. Klimesch Memory processes, brain oscillations and EEG synchronization. , 1996, International journal of psychophysiology : official journal of the International Organization of Psychophysiology.

[19]  Andreas Stefik,et al.  Understanding Programming Expertise , 2015, ACM Trans. Comput. Hum. Interact..