1 Introduction

In response to the challenges posed by global competition, artificial intelligence, and the knowledge society in the information age, there is an international education reform movement oriented toward 21st-century skills. The spiritual core of the 21st-century skills framework of system learning and innovation skills involves critical thinking and problem-solving, communication and collaboration, creativity and innovation. Many of these skills are highly relevant to computational thinking (Binkley et al., 2012). The European Union's Review of Computational Thinking (CT) in Compulsory Education lists CT as one of the skills to be acquired in a digital world (Bocconi et al., 2022). As a combination of higher-order cognitive skills, including problem-solving, creativity and critical thinking, the development of CT has been recognized by national teaching communities (ISTE, 2016; Kong & Liu, 2020; Korkmaz et al., 2017). The development of CT as a combination of higher-order cognitive skills, including problem-solving, creativity, and critical thinking, has received widespread attention from the teaching profession in various countries. Educational researchers have called for the integration of CT across disciplines to facilitate students' more profound understanding of problems and the acquisition of skills to solve complex problems across disciplines (Apiola & Sutinen, 2021; Chen et al., 2021; Hsu & Liang, 2021). Educational researchers have emphasized the importance of CT in teaching and learning.

Programming is an important vehicle for learning and developing CT (Boom et al., 2022; Laura-Ochoa et al., 2022; Pala & Turker, 2021). Solving a programming problem requires paying attention to every detail of the problem and building a solution to the problem step by step. In the field of programming education, project-based learning is seen as one of the learning styles that promote student understanding and help students to use programming concepts to communicate and solve problems (Bennedsen et al., 2008). However, for beginners, it is difficult to proceed if a problem arises at a certain step due to their general lack of metacognitive awareness (Loksa & Ko, 2016; Roll et al., 2012; Vallejos-Yopan & Rodriguez-Gonzalez, 2022). Metacognitive awareness aims to think and reflect on the problem-solving process, focusing on how humans spontaneously monitor and regulate their thinking (Metcalfe & Shimamura, 1994). The level of metacognitive awareness directly affects the effectiveness of the cognitive process, that is, the effectiveness and efficiency of learning (Callender et al., 2016; Holton & Clarke, 2006). In addition, students are challenged to solve complex programming problems by not only decomposing the problem and dissecting the logical relationships between tasks in a short time, but also coordinating metacognitive processes and behavioral activities to solve the problem and develop CT.

The introduction of scaffolding in programming instruction enables students to identify their strengths with the help of teachers independently, become more aware of their current learning status and identify problems in time (Yadav et al., 2022; Zheng et al., 2022). Scaffolding can help students solve these challenges by independently identifying their strengths with the teacher ‘s help, becoming more aware of their current learning status, and identifying problems promptly. Research shows that scaffolding can improve learners' problem-solving skills (Abdullah et al., 2021; Kim & Lim, 2019; Shin & Song, 2016). In addition, scaffolding can help students implement and monitor the process and effects of learning, reflect and summarize at different stages, and improve their learning efficiency (Pieger & Bannert, 2018). Therefore, this study investigated the effects of metacognitive scaffolding on learners' metacognitive abilities, CT, and learning effectiveness, intending to exploit the advantages of metacognitive scaffolding to improve the quality of programming instruction and learners' metacognitive ability and CT.

Based on the above description, the research questions were as follows:

  1. (1)

    Does metacognitive scaffolding affect students' CT?

  2. (2)

    Does metacognitive scaffolding affect students' metacognition?

  3. (3)

    Does metacognitive scaffolding affect students' learning achievement?

2 Theoretical background

2.1 Scaffolding

