1. Introduction
With the trend in emphasis on incorporating computer science (CS) education into K-12 settings in recent years (
Childs et al., 2024;
Gokoglu & Kilic, 2023;
Timur et al., 2021), learning to code has become a topic that has gained increased attention and interests from teachers, teacher educators, school leaders, and researchers (
Ari et al., 2022;
Schmidt-Crawford et al., 2019). Coding or programming has become a basic and essential skill to learn, and it is as important as the skills of reading, writing, and arithmetic (
Anderson, 2016;
Timur et al., 2021). With the importance of coding or programming being recognized, many countries (e.g., the United States, Australia, the United Kingdom, etc.) have sought approaches or strategies to integrate coding into the K-12 curriculum (
Basarmak, 2021;
Timur et al., 2021).
Learning coding or programming skills can benefit students in many ways, including the development of higher-order thinking skills (e.g., problem solving, creativity, critical thinking, computational thinking, etc.), and improvements in students’ engagement, self-efficacy, and motivation to learn (
Blackley & Howell, 2019;
Brooke, 2024;
Y. T. Kuo & Kuo, 2025;
Mason & Rich, 2019). In addition, possessing coding skills can prepare students for future careers in STEM (e.g., computer and information technology, engineering, etc.) or other fields (e.g., business, education, healthcare, etc.) that require the employment of 21st century skills (
Mason & Rich, 2019;
Timur et al., 2021). Therefore, it is important to begin learning coding early by engaging younger students in coding activities as a stepping stone to success in their future professional or academic careers (
Ari et al., 2022;
Basarmak, 2021;
Timur et al., 2021).
Teaching coding is considered important to fulfill the increasing demand of CS education in K-12 settings (
Ari et al., 2022). Emergent arguments from educators and K-12 stakeholders indicated that teaching coding not only provides students with initial experiences in computational thinking, but also helps them to become an innovative creator (
Schmidt-Crawford et al., 2019). To provide a seamless pathway of integrating coding into K-12 lessons, teachers serve as a pivotal role in such a process, and there is a necessity to offer training sessions and professional development opportunities in coding for both in-service teachers and pre-service teachers (
Hunsaker & West, 2019;
Sekyere-Asiedu et al., 2020;
Zha et al., 2019). Researchers have indicated the importance of coding education, and the lack of such opportunities in teacher education (
Ari et al., 2022;
Schmidt-Crawford et al., 2019;
Sekyere-Asiedu et al., 2020). For example,
Poth (
2019) indicated coding as an excellent opportunity to provide pre-service teachers with the skills to teach in the future classroom, including creativity, critical thinking, communication, collaboration, and problem solving.
Zha et al. (
2019) called for the need for teacher educators to offer coding preparation to pre-service teachers, and pointed out an issue with the lack of understanding about how pre-service teachers would engage in CS or programming learning and teaching.
There are various barriers that teachers may encounter when teaching coding or CS, including physical (e.g., lack of computer or Internet access), institutional (e.g., unsupportive administrators), knowledge (e.g., coding or programming concepts, pedagogical approaches, etc.) and emotional barriers (e.g., dispositions, beliefs, etc.) (
Mason & Rich, 2019). Teachers’ knowledge has a significant impact on their practice (
Ertmer & Ottenbreit-Leftwich, 2010), and their lack of knowledge in content, technology, or pedagogy could prevent teachers from successfully teaching coding or programming (
Mason & Rich, 2019). It can be challenging for teachers to teach coding or integrate coding into daily lessons, as many teachers have little to no coding or programming experience (
Broley et al., 2023), and few teachers possess an adequate level of competencies and confidence to incorporate coding into teaching (
Hunsaker & West, 2019). Having negative attitudes or perceptions towards coding topics or programming education would make teachers think that coding or programming is difficult (
Ari et al., 2022). To enhance teachers’ competence and confidence in teaching coding and to eliminate their knowledge and emotional barriers for coding, it is necessary to provide them with effective training in coding (
Mason & Rich, 2019).
Developing pre-service teachers’ understanding of CS education and their positive perceptions towards integrating CS into teaching is crucial for increasing pre-service teachers’ intention to integrate coding into future teaching in the K-12 classroom (
Ari et al., 2022;
Butler & Leahy, 2021;
Vasconcelos & Kim, 2022).
Yukselturk and Altiok (
2017) reported that engaging pre-service teachers in a course using Scratch to learn programming significantly decreased their negative attitudes toward programming.
Lloyd and Chandra (
2020) found that pre-service teachers’ prior experience with programming is related to their understanding of the critical roles of coding skills for students.
Gokoglu and Kilic (
2023) pointed out the importance for teachers to have a sufficient level of knowledge about learning tools and teaching strategies to teach students coding. They further suggested the necessity to discover the factors that have an effect on pre-service teachers’ learning and teaching of programming. Currently, there is a growing amount of research on CS education with CS teachers (
Ari et al., 2022). However, limited research has focused on non-CS pre-service teachers (
Ari et al., 2022;
Chang & Peterson, 2018). The technology acceptance model (TAM), as an important information systems theory, provides explanations about how users accept and use new technology (
Davis, 1989). It is unclear about pre-service teachers’ intention to use coding tools (
Klonou et al., 2025). Specifically, the research addressing the factors that affect pre-service teachers’ intention to teach coding is scarce (
Gokoglu & Kilic, 2023). Furthermore, there is a lack of research exploring how affective variables relate to TAM in the context of pre-service teachers involved in the learning or teaching of coding. To enhance the understanding of pre-service teachers’ perceptions of coding, this study aims to investigate teachers’ intention to adopt coding in future teaching, with a focus on factors including ease of use, usefulness, and affective variables.
4. Method
4.1. Research Design
A mixed-methods design approach was undertaken for this study. Through the survey technique, both the quantitative and qualitative data were collected. The participants of this study were the pre-service teachers who volunteered to participate in the survey research. The following sections provide details about the participants, procedure, and data collection and analysis.
4.2. Participants
The participants were 47 students enrolled in the educational technology courses from a northeastern university in the United States (see
Table 1). The undergraduate-level courses were face-to-face and taught by the same instructor. Most of the undergraduate students, as pre-service teachers, were in their sophomore (51.1%) or junior (10.6%) year. There were more female students (87.2%) than male students (12.8%). Most of them were aged between 18 and 21 years (74%). Most of these students (68.1%) did not have any experience with coding, with about 31.9% of the students reporting having some experience with coding. Only two students had used Scratch prior to the class. In terms of coding skills, more than half (57.4%) reported having no coding skills at all. About 36.2% of them reported possessing a basic level of coding skills. Very few of them reported possessing a medium (4.3%) or high (2.1%) level of coding skills.
4.3. Data Collection
The study was conducted using an online survey. The online survey was provided to students at the end of the coding project. The study was approved by the university’s Institutional Review Board (IRB), and informed consent forms were obtained from the students who participated in the survey. The survey questionnaire consisted of eight sections: student background information, perceived ease of use, perceived usefulness, intention to use Scratch, positive emotions, negative emotions, situational interest, and student coding experience (see
Table 2). The students’ background information included gender, age, grade level, prior experience with coding and Scratch, and coding skills (see
Table 1). An open-ended question was included in the survey for pre-service teachers to share their coding experience in the project.
The three scales, including perceived ease of use, perceived usefulness, and intention, which were used in
Teo’s (
2009) study, were adapted to measure pre-service teachers’ coding acceptance. The term of computers was changed to Scratch. Some item examples include “I find Scratch easy to use”, “I will use Scratch in future”, etc. The positive and negative emotions scales were adapted from the achievement emotions questionnaire developed by
Pekrun et al. (
2011). The situational interest scale, developed by
Chen et al. (
1999), was adapted to measure pre-service teachers’ perceived levels of situational interests in coding. The term of class was replaced with the Scratch activity. Item examples include “I enjoyed being in the Scratch activity”, “I got tense and nervous in the Scratch activity”, etc. The scales that measure perceived ease of use, perceived usefulness, and intention are 7-point Likert scales. The situational interest and positive and negative emotion scales are 5-point Likert scales. The Cronbach’s coefficient alpha values calculated based on the sample of this study were high, indicating the good reliability of the scales: perceived ease of use (0.96), perceived usefulness (0.95), intention (0.94), positive emotions (0.87), negative emotions (0.93), and situational interest (0.90) (see
Table 2).
4.4. Procedure
Students in the Educational Technology classes participated in a coding project, in which they were engaged in the development of interactive media using Scratch. The project required students to explore the interface of Scratch, different categories of the block palette provided in Scratch, such as motion, looks, sound, events, controls, etc., and the actions associated with the blocks. Before the project started, the instructor had a presentation that introduced students to the concept of coding and the importance of coding in K-12 education. The instructor also provided students with an overview of the Scratch website and the development interface of Scratch that students can use to create interactive media for teaching or learning purposes, and supplemental resources (e.g., handouts, guidance, etc.) for using Scratch. Examples and short video tutorials were shown to the students about different types of code blocks, as well as the steps to create actions for selected blocks in Scratch. The project took four weeks to complete. In week one, the introduction of the project and the basics of Scratch were covered by the instructor. In weeks two to four, the students explored the features of Scratch and created a simple product. During the project, the instructor served as a facilitator who provided further guidance or support to assist students who encountered difficulties or problems when they explored or developed the media product using the features provided by Scratch.
4.5. Data Analysis
Data were analyzed using quantitative and qualitative approaches. Quantitative approaches included descriptive analyses, t-tests, ANOVAs, and correlation and regression analyses. SPSS 27 was used for data analyses. Descriptive analyses, t-tests, and ANOVAs were performed for research questions one and two. The correlational analysis was conducted for research question three. Regression analyses were performed for research question four. The normality of the data and homogeneity of variance were examined to ensure that the data were adequate for the proposed quantitative analyses. Content analysis, a method for analyzing the text data by transforming them into a concise summary of key results with established categories or themes, was performed to analyze the qualitative data for research question five.
5. Results
This section includes information about the results of the data analysis for the research questions proposed in this study.
5.1. RQ1: Do Pre-Service Teachers’ Coding Acceptance (i.e., Perceived Ease of Use, Perceived Usefulness, and Intention to Use Scratch) Differ in Terms of Gender, Age, Prior Coding Experience, Prior Experience with Scratch, Coding Skills, and Perceived Difficulty Levels of Coding?
T-test analyses in
Table 3 show that male pre-service teachers had significantly higher average scores in perceived ease of use (
t = 4.87,
p < 0.001), but not perceived usefulness (
t = 1.52,
p > 0.05) and intention (
t = 1.84,
p > 0.05). Age did not have a significant influence on coding acceptance (see
Table 4), according to the ANOVA analysis. Prior coding experience did not significantly influence pre-service teachers’ coding acceptance (see
Table 5). In terms of prior experience with Scratch, as there were only two pre-service teachers indicating having used Scratch, a T-test was not performed (see
Table 6). It appears that the pre-service teachers who used Scratch previously had higher average scores than their counterparts. In terms of coding skills, pre-service teachers who reported having no to basic coding skills had significantly lower scores in perceived ease of use (
t = −5.69,
p < 0.001), perceived usefulness (
t = −6.63,
p < 0.001), and interaction (
t = −2.35,
p < 0.05) than those reporting having a medium or high level of coding skills (see
Table 7). Pre-service teachers who perceived coding at a low level of difficulty had a significantly higher score in intention for adoption, compared to those perceiving coding at a high level of difficulty (
t = 3.12,
p < 0.01) (see
Table 8).
5.2. RQ2: Do Pre-Service Teachers’ Coding Acceptance (i.e., Perceived Ease of Use, Perceived Usefulness, and Intention to Use Scratch) Differ in Terms of Their Affective Experiences (i.e., Positive Emotions, Negative Emotions, and Situational Interest) for Coding?
According to T-test analyses, levels of positive emotions had a significant influence on pre-service teachers’ perceived ease of use (
t = −6.49,
p < 0.001), perceived usefulness (
t = −2.60,
p < 0.05), and intention (
t = −4.20,
p < 0.001) (see
Table 9). Pre-service teachers who possess high levels of positive emotions had significantly higher average scores in perceived ease of use, perceived usefulness, and intention, compared to those with low levels of positive emotions. Levels of negative emotions significantly influenced perceived ease of use (
t = 2.83,
p < 0.01), but not perceived usefulness (
t = 0.78,
p > 0.05) and intention (
t = 1.18,
p > 0.05) (see
Table 10). Levels of situational interest had a significant influence on pre-service teachers’ perceived ease of use (
t = −4.31,
p < 0.001), perceived usefulness (
t = −5.50,
p < 0.001), and intention (
t = −6.21,
p < 0.001) (see
Table 11). Pre-service teachers who possess high levels of situational interest had significantly higher average scores in perceived ease of use, perceived usefulness, and intention than those with low levels of situational interest.
5.3. RQ3: What Are the Relationships Between Pre-Service Teachers’ Perceived Ease of Use, Perceived Usefulness, and Intention to Use Scratch in the Classroom?
Table 12 shows the correlations among perceived ease of use, perceived usefulness, and intention to use Scratch. All correlations were positive and significant at a
p-value of 0.01. Perceived ease of use (
r = 0.68,
p < 0.01) and perceived usefulness (
r = 0.79,
p < 0.01) were positively related to intention to use Scratch. The strongest correlation was found between perceived usefulness and intention to use Scratch (
r = 0.79,
p < 0.01).
5.4. RQ4: Do Pre-Service Teachers’ Perceived Ease of Use and Perceived Usefulness Predict Their Intention to Use Scratch in the Classroom?
The multiple regression model (see
Table 13) was significant,
F (2, 44) = 51.27,
p < 0.001. The model explained 70% of the variance in the intention to adopt digital games. Both variables, perceived ease of use (
t = 3.048,
p < 0.01) and perceived usefulness (
t = 5.843,
p < 0.001), significantly predicted the intention to use Scratch. Between the two significant predictors, perceived usefulness was the strongest predictor for intention to use Scratch.
5.5. RQ5: What Are Pre-Service Teachers’ Coding Experiences of Using Scratch in the Project?
Most of the pre-service teachers shared their positive perspectives towards learning coding using Scratch, with a few of them showing negative perspectives (see
Table 14). Several pre-service teachers indicated their change in perspective on coding after participating in the coding activity, with the majority of them showing positive changes in perspective (e.g., “I thought coding was impossible for me to do before, but now I think I understand it better.”) and a few of them presenting negative (e.g., “I knew coding would be hard, but it was even harder than I had imagined.”) or no changes in perspectives towards learning coding.
In terms of positive perspectives, pre-service teachers thought that coding is an important skill and it enhances students’ thinking or problem-solving skills (e.g., “I do think coding or programming is an important skill to possess because it will enhance students’ thinking and problem-solving skills. It requires them to utilize critical and logistical thinking that they do not always have the opportunity to use.”). A few indicated the necessity to engage in coding at a younger age (e.g., “It would have been easier if I was exposed to things like this as a younger student.”). Overall, pre-service teachers thought that the activity helped them to learn coding, develop a better understanding of coding, and enhance their confidence or ability to code (e.g., “I did not truly understand how coding works. After this activity I have a better understanding.”). The use of Scratch benefited pre-service teachers in their learning experience with coding (e.g., “Scratch made it easier than I thought.”; “I have always wanted to learn how to code and this website can help me do that.”). Several pre-service teachers thought that Scratch is easy to use and a great tool to learn coding (e.g., “I thought I would never understand how to code, but the Scratch activity made me realize that it is easier than I thought it would be.”). On the other hand, several pre-service teachers indicated that they felt the coding process is difficult and that they struggled. Some just did not like or enjoy coding. In addition to positive or negative perspectives, a few pre-service teachers indicated the need to spend more time to practice coding, or to receive additional support in the future learning of coding (e.g., “Coding is a skill that I can do but would need more practice with.”).
5.6. Integration of Findings
The results from the content analysis provide additional information about their coding experiences beyond the quantitative analyses. The quantitative analyses focus on examining the relationships among the proposed variables. The content analysis results address the changes in pre-service teachers’ perspectives about coding, which were not assessed through the quantitative analyses. The content analysis also provides information about why pre-service teachers showed positive or negative perceptions of coding, which adds to the results of quantitative analyses that compared the groups of low and high emotions in relation to coding acceptance.
7. Conclusions
This study investigated pre-service teachers’ experience with the coding activity, as well as their perceptions towards coding and the coding tool. The findings of this study have increased our understanding of pre-service teachers’ perceptions of coding and their intention to use coding for future teaching, with a focus on TAM (i.e., ease of use, usefulness, and intention) and affective factors (i.e., positive and negative emotions, situational interests). This study not only adds to the limited studies addressing factors affecting non-CS pre-service teachers’ intention to adopt coding in teaching, but also provides insights into the application of TAM in coding for pre-service teachers, and the influence of affective and personal variables on pre-service teachers’ intention to integrate coding in teaching. This study provides evidence of the importance of TAM in addressing pre-service teachers’ intention for coding, indicating ease of use and usefulness as significant predictors of intention. Personal variables, including gender and coding skills, were found to have an impact on pre-service teachers’ intention for coding. Pre-service teachers’ coding experiences were positive overall, with most of them identifying coding as an essential skill to possess and Scratch being a useful tool to learn or teach coding. In addition, the coding activity led to more of the positive changes in perceptions of coding than the negative and no changes in perceptions among pre-service teachers.
There are several limitations for this study, and some of them are linked to research implications. The findings of this study may not be generalized to other groups of pre-service teachers from other countries or with different cultures. The pre-service teachers in this study were from different subject areas, and they were expected to teach at different grade levels (e.g., early childhood, elementary or secondary schools). We did not consider how subject areas or grade levels might play a role in pre-service teachers’ acceptance to coding, which could be further explored in future research. This study focused on TAM, affective, and personal factors in relation to pre-service teachers’ intention to use or teach coding. There may be other factors (e.g., self-efficacy, school support, the design of activities, etc.) associated with pre-service teachers’ acceptance for coding, and we encourage future researchers to include them. In addition, pre-service teachers’ changes in perceptions towards coding were found based on the qualitative analysis. We did not perform a pre–post design to verify pre-service teachers’ changes in perceptions. It is suggested that future studies adopt pre–post surveys to examine changes in pre-service teachers’ perceptions of coding.
As for the practical implications, this study suggests that teacher educators should (a) provide pre-service teachers with opportunities to engage in coding activities to enhance their awareness of the importance of coding, as well as their willingness to adopt or integrate coding into teaching (
Ertmer & Ottenbreit-Leftwich, 2010;
Hunsaker & West, 2019); (b) offer additional support or practice opportunities to female pre-service teachers and those with no or basic coding skills; (c) identify pre-service teachers who may possess negative emotions or low levels of interests about coding, and pair them up with those who show positive emotions towards coding or have higher levels of coding skills or interests in coding (
Ari et al., 2022); (d) share best practices or successful examples about teachers’ journeys from learning to code to integrating coding into teaching, as well as how coding significantly enhances students’ learning outcomes, to enhance pre-service teachers’ coding acceptance (
Y. C. Kuo et al., 2023); and (e) provide pre-service teachers with relevant resources for coding, such as useful, highly rated coding tools or platforms (
Yukselturk & Altiok, 2017).