Detecting and comparing brain activity in short program comprehension using EEG

Martin K.C. Yeh, Dan Gopstein, Yu Yan, Yanyan Zhuang

Research output: Chapter in Book/Report/Conference proceedingConference contribution

16 Scopus citations


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.

Original languageEnglish (US)
Title of host publicationFIE 2017 - Frontiers in Education, Conference Proceedings
PublisherInstitute of Electrical and Electronics Engineers Inc.
Number of pages5
ISBN (Electronic)9781509059195
StatePublished - Dec 12 2017
Event47th IEEE Frontiers in Education Conference, FIE 2017 - Indianapolis, United States
Duration: Oct 18 2017Oct 21 2017

Publication series

NameProceedings - Frontiers in Education Conference, FIE
ISSN (Print)1539-4565


Other47th IEEE Frontiers in Education Conference, FIE 2017
Country/TerritoryUnited States

All Science Journal Classification (ASJC) codes

  • Software
  • Education
  • Computer Science Applications


Dive into the research topics of 'Detecting and comparing brain activity in short program comprehension using EEG'. Together they form a unique fingerprint.

Cite this