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 2023Publication 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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  5. Couceiro et al.2019. Spotting problematic code lines using nonintrusive programmers’ biofeedback. In 30th Int. Symposium on Software Reliability Engineering. 93–103.Google ScholarGoogle Scholar
  6. Medeiros et al.2021. Can EEG Be Adopted as a Neuroscience Reference for Assessing Software Programmers’ Cognitive Load?Sensors 21, 7 (2021).Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ayaz Isazadeh, Habib Izadkhah, and Islam Elgedawy. 2017. Source code modularization: theory and techniques. Springer.Google ScholarGoogle Scholar
  10. Barbara A Kitchenham and Shari L Pfleeger. 2008. Personal opinion surveys. In Guide to advanced empirical software engineering. Springer, 63–92.Google ScholarGoogle Scholar
  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).Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T.J. McCabe. 1976. A Complexity Measure. IEEE Transactions on Software Engineering SE-2, 4 (1976), 308–320.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  17. Girish Maskeri Rama and Naineet Patel. 2010. Software modularization operators. In 2010 IEEE International Conference on Software Maintenance. 1–10.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  21. Janet et al. Siegmund. 2017. Measuring Neural Efficiency of Program Comprehension. In 11th Joint Meeting on Foundations of Software Engineering. 140–150.Google ScholarGoogle Scholar
  22. John Sweller. 2011. Cognitive load theory. In Psychology of learning and motivation. Vol. 55. Elsevier, 37–76.Google ScholarGoogle Scholar
  23. Rebecca Tiarks. 2011. What Programmers Really Do - An Observational Study. Softwaretechnik-Trends 31 (2011).Google ScholarGoogle Scholar
  24. Kurt Welker. 2001. Software Maintainability Index Revisited. J. Def. Softw. Eng none (08 2001).Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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).Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Effects of Modularization on Developers' Cognitive Effort in Code Comprehension Tasks: A Controlled Experiment
        Index terms have been assigned to the content through auto-classification.

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • 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

          Copyright © 2023 ACM

          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 about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Research
          • Refereed limited

          Acceptance Rates

          Overall Acceptance Rate147of427submissions,34%
        • Article Metrics

          • Downloads (Last 12 months)36
          • Downloads (Last 6 weeks)4

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        HTML Format

        View this article in HTML Format .

        View HTML Format