Scaffolding was originally introduced in the context of helping children acquire knowledge or solve problems in informal learning environments (Wood et al., 2006). Later, educators expanded the scope of their research to regular education, and the development and application of computer technology led to further expansion of scaffolding to new technology-based learning environments. In a technology-based instructional environment, learners can receive support from a variety of resources, including instructors, experts, peers, and technology-based tools. Over time, Lepper et al. noted that the concept of scaffolding had different meanings in different studies (Lepper et al., 1997). Inspired by Vygotsky, Stone (1993) proposed that learning is a process in which both teachers and students actively communicate to build consensus, and that instructional scaffolding is a tool that aids teacher-student interaction. Seidel and Shavelson (2007) argued that cognitive scaffolding consists of specific processes, strategies, and techniques that support learners. Gibbons (2002) defined instructional scaffolding as temporary, meaningful, and responsive support that helps learners develop new skills or concepts, suggesting that the core of scaffolding is emotional engagement, progressive assistance, and transfer of responsibility. Janneke et al.'s (2010) analytical review of nearly a decade of research on teacher-student interaction found that instructional scaffolding should provide assistance in diagnosing students' cognitive states, gradually withdrawing scaffolding based on students' cognitive levels, and achieving a transfer of responsibility so that students can become independent problem solvers. The development of the teaching scaffolding definition metaphor demonstrates its significance and practical value for teaching and educational research.

Classifying instructional scaffolds from different perspectives and identifying the mechanisms of scaffolding is also one of the main directions of scaffolding research. Reigeluth (2013) classified instructional scaffolds into two categories: cognitive and affective, where cognitive scaffolding helps students grow in the subject matter. Saye and Brush (2002) designed hard and soft scaffolds to increase student engagement in history lessons and to help students reframe their narrative stories. The hard scaffolding not only provided students with the opportunity to learn more about history, but also to rethink their stories. It not only provided static support for students to help them make sense of their historical stories, but also assisted teachers in dealing with discipline issues. In practice, soft scaffolding requires teachers to ask questions about student learning and to adjust their teaching strategies based on student responses. Azevedo et al. (2008) used interaction as a classification criterion and considered scaffolding to include fixed scaffolding and adaptive scaffolding, while Hill and Hannafin (2001) classified scaffolding according to its uses as conceptual, metacognitive, process, and strategic scaffolding.

In addition to facilitating learners’ cognitive development, scaffolded learning can also facilitate the development of metacognitive skills. Metacognition is about what a person knows, how they know it, and how they regulate their learning process. The stronger the metacognitive skills, the better the student's performance. However, many learners do not have sufficient metacognitive knowledge and lack metacognitive skills to learn effectively. Therefore, it is necessary to help them develop metacognitive skills. For example, Quintana et al. (2004) designed questions such as "Checking our understanding" and "How do we do learning activities?", while Kaptelinin and Cole (2002) pointed out that teachers provide scaffolding to help students check their learning and develop the ability to monitor and regulate their own thinking in ways that students cannot do alone.

In recent years, educational research has focused on developing learners' higher-order thinking skills. However, due to the poor match between the difficulty of the task and students' limited abilities, they do not spontaneously engage in higher-order thinking. Scaffolding has been shown to be effective in facilitating the development of higher-order thinking skills (Sharma & Hannafin, 2007). In computer science, scaffolding can assist students in characterizing problems, debugging programs, and stimulating their thinking skills (Lye & Koh, 2014). Educators advocate the use of scaffolding to develop students' CT (Grover et al., 2015; Hsu et al., 2018). In addition, many studies have examined the effectiveness of scaffolding in promoting the development of CT (Angeli & Valanides, 2020; Basu et al., 2017; Sharma et al., 2019). However, few studies have clarified the effects of metacognitive scaffolding on CT. Therefore, this study considers the design principles of metacognitive scaffolding and the characteristics of programming instruction to design metacognitive scaffolding suitable for programming instruction based on students’ cognitive characteristics.

2.2 Metacognition

Metacognition was proposed by Flavel, who defined metacognition as knowledge about knowledge, that is, knowledge that includes not only the process by which an individual learns knowledge, but also the cognitive conditioning that accompanies it (Flavell, 1979). Thus, metacognition has two layers: one for metacognitive knowledge about knowledge creation and the other for metacognitive awareness when dealing with problems to monitor, evaluate, modify, and solve complex problems. Cognition is the mediator between the learner, the world of experience, and the cognitive object. Metacognition is problem-solving related, purposeful thinking, and mediates between learning content and cognition (Schoenfeld, 2016).

