Modelling Programmer Experience in Cognitive Complexity: The EWCCM Framework

Main Article Content

Dr. Ugochukwu Onwudebelu
Dr. Olusanjo Olugbemi Fasola
Ms. Hadiza Salihu Idris

Abstract

Software comprehension remains one of the most cognitively intensive activities in software engineering, directly influencing code quality, defect proneness, maintainability, and developer productivity. Although several structural and cognitive complexity metrics have been proposed, most existing approaches implicitly treat all developers as cognitively uniform, overlooking how individual experience shapes comprehension and effort. This limitation continues to affect the predictive accuracy and practical applicability of traditional metrics such as McCabe’s Cyclomatic Complexity and Halstead’s measures. To address this gap, this study proposes the Experience-Weighted Cognitive Complexity Metric (EWCCM), a human-centric framework that integrates structural complexity with a quantifiable programmer experience factor. Grounded in Cognitive Informatics, Cognitive Load Theory, and schema formation principles, EWCCM models comprehension difficulty as a function of both intrinsic program structure and developer familiarity. The study employs a mixed-method research design comprising empirical data collection, synthetic data augmentation, simulation experiments, and comparative analysis with established complexity metrics. Three program comprehension tasks, varying in structural complexity, were administered to participants with diverse experience levels. Statistical analyses—including correlation modelling, regression analysis, ablation studies, and significance testing—demonstrate that programmer experience is a significant predictor of comprehension accuracy and cognitive load. Results show that EWCCM achieves stronger alignment with empirical comprehension outcomes (r = 0.97) compared to traditional metrics and unweighted cognitive models. The synthetic simulations further validate the metric’s stability and generalizability under expanded familiarity conditions. The paper contributes (i) a formal mathematical model for experience-weighted cognitive complexity, (ii) empirical and simulated evidence confirming the role of experience in cognitive load modulation, and (iii) comparative insights demonstrating EWCCM’s superiority over existing measures. Practical implications include improved complexity assessment for software evaluation, personalized code review and learning tools, and pathways for integrating human factors into automated analysis environments. The study concludes with limitations, validity considerations, and recommendations for applying EWCCM across languages, paradigms, and real-world software systems.

Article Details

How to Cite
Onwudebelu, U., Fasola, O. O., & Idris, H. S. (2025). Modelling Programmer Experience in Cognitive Complexity: The EWCCM Framework. CINEFORUM, 65(4), 893–919. Retrieved from https://revistadecineforum.com/index.php/cf/article/view/561
Section
Journal Article
Author Biographies

Dr. Ugochukwu Onwudebelu, Alex Ekwueme Federal University Ndufu Alike (AE-FUNAI)

Department of Computer Science/Informatics, Alex Ekwueme Federal University Ndufu Alike (FUNAI), P.M.B. 1010, Abakaliki, Ebonyi State, Nigeria.

Dr. Olusanjo Olugbemi Fasola, Department of Cybersecurity, School of Information and Communication Technology, Federal University of Technology, Minna, Nigeria.

Department of Cybersecurity, School of Information and Communication Technology, Federal University of Technology, Minna, Nigeria.

Ms. Hadiza Salihu Idris, Department of Computer Science, Al-Hikmah University, Ilorin, Nigeria.

Department of Computer Science, Al-Hikmah University, Ilorin, Nigeria.

References

Agrawal, L. A., Kanade, A., Goyal, N., Lahiri, S., and Rajamani. S. (2023). Monitor-guided decoding of code LMS with static analysis of repository context. Advances in Neural Information Processing Systems, 36, 32270–32298.

Ali, N., Al‑Qutaish, R., & Ahmad, M. (2020). Software complexity measurement: A review. International Journal of Advanced Computer Science, 11(6), 120‑134.

Amandeep, K. & Sharma, D. (2021). Machine learning approaches to predict cognitive load in software comprehension. Applied Soft Computing, 108, 107421. https://doi.org/10.3390/make7020051

Aregbesola, M. K. & Onwudebelu, U. (2019), Experimental Evaluation of Software Quality Management and Assurance in the Nigerian Software Industry, International Journal of Latest Technology in Engineering, Management & Applied Science (IJLTEMAS), 8, 7, 77-82, ISSN 2278-2540.

