skip to main content
10.1145/3613372.3613387acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

Effects of Modularization on Developers' Cognitive Effort in Code Comprehension Tasks: A Controlled Experiment

Published: 25 September 2023 Publication History

Abstract

Developers invest the cognitive effort to comprehend instructions in source code. Cognitive effort refers to the cognitive processing of a human being’s brain required to complete a cognitive task. The cognitive effort invested by developers can vary depending on the complexity of how instructions in source code are structured. To implement features, developers can write all instructions in a single method (non-modular) or even modularize it into several methods (modular). However, little is known about the effects of modularizing instructions in source code on the developers’ cognitive effort. Hence, adopting modularization practices ends up being a cognitive effort-insensitive task. This paper, therefore, reports on a controlled experiment that investigates the effects of modularization on the cognitive effort of developers while comprehending instructions in (non-)modular code. We evaluated the modularization of instructions with the participation of 35 developers who performed 10 comprehension tasks using a wearable EEG device. The main results suggest that developers tend to invest less cognitive effort to understand instructions in modular code rather than in non-modular code. However, developers spend more temporal effort to understand instructions in modular code, and this extra time is not converted into a higher rate of correct code comprehension. Our findings shed light on improving the state of the art of modularization practices by making them sensitive to the developers’cognitive effort.

References

[1]
Igor Crk and Timothy Kluthe. 2016. Assessing the contribution of the individual alpha frequency (IAF) in an EEG-based study of program comprehension. In 2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC). IEEE, 4601–4604.
[2]
Igor Crk, Timothy Kluthe, and Andreas Stefik. 2016. Understanding Programming Expertise: An Empirical Study of Phasic Brain Wave Changes. ACM Trans. Comput.-Hum. Interact. 23, 1, Article 2 (Dec 2016), 29 pages.
[3]
B. Curtis, S.B. Sheppard, P. Milliman, M.A. Borst, and T. Love. 1979. Measuring the Psychological Complexity of Software Maintenance Tasks with the Halstead and McCabe Metrics. IEEE Transactions on Software Engineering SE-5, 2 (1979).
[4]
Nicole Novielli Alexander SerebrenikMüller Sebastian C. Daniela Grassi, Filippo Lanubile. 2023. Towards Supporting Emotion Awareness in Retrospective Meetings. In Preprint - ICSE 2023 NIER - New Ideas and Emerging Results.
[5]
Couceiro et al.2019. Spotting problematic code lines using nonintrusive programmers’ biofeedback. In 30th Int. Symposium on Software Reliability Engineering. 93–103.
[6]
Medeiros et al.2021. Can EEG Be Adopted as a Neuroscience Reference for Assessing Software Programmers’ Cognitive Load?Sensors 21, 7 (2021).
[7]
Thomas Fritz and Sebastian C Müller. 2016. Leveraging biometric data to boost software developer productivity. In 2016 IEEE 23rd international conference on software analysis, evolution, and reengineering (SANER), Vol. 5. IEEE, 66–77.
[8]
Lucian José Gonçales, Kleinner Farias, and Bruno C. da Silva. 2021. Measuring the cognitive load of software developers: An extended Systematic Mapping Study. Information and Software Technology 136 (2021), 106563.
[9]
Ayaz Isazadeh, Habib Izadkhah, and Islam Elgedawy. 2017. Source code modularization: theory and techniques. Springer.
[10]
Barbara A Kitchenham and Shari L Pfleeger. 2008. Personal opinion surveys. In Guide to advanced empirical software engineering. Springer, 63–92.
[11]
Thomas Kosch, Jakob Karolus, Johannes Zagermann, Harald Reiterer, Albrecht Schmidt, and Paweł W. Woźniak. 2023. A Survey on Measuring Cognitive Workload in Human-Computer Interaction. ACM Comput. Surv. (Jan 2023).
[12]
T.J. McCabe. 1976. A Complexity Measure. IEEE Transactions on Software Engineering SE-2, 4 (1976), 308–320.
[13]
Julio et al. Medeiros. 2019. Software code complexity assessment using EEG features. In 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC). 1413–1416.
[14]
Roberto Minelli, Andrea Mocci, and Michele Lanza. 2015. I Know What You Did Last Summer - An Investigation of How Developers Spend Their Time. 2015 IEEE 23rd International Conference on Program Comprehension (2015), 25–35.
[15]
Norman Peitek, Sven Apel, Chris Parnin, André Brechmann, and Janet Siegmund. 2021. Program comprehension and code complexity metrics: An fMRI study. In 43rd International Conference on Software Engineering.
[16]
Norman et al. Peitek. 2022. Correlates of programmer efficacy and their link to experience: a combined EEG and eye-tracking study. In 30th FSE. 120–131.
[17]
Girish Maskeri Rama and Naineet Patel. 2010. Software modularization operators. In 2010 IEEE International Conference on Software Maintenance. 1–10.
[18]
Filippo Ricca, Massimiliano Di Penta, Marco Torchiano, Paolo Tonella, and Mariano Ceccato. 2010. How Developers’ Experience and Ability Influence Web Application Comprehension Tasks Supported by UML Stereotypes: A Series of Four Experiments. IEEE Transactions on Software Engineering 36, 1 (2010), 96–118.
[19]
Janet Siegmund. 2016. Program Comprehension: Past, Present, and Future. In 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Vol. 5. 13–20.
[20]
Janet Siegmund, Norman Peitek, André Brechmann, Chris Parnin, and Sven Apel. 2020. Studying Programming in the Neuroage: Just a Crazy Idea?Commun. ACM 63, 6 (may 2020), 30–34.
[21]
Janet et al. Siegmund. 2017. Measuring Neural Efficiency of Program Comprehension. In 11th Joint Meeting on Foundations of Software Engineering. 140–150.
[22]
John Sweller. 2011. Cognitive load theory. In Psychology of learning and motivation. Vol. 55. Elsevier, 37–76.
[23]
Rebecca Tiarks. 2011. What Programmers Really Do - An Observational Study. Softwaretechnik-Trends 31 (2011).
[24]
Kurt Welker. 2001. Software Maintainability Index Revisited. J. Def. Softw. Eng none (08 2001).
[25]
Claes Wohlin, Per Runeson, Martin Höst, Magnus C Ohlsson, Björn Regnell, and Anders Wesslén. 2012. Experimentation in software engineering. Springer Science & Business Media.
[26]
Claes Wohlin, Per Runeson, Martin Höst, Magnus C. Ohlsson, and Björn Regnell. 2012. Experimentation in Software Engineering.Springer. I–XXIII, 1–236 pages.
[27]
Xin Xia, Lingfeng Bao, David Lo, Zhenchang Xing, Ahmed E. Hassan, and Shanping Li. 2018. Measuring Program Comprehension: A Large-Scale Field Study with Professionals. IEEE Transactions on Software Engineering 44, 10 (2018).

