Code Comprehension Confounders: A Study of Intelligence and Personality

Program comprehension is a cognitive psychological process. Accordingly, literature and intuition suggest that a developer’s intelligence and personality have an impact on their performance in comprehending source code. Some researchers have made this suggestion in the past when discussing threats to validity of their study results. However, the lack of studies investigating the relationship of intelligence and personality to performance in code comprehension makes scientifically sound reasoning about their influence difficult. We conduct the first large-scale empirical evaluation, a correlational study with undergraduates, to investigate the correlation of intelligence and personality with performance in code comprehension, that is, in this context, with correctness in answering comprehension questions on code snippets. We found that personality traits are unlikely to impact code comprehension performance, at least not when their influence is considered in isolation. Conscientiousness, in combination with other factors, however, explains some of the variance in code comprehension performance. For intelligence, significant small to moderate positive effects on code comprehension performance were found for three of four factors measured, i.e., fluid intelligence, visual perception, and cognitive speed. Crystallized intelligence has a positive but statistically insignificant effect on code comprehension performance. According to our results, several intelligence facets as well as the personality trait conscientiousness are potential confounders that should not be neglected in code comprehension studies of individual performance and should be controlled for via an appropriate study design. We call for the conduct of further studies on the relationship between intelligence and personality with code comprehension, in part because code comprehension involves more facets than we can measure in a single study and because our regression model explains only a small portion of the variance in code comprehension performance.

[1]  Magnus C. Ohlsson,et al.  Experimentation in Software Engineering , 2000, The Kluwer International Series in Software Engineering.

[2]  Amy J. Ko,et al.  Individual differences in program comprehension strategies in unfamiliar programming systems , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[3]  Ian J. Deary,et al.  The Stability of Individual Differences in Mental Ability from Childhood to Old Age: Follow-up of the 1932 Scottish Mental Survey , 2000 .

[4]  M. Ashton,et al.  Psychometric Properties of the HEXACO-100 , 2018, Assessment.

[5]  Thomas Leich,et al.  A Look into Programmers’ Heads , 2020, IEEE Transactions on Software Engineering.

[6]  Sarah Fakhoury Moving towards objective measures of program comprehension , 2018, ESEC/SIGSOFT FSE.

[7]  Zhenchang Xing,et al.  Measuring Program Comprehension: A Large-Scale Field Study with Professionals , 2018, IEEE Transactions on Software Engineering.

[8]  Janet Siegmund,et al.  Program Comprehension: Past, Present, and Future , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[9]  M. Ashton,et al.  HEXACO Personality Inventory-Revised , 2011 .

[10]  Jacob Krüger,et al.  Comprehending Studies on Program Comprehension , 2017, 2017 IEEE/ACM 25th International Conference on Program Comprehension (ICPC).

[11]  Dietmar Pfahl,et al.  Reporting Experiments in Software Engineering , 2008, Guide to Advanced Empirical Software Engineering.

[12]  Stefan Wagner,et al.  Fluid Intelligence Doesn't Matter! Effects of Code Examples on the Usability of Crypto APIs , 2020, 2020 IEEE/ACM 42nd International Conference on Software Engineering: Companion Proceedings (ICSE-Companion).

[13]  Sven Apel,et al.  Views on Internal and External Validity in Empirical Software Engineering , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[14]  A. Caspi,et al.  The child is father of the man: personality continuities from childhood to adulthood. , 2000, Journal of personality and social psychology.

[15]  Stefan Wagner,et al.  The Mind Is a Powerful Place: How Showing Code Comprehensibility Metrics Influences Code Understanding , 2020, 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE).

[16]  David Greathead,et al.  Does personality matter?: an analysis of code-review ability , 2007, CACM.

[17]  John Grundy,et al.  An empirical study of the effects of personality on software testing , 2013, 2013 26th International Conference on Software Engineering Education and Training (CSEE&T).

[18]  M. Ashton,et al.  A theoretical basis for the major dimensions of personality , 2001 .

[19]  Aamer Nadeem,et al.  An empirical evaluation of the influence of human personality on exploratory software testing , 2009, 2009 IEEE 13th International Multitopic Conference.

[20]  Anneliese Amschler Andrews,et al.  Program Comprehension During Software Maintenance and Evolution , 1995, Computer.

[21]  Stefan Wagner,et al.  Links between the personalities, styles and performance in computer programming , 2016, J. Syst. Softw..

[22]  Julia M. Rohrer,et al.  Thinking Clearly About Correlations and Causation: Graphical Causal Models for Observational Data , 2017 .

[23]  Sven Apel,et al.  Simultaneous measurement of program comprehension with fMRI and eye tracking: a case study , 2018, ESEM.

[24]  Jim Buckley,et al.  Expectation-based, inference-based, and bottom-up software comprehension , 2004, J. Softw. Maintenance Res. Pract..

[25]  Jacob Cohen,et al.  A power primer. , 1992, Psychological bulletin.

[26]  Gabriele Bavota,et al.  Automatically Assessing Code Understandability , 2019, IEEE Transactions on Software Engineering.

[27]  Luiz Fernando Capretz,et al.  Forty years of research on personality in software engineering: A mapping study , 2015, Comput. Hum. Behav..

[28]  S. Holm A Simple Sequentially Rejective Multiple Test Procedure , 1979 .

[29]  A. Baghestani,et al.  How to control confounding effects by statistical analysis , 2012, Gastroenterology and hepatology from bed to bench.

[30]  Stefan Wagner,et al.  An Empirical Validation of Cognitive Complexity as a Measure of Source Code Understandability , 2020, ESEM.

[31]  Jana Schumann,et al.  Confounding parameters on program comprehension: a literature survey , 2015, Empirical Software Engineering.

[32]  Fernando Castor Filho,et al.  Evaluating Code Readability and Legibility: An Examination of Human-centric Studies , 2020, 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[33]  L. Wolfle,et al.  The Three-Stratum Theory of Cognitive Abilities: Test of the Structure of Intelligence across the Life Span. , 1995 .

[34]  Dietmar Pfahl,et al.  Software engineering group work: personality, patterns and performance , 2010, SIGMIS-CPR '10.

[35]  John B. Carroll,et al.  The Three-Stratum Theory of Cognitive Abilities. , 1997 .

[36]  Sven Apel,et al.  Measuring and modeling programming experience , 2013, Empirical Software Engineering.

[37]  Barry W. Boehm,et al.  Quantitative evaluation of software quality , 1976, ICSE '76.

[38]  Stefan Wagner,et al.  A theory on individual characteristics of successful coding challenge solvers , 2019, PeerJ Comput. Sci..

[39]  Michael C. Pyryt Human cognitive abilities: A survey of factor analytic studies , 1998 .

[40]  L. Cronbach The two disciplines of scientific psychology. , 1957 .

[41]  Michele Lanza,et al.  I know what you did last summer: an investigation of how developers spend their time , 2015, ICPC '15.