Aregbesola & Onwudebelu, U. (2011), Typical Software Quality Assurance and Quality Management Issues in the Nigerian Software Industry. The National Association for Science, Humanities and Education Research (NASHER) 8th Annual National Conference. September 14th –17th, 2011, pp. 107-113.

Bavota, G. (2022). Code comprehension: A survey of cognitive models and empirical results. ACM Computing Surveys, 54, 9, 1‑39.

Ben Athiwaratkun, et al. (2023). Multi-lingual evaluation of code generation models. https://www.amazon.science/publications/multi-lingualevaluation-of-code-generation-models

Chhabra, J. K. (2011). Cognitive complexity measure of source code. ACM SIGSOFT Software Engineering Notes, 36(1), 1‑6.

Feitelson, G. D. (2023). From Code Complexity Metrics to Program Comprehension, Communications of the ACM, 66 (5), 52 -61. https://doi.org/10.1145/3546576

Fenton, N. (1997). Software Metrics: A Rigorous and Practical Approach. Chapman & Hall.

Halstead, M. H. (1977). Elements of Software Science. Elsevier North‑Holland.

Gil, Y. and Lalouche, G. (2017). On the correlation between size and metric validity. Empirical Software Engineering, 22, 5, 2585–2611; https://doi.org/10.1007/s10664-017-9513-5.

Levy, O. and Feitelson, D. G. (2021). Understanding large-scale software systems—Structure and flows. Empirical Software Engineering, 26, 3; https://doi.org/10.1007/s10664-021-09938-8.

Idris, H. S., Isah, O. M., Fasola, O. O. and Onwudebelu, U. (2025) Experience‑Weighted Cognitive Complexity Metric for Software Understandability: A Cognitive‑Informatics Perspective, International Conference on Emerging Technologies for Multidisciplinary Innovation and Sustainability (ETMIS 2025), December 4-5, 2025.

McCabe, T. J. (1976). A complexity measure. IEEE Transactions on Software Engineering, 2(4), 308‑320. https://doi.org/10.1109/TSE.1976.233837

Minelli, R., Mocci, A., and Lanza, M. (2015) I know what you did last summer: An investigation of how developers spend their time. 23rd Intern. Conf. on Program Comprehension, 25–35; https://doi.org/10.1109/ICPC.2015.12.

Misra, S., & Akman, I. (2008). Cognitive complexity metrics and their empirical evaluation. Journal of Computer Science, 4(9), 707‑713.

Onwudebelu, U., Igbinosa O. G., & Ugwoke C. U., (2013) The Use of a Collegiate Software Exhibition & Competition in Software Development Education, World Journal of Computer Application and Technology (WJCAT), USA, 1(1): 6-9, 2013, https://doi.org/10.13189/wjcat.2013.010102

Pantiuchina, J., Lanza, M., and Bavota, G. (2018). The (mis) perception of quality metrics. In Intern. Conf. on Software Maintenance and Evolution, 80–91; https://doi.org/10.1109/ICSME.2018.00017.

Politowski, C. et al. (2020) A large scale empirical study of the impact of Spaghetti Code and Blob anti-patterns on program comprehension. Information and Software Technology, 122; https://doi.org/10.1016/j.infsof.2020.106278.

Rim, K., & Choe, Y. (2007). Scope information complexity number: A measure for cognitive complexity. Information and Software Technology, 49(11‑12), 1160‑1170.

Scalabrino, S. et al. (2021). Automatically assessing code understandability. IEEE Transactions on Software Engineering, 47, 3, 595–613; https://doi.org/10.1109/TSE.2019.2901468.

Sharma, T. and Spinellis, D. (2018) A survey of code smells. J. of Systems and Software, 138, 158–173; https://doi.org/10.1016/j.jss.2017.12.034.

Sweller, J. (2019). Cognitive load theory and its application to computer programming. Educational Psychology Review, 31(2), 261‑278.

Tiwari, R., Kaur, S., & Gupta, M. (2019). Predicting code comprehension using neural networks. Journal of Systems and Software, 158, 110420.

Wang, Y. (2007). On cognitive complexity of software and its measurement. International Journal of Cognitive Informatics and Natural Intelligence, 1(4), 17‑36.

Wang, Y. (2009). Cognitive informatics foundations of software engineering. Springer.

Xia, X. et al. (2018). Measuring program comprehension: A large-scale field study with professionals. IEEE Transactions on Software Engineering, 44, 10, 951–976; https://doi.org/10.1109/TSE.2017.2734091.