Using Data Mining to Investigate the Effect of Cognitive Style on Programming Habits

Document Type : Research Article


1 Department of Computer Science, Faculty of Mathematical Science, Shahrekord University, Shahrekord, Iran.

2 Department of Engineering, Payame Noor University (PNU), P.O.Box 19395-4697, Tehran, Iran.


Different programmers code in different ways. Knowing these habits and the human factors that affect them significantly impacts teaching and task assignments in programming. This article examines the effect of cognitive style on programming habits. We used a questionnaire to obtain data on cognitive style, programming experience, programming skill, interest in programming, and programming habits from 275 student programmers. After preprocessing and feature selection, we evaluated the effectiveness of different data mining techniques in estimating programming habits. Using the Support Vector Machine, the most effective method, we predicted each programming habit once without cognitive style and the second time with cognitive style. The results showed that cognitive style affects the programming habit of "systematic debugging" with Glass's Delta value = 0.22. Programmers with a median score in cognitive style, both analytic and Intuitive, more often debug their codes systematically than programmers with lower or higher scores in cognitive style. Thus assigning programmers with both Intuitive and analytic talent would be more effective when projects need systematic debugging. Moreover, trainers should pay more attention to only Intuitive or only analytical students when teaching systematic debugging. We recommend teachers, trainers, and managers consider cognitive style in programming.


Main Subjects

