Computational thinking, programming self-efficacy, and cognitive styles
Definition and history of computational thinking
Wing (2006, p. 33) regarded computational thinking as a fundamental skill facilitated by computers and their widespread applications; it “involves solving problems, designing systems, and understanding human behavior, by drawing on the concepts fundamental to computer science.” Computational thinking gradually attracted the attention of researchers, and different interpretations of its definition emerged, which can be broadly divided into three perspectives. The first perspective closely links computational thinking to programming. For example, Brennan and Resnick (2012) introduced a computational thinking framework centered on computational concepts, practices, and perspectives, which was inspired by the Scratch programming environment. The second perspective emphasizes computational thinking as a set of higher-order thinking skills, including creativity, critical thinking, problem solving, cooperative thinking, and others (e.g., International Society for Technology in Education, 2015; Mannila et al., 2014). The third perspective focuses on process, explaining that computational thinking is a cognitive process that involves abstraction, decomposition, algorithmic thinking, representation, generalization, and evaluation (e.g., Li et al., 2023; Selby & Woollard, 2013). In line with these conventional definitions, computational thinking is not just a cognitive process but also a skill integral to the learning process, supporting students in problem-solving (Chen et al., 2023).
Learners with computational thinking are great at analyzing new information and handling new problems, thereby improving their problem-solving abilities. With the rapid development of artificial intelligence, the convergence of human cognitive abilities, robots, and computer programming underscores computational thinking as an essential skill in modern society (Lin & Mubarok, 2024). Substantial efforts have been made to improve learners’ computational thinking (e.g., Chen et al., 2023; Chiang et al., 2022; Li et al., 2023). Despite studies on the acquisition of computational thinking in education and training contexts, the relationships between computational thinking and the factors for its effective acquisition during computer programming remain under-explored (Lee et al., 2023; Şen, 2023). Furthermore, identifying predictors of computational thinking must be prioritized when providing meaningful computational thinking training for educators and institutions to cultivate high-quality digital talents (Durak & Saritepeci, 2018). In this context, identifying variables that directly and indirectly affect computational thinking during computer programming can contribute to the experimental research on the development of learners’ computational thinking. The findings can inform the improvement of computer science courses aimed at cultivating computational thinking. From this perspective, this study focuses on the effect of various factors during computer programming on the level of computational thinking.
Effect of programming self-efficacy on computational thinking
Self-efficacy plays a significant role in determining learning performance and achievement; it refers to the “beliefs in one’s capabilities to organize and execute the courses of action required to produce given attainments” (Bandura, 1997, p. 3). When individuals with high self-efficacy set goals for themselves, they tend to be patient when facing challenges, because they are clearly aware of the relationship between their gains and efforts (Lee et al., 2023). Programming self-efficacy mainly involves the computational perspective of students, representing their understanding and evaluation of their ability to use programming knowledge and skills in solving computational problems (Kong, 2017; Román-González et al., 2019). Determining and evaluating the programming self-efficacy of students enables them to gauge their performance in programming learning (Cigdem, 2015). Based on the theory of self-efficacy, learners with high self-efficacy tend to be goal oriented, strive to regulate, persist in learning, and execute tasks, thereby attaining success and competence (Bandura, 1992). In summary, students’ programming self-efficacy, a self-judgment of their effective programming learning, may have a strong positive impact on their acquisition of computational thinking.
Numerous empirical studies have also supported this inference, many of which have shown a significant relationship between the programming self-efficacy level of students and the development of their computational thinking ability. For instance, Chiang et al. (2022) applied cluster analysis to classify elementary school students who received STEM online education based on their self-efficacy from high to low. They found that students with high self-efficacy perform better in computational thinking and task value than students with low self-efficacy. Another research on talented and gifted secondary school students has discovered a positive and medium correlation between their programming self-efficacy and computational thinking (Avcu & Ayverdi, 2020). The programming self-efficacy of students with norm-typical level also has a significant impact on their computational thinking performance (Yildiz-Durak et al., 2019). In addition, Martin and Rimm-Kaufman (2015) proposed that students who have positive and relatively high self-efficacy are likely to be encouraged to engage in classroom tasks in terms of motivation, behavior, and cognition. Nonetheless, no research explores whether the relationships between students’ programming self-efficacy and computational thinking are influenced by other cognitive and behavioral factors of the programming process and the predictive status among them. Therefore, an in-depth analysis of the mechanisms by which programming self-efficacy influences computational thinking is necessary and beneficial.
Cognitive styles as a moderator for programming
Individuals’ cognitive styles can influence their information processing, including identifying problems, searching and interpreting information, and generating thoughts, and play a significant role in the development of computational thinking (Yen & Liao, 2019). Several studies have emphasized the importance of considering learners’ cognitive characteristics, such as cognitive styles, when researching technology-related educational matters (Aciang et al., 2023; Gu et al., 2022). Personal cognitive styles remain relatively constant, or at least they are less susceptible to being influenced over time and situation. Cognitive styles refer to differences in individual preferences for information organization, process, and representation, which can usually be manifested in perception, thinking, decision making, learning, and problem solving (Yilmaz, 2021). Cognitive style is explained from different dimensions. The present study used the cognitive style dimensions proposed by Allinson and Hayes (1996) to classify intuitive learners and analytical learners. Intuitive learners, driven by their right brain, favor random exploration methods based on sensation and adopt a global perspective for immediate judgment. They prefer to view problems comprehensively from a holistic perspective (Aciang et al., 2023). By contrast, analytical learners, led by the left brain, tend to make corresponding strategies based on psychological reasoning and attention to details (Kickul et al., 2009). They prefer structured methods to solve problems and are more adaptable to situations that require step-by-step analysis.
Differences in cognitive styles among learners significantly affect their learning outcome, perception, problem solving, and decision making (Theodoropoulos et al., 2017). For instance, in a study on robot classrooms for a Taiwanese secondary school, analytical students have significantly higher academic performance and cognitive engagement than intuitive students, but their mental load was lower than that of intuitive students (Aciang et al., 2023). Papert (1980) defined computational thinking as a procedural thinking process for designing and executing computer programs. This definition implies that learners’ cognitive styles and powerful thinking may impact their learning and thinking ways (Lai et al., 2023). In programming education, students with different cognitive styles may exhibit varied learning outcomes, problem-solving strategies, and learning behavior (Yen & Liao, 2019). Durak and Saritepeci (2018) pointed out that improving computational thinking skills becomes easy and sustainable by considering the cognitive styles of students in instructional design. Overall, understanding the effect of cognitive styles on the development of computational thinking and learning strategies in programming can provide important implications for educators, researchers, and developers.
Self-regulated learning and successful programming learning
Self-regulated learning in programming
Bandura (1992) proposed that self-efficacy can influence achievement by affecting the self-regulation of cognitive, motivational, emotional, and decision-making processes, such as seeking assistance and managing effort. Zimmerman (2000, p. 14) defined self-regulated learning as “self-generated thoughts, feelings, and actions that are planned and cyclically adapted to the attainment of personal goals.” The self-regulation of cognition and behavior can be achieved through students’ learning strategies (Ramírez Echeverry et al., 2018). As the foundation of self-regulated learning, these learning strategies, including metacognitive and resource management strategies (Pintrich et al., 1991), refer to psychological operations or activities carried out to facilitate learning tasks (Ramírez Echeverry et al., 2018). With the expansion of programming education to non-major students, many programming courses have adopted a self-regulated learning mode. Therefore, in computer programming classrooms, more exploration should also be conducted on students’ self-regulated learning strategies.
The problem-solving process in computer programming involves multiple processes similar to self-regulated learning stages, from planning to evaluation (Kong & Liu, 2023). Students who participate in self-regulated learning can self-monitor their learning, seek help from appropriate sources, strategically select tasks they feel capable of completing, and actively adapt to challenges while following feedback (Zimmerman & Schunk, 2011). When programming, it is important for learners to first understand the problem, identify potential solution processes, and acquire necessary knowledge. This initial stage is similar to the planning or pre-thinking stage of self-regulated learning. Learners should also possess the ability to troubleshoot coding errors by understanding the underlying issues and identifying solutions. This problem-solving process aligns with the monitoring or performance stage of self-regulated learning. Throughout programming, learners should assess their potential solutions, similar to the evaluation or self-reflection stage of self-regulated learning (Shin & Song, 2022). Studies on how to improve students’ programming performance and computational thinking abilities by supporting their self-regulated learning have already been conducted (e.g., Gao et al., 2023; Lee et al., 2018). As such, if students can apply more metacognitive and resource management strategies in their programming learning, they are likely to excel and attain a higher quality of computational thinking development. Similarly, students with advanced levels of computational thinking may be more capable of using self-regulated learning strategies.
Self-regulated learning and computational thinking
Students with good self-regulated learning skills are great at setting goals and managing learning and can effectively and efficiently self-monitor, organize, and evaluate their own learning (Sholihah & Firdaus, 2023). They continuously adjust strategies based on monitoring results during the learning process, ultimately forming the optimal solutions (Hong et al., 2021). These skills correspond to important components of computational thinking, including abstraction, algorithms, and evaluation (Sholihah & Firdaus, 2023). In addition, Myers (2021) focused on the intersection of self-regulated learning and computational thinking and summarized that the connection between them can support the development of citizens in preparation for the 21st century. The definition of computational thinking in computer science education supports this statement; it strengthens the importance of cognitive processes that promote computational thinking education, such as self-regulation (Gerosa et al., 2021).
Some empirical studies have also revealed the relationship between self-regulated learning and computational thinking. For example, a study on how students solve trigonometric problems through self-regulated learning has shown that students who exhibit high levels of self-regulated learning are capable of completing three to four indicators of computational thinking. Those with moderate self-regulated learning can complete one to three indicators, while students with low levels of self-regulated learning can manage at most one indicator (Sholihah & Firdaus, 2023). Liu et al. (2021) analyzed experimental data from sixth-grade students in Taiwan. They found that programming self-regulation is an important variable in predicting problem-solving ability, and computational thinking is positively correlated with problem-solving ability. They also concluded that personal traits, such as learning style and self-regulation ability, can help learners enhance their computational thinking. Moreover, a cross-sectional study on Chinese children has shown a positive correlation between their self-regulation and computational thinking, and children’s self-regulated learning fully mediates the relationship between their sequencing ability and computational thinking (Gao et al., 2023). However, direct evidence suggesting a connection between self-regulated learning strategies and computational thinking is little. Little is also known about the underlying mechanisms between these cognitive abilities.
Previous studies have explained how self-regulation mediates the relationship between various variables. Individuals need self-regulation skills to set long-term plan goals, implement strategies, manage time, prepare for potential events, and persist in tasks when facing failure (Baumeister & Vohs, 2003). Self-regulation, therefore, resembles a psychological mechanism associated with positive outcomes (Morosanova, 2013), capable of altering the relationship between two correlated factors in favor of positive outcomes. Cognitive styles, programming self-efficacy, and self-regulated learning strategies are important predictive factors for successful programming learning, and the most important outcome of programming learning is the improvement of learners’ computational thinking level. Considering these two facts, this study was conducted to understand whether programming self-efficacy, cognitive style, and self-regulated learning strategies are related to computational thinking and explore the possible mediating role of self-regulated learning strategies on the relationship between programming self-efficacy and computational thinking.
Research model and hypothesis
Collectively, educational theories and empirical findings from the previously reviewed studies suggest the hypothesized mediation model of self-regulated learning strategies on the relationship between programming self-efficacy and computational thinking. The hypothesized model is depicted in Fig. 1, and all hypotheses guiding the research questions are listed below.

Hypothesized model of all main elements.
H1. Programming self-efficacy is positively related to metacognitive regulation strategies.
H2. Programming self-efficacy is positively related to effort regulation strategies.
H3. Programming self-efficacy is positively related to computational thinking.
H4. Metacognitive regulation strategies are positively related to computational thinking.
H5. Effort regulation strategies are positively related to computational thinking.
H6. Cognitive styles moderate the effects of programming self-efficacy and self-regulated learning strategies on computational thinking.
Learners with a higher sense of self-efficacy are better at regulating effort and executing tasks during the learning process, achieving excellent achievements (Bandura, 1992). Self-efficacy can significantly positively predict the use of learning strategies, including metacognitive regulation, monitoring, self-setting goals, effort regulation, and time management (Cho & Shen 2013; Heo et al., 2022; Wolters & Hussain, 2015). Furthermore, in robot programming, Baek et al. (2019) found that second-grade students’ self-efficacy, learning preferences, and intrinsic motivation significantly affect their coding achievement and computational thinking. They concluded that self-efficacy is an important predictor of computational thinking. By analyzing a survey they conducted on 106 middle school students, Avcu and Ayverdi (2020) found a positive correlation between programming self-efficacy and computational thinking. The programming self-efficacy of gifted students is an important predictor of computational thinking and explains 31.5% of the total variance in computational thinking. Given previous research findings, this study hypothesizes that programming self-efficacy positively affects self-regulated learning strategies, including metacognitive self-regulation and effort regulation, as well as computational thinking (H1, H2, and H3).
A survey on online software education for elementary school students has shown that participants’ self-regulated learning and GRIT significantly predict computational thinking, with the explanatory power reaching 87% of the total (Lee et al., 2018). Similarly, Gao et al. (2023) revealed that self-regulation is significantly positively associated with computational thinking. If children have a higher level of self-regulation, they tend to perform better in computational thinking tasks. In addition, according to Allsop (2019), computational thinking is a cognitive process regulated by individual metacognition. As such, metacognitive self-regulation is considered to significantly affect computational thinking. Moreover, previous studies have found that students who use high-level metacognitive and resource management strategies in computer programming learning exhibit significantly higher programming performance than those who use low-level strategies (Bergin et al., 2005). Effort regulation in resource management strategies is a form of self-management that refers to students controlling their efforts and attention when facing uninteresting tasks (Heo et al., 2022). This approach is crucial for the sustained use of metacognitive self-regulation strategies and academic success (Pintrich et al., 1991). Furthermore, a fundamental assumption of the self-regulated learning framework lies in its pivotal mediating role, bridging personal factors, including self-efficacy, with learning outcomes across diverse fields (Pintrich, 2004). Based on previous research findings related to self-regulated learning in computer programming, this study hypothesizes that metacognitive self-regulation and effort regulation positively affect computational thinking (H4 and H5).
Cognitive styles, as another personal characteristic factor in this study, represent an important predictor of learner interest, perseverance, and positive performance in tasks (Luse et al., 2013). They influence students’ preferences in how they process information and approach tasks (Chen & Tseng, 2021). When learners with varying cognitive styles are in the same learning environment, their perception and processing of information may differ (Aciang et al., 2023). Previous studies have discovered the significant relationships between cognitive styles and programming-related skills (Catherine, 1995; Cunha & Greathead, 2007). In addition, Sırakaya et al. (2020) found that STEM attitudes and thinking styles (holistic or analytical) significantly affect computational thinking skills, with an explanatory variance of 43%. Most previous studies have focused on investigating the direct effect of cognitive styles on individual cognition and behavior of learners. The effect of cognitive styles on computer programming processes and outcomes must be investigated from different perspectives. Therefore, this study hypothesizes that cognitive styles may moderate the relationships between variables related to computer programming, such as programming self-efficacy, computational thinking, and self-regulated learning strategies in the computer programming process (H6).
link

