Abstract
Although previous research has provided some insights into the effects of block-based and text-based programming modalities, there is a dearth of a detailed, multi-dimensional analysis of the transition process from different introductory programming modalities to professional programming learning. This study employed a quasi-experimental design to address this gap, involving 64 secondary school students in two groups. For the beginning five weeks, the first group used an introductory block-based programming environment, while the second group used an introductory text-based programming environment. Then, both groups transitioned to professional text-based programming for the subsequent eight weeks. The results showed that participants who transitioned from introductory text-based programming to professional text-based programming (1) significantly outperformed in computational thinking skills; (2) had more code-writing and debugging behaviors and fewer irrelevant behaviors, and (3) had more interactions with the instructor. No significant differences were observed between the two groups regarding enjoyment, confidence, and interest in programming. Drawing on these findings, this study proposes pedagogical implications that could facilitate the adoption of programming modalities within the broader context of STEM education.
Keywords
Introduction
Computer programming is an integral component of STEM education, encompassing science, technology, engineering, and mathematics disciplines. Its significance lies in developing students’ computational thinking (CT) skills (Sun et al., 2021b), enhancing their motivation and engagement (Schnittka et al., 2015), and encouraging them to pursue careers in computer science (Chittum et al., 2017). In primary and secondary education, two predominant modalities have emerged: block-based programming (also known as graphical programming) and text-based programming (Weintrop & Wilensky, 2019). The availability of tools such as Scratch, Blockly, and App Inventor has facilitated the engagement of increasing young learners or beginners worldwide in learning block-based programming. Meanwhile, recognizing the necessity of professional programming knowledge and skills as a prerequisite for entering fields like Artificial Intelligence, educators have increasingly focused on integrating text-based programming languages (e.g., Python, Java, C#) into secondary school curricula and beyond (Grover, 2021; Ministry of Education, 2017).
However, regarding the transition from introductory (text-based or block-based) programming to professional (mainly text-based) programming in K-12 school settings, previous empirical research has yielded conflicting results on students’ summative performance, such as programming knowledge, computational thinking skills, and attitudes. Some studies indicate that introductory block-based programming leads to positive learning processes and outcomes in professional text-based programming (Armoni et al., 2015; Grover et al., 2015; Mladenović et al., 2018), while others suggest that introductory text-based programming is more effective than introductory block-based programming at improving students’ programming ability (Weintrop & Wilensky, 2017, 2019; Xu et al., 2019). In addition, few studies actually examine how learners engage in programming practices from a process-oriented perspective. Many open questions have not been addressed regarding the transition between programming modalities (Lin & Weintrop, 2021), therefore, further research is necessary to conduct a detailed, multi-dimensional analysis of the transition process.
Given the above-mentioned needs, this study aimed to investigate two transitions: (1) the transition from the learning of introductory text-based programming to professional text-based programming (e.g., Python), namely TPP; (2) the transition from the learning of introductory block-based programming to professional text-based programming (e.g., Python), namely BPP. A quasi-experimental research design was employed to examine these two transitions and their impacts on learners. Specifically, the following research questions were answered.
What is the impact of the introductory programming modality (block-based vs. text-based) on secondary school students’ computational thinking skills as they transition to professional text-based programming?
What is the impact of the introductory programming modality (block-based vs. text-based) on secondary school students’ programming behaviors as they transition to professional text-based programming?
What is the impact of the introductory programming modality (block-based vs. text-based) on secondary school students’ attitudes toward programming as they transition to professional text-based programming?
Literature Review
Block-Based versus Text-Based Programming Modalities
Block-based programming has emerged as an accessible and intuitive to visual programming, employing the “programming-primitive-as-puzzle-piece” technique to simplify the programming process (Good, 2018). The rising popularity of tools such as Scratch, Snap!, and Blockly has led to the widespread adoption of block-based programming in primary education. In a block-based environment, program blocks can only be connected if they form a valid statement, preventing syntax errors while maintaining a step-by-step instruction process (Lin & Weintrop, 2021). These tools also utilize color-coding to signify different programming concepts and nested structures to indicate block scope (Maloney et al., 2010). Block-based programming’s user-friendly nature has made it appealing to novice learners globally. For instance, Code.org’s “Hour of Code” features numerous block-based programming activities, with over 100 million participants from more than 180 countries (HourofCode, 2023). Furthermore, block-based programming is increasingly integrated into primary school curricula, specifically in information technology courses (Ministry of Education, 2017).
In contrast, text-based programming necessitates learners to input command lines and is a prevalent method in secondary programming education and beyond, especially for secondary students with a firm grasp of syntax and text-based code logic (Yücel & Rızvanoğlu, 2019). Common professional text-based programming languages include Python, C++, and Java. Text-based programming allows learners to attain advanced programming expertise, engage in professional projects (Weintrop & Wilensky, 2019), and access more robust and realistic features (Weintrop & Wilensky, 2015).
With the development of different programming modalities, researchers have gradually focused on the differences between block-based programming and text-based programming. Kölling et al. (2015) identified 13 key distinctions between block-based and text-based programming, such as code readability, code memory, syntax memory, typing/spelling, command line quantity, prototypes and definitions, identifiers (e.g., variables), scopes, written expressions, data types, error reporting, code layout, and programming paradigms. Researchers have acknowledged that text-based programming cannot be supplanted by block-based programming. Instead, text-based programming languages are often designed as learning objectives for students who have mastered block-based programming languages (Xu et al., 2019).
In block-based programming, students do not need to learn the syntax of a specific programming language in advance, which reduces the cognitive load of elementary and secondary school students and allows them to focus more on the structure of the code (Hu et al., 2021; Sayginer & Tuzun, 2023). However, according to Weintrop and Wilensky (2019) research, block-based programming was seen by students as lacking authenticity and being less powerful, which was more likely to impact older students keen to develop transferable skills for potential employment or future computer science studies.
Research on the Transition across Different Programming Modalities
The increasing popularity of block-based programming in formal educational settings has driven research efforts to examine its effectiveness in preparing learners for professional text-based programming in the future. Early studies identified that, despite success in block-based programming, learners often faced challenges when transitioning to text-based programming (Scholtz & Wiedenbeck, 1990). Recent scholars continue to investigate the obstacles encountered by learners during this transition, revealing that experiences in block-based programming do not automatically transfer to text-based programming (Grover, 2021; Lin & Weintrop, 2021). Hsu and Gainsburg (2021) revealed that the block-based environment used in introductory programming courses did not offer an advantage in preparing students for learning a text-based programming language (Java). According to Saygıner and Tüzün’s (2023) research, the implementation of a block-based environment in programming training had a positive impact on the development of students’ logical thinking skills and motivation to learn programming. However, the study found no significant differences in programming success between students who received this training and those who did not. Espinal et al. (2022) also found that most students were capable of transitioning between block-based and text-based programming languages, yet many struggled with interpreting programs and addressing new challenges in text-based environments.
These findings suggest that block-based programming tools can enhance learners’ attitudes toward programming education, but their influence on overall learning performance remains inconclusive (Lin & Weintrop, 2021; Xu et al., 2019). Furthermore, the majority of prior research has examined the comparative effects of block-based and text-based programming at different stages of learning, with few studies exploring the impact of these experiences on secondary school students’ professional programming (such as Python) skills through quasi-experimental methods (Weintrop & Wilensky, 2019). Consequently, the potential benefits of block-based programming experiences for professional text-based programming remain uncertain.
Influential Factors on Learning Across Varied Programming Modalities
Empirical research suggests that the transition from introductory to professional programming could have an impact on several aspects of learners’ experience, including their CT skills, level of engagement, and attitudes towards programming. Firstly, computational thinking entails utilizing basic computational concepts and methods to scrutinize and solve problems (Wing, 2006). The transitions from block-based to text-based programming can have a considerable impact on the development of CT skills. According to Tabet et al. (2016), students who transitioned from block-based to text-based programming witnessed enhancement in their CT skills, in contrast to those who solely received text-based programming instruction. Similarly, Espinal et al. (2022) discovered that exposure to block-based programming aided students in developing CT skills such as decomposition, while text-based programming in their algorithm design skills. Hence, when assessing the efficacy of transition between different programming modalities, the advancement of CT skills is a crucial consideration.
Secondly, as programming necessitates cognizant problem-solving, meaning-making, and construction of knowledge (Sun et al., 2021a), empirical research has undertaken the analysis and demonstration of various facets of block-based and text-based programming processes. For instance, Schnittka et al. (2015) demonstrated that middle-school students manifested increased engagement and motivation toward programming through the introduction of block-based programming languages. Weintrop and Wilensky (2015) discovered that block-based programming strengthened novice programmers’ debugging abilities. Similarly, according to Xu et al. (2019), block-based programming aided learners in improving their coding habits, including the ability to write concise and readable code.
Finally, the modalities of programming instruction can have an impact on attitudes toward programming. Chittum et al. (2017) found that introducing Python programming to high school students improved their attitudes toward programming and careers in computer science. Furthermore, Wang (2021) found that female students’ attitudes toward programming were more positive when they learned through a block-based programming language, as opposed to a text-based programming language. Taken together, an essential aspect of investigating the efficacy of programming modality transition is the examination of learners’ CT skills, programming behaviors, and attitudes toward programming.
Methodology
Context and Participants
The research context was a formal course titled “Creative Programming Algorithms”, which took place during Autumn 2021 in a secondary school located in the Eastern area of China. A total of 64 students from two first-grade classes at the secondary school were recruited in this study, after obtaining consent from both the school and the students. The Review Committee’s written agreement was obtained to interact with and collect data for research purposes without ethical issues. The students, with no formal text-based or block-based programming learning experience, were instructed by the same teacher (the first author of this paper).
The 64 participants came from two natural classes were divided into two groups. Over a period of five initial weeks, the first group interacted with an introductory block-based programming environment (BPP group: 32 students, 20 boys, and 12 girls). This group was designated as the control group, as it was consistent with the default environment in the secondary school setting. While the second group engaged with an introductory text-based programming environment (TPP group: 32 students, 17 boys, and 15 girls), establishing the experimental group for this study. Then, both groups transitioned to professional text-based programming instruction with Python.
Course Design
The instructional sessions for introductory text-based and block-based programming were based on Bau’s (2013) book, where they provided 26 projects covering basic to deep knowledge of coding concepts such as lines, points, loops, events, sorting, and searching. Additionally, the book showcased 17 elaborated examples including running pencil code, strings/numbers, using “if” to choose, etc. The instructor adjusted the instructional content and procedures to suit the programming abilities of local students. The instructional content included starting the art of drawing, using for and while loops to draw, implementing if statements to guess numbers, and utilizing functions to create both basic and advanced starry night drawings. For the professional text-based programming instruction, the sessions were based on the Information Technology textbook for secondary students (Zhejiang Provincial Department of Education and Research Office, 2019). The instructional content comprised getting started with Python, data and operations, sequential structures in Python, if structures in Python, loop structures in Python, and Python Programming with functions.
This study was conducted on two programming platforms (Code4all, and PyCharm). In the introductory text-based and block-based programming phases, learners were taught and practiced on the Code4all platform. The platform’s backend server was built using Node.js web architecture and express, while the front end was developed in JavaScript with custom messaging middleware. The modules collaborated and passed information entirely through events. Additionally, the platform uses jQuery Turtle to draw graphics and can support the block-based or text-based presentation of the programming language CoffeeScript (see Figure 1(a)), which has a ‘light syntax’ property that makes it more suitable for beginners to learn introductory programming (CoffeeScript, 2023). Code4all Platform Interfaces. (a) Interface of the Code4all platform. (b) Interface of the block-based programming (c) Interface of text-based programming.
In the block-based programming interface (see Figure 1(b)), learners can drag and drop programming blocks and auto-link them, while in the text-based programming interface (see Figure 1(c)), learners need to write programs by entering code character by character. Both interfaces have the same functionality, except for the different presentation of the programming language, including the keywords and syntax of the programming language, the visual execution environment, and other platform features such as login, new, save, delete, and other operations. Code4all does not allow learners to switch between the two modalities. Instead, learners are required to use either the block-based interface or the text-based interface exclusively.
During the professional text-based programming instruction phase, this study used PyCharm as the Integrated Development Environment (IDE) in the course. The main reason for adopting this platform is that it supports the writing of Python language (see Figure 2). By developing relevant tools, the researcher could use this platform to automatically capture learners’ programming learning behavior, which laid the necessary foundation for the study. PyCharm platform interface.
Analytical Framework
As demonstrated in Figure 3, the research proposed an analytical framework to investigate the differences between TPP and BPP from the process and summative perspective, which was adapted from Sun et al. (2021b). From the perspective of process-oriented assessment, research can gather behavioral data by recording in-class behaviors and programming activities through classroom video recordings and learners’ programming operations through log data or computer screen recordings. Classroom video analysis, clustering analysis, and temporal analysis can be applied to analyze behavioral data. Furthermore, recordings of classroom audio have the potential to capture discussions that take place between students and teachers during class. These recordings can be analyzed using quantitative content analysis, lag-sequential analysis, and ethnographic interpretations to explore discourse patterns and features. With regards to summative assessment, data on programming knowledge and skills (e.g., pre-, mid-and post-tests) and final products (e.g., programming projects) can be gathered as performance data, and statistics can be used to explore the significance of performance changes. Moreover, learners’ attitudes toward various programming modalities can be better understood by collecting data from surveys conducted from pre-, mid-, and post-surveys. Taken together, this analytical framework provides a comprehensive approach to both the process and final assessments of different programming modalities. Analytical framework.
Data Collection
This study collected data from four sources. First, we conducted pre- and post-test of learners’ computational thinking skills. The questionnaire used a validated computational thinking scale (5-point Likert scale) for Chinese K-12 students adapted from Bai and Gu (2019) based on Korkmaz et al. (2017).
Second, we collected data on learners’ programming behaviors from two aspects. On the one hand, we recorded students’ online programming behaviors through programming platform log data. By modifying the helper’s file of the PyCharm platform, the debugging information generated by each student’s click on the “debug” button is transferred to the cloud server for storage in the form of time stamps. The stored data includes “operation time, written code, operation result, error message, etc.” On the other hand, we recorded students’ offline programming behaviors (90 minutes in total) through a whole class video recording.
Finally, this study conducted pre-, mid-, and post-tests in three phases of the experiment to investigate changes in students’ attitudes, which include self-confidence, enjoyment, and interest. The survey was adapted from the Georgia Computes project (Bruckman et al., 2009) and the Computing Attitudes Survey, which were validated from previous research (Sun et al., 2021b). The survey includes five items on a 10-point Likert scale ranging from 1 (strongly disagree) to 10 (strongly agree). Please refer to Appendix A.
As illustrated in Figure 4, the study lasted for 16 weeks, with one class period of 40 minutes per week. In the first week, students were acclimated to the programming environment and were administered a pre-test of CT and learning attitudes. In the seventh week, students took a mid-test of CT and learning attitudes along with a programming project. During the eighth to 15th week, both sets of students were taught Python programming. In the 16th week, students underwent a post-test of CT and attitudes, and complete a programming project. Experimental design.
Data Analysis
First, analysis of variance (ANOVA) was used to compare the differences in CT skill levels among pre-, mid-, and post-test, and one-way analysis of covariance (ANCOVA) methods was applied to compare the post-test computational thinking skills between the two groups. These data analyses were conducted using SPSS 25.0.
The Coding Framework of Learner’s Online Programming Behaviors.
For the log data recorded by the programming platform, the study analyzed the descriptive statistics and then conducted a clustering analysis (Dutt, 2015). Clustering algorithms can discover hidden patterns in complex datasets, and new relationships in educational data can be mined through unsupervised learning methods (Dutt et al., 2017). Based on the fact that learners’ behaviors are heterogeneous, this study clustered learners based on the data recorded in the platform logs to explore the programming learning behavior patterns of different learner clusters. In addition, the study used the K-means algorithm, which derives N observations among a predetermined number of K clusters, where each observation belongs to the nearest group mean (MacQueen, 1967), and then uses the average profile coefficient of the observations to select the most appropriate number of clusters (Rousseeuw, 1987). Log data analysis was conducted using RStudio 2022.
Coding Framework of Learners’ Offline Programming Behaviors.
Finally, regarding the difference in attitudes, the Wilcoxon Rank Sum test (reported as a U statistic) was performed to reveal the differences in learners’ attitudes in terms of confidence, enjoyment, and future interest between the two groups. This test was used because the two samples are independent, and the underlying data is ordinal and non-parametric (Fay & Proschan, 2010).
Results
Results Regarding Computational Thinking Skills
Distribution and ANOVA Results of Learners’ Computational Thinking Skills.
Note. *p < .05; ** p < .01.
ANOVA Results of Learners’ Computational Thinking Skills.
Note. p*< .05.
Results Regarding Programming Behaviors
Log Data: Online Programming Behaviors
Distribution of Learners’ Online Programming Behaviors.
Clustering of Learners’ Online Programming Behaviors.
ANOVA Results of Five Clusters’ Computational Thinking Skills.
Note. *p < .05.
Looking into the programming behaviors of the high-performing clusters, the 4 members in Cluster 2 (2 learners for BPP and 2 learners for TPP) had an average level of programming behaviors. The 29 members in Cluster 4 (10 learners for BPP and 19 learners for TPP) used the “trial and error” or “tinkering” strategy, as they showed the greatest number of debugging behaviors (ND: M = 7.80, SD = 2.61) and the least number of code-modifying behaviors (ACh: M = 2.40, SD = 1.09).
Similar to learners in Cluster 4, the 11 members in Cluster 1 (4 learners for BPP and 7 learners for TPP) had intensive debugging behaviors, as they showed the shortest debugging interval (AtD: M = 42.08, SD = 42.46). However, they also showed the least number of code-writing (ACo: M = 20.20, SD = 6.73) and the greatest number of errors (Nse: M = 6.91, SD = 10.54), which lead to slightly lower performance in CT.
For the relatively lower-performing groups, Cluster 3 had 18 members (15 learners for BPP and 3 learners for TPP) who had the least number of operational (NPo: M = 6.75, SD = 2.35) behaviors, but had the greatest number of irrelevant (AIb: M = 9.01, SD = 10.94) behaviors. Lastly, Cluster 5 had 2 members (both members are BPP learners), and they had the highest number of code writing (ACo: M = 24.50, SD = .07), code modifying (ACh: M = 14.00, SD = .12), platform operation (NPo: M = 9.00, SD = .23), and had the longest debugging interval (AtD: M = 1903, SD = 50.13).
Class Video: Offline Programming Behaviors
In terms of offline programming behaviors during the course (see Figure 5), in the introductory programming period, BPP learners were more focused on operating computers (OoC; frequency = 347) and peer discussions (DwP; frequency = 274) but showed limited interactions with the instructor (AsQ; frequency = 35, LtI; frequency = 160). More casual walking behavior (WR; frequency = 136) occurred in the following professional text-based programming learning period. In comparison, learners in the TPP group also focused on their computer operations (OoC; frequency = 380) during the introductory instruction period and had more interactions with the instructor (AsQ; frequency = 117, LtI; frequency = 318) and discussions with peers (DwP; frequency = 221). The Temporal Graph of Learners’ Classroom Behaviors. (a) BPP. (b) TPP. Note. The x-axis represents the time period; the y-axis represents classroom behaviors.
Results Regarding Attitudes
As shown in Figure 6, this study analyzed three aspects of students’ attitudes on the three administrations (pre-, mid-, and post-tests): confidence, enjoyment, and interest. In terms of confidence, both BPP and TPP showed a trend of decreasing, with the mean level of BPP learners slightly higher than that of TPP learners from beginning to end. However, there was no statistically significant difference between the scores of the two groups in the post-test (U = 424.50, p > .05). Similarly, learners’ enjoyment in both BPP and TPP did not show a significant difference between the two groups in the post-test (U = 459.00, p > .05). Both groups experienced a decrease in engagement first and then a slight increase. Regarding interest, there was no statistically significant difference in learners’ scores on the post-test interest score either (U = 415.50, p > .05). The two groups appeared to have different trends: Learners in the BPP experienced a trend of increasing and then decreasing, while learners in the TPP maintained a more stable level of interest. Changes of learners’ Confidence (a), Enjoyment (b), and Interest (c).
Discussions
As one area of STEM education, computer programming focuses on fostering learners’ computational thinking skills, learning motivations and interests in programming, as well as programming engagement (Grover, 2021; Sun et al., 2021b; Wakhata et al., 2022). This study explored the transitions from two introductory programming modalities, namely text-based and block-based programming, to professional text-based (Python) programming in secondary education in China. The computational thinking skills, programming behaviors, and programming attitudes of 64 participants were collected and analyzed.
The results found that, compared with learners who began with introductory block-based programming, those who transitioned from introductory text-based programming to professional text-based programming outperformed in CT skills. This study found that although block-based programming improved learners’ levels of CT skills during the introductory programming period, the improvement was less likely to persist in the learning of professional programming (Python). The findings are aligned with previous research (Mladenović et al., 2018), suggesting that block-based programming tools may offer some features to simplify programming complexity and impart certain logical and structural concepts, whereas they have a minor impact on learners’ ability to learn professional programming learning. In contrast, learners who were taught with introductory text-based programming are better equipped to learn Python and demonstrate stronger CT skills due to the smooth transition between introductory and professional text-based programming languages (Weintrop & Wilensky, 2019), and Espinal et al. (2022) also found, as the students advanced through the lesson plans, their progress in transition tasks improved due to the enhancement of their initial CT abilities.
Regarding programming behaviors, learners in the BPP group showed a greater number of code-modifications, which could be attributed to the various assistive features provided by the block-based programming environment (Grover & Basu, 2017). Learners in the BPP group also had longer debugging intervals and displayed over three times the number of irrelevant behaviors. This suggests that although block-based languages could reduce the difficulty in coding for beginners (Mladenović et al., 2018), it run the risk of leading to more behaviors unrelated to programming. In contrast, students in TPP showed more code-writing and debugging behaviors. We infer that after transitioning to Python, learners in the TPP group became more comfortable with a text-based programming language and engaged in more debugging behaviors when they encountered syntax errors. While learners in the BPP group took longer to adapt to the Python language and made more changes to their codes, resulting in fewer debugging behaviors.
Based on the results of clustering analysis, learners in Cluster 3 who had many irrelevant behaviors and fewer operations of the programming platform underperformed in the CT test, from which we can conclude that irrelevant behaviors or cognitive absence are one of the barriers to developing CT skills through programming. Consistent with prior research (Fields et al., 2021; Hwang et al., 2012), Cluster 5, which performed lower in CT had the least number of debugging behaviors, which suggested that students could benefit from continuous debugging and modification of codes. Without testing their codes and detecting bugs in the codes, learners can hardly develop CT skills through the problem-solving process. Additionally, most learners in Cluster 3 and Cluster 5 were from the BPP group. We can infer that instructors should monitor the progress of learners with block-based languages and provide timely support (e.g., process-oriented scaffoldings) in the introductory instruction stage (Sun et al., 2021b).
Meanwhile, the analysis of offline behaviors through class videos indicated that students in BPP displayed fewer interactions with the instructor. One possible explanation is that students who have worked with block-based programming may have developed the habit of exploring code blocks independently through drag and drop. Therefore, when students transition from introductory block-based languages to more complicated professional text-based languages, instructors need to increase their communication with them (Sun et al., 2021a). This includes the provision of comprehensive code explanations, monitoring students’ advancement, addressing their queries, and undertaking similar supportive measures.
Moreover, the obtained results revealed no statistically significant difference between learners in the BPP and TPP groups concerning their confidence, enjoyment, and interest. This finding contradicts previous arguments that emphasized the positive impacts of block-based programming on motivation, attitudes, and engagement for K-12 learners (Grover, 2021; Hu et al., 2021; Saygıner & Tüzün, 2023). However, this finding echoes studies investigating transition effect of different programming modalities. For instance, Hsu and (2022) found that, compare with Java-only group, students with introductory block-based programming experience felt less confident in later Java course. Likely,Weintrop and Wilensky (2019) conducted a study comparing transitions between different modalities and found no significant differences in confidence and enjoyment across the conditions. The absence of a significant difference suggests that the increased positive attitudes observed in previous studies employing block-based tools may be more influenced by the curriculum employed or the contextual factors surrounding learners’ programming experiences, rather than the programming modality itself (Lin & Weintrop, 2021). Another potential factor contributing to these results could be the age range of the research participants. Given the developmental aspects of metacognition among high school students in Weintrop and Wilensky’s (2019) study, they may exhibit different patterns in attitudes compared to secondary students in this study.
Overall, despite prior claims by researchers regarding the potential benefits of block-based programming for fostering a favorable initial learning encounter, this study reveals that individuals who were exposed to introductory text-based programming exhibited a higher degree of consistency and fluidity during their progression towards professional text-based programming in Python. Learners in the TPP group demonstrated superior computational thinking abilities, displayed a greater propensity for desirable programming-related behaviors, and exhibited comparable levels of attitudes toward programming when compared to their block-based programming counterparts.
Pedagogical Implications
Based on the results, this study proposes three pedagogical implications for future instructional design of programming education in secondary school. Firstly, to continue learning professional programming languages, text-based programming is a more beneficial modality in introductory programming instruction. In other words, teachers could select appropriate programming modalities based on specific goals of programming education. To do this, teachers should specify the learning goals and consider whether students will transition to professional text-based programming languages such as Python or pursue a programming-relevant career in the future. According to Weintrop and Wilensky (2019), for educator who has doubts about the authenticity of block-based tools or recognizes the pedagogical benefits of having learners write programs from the beginning, it could be more suitable to introduce learners to a text-based language instead of a block-based one.
Secondly, teachers could provide different scaffoldings for learners with different programming learning experiences. On the one hand, this study shows that block-based programming could help learners reduce the likelihood of encountering syntax errors compared to text-based programming, but learners may exhibit more irrelevant behaviors during the learning process. Grover and Basu’s research (2017) also found that students in block-based environments may face challenges in fully understanding fundamental programming concepts and the flexibility of manipulating data due to the absence of variable and data type usage. Therefore, when dealing with learners who have experience with block-based programming, teachers should provide more instructional interventions and support on learning strategies, such as providing explicit task lists, incorporating gamified learning strategies (Mladenović et al., 2018), engaging students in functions-describing activities (e.g., loop iterations), promoting the practice of choosing appropriate variable names, and consistently assessing students’ comprehension of constructs and concepts with ongoing evaluations (Grover & Basu, 2017).
On the other hand, text-based programming learners wrote longer lines of code, spent more time debugging, and encountered more syntax errors. They showed limited creativity in solving problems because they relied mainly on the teacher’s examples (Pereira et al., 2020). Therefore, educators can foster learners’ engagement in code-writing and debugging by leveraging their experience with text-based programming. They can offer additional support through scaffolding techniques for error correction strategies. This might involve equipping students with a compilation of typical debugging errors (Žanko et al., 2023), compiling syntax errors commonly encountered during early programming practices, and distributing them to learners through feedback charts or tables. Furthermore, the adoption of innovative approaches in text-based programming can enhance learning experiences. For example, Kölling et al. (2015) suggest frame-based editing as a method that combines the error resistance and user-friendliness of block-based programming with the flexibility and conventional programming semantics inherent in text-based programming languages.
Thirdly, teachers should also consider learners’ emotional feedback during the learning process. This study found that learners in both programming modalities showed decreased enjoyment and confidence levels when they faced programming challenges. Therefore, teachers could be attentive to learners’ emotional fluctuations and offer timely feedback to help adjust their attitudes and learning strategies accordingly (Jeon & Song, 2019). Throughout the instructional process, teachers have the opportunity to tailor the difficulty level of materials according to learners’ programming experience, use diverse learning strategies like peer communication support (Sun et al., 2021a), and provide verbal or behavioral encouragement to foster positive attitudes towards programming learning (Sherin, 2001).
Conclusions, Limitations, and Future Directions
This research aimed to investigate how transitioning from introductory text-based or block-based programming to professional text-based programming (i.e., Python) instruction affects learners’ computational thinking skills, programming learning behaviors, and learning attitudes. The study involved 64 secondary school students as experimental subjects. The findings indicated that learners who transitioned from introductory block-based programming instruction to Python showed higher levels of computational thinking skills than those who transitioned from introductory block-based programming instruction. On the other hand, learners who transitioned from introductory text-based programming to Python showed more code-writing and code-debugging behaviors and fewer irrelevant behaviors. The study suggests that introducing learners to introductory text-based programming can be more beneficial for formal education scenarios in secondary schools, where the primary learning goal is to teach professional text-based programming in the future. However, introductory block-based programming can be more suitable for learners who use programming skills to develop comprehensive skills like logical thinking. These findings offer evidence to support the use of either block-based or text-based programming instruction in secondary school settings.
Nonetheless, this study has a few limitations. Firstly, the assessment of computational thinking relied primarily on self-reported questionnaires completed by students, introducing the possibility of bias due to inaccurate comprehension and interpretation of the questionnaire items. Future research should assess learners’ computational thinking through knowledge tests and fine-grained examination of their programming learning behaviors. Secondly, though the sample size of 64 participants was appropriate, all participants in this study were recruited solely within the context of secondary education in China. A larger and more diverse sample would provide more statistical power and enhance the robustness of the results.
Thirdly, the study’s duration was relatively brief, encompassing only 16 weeks and 16 instructional sessions, leading to limited insight into the lasting effects of block-based or text-based programming on learners. Due to technical constraints, the analysis of data relied heavily on manual coding, preventing the utilization of alternative methods. Future research should focus on gathering multimodal data over an extended timeframe to gain a more comprehensive understanding of learners’ long-term changes resulting from transitions between different modalities. This could involve incorporating various data types such as audio/video recordings, clickstream data, facial expressions, motion and gesture analysis, and eye-tracking data. A mixed-method approach has the potential to provide more meaningful and robust results, which could be incorporated in future research. Moreover, the development or implementation of automated data analysis tools and the execution of longer-term experimental studies would significantly enhance a more comprehensive evaluation.
Overall, as the essence of programming lies in its process, future research and practices must integrate both block-based and text-based programming approaches and adopt a process-oriented perspective in investigating, advancing, and evaluating learners’ programming quality. This research represents a significant step forward in conducting a comprehensive analysis of learners’ performances, processes, and attitudes in computer programming education within the context of compulsory secondary education in China. Furthermore, this study has the potential to contribute to the global adoption of programming modalities, particularly in the broader realm of STEM education.
Footnotes
Acknowledgements
The authors would like to thank all the participants for their active participation and collaboration in this study.
Authors’ Contributions
Sun Dan: Conceptualization; Data analysis; Writing – original draft, review & editing. Chengcong Zhu: Data analysis; Writing – original draft. Yan Li: Writing – original draft, review & editing; funding acquisition. Fan Xu: Writing –review & editing. Fan Ouyang: Writing – original draft, review & editing. Miaoting Cheng: Writing – review & editing, funding acquisition.
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by funding from the National Natural Science Foundation of China [Grant No. 62307011], National Natural Science Foundation of China [Grant No. 61977057], Guangdong Basic and Applied Basic Research Foundation, China [Grant No. 2021A1515110081], Guangdong Planning Office of Philosophy and Social Science, China [Grant No. GD22XJY12], Shenzhen Science, Technology and Innovation Commission, China [Grant No. 20220810115236001].
Ethical Statement
Data Availability Statement
Requests for data details may be made to the corresponding author.
Appendix A
Author Biographies
Fan Xu (Ph.D.) is a Senior Learning Designer in the Center on Education and Training for Employment (CETE) of the College of Education and Human Ecology at The Ohio State University. Her research interests include learning design, learning analytics, computational thinking, collaborative learning, etc. Email: xu.3849@osu.edu, ORCID: https://orcid.org/0000-0002-2518-4075
Fan Ouyang (Ph.D.) is a ZJU 100 Young Professor in College of Education at Zhejiang University. Her research interests include learning analytics and educational data mining, computer-supported collaborative learning, etc. Email: fanouyang@zju.edu.cn, ORCID: https://orcid.org/0000-0002-4382-1381