[1] M. Kozhevnikov. Cognitive styles in the context of modern psychology: Toward an integrated framework of cognitive style. Psychological Bulletin, 133(3):464–481, 2007. [ bib | DOI ]
[2] R. T. Pithers. Cognitive Learning Style: a review of the field dependent-field independent approach. Journal of Vocational Education & Training, 54(1):117--32, 2002. [ bib | DOI ]
[3] C. Allinson and J. Hayes. The Cognitive Style Index - Technical Manual and User Guide. Retrieved January, 13, 2014. [ bib | DOI ]
[4] J. R. Hough and D. Ogilvie. An Empirical Test of Cognitive Style and Strategic Decision Outcomes. Journal of Management Studies, 42(2):417--448, 2005. [ bib | DOI ]
[5] I. B. Myers. A Guide to the Development and Use of the Myers-Briggs Type Indicator: Manual. Consulting Psychologists Press, 1985. [ bib ]
[6] M. J. Kirton. Adaption-innovation: In the context of diversity and change. Routledge, 2004. [ bib ]
[7] G. L. White and M. P. Sivitanides. A theory of the relationships between cognitive requirements of computer programming languages and programmers’ cognitive characteristics. Journal of Information Systems Education, 13(1), 2002. [ bib | DOI ]
[8] O. S. Akinola and O. Oluwatosin. A Study on the Interplay of Cognition in Computer Programming and Code Inspection Skills in an Academic Environment. Journal of Science Research, 12(1):167--178, 2013. [ bib | DOI ]
[9] F. Huang, B. Liu, Y. Song, and S. Keyal. The links between human error diversity and software diversity: Implications for fault diversity seeking. Science of Computer Programming, 89:350--373, 2014. [ bib | DOI ]
[10] A. Theodoropoulos, A. Antoniou, and G. Lepouras. How Do Different Cognitive Styles Affect Learning Programming? Insights from a Game-Based Approach in Greek Schools. ACM Transactions on Computing Education (TOCE), 17(1):1--25, 2016. [ bib | DOI ]
[11] J. Abdelnour-Nocera, T. Clemmensen, and T. G. Guimaraes. Sequence and Structure based Protein Peptide Binding Residue Prediction. In IFIP Conference on Human-Computer Interaction, pages 198--217. Springer, 2017. [ bib | DOI ]
[12] D. Susilowati, D. Susilowati, N. S. Degeng, N. S. Degeng, P. S. P. Setyosari, and S. U. Ulfa. The Role of Cognitive Styles in Computer Programming Learning. In 2nd International Conference on Learning Innovation. Springer, 2018. [ bib | DOI ]
[13] D. Susilowati, I. N. S. Degeng, P. Setyosari, and S. Ulfa. Effect of collaborative problem solving assisted by advance organisers and cognitive style on learning outcomes in computer programming. World Transactions on Engineering and Technology Education, 17(1):35--41, 2019. [ bib | DOI ]
[14] J. Yen and W. Liao. Effects of Cognitive Styles on Computational Thinking and Gaming Behavior in an Educational Board Game. International Journal of Learning Technologies and Learning Environments, 2(2):1--10, 2019. [ bib | DOI ]
[15] C. Pretorius, M. Razavian, K. Eling, and F. Langerak. Combining cognitive styles matters for female software designers. IEEE Software, 38(2):64--69, 2020. [ bib | DOI ]
[16] A. Cox and M. Fisher. Programming style: Influences, factors, and elements. In 2009 Second International Conferences on Advances in Computer-Human Interactions, pages 82--89. IEEE, 2009. [ bib | DOI ]
[17] A. Setiawan, İ. Degeng, C. SA'DIJAH, and H. Praherdhiono. The Effect Of Collaborative Problem Solving Strategies And Cognitive Style On Students' Problem Solving Abilities. Journal for the Education of Gifted Young Scientists, 8(4):1618 -- 1630, 2020. [ bib | DOI ]
[18] M. N. Kholid, P. S. Hamida, L. N. Pradana, and S. Maharani. Students‘ Critical Thinking Depends On Their Cognitive Style. International Journal of Scientific and Technology Research, 9(1):1045--1049, 2020. [ bib | DOI ]
[19] Y. Yusnaini, K. Dewi, and A. Novriansa. Cognitive Style and Cognitive Mapping: Experimental Study in Accounting Decision Making. PalArch's Journal of Archaeology of Egypt/Egyptology, 17(6):7151--7168, 2020. [ bib | DOI ]
[20] M. Muzaini, M. Hasbi, and N. Nasrun. The Role of Students’ Quantitative Reasoning in Solving Mathematical Problems Based on Cognitive Style. Vygotsky: Jurnal Pendidikan Matematika dan Matematika, 3(2):87--98, 2021. [ bib | DOI ]
[21] J. C. Hung and C. Wang. The Influence of Cognitive Styles and Gender on Visual Behavior During Program Debugging: A Virtual Reality Eye Tracker Study. Human-centric Computing and Information Sciences, 11(22):1--21, 2021. [ bib | DOI ]
[22] T. Michaeli and R. Romeike. Improving Debugging Skills in the Classroom – The Effects of Teaching a Systematic Debugging Process. In Proceedings of the 14th Workshop on Primary and Secondary Computing Education, pages 1--7. ACM, 2019. [ bib | DOI ]
[23] Z. Karimi, A. Baraani-Dastjerdi, N. Ghasem-Aghaee, and S. Wagner. Links between the personalities, styles and performance in computer programming. Journal of Systems and Software, 111:228--241, 2016. [ bib | DOI ]
[24] J. Kotrlik and C. Higgins. Organizational research: Determining appropriate sample size in survey research appropriate sample size in survey research. Information technology, learning, and performance journal, 19(1):43--50, 2001. [ bib | DOI ]
[25] C. W. Allinson and J. Hayes. The Cognitive Style Index: A Measure of Intuition‐Analysis For Organizational Research. Journal of Management Studies, 33(1):119--135, 1996. [ bib | DOI ]
[26] A. Bhattacharyya. On a Measure of Divergence between Two Multinomial Populations. The Indian Journal of Statistics, 7(4):401--406, 1946. [ bib | DOI ]
[27] G. J. McLachlan. Mahalanobis distance. Resonance, 4(6):20--26, 1999. [ bib | DOI ]
[28] M. Shepperd and S. MacDonell. Evaluating prediction systems in software project estimation. Information and Software Technology, 54(8):820--827, 2012. [ bib | DOI ]
[29] H. A. R. Daraghmee. The impact of learning computer programming on the development of high school students cognitive abilities in the uae. The British University in Dubai (BUiD), 2019. [ bib ]
[30] L. Baldacchino, D. Ucbasaran, and L. Cabantous. Linking Experience to Intuition and Cognitive Versatility in New Venture Ideation: A Dual-Process Perspective. Journal of Management Studies, 2022. [ bib | DOI ]