Research has shown that metacognition is closely linked to and that learners with higher levels of metacognition have better problem-solving skills (Berardi-Coletta et al., 1995; Kapa, 2001). Moreover, CT reflects the developmental process of learners' problem-solving thinking. Four metacognitive processes are included in the problem-solving process, namely identifying and defining the problem, forming a mental representation of the problem, planning the problem-solving process, and evaluating the operational process (Davidson et al., 1994). When learners are first exposed to a domain of knowledge, metacognitive skills are useful for students to determine the current state of learning, use self-questioning, and monitor cognitive processes to compensate for their deficiencies (Grover & Pea, 2013; Hsu et al., 2019). In addition, metacognitive knowledge helps to understand and abstract programming languages, and supports debugging programs and detecting syntax errors, modifying programming languages, and thus improving computing practices (Lye & Koh, 2014). Research has shown that students who perform better in programming have higher levels of metacognition, and these learners are better at identifying key features of problems, analyzing the logical relationships between problems, and developing systematic solutions (Prather et al., 2019).

However, in the field of computer science, CT development studies rarely focus on students' metacognitive processes. When solving complex problems, learners are required to not only complete the problem decomposition in a short period of time, but also design algorithms and debug programming errors, which is demanding for learners. Therefore, teachers need to provide students with appropriate scaffolding to facilitate the coordination of metacognitive processes around knowledge in order to achieve a high degree of problem structuring. Metacognitive scaffoldings provide new ideas to address these issues by assisting students in four areas: self-planning, self-monitoring, self-reflection, and self-evaluation, to promote a deeper understanding of their own knowledge acquisition process and the problems encountered in solving tasks, and to promote spontaneous reflection and analysis of deficiencies. In this study, we designed metacognitive scaffoldings from the above four aspects to verify their effects on students' CT and metacognitive abilities.

2.3 Computational thinking

CT can be traced back to the programming language for children developed by Papert (1980). A few years after the concept of CT first emerged, Wing (2006) revisited the thinking processes involved in CT, refining CT into the mathematical logic and operational decision-making processes involved in forming the numbers used in solutions The U.S. National Research Council (2011) published a report on the state of K-12 CT, and proposed several core concepts of CT, arguing that CT is not procedural thinking or simple programming, but rather a heuristic reasoning process. The U.S. National Science Foundation has also outlined the principles of CT and integrated CT into the U.S. college prerequisite curriculum. Researchers agree that CT is a multidimensional concept that involves algorithms, creativity, collaboration, and critical thinking (Aho, 2012; Mannila et al., 2014; Yadav et al., 2016).

Educators and researchers are trying to find an effective set of instructional interventions to train students in CT (Lyon & Magana, 2020). Some researchers have chosen to narrow the scope of research on CT by limiting it to tools and strategies for teaching programming. Buitrago Flórez et al. (2017) used successful instructional strategies such as peer-to-peer learning and concept mapping in their classrooms, and found that these approaches increased programming course pass rates by nearly one-third. Young and Lewis (2022) confirmed that peer-led team learning, pair programming, and peer teaching are effective approaches and showed that media resources can meet students’ needs and increase their interest in learning. In addition, researchers have experimentally shown that adaptive curricula that integrate multiple strategies facilitate the development of CT. Scaffolding and reflective activities can foster computational practices and perspectives (Zhao et al., 2008).

From the perspective of the development of CT, CT emphasizes the gradual automation of complex tasks by abstracting and decomposing tasks. However, in the actual execution of a task, students often have difficulty choosing an appropriate way to describe the problem, are unable to abstract the problem, and do not know how to break down a large, complex problem into small, simple steps, so that they become intimidated and unable to successfully solve the problem, which can have a negative impact on their academic performance as they engage in the problem-solving process (Perry et al., 2019). In some ways, metacognitive regulation is a prerequisite for successful problem-solving. To some extent, metacognitive regulation skills reflect how learners monitor and adjust their cognitive activities. However, research has found that elementary school students have low levels of metacognitive skills, so providing learners with the necessary metacognitive support can help them correct their errors and thus gain skills and knowledge. Developing their metacognitive skills and CT is therefore a priority.

3 Method