Cited By

View all
  • (2024)Exploring the Technologies and Architectures Used to Develop Micro-frontend Applications: a Systematic Mapping and Emerging PerspectivesSSRN Electronic Journal10.2139/ssrn.4750661Online publication date: 2024
  • (2024)Investigating the impact of logical reasoning in honing code comprehension skills: An empirical analysisProceedings of the 2024 Sixteenth International Conference on Contemporary Computing10.1145/3675888.3676024(35-41)Online publication date: 8-Aug-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
SBES '23: Proceedings of the XXXVII Brazilian Symposium on Software Engineering
September 2023
570 pages
ISBN:9798400707872
DOI:10.1145/3613372
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 September 2023

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code Comprehension
  2. Cognitive Effort
  3. EEG
  4. Modularization

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • Fundação de Amparo à Pesquisa do Estado do Rio Grande do Sul (FAPERGS)
  • Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq)

Conference

SBES 2023
SBES 2023: XXXVII Brazilian Symposium on Software Engineering
September 25 - 29, 2023
Campo Grande, Brazil

Acceptance Rates

Overall Acceptance Rate 147 of 427 submissions, 34%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)32
  • Downloads (Last 6 weeks)6
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Exploring the Technologies and Architectures Used to Develop Micro-frontend Applications: a Systematic Mapping and Emerging PerspectivesSSRN Electronic Journal10.2139/ssrn.4750661Online publication date: 2024
  • (2024)Investigating the impact of logical reasoning in honing code comprehension skills: An empirical analysisProceedings of the 2024 Sixteenth International Conference on Contemporary Computing10.1145/3675888.3676024(35-41)Online publication date: 8-Aug-2024

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media