Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Hum. Neurosci.

Sec. Cognitive Neuroscience

This article is part of the Research TopicModern applications of EEG in neurological and cognitive researchView all 16 articles

Exploring the Link Between Emotional States and Software Development Coding Task Quality: A Pilot Study

Provisionally accepted
  • 1Kennesaw State University Department of Industrial and Systems Engineering, Marietta, United States
  • 2Kennesaw State University, Kennesaw, United States
  • 3Utah State University - Eastern, Price, United States

The final, formatted version of the article will be published soon.

Emotions play an important role in cognitive performance and decision-making, yet their influence on programming remains underexplored. This study examined the relationship between programmers' emotional states and the quality of their code. Ten participants performed a programming task while their brain activity was recorded using electroencephalography (EEG), with particular attention to the prefrontal cortex, a region associated with emotion regulation and executive functions. Emotional states were quantified through the Frontal Asymmetry Index (FAI) and supplemented with self-reported affect using the Scale of Positive and Negative Experience (SPANE). Code quality was evaluated using a structured rubric that identified task-related errors. Findings suggested a potential trend in which more positive emotional states corresponded with lower code quality, although the small sample size (n = 10) limited statistical strength. This study highlights the feasibility of integrating EEG-based emotional measures with software engineering assessments and provides a foundation for future research with larger cohorts to more clearly determine how emotional states shape programming outcomes. Emotions play a crucial role in shaping cognitive performance, yet their influence on programming remains understudied. This pilot study investigates the relationship between emotional states and coding task quality. Ten participants completed a programming task while their brain activity was recorded using electroencephalography (EEG), with frontal alpha asymmetry (FAI) applied as a neural marker of emotional valence. Emotional self-reports were collected using the Scale of Positive and Negative Experience (SPANE), and coding quality was evaluated through a structured rubric. Preliminary findings indicate a potential association between FAI and coding performance, whereas self-reported affect showed weaker or inconsistent patterns. Given the small sample size (n = 10), these results should be interpreted as exploratory. Nevertheless, the study demonstrates the feasibility of integrating EEG-based emotional measures into software engineering research and lays the groundwork for larger-scale investigations into how emotions influence coding task quality.

Keywords: EEG, Emotions, programming quality, frontal asymmetry index, Programmers

Received: 13 Jun 2025; Accepted: 27 Oct 2025.

Copyright: © 2025 Reshad, Nino, Valero, Randolph and Shi. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Valentina Nino, lvallad1@kennesaw.edu

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.