To evaluate the effectiveness of metacognitive scaffolding, a quasi-experiment was conducted with recruited elementary school students in Wenzhou city, Zhejiang province, China. The quasi-experimental approach was used in this study because it was not possible to randomly select students from the overall population and because it was necessary to control for extraneous variables such as learning content, length of learning, teacher level, and student level (Cohen et al., 2017). The selected curriculum goal was to improve students' CT, learning achievement, and metacognitive skills in the process of learning programming knowledge through the use of metacognitive scaffolding, and to help them plan and monitor their own learning and enhance their learning efficiency.

3.1 Participants

In this study, students aged 9–11 who were recruited for elementary school in Wenzhou city, Zhejiang province, China, were recruited as the study subjects. A total of 70 valid samples were obtained after eliminating the invalid sample data of students who did not participate in the pre-test or post-test. There was a total of 38 students in the experimental group and 32 in the control group. Table 1 shows the student information of the two groups.

Table 1 Student information

3.2 Experimental procedure

Project-based learning is a learner-centered approach to learning in which learners actively engage in activities such as research, goal setting, decision making, and reflection to solve problems (Chiu, 2020). Students work long hours to investigate and answer authentic, engaging, and complex questions or challenges from which they gain knowledge and skills (Blumenfeld et al., 1991). Project-based learning itself is a collaborative form of learning that provides an interactive and cooperative environment in which all participants need to actively reflect and consciously engage in order to work together to accomplish project outcomes (Bell, 2010). Therefore, this study redeveloped the content based on the "Sorting Algorithm," "Finding Algorithm," and "Control Structure of Algorithm" topics in the elementary IT curriculum and designed The "Sunset Princess" series of lessons were designed, and the topics and contents of the lessons are shown in Table 2. This course uses project-based learning as the learning method for elementary school students, takes "the prince rescues the princess" as the main story line, and "how can the prince overcome the many hurdles and finally rescue the princess" as the driving problem, and guides students to understand and master the algorithm knowledge and optimize the problem-solving solution by group cooperation. Students are guided to work in groups to understand the algorithm knowledge and optimize the solution to the problem, pay attention to the convenience and innovation of the process, and finally complete the solution to the problem as the project result.

Table 2 Programming content and cases

The experimental procedure is shown in Fig. 1. The difference between the experimental and control groups was that the experimental group incorporated the corresponding metacognitive scaffolding in the project-based teaching process, while the control group did not use metacognitive scaffolding in the project-based teaching process. The pre-test questionnaire was distributed and collected with the assistance of the teaching assistant. Before the students filled out the questionnaires, the teachers clearly informed the students that the survey would not reveal their information and would not involve their scores, but would only be used for research purposes. The curriculum was based on a "university-primary school" partnership, developed by university curriculum researchers and modified through classroom observations and teacher feedback, resulting in a total of 20 lessons, lasting 5 weeks, each of 50 min. In addition, the two groups of students were unaware of each other's different learning styles, and the teachers did not inform the students that the experiment was taking place, but rather followed the normal teaching schedule.

Fig. 1
figure 1

Experimental procedure

The implementation of the project-based curriculum consisted of four phases: project focus, project exploration, project implementation, and evaluation and testing. The teachers incorporated metacognitive scaffolding into the experimental group's project-based computational thinking development instruction, as shown in Table 3.

Table 3 Teaching plan

Project focus phase: The teacher used PowerPoint to introduce students to the Misty Forest project situation. The project content is: There are 50 trees in the forest, and one of them has a love fruit on it. The prince can only find the tree and eat the love fruit, and the poison will be lifted to move on to the next level. The teacher asked driving question 1 and provided students with a metacognitive planning scaffolding (shown in Fig. 2) to guide elementary students in decomposing the complex project problem. Students were guided to use their prior knowledge of finding algorithms and real-life experiences to analyze the problem-solving methods and steps to complete.

Fig. 2
figure 2

Planning Scaffolding

Project exploration phase: The teacher asked driving questions 2 in response to student responses during the project focus phase and distributed metacognitive monitoring scaffolding (as shown in Fig. 3), which students used to monitor their own learning status and confirm task and role division to avoid confusion and divergence of roles during task solving. Students worked in groups to explore the process of locating the target trees and compared the relationship between different methods of locating and efficiency using actual drawings to finalize the solution for the Misty Forest project and complete the metacognitive monitoring sheet.

