Modelling Programmer Experience in Cognitive Complexity: The Ewccm Framework
Main Article Content
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

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.