Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3643916.3644432acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

On the comprehensibility of functional decomposition: An empirical study

Published: 13 June 2024 Publication History

Abstract

Folk-wisdom in software engineering suggests that small functions that adhere to the principle of single-responsibility have several advantages over longer, monolithic functions, including improvement in code comprehension. Despite this widespread view, empirical research on the impact of functional decomposition on understanding code is sparse, yet it is central to software development practices.
In this study, we investigated the impact of functional decomposition on understanding using a controlled experiment in which participants were tasked with comprehending code for two different functionalities, each implemented as either a single function or multiple functions, and recorded the reading time, code description accuracy, and behaviour question responses.
Despite a carefully constructed empirical study, we find that the influence of function decomposition on code understanding is inconclusive, suggesting that functional decomposition does not universally enhance code comprehensibility, and context-aware guidelines for code structuring may promote better comprehensibility. Our negative result contributes to the ongoing refinement of software engineering best practices for creating more maintainable software.

References

[1]
Ahmed S Alardawi and Agil M Agil. 2015. Novice comprehension of Object-Oriented OO programs: An empirical study. In 2015 World Congress on Information Technology and Computer Applications (WCITCA). 1--4.
[2]
Edward V. Berard. 1993. Essays on object-oriented software engineering (vol. 1). Prentice-Hall, Inc.
[3]
B. W. Boehm, J. R. Brown, and M. Lipow. 1976. Quantitative evaluation of software quality. In ICSE '76: Proceedings of the 2nd International Conference on Software engineering. 592--605.
[4]
Grady Booch. 1994. Object-Oriented Analysis and Design: with Applications (2nd ed.). Addison-Wesley.
[5]
Frederick P. Brooks, Jr. 1995. The Mythical Man-Month (20th anniversary ed.). Addison-Wesley.
[6]
Caitlin Jee. 2021. Modularization in Software Engineering. Medium. Retrieved October 20th, 2023 from https://medium.com/@caitlinjeespn/modularization-in-software-engineering-1af52807ceed
[7]
Richard Catrambone. 1998. The subgoal learning model: Creating better examples so that students can solve novel problems. Journal of experimental psychology: General 127, 4 (1998), 355.
[8]
Thomas A Corbi. 1989. Program understanding: Challenge for the 1990s. IBM Systems Journal 28, 2 (1989), 294--306.
[9]
Rodrigo Duran, Albina Zavgorodniaia, and Juha Sorva. 2022. Cognitive Load Theory in Computing Education Research: A Review. ACM Trans. Comput. Educ. 22, 4, Article 40 (sep 2022), 27 pages.
[10]
Davide Falessi, Natalia Juristo, Claes Wohlin, Burak Turhan, Jürgen Münch, Andreas Jedlitschka, and Markku Oivo. 2018. Empirical software engineering experts on the use of students and professionals in experiments. Empirical Software Engineering 23 (2018), 452--489.
[11]
Dror G. Feitelson. 2021. Considerations and Pitfalls in Controlled Experiments on Code Comprehension. In 2021 International Conference on Program Comprehension (ICPC). 106--117.
[12]
W. Findlay and D.A. Watt. 1981. Pascal: An Introduction to Methodical Programming. Pitman Publishing Inc., Massachusetts, USA.
[13]
Kathi Fisler. 2014. The Recurring Rainfall Problem. In Proceedings of the Tenth Annual Conference on International Computing Education Research (Glasgow, Scotland, United Kingdom) (ICER '14). Association for Computing Machinery, New York, NY, USA, 35--42.
[14]
Richard K Fjeldstad. 1983. Application program maintenance study. Report to Our Respondents, Proceedings GUIDE 48 (1983).
[15]
International Organization for Standardization. 2011. ISO/IEC 25010:2011: Systems and software engineering --- Systems and software Quality Requirements and Evaluation (SQuaRE) --- System and software quality models. https://www.iso.org/standard/35733.html.
[16]
Martin Fowler. 1999. Refactoring: improving the design of existing code. Addison-Wesley, Boston, MA, USA.
[17]
Richard Gauthier and Stephen Pont. 1970. Designing Systems Programs. Prentice-Hall.
[18]
Amy J Ko, Brad A Myers, Michael J Coblenz, and Htet Htet Aung. 2006. An exploratory study of how developers seek, relate, and collect relevant information during software maintenance tasks. IEEE Transactions on software engineering 32, 12 (2006), 971--987.
[19]
Dawn Lawrie, Christopher Morrell, Henry Feild, and David Binkley. 2006. What's in a Name? A Study of Identifiers. In 14th IEEE international conference on program comprehension (ICPC'06). IEEE, 3--12.
[20]
Robert C. Martin. 2009. Clean Code: A handbook of agile software craftmanship. Prentice Hall.
[21]
Bertrand Mayer. 1988. Object-oriented Software Construction. Prentice-Hall, Inc., Hertfordshire, UK.
[22]
Millie MacDonald. 2023. Modular programming: beyond the spaghetti mess. TINY. Retrieved October 20th, 2023 from https://www.tiny.cloud/blog/modular-programming-principle/
[23]
Roberto Minelli, Andrea Mocci, and Michele Lanza. 2015. I know what you did last summer-an investigation of how developers spend their time. In 2015 IEEE 23rd international conference on program comprehension. IEEE, 25--35.
[24]
Briana B. Morrison, Lauren E. Margulieux, and Mark Guzdial. 2015. Subgoals, Context, and Worked Examples in Learning Computing Problem Solving. In Proceedings of the Eleventh Annual International Conference on International Computing Education Research (Omaha, Nebraska, USA) (ICER '15). Association for Computing Machinery, New York, NY, USA, 21--29.
[25]
National Institute for Standards and Technology NIST). n.d. Modularity is for Understandability, Maintainabilty and Testability. Retrieved October 20th, 2023 from https://www.niap-ccevs.org/Useful_Links/PUBLIC/0140.html
[26]
Oracle. n.d. Java Language Specification. Chapter 7: Packages and Modules. Retrieved October 20th, 2023 from https://docs.oracle.com/javase/specs/jls/se20/html/jls-7.html
[27]
David L. Parnas. 1972. On the criteria to be used in decomposing systems into modules. Commun. ACM 15, 12 (1972), 1053--1058.
[28]
Shari L Pfleeger. 1998. Software Engineering: Theory and Practice. Prentice Hall.
[29]
Jan L Plass, Roxana Moreno, and Roland Brünken. 2010. Cognitive load theory. (2010).
[30]
Python Software Foundation. 2023. The Python Tutorial: Modules. Retrieved October 20th, 2023 from https://docs.python.org/3/tutorial/modules.html
[31]
Paul Ralph and Ewan Tempero. 2018. Construct Validity in Software Engineering Research and Software Metrics. In 22nd International Conference on Evaluation and Assessment in Software Engineering.
[32]
Vennila Ramalingam and Susan Wiedenbeck. 1997. An Empirical Study of Novice Program Comprehension in the Imperative and Object-Oriented Styles. In Papers Presented at the Seventh Workshop on Empirical Studies of Programmers (Alexandria, Virginia, USA) (ESP '97). Association for Computing Machinery, New York, NY, USA, 124--139.
[33]
Giulia Sellitto, Emanuele Iannone, Zadia Codabux, Valentina Lenarduzzi, Andrea De Lucia, Fabio Palomba, and Filomena Ferrucci. 2022. Toward Understanding the Impact of Refactoring on Program Comprehension. In 2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER). 731--742.
[34]
Janet Siegmund, Christian Kästner, Jörg Liebig, Sven Apel, and Stefan Hanenberg. 2014. Measuring and modeling programming experience. Empirical Software Engineering 19 (2014), 1299--1334.
[35]
Janet Siegmund and Jana Schumann. 2015. Confounding Parameters on Program Comprehension: A Literature Survey. Empirical Softw. Engg. 20, 4 (aug 2015), 1159--1192.
[36]
Janet Siegmund, Norbert Siegmund, and Sven Apel. 2015. Views on Internal and External Validity in Empirical Software Engineering. In Proceedings of the 37th International Conference on Software Engineering - Volume 1 (Florence, Italy) (ICSE '15). IEEE Press, 9--19.
[37]
E. Soloway. 1986. Learning to Program = Learning to Construct Mechanisms and Explanations. Commun. ACM 29, 9 (sep 1986), 850--858.
[38]
Barbee E Teasley. 1994. The effects of naming style and expertise on program comprehension. International Journal of Human-Computer Studies 40, 5 (1994), 757--770.
[39]
Ewan Tempero, Kelly Blincoe, and Danielle Lottridge. 2023. An Experiment on the Effects of Modularity on Code Modification and Understanding. In Proceedings of the 25th Australasian Computing Education Conference (Melbourne, VIC, Australia) (ACE '23). Association for Computing Machinery, New York, NY, USA, 105--112.
[40]
Ewan Tempero, Paul Denny, James Finnie-Ansley, Andrew Luxton-Reilly, Diana Kirk, Juho Leinonen, Asma Shakil, Robert Sheehan, James Tizard, Yu-Cheng Tu, and Burkhard Wuensche. 2023. Replication package for "On the comprehensibility of functional decomposition: An empirical study". https://github.com/uoa-cs-pcrg/icpc2024-rene-replication
[41]
Susan Wiedenbeck and Vennila Ramalingam. 1999. Novice comprehension of small programs written in the procedural and object-oriented styles. International Journal of Human-Computer Studies 51, 1 (1999), 71--87.
[42]
Susan Wiedenbeck, Vennila Ramalingam, Suseela Sarasamma, and CynthiaL Corritore. 1999. A comparison of the comprehension of object-oriented and procedural programs by novice programmers. Interacting with Computers 11, 3 (1999), 255--282.
[43]
Marvin Wyrich, Justus Bogner, and Stefan Wagner. 2023. 40 Years of Designing Code Comprehension Experiments: A Systematic Mapping Study. ACM Comput. Surv. (oct 2023). Just Accepted.
[44]
Xin Xia, Lingfeng Bao, David Lo, Zhenchang Xing, Ahmed E Hassan, and Shanping Li. 2017. Measuring program comprehension: A large-scale field study with professionals. IEEE Transactions on Software Engineering 44, 10 (2017), 951--976.
[45]
Marvin V Zelkowitz, Alan C Shaw, and John D Gannon. 1979. Principles of software engineering and design. Prentice Hall Professional Technical Reference.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPC '24: Proceedings of the 32nd IEEE/ACM International Conference on Program Comprehension
April 2024
487 pages
ISBN:9798400705861
DOI:10.1145/3643916
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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 June 2024

Check for updates

Author Tags

  1. functional decomposition
  2. comprehensibility
  3. controlled experiment
  4. program comprehension

Qualifiers

  • Research-article

Conference

ICPC '24
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 82
    Total Downloads
  • Downloads (Last 12 months)82
  • Downloads (Last 6 weeks)7
Reflects downloads up to 03 Feb 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media