Fig. 3
figure 3

Monitoring Scaffolding

Project implementation phase: After the group solution is determined, the teacher asked driving question 3 and distributed a metacognitive reflection scaffolding (shown in Fig. 4), which is used to help students check whether they have accomplished the desired goal and whether there is an optimal path to solve the problem. Students divided the work within the group and finally drew the process diagram of dichotomous finding. After completing the project results, group members exchanged and discussed to summarize the process, time complexity, limitations and advantages of dichotomous finding, and the difference with linear finding, etc., and complete the metacognitive monitoring scaffolding and metacognitive reflection scaffolding.

Fig. 4
figure 4

Reflection Scaffolding

Evaluation and testing phase: After the group representatives presented and reported the project results and students explained the dichotomous finding process diagram in detail and summarized the project implementation phase, the teacher gave feedback on the results report and issues metacognitive evaluation sheets (as shown in Fig. 5). Students deepened their understanding and mastery of programming knowledge through real-time testing in two aspects, and used the metacognitive evaluation scaffolding to assess their knowledge mastery and reconstructed their knowledge to promote a virtuous cycle of learning.

Fig. 5
figure 5

Evaluation Scaffolding

3.3 Measurement instruments

This study used the Metacognitive Ability Inventory (Jr. MAI) for elementary school students, revised by Sperling et al. (2002) based on the Metacognitive Ability Inventory (MAI) proposed by Sweller (1988). The scale includes questions on two dimensions, metacognitive knowledge and metacognitive regulation, with six questions on each dimension, giving a total of 12 questions. The specific classification of the questions in the scale is shown in Table 4. A 3-point scale was used for scoring (1 = never, 2 = sometimes, 3 = always). The questions were all positively scored and were scored out of 36. Thus, the higher the score, the stronger the student’s metacognitive ability. The internal consistency coefficient of the empirical scale Cronbach's α was 0.77, indicating good reliability.

Table 4 Measurement instruments

As the dependent variable of this study, the scale of CT is the CT tendency compiled by Hwang et al (2020) and the higher-order thinking tendency scale compiled by Lai and Hwang (2014), which includes four dimensions: communication tendency, creative thinking tendency, cooperation tendency and problem-solving ability tendency. The scales were designed for elementary and middle school students. Huang believes that higher-order thinking skills are difficult to measure, but the awareness or tendency of higher-order thinking can be measured by the scale. The scale uses a 5-point Likert scale (1 = strongly disagree, 2 = comparatively disagree, 3 = uncertain, 4 = comparatively agree, 5 = strongly agree). The internal consistency coefficients of the scales’ Cronbach's α were analyzed to be over 0.7, thus proving that the scales have good reliability.

Two sets of questions (Paper A and Paper B) were selected from the Bebras Challenge to address the cognitive characteristics and programming levels of elementary school students. Then, according to the experts' and teachers' suggestions, the questions were modified and deleted to form a preliminary 9-item pre- and post-test of computational thinking, of which Paper A was used for the pre-test and Paper B for the post-test.

3.4 Data collection and analysis

The study was conducted over a 5-week period, and students were given an approximately 60-min pretest of programming knowledge and completed the CT and metacognitive skills scales prior to the start of the course. Students were then randomly assigned to the experimental and control groups to complete 5 weeks of CT development. At the end of the experiment in week 5, the instructor administered the CT post-test to the students in the experimental and control groups and measured the students' CT and metacognitive abilities again. The quantitative data collected in this study included CT pre- and post-test performance scores, CT tendencies, and metacognitive abilities, and were statistically analyzed with the help of the Jamovi 3.2 software developed by the psychology team at the University of Tasmania, which has similar functions to SPSS.

4 Results

4.1 Descriptive statistics

Descriptive statistics are presented in Table 5. Existing studies have shown that prior knowledge experience has an effect on learning effectiveness (Jonassen et al., 2008), Therefore, in order to exclude the effect of prior knowledge experience on CT, metacognitive ability, and learning effectiveness, the level of prior experience of the subjects was used as a covariate in this study to ensure homogeneity of the experimental sample.

Table 5 Descriptive statistics

4.2 Effects of metacognitive scaffoldings on CT tendency

To exclude the influence of CT pretest scores on the study, the study used the pre-test scores of CT as the covariate, the experimental approach as the independent variable, and the score of CT propensity as the dependent variable, and conducted an analysis of covariance on the post-test CT scores of the experimental and control classes. The data met the parallelism test and chi-square test (F = 0.667, p = 0.770). Table 6 shows that there is a significant difference between the two classes of students' tendency to engage in CT (p = 0.029 < 0.05), and the mean of the experimental class is significantly higher than that of the control class. Therefore, it can be concluded that metacognitive scaffolding can enhance the level of students' tendency to engage in CT.

Table 6 Covariance analysis results of CT tendency

In order to see the changes in the level of students' propensity to engage in CT in more detail, the study conducted an in-depth analysis of the scores of the five dimensions of CT. The Shapiro–Wilk test on the sample data of the five dimensions revealed that the propensity to think creatively (p = 0.148), communicate (p = 0.369), and cooperate (p = 0.179) were normally distributed, and the propensity to think algorithmically (p = 0.043) and to problem solve (p = 0.022) were not normally distributed. The paired samples t test was used for the normally distributed data, and the Wilcoxon rank sum test was selected for the analysis of non-normal data; the results are shown in Table 7. It can be seen that metacognitive scaffolding significantly increased students' problem-solving tendency and collaborative tendency, but there was no significant difference in algorithmic thinking tendency, creative thinking tendency, and communication tendency.

Table 7 Effects of scaffoldings on CT tendency’s dimension

4.3 Effects of metacognitive scaffoldings on metacognition

To investigate whether task-driven programming based on metacognitive scaffolding can enhance students' metacognitive abilities, the Mann–Whitney U test was conducted on the posttest data from both classes, and the results are shown in Table 8, from which it can be seen that there was no significant difference in the overall dimension of metacognitive abilities between the two classes (p = 0.161). Neither class showed a significant increase in their metacognitive ability after the teaching practice. This may be due to the fact that the enhancement of metacognitive abilities requires long-term instructional intervention.

Table 8 Mann–Whitney U test of metacognitive ability

To further explore whether there was a significant difference between the experimental and control classes in the metacognitive ability sub-dimension, a paired-samples t test was conducted on the data from both classes in terms of the metacognitive knowledge and metacognitive regulation sub-dimensions; the results are shown in Table 9; they indicate that there was a significant difference between the students in the experimental class in the metacognitive regulation dimension (p < 0.001). The experimental class scored significantly higher on the metacognitive regulation dimension (M = 14.8) than the control group (M = 13.6), indicating that programming instructional practices incorporating metacognitive scaffolding can improve students' regulation abilities. On the metacognitive knowledge dimension both classes slightly decreased after the teaching experiment, and the experimental class scored slightly lower than the control class, but there was no significant difference. Therefore, although the programming with metacognitive scaffolding can't improve the overall level of metacognitive ability, metacognitive scaffolding will still affect metacognitive adjustment ability and produce differences.

Table 9 Test of paired samples of metacognitive ability

4.4 Effects of metacognitive scaffoldings on programming achievement

We conducted Mann–Whitney U test analysis for the posttest performance scores of students in the experimental and control groups. The results of the data analysis showed that the experimental group posttest had a 0.05 level of significance (p = 0.028), while a specific comparison of the median difference showed that the median of 5.0 in the control group was significantly lower than the median of 6.0 in the experimental group. The programming incorporated into metacognitive scaffolding was therefore able to significantly improve students' CT performance, which is shown in Table 10.

Table 10 Achievement results of the Mann–Whitney U test

Paired-samples t tests were conducted separately for the pre- and post-test scores of the experimental and control classes, and according to the summary analysis in Table 11, it is clear that both the experimental (t = -2.117, p < 0.05) and control classes (t = -2.270, p < 0.05) had significantly higher programming scores after the experiment.

Table 11 Achievement results of paired samples

5 Discussion

This study constructs metacognitive scaffolding from four aspects: planning, monitoring, reflecting, and evaluating, and investigates its effects on students' CT and learning achievement. The results showed the positive effects of metacognitive scaffolding on students' CT, metacognitive regulation, and learning achievement.

Specifically, metacognitive scaffolding enhanced students' CT and produced significant differences in problem-solving and collaborative tendencies, consistent with scholarly research (Gao & Hew, 2022; Lai & Wong, 2022; Pala & Turker, 2021). When students collaborate on complex programming problems, they are less likely to be intimidated if they can break them down into easy-to-follow problems by functional elements, roles, or other logic, making the process of solving programming problems easier. Based on the clarification of the problem, students continue to obtain problem-related information from the problem context, extract or add domain knowledge related to these problems, form a semantic network of all information in the problem space, discuss the semantic relationships of each problem in a free-dispersive manner, and carry out structured summarization and organization; as such, the problem is effectively decomposed and transformed.

Furthermore, metacognitive scaffolding was able to improve students' programming learning achievement. This result is similar to previous studies (Bannert et al., 2009; Huang et al., 2017). This suggests that metacognitive scaffolding guides students to clarify topics, characterize problems, and activate knowledge experiences in students' original cognitive structures during problem-solving, and facilitates students' transfer of new knowledge through self-monitoring, self-regulation, and self-reflection. In addition, Molenaar et al. (2011) found that metacognitive scaffolding could facilitate the development of students' metacognitive activities by analyzing the problem in depth from their perspective, such as finding grammatical errors and debugging programs. Students not only improved their metacognitive skills during the process, but also improved their CT. Previous studies have confirmed the correlation between metacognitive scaffolding and metacognitive ability (Pozuelos et al., 2019; Valencia-Vallejo et al., 2019). Besides, the results of this study showed that metacognitive scaffolding positively affected students' metacognitive regulation ability. However, the overall metacognitive level did not change significantly, which may be due to the short duration of this study and the development of it is a longer process.

In summary, this study aimed to use metacognitive scaffolding to help students improve their CT and metacognitive skills and achieve better programming performance. Integrating metacognitive scaffolding in programming instruction, such as robotics and game design, facilitates not only the development of metacognitive theory but also improves the situation that teachers have difficulty teaching students' cognitive development simultaneously and inspires educators to focus on students' metacognitive abilities. Students can consciously reflect on and adjust their learning strategies and processes to become more enriched learning experiences and reflective learners.

There are also shortcomings in this study. Although elementary school students began to learn programming courses from the third grade, there are limitations in the broad applicability of this study because of the time and regional limitations and the small number of subjects in this study. The sample size should be increased in future research, and a comprehensive analysis of the observed effects should be conducted. In addition, the experimental research protocol needs to be further improved by adopting a more rigorous experimental design. The study needs more process data for recording students' cooperation in completing tasks, which makes this study lack strong support for analyzing the changes in students' cooperation ability. The teaching process could be further filmed and recorded in future studies to ensure the credibility of the study results.

6 Conclusion

CT is an essential skill for students to succeed in the 21st-century digital society (Bocconi et al., 2016). Although programming can improve CT, activities such as programming alone often fail to achieve learning goals (Shute et al., 2017). Metacognitive scaffolding offers new ideas to address these issues. It helps students determine the current state of learning, adopt self-questioning, and monitor cognitive processes to compensate for their deficiencies. However, little research on CT development has focused on students' metacognitive processes. Therefore, this study attempted to investigate the effects of metacognitive scaffolding on students' computational thinking disposition, learning effectiveness, and metacognitive abilities. During the experiment, metacognitive scaffolding was provided to the experimental group, while the control group was taught in a way that did not use metacognitive scaffolding. The results showed that all students' academic performance and CT were statistically significant before and after the intervention, and the experimental group performed significantly due to the control group. Although there was no statistically significant difference in the effect of programming and instruction incorporating metacognitive scaffolding on students' metacognitive abilities, metacognitive scaffolding still influenced metacognitive regulatory abilities and produced significant differences. There is arbitrariness in students' problem-solving thinking, whereas computational thinking is directed. Therefore, metacognitive scaffolding is needed to help students regulate the direction and pace of learning from the arbitrary nature of computational thinking problem solving to directedness. Students try to use metacognitive methods and strategies to solve problems so that they can acquire relevant knowledge and enhance CT in the process of problem solving.