An Investigation of Affective Factors Influencing Computational Thinking and Problem-Solving

 Abstract —This study investigated the effects of affective factors on computational thinking and problem-solving. Computer science subjects are becoming part of the regular curricula in K-12 and higher education to enhance computational problem-solving skills. However, affective factors influencing computational thinking skills and computational thinking components predicting problem-solving skills have yet to be fully explored. This paper proposed a conceptual model to predict (a) four affective factors that influence computational thinking self-efficacy and (b) six computational thinking components that affect problem-solving self-efficacy. Structural equation modeling was used to analyze self-report data from college students to examine the direct relationships among study variables. The findings showed that two affective factors (i.e., programming self-efficacy and computer science usefulness) significantly predicted computational thinking self-efficacy and influenced problem-solving self-efficacy. Also, two computational thinking components (i.e., algorithm and debugging) were the significant determinants of problem-solving self-efficacy. The results validate the importance of affective factors in computer science education and suggest specific computational thinking activities that should be emphasized in computer science curricula to facilitate problem-solving skills.


I. INTRODUCTION
Today's pervasiveness and rapid evolvement of computer technology are demanding new competencies indispensable to success in our digital society.The ability to enhance Problem-Solving (PS) with computing has become an integral part of our daily lives and tasks.Beyond the -4Cs‖ for 21st-century skills (i.e., critical thinking, creativity, collaboration, and communication [15]), Computational Thinking (CT) has been argued to be another core skill or the -fifth C.‖ Also, Computer Science (CS) education has been emphasized to provide students with more CT learning opportunities that will enable them to be active in the digital world [69].CT can be fostered by introducing CT competencies (i.e., knowledge, skill, and attitude) in CS subjects and incorporating them into cross-curricular disciplines so that CT can be leveraged across disciplines and everyday life [1014].As a result of the recent transition in CS education, the Next Generation Science Standards (NGSS) and Common Core State Standards (CCSS) were restructured to embrace CT as an interdisciplinary approach that can promote synergy with other existing core standards [1517].These shifts in CS education have led researchers and educators to focus more on defining and assessing CT competency, which can evaluate evidence of the learning process and enhance the effectiveness of instruction [1822].Although much effort has been devoted to developing CT through programming, robotics, gaming, and unplugged activities in various educational environments [23,24], very little research has been conducted on CT's affective factors as a critical predictor of CT competency, and the relationship of CT's underlying competencies with problem-solving skills.
There remains a need for studies to investigate the affective aspects towards CS, CT, and PS for promoting an active learning experience in computer science education.One way to move this area of research forward was to examine what affective factors influence computational thinking and what CT components contribute to PS.The present study, therefore, intended not only to identify affective factors influencing CT competency but also to examine the structural relationship between CT components and PS in a higher education course.To this end, the following two questions guided this study: 1) What affective factors influence computational thinking self-efficacy? 2) What computational thinking components affect problem-solving self-efficacy?

A. Computer Science Education
In recent years, attention and efforts in CS education around the world have rapidly increased to prepare them to develop the knowledge and skills effectively used to not only benefit future career and educational opportunities but also deal with the new challenges of the 21st century [2,6,8,15].According to the Association for Computing Machinery, Computer Science (CS) is defined as -the study of computers and algorithmic processes, including their principles, their hardware and software designs, their applications, and their impact on society‖ [4] and is distinct from computer literacy, which merely focuses on using computer technologies.Educators, researchers, and policymakers all have increasingly recognized that CS is a new drive necessary for today's technology innovation, economic opportunity, and social mobility [13, 12,13,25,26].High-quality CS education enables all students to acquire skills for the future, including analytic thinking, creativity, and teamwork [1,25,26].In this context, it has been agreed that K-12 and higher education should prepare learners in CS education to develop CT by incorporating the underpinnings of CS competency and new approaches to solving a problem [11,13,14,27].Therefore, it is crucial to ensure that students of various demographics (e.g., age, gender, race, ethnicity, and socioeconomic status) have the opportunity to acquire these skills.

B. Computational Thinking
Since CT encompasses broad topics across disciplines, it has been defined in a variety of contexts [1114].Wing [28] began to publicize the discourse regarding the role of CT across all disciplines and how it contributes to PS in the digital age.She underlined the CT processes of -formulating problems and their solutions so that the solutions are represented in a form that can be effectively carried out by an information-processing agent‖ [29].The National Research Council [10] underlined the role of programming in constructing a sequence of steps for solving a problem.Barr and Stephenson [27] specified an operational definition of CT for K-12 education, which they described as a PS process and a series of dispositions and attitudes: (a) formulating problems in a way that enables us to use a computer and other tools to help solve them; (b) logically organizing and analyzing data; (c) representing data through abstractions such as models and simulations; (d) automating solutions through algorithmic thinking; (e) identifying, analyzing, and implementing possible solutions with the goal of achieving the most efficient and effective combination of steps and resources; (f) generalizing and transferring this PS process to a wide variety of problems [30].Many other researchers have elaborated various definitions to suit their research situation [24,[31][32][33].As the definition of CT evolves, the three-dimensional framework of CT suggested by Brennan and Resnick [34] has been widely accepted in the context of learning CT through programming [20,21].Its three fundamental dimensions are as follows: (a) seven computational concepts (i.e., sequences, loops, events, parallelism, conditionals, operators, and data), (b) four computational practices (i.e., experimenting and iterating, testing and debugging, reusing and remixing, and abstracting and modularizing), and (c) three computational perspectives (expressing, connecting, and questioning) [34].

C. Programming
Advances in computing technology allow people to come up with new PS approaches and examine virtual solutions in the real world.Resnick [35] argued that CT competency requires not just the ability to use computing tools but also the ability to design, deliver, and communicate with new solutions.While CT can be applied to various challenges that are not directly related to programming tasks, programming is a fundamental way to develop CT effectively [3,5,9,18,36].The ability to program plays an essential role in enhancing the power of the CT process [18].For example, programming provides a new perspective for PS strategies-such as decomposition, pattern recognition, abstract, and algorithm-that can be applied to non-programming domains.Also, since programming involves developing thought processes for solving problems, it can provide people with opportunities to reflect on their learning [18,37].Due to the close relationship of programming with CT, several studies found that programming is frequently adopted to teach CT skills [3,5,9,18,36].However, at the same time, programming was perceived to be highly challenging, such that many people misunderstood computer programming as a limited realm used only by a particular population [35, 19].This may be because early programming learning did not make it easy for many beginners to learn text-based programming languages.In addition, programming was often introduced without sufficient guidance when learners needed help with their codes or in activities that were not relevant to learners' interests and prior knowledge [38].In recent years, to overcome these obstacles, there have been different attempts to introduce beginners to online block-based programming platforms, such as Scratch, MIT App Inventor, MakeCode, and Lego WeDo [5,39].

D. Problem-Solving
What are the traits of an effective PS process?There have been several approaches to defining the PS process.Lester and Charles [40] defined PS as the process of coordinating cognitive ability, affective ability, and experience to determine a solution.Schoenfeld [41] outlined four factors that affected students' PS process in mathematics: (a) resources (domain knowledge), (b) heuristics (PS strategy), (c) monitoring and control (self-regulation), and (d) beliefs and affects (perspectives of individuals towards themselves and their environment).According to the problem-solving behavioral theory proposed by Tallman et al. [42], PS involves a set of sequences, including (a) defining the problem, (b) gathering information, (c) developing solutions, and (d) evaluating results.Mayer [43] proposed that the success of PS depended on three factors: (a) skill (domain-specific knowledge), (b) meta-skill (metacognition), and (c) will (motivational aspects of cognition).In other words, to solve a problem, students should acquire the relevant skill, meta-skill, and will.The meta-skill is central in PS because it coordinates the cognitive process and other components.The three parts are aligned with the knowledge, skill, and attitude model [44] to measure PS competencies.Similarly, Bloom [45] categorized the three domains of learning as cognitive (knowledge acquisition), psychomotor (physical skills), and affective (feelings, emotions, and attitudes).Jonassen [46] emphasized the cognitive and affective requirements needed to solve different problems.As noted previously, affective factors have a significant role in developing PS ability.

E. Affective Factors
In addition to being a critical factor in PS, many studies revealed that affective factors significantly impact the PS process.For instance, Mason [47] noted that as students' beliefs about PS increased, their PS achievements were enhanced accordingly.In contrast, anxiety and fear towards subjects were a factor that negatively affected students' PS achievements.Likewise, Hoffman and Schraw [48] confirmed a positive relationship between students' PS self-efficacy and PS efficiency.In the present study, these affective factors included attitudes towards CS, perceived usefulness of CS, and self-efficacy regarding Programming, CT, and PS.These emotional factors have been widely investigated in various fields and defined by distinctive elements.Self-efficacy is a person's belief about their capability to perform a behavior that deals with a particular problem and to produce designated levels of performance [49].Attitude is a person's evaluative judgment, which depends on their prior knowledge and experience [50].Usefulness refers to the degree to which a person believes that using a tool will help them to attain gains in job performance [51].To summarize, affective factors are a set of emotions and attitudes people have about themselves or their surroundings.These factors influence student performance in either positive or negative ways.

F. Research Model and Hypothesis Development
The aim of this study was to investigate the relationships among learners' affective factors-computer science attitude, computer science usefulness, programming self-efficacy, programming attitude, computational thinking self-efficacy, and PS self-efficacy-in the context of an online block-based programming environment.Many studies confirmed that domain-specific knowledge and metacognition skills could promote computational thinking [52][53][54][55][56]. Also, other studies discovered a strong link between CT and PS [36,[57][58][59].However, there is a lack of knowledge regarding how affective factors interact to influence CT, as well as how CT sub-competencies affect PS, particularly in higher education and online learning environments.In addition, the effects of CT components such as decomposition, pattern recognition, planning, algorithm, reusing, and debugging on PS self-efficacy were explored.Thus, the direction and degrees of structural relationships were examined among affective factors, CT, and PS.The research model is illustrated with the related hypotheses in Fig. 1, and the hypotheses are presented in Table I.

A. Participants
Two types of sampling techniques were used for this population.These included convenience sampling to quickly reach a targeted sample, and identical sampling to simultaneously produce quantitative and qualitative phases [60].Participants were a total of 69 college students who were enrolled in an online course, Computing and Information Technology, at a large public university.The participants were enrolled in varied majors, were of various ages, and were both male and female (age: M = 25.26 years, range = 19-47 years, female: 54%).They had little-to-no previous programming experience prior to taking the online course.The sample size was considered adequate, providing ≥ 80% power to reject a non-closely fitting model (i.e., root mean squared error of approximation [RMSEA] = 0.10) in favor of a closely fitting model (i.e., RMSEA = 0.05) at 0.05 alpha level.

B. Research Setting
The course was intended to provide students with basic CS knowledge and programming experiences using Scratch block-based programming language and environment to create and share their programming projects easily.A web-based learning management system was used to administer and provide online learning during a semester.Scratch programming was adopted because it is suitable as an introductory programming language for people of all ages.The participants were asked to perform a programming task using Scratch Version 3.0.There was a total of 13 modules, including six modules related to programming.The main tasks were to complete semi-finished Scratch projects, and the final project was designing and developing a platform game in which a player could make a character jump or climb to avoid obstacles and reach a destination or perform a mission.

C. Instrument
This study used an online survey questionnaire to measure the perceived level of affective factors.The survey consisted of demographic questions and 18 closed-ended questions (three questions per construct) asking about the six constructs: (a) computer science attitude, (b) computer science usefulness, (c) programming self-efficacy, (d) programming attitude, (e) International Journal of Information and Education Technology, Vol. 13, No. 10, October 2023 computational thinking self-efficacy, and (f) problem-solving self-efficacy.Responses to the closed-ended questions were scored on a 5-point Likert scale ranging from -strongly disagree‖ to -strongly agree.‖Survey items were adapted from the CS Attitude [61], Programming Self-Efficacy [62], and CT/Problem-Solving Self-Efficacy [63].Two professionals independently reviewed the survey items.Based on their feedback, we revised the items to enhance clarity and accessibility.The internal consistency of the survey items was confirmed (Cronbach's α = 0.92).

D. Data Collection and Analysis
An online form of the survey was linked in the last module, and participants received an extra point for voluntarily taking the survey (71% response rate).The answers to the survey items were stored in the database and statistically analyzed using RStudio [64].In a preliminary analysis, assumptions of normality, linearity, and homoscedasticity were met.Descriptive statistics were also calculated to summarize the demographic characteristics of the participants, as shown in Table II.Confirmatory Factor Analysis (CFA) was employed to examine the hypothesized factors of the research model, which illustrates the directions and links between the latent variables (i.e., factors) and their observed variable (i.e., closed-ended questions) as well as the associations among the factors.The CFA model included the following parameters: (a) item loadings on six affective factors-computer science attitude, computer science usefulness, programming self-efficacy, programming attitude, computational thinking self-efficacy, problem-solving self-efficacy, (b) covariances among the six factors, and (c) residual variances/covariances and intercepts of the items.
Next, Structural Equation Modeling (SEM) was conducted to examine predictive relationships among the latent variables.The SEM model involved the same measurement part as the CFA model, but the structural relationships were modified with the regression paths: (a) from computer science attitude, computer science usefulness, programming self-efficacy, programming attitude (predictors) to computational thinking self-efficacy (outcome); (b) from computational thinking self-efficacy (predictor) to problem-solving self-efficacy (outcome); and (c) from decomposition, pattern recognition, planning, algorithm, reusing, and debugging (predictors) to problem-solving self-efficacy (outcome).The model parameters were estimated via robust maximum likelihood [65].The overall model fit was evaluated with multiple indicators: chi-square statistic (χ 2 ), RMSEA, Standardized Root Mean Square Residual (SRMR), and two comparative fit indices [66][67][68][69].

IV. RESULTS
Descriptive statistics and bivariate correlations were calculated and are presented in Table III and Table IV, respectively.The overall model fit was evaluated using chi-square statistic (χ 2 ), RMSEA, SRMR, Comparative Fit Index (CFI), and Tucker-Lewis index (TLI) because various indicators may show different features of model fit [70].The chi-square statistic and its p-value should not be significant at the 0.05 level if there is a good model fit.The chi-square (χ 2 = 181.65,df = 124) was statistically significant (p < 0.001); however, the chi-square statistic is very sensitive to sample size and is weak to use as a single criterion of acceptance or rejection [71,72].To overcome this issue, other indices are recommended to determine the fit [65,68].The model fit indices indicated a good fit between the observed data and the structural causal model, as shown in Table V.The RMSEA indicates the absolute fit of the hypothesized model in the population covariance matrix.The RMSEA estimate was 0.07, and its associated 90% Confidence Interval (CI) was (0.03, 0.09), which also indicates a good model fit [73].The difference between the residuals of the sample covariance and the hypothesized covariance model is represented by the SRMR.Since the lower SRMR values (≤ 0.08) are generally considered a good fit [66], the SRMR estimate in the model obtained 0.05, indicating a good model fit.Lastly, the CFI calculates how well the hypothesized model fits the data compared to a null model of uncorrelated variables.The comparative indices of CFI and TLI were 0.95 and 0.94, respectively, showing a good and acceptable model fit [65,68].Although the results of the chi-square test and RMSEA's CI are not sufficient, the rest of the indices indicated that the fit of the model deems adequate and validated the hypotheses of the research model.For the first research question concerning affective factors influencing CT, the results suggested that computer science usefulness and programming self-efficacy were positively and significantly linked to computational thinking self-efficacy.The rest of the latent variables-i.e., computer science attitude and programming attitude-were not significant.As hypothesized in Table I, programming self-efficacy and computer science usefulness significantly predicted computational thinking self-efficacy (Hypotheses 2 and 3).71% of computational thinking self-efficacy variance was explained by the two latent variables, among which programming self-efficacy was the stronger predictor with path loading (β = 0.58, p < 0.001).The direct effects of computer science usefulness had slightly lower influences with path loading (β = 0.29, p < 0.01).However, two attitudinal factors (i.e., computer science attitude and programming attitude) had no significant influence on computational thinking self-efficacy (Hypotheses 1 and 4) (p = 0.41-0.59).
Computational thinking self-efficacy was also positively related to problem-solving self-efficacy.For the second research question, it was found that the effects of two CT components, algorithm and debugging, were positively significant on problem-solving self-efficacy.In contrast, the rest of the components-decomposition, pattern recognition, planning, and reuse-were not significant.The analysis results of the final structural model are illustrated in Fig. 2 and detailed in Table IV.Computational thinking self-efficacy was a strong predictor of problem-solving self-efficacy (Hypothesis 5) (β = 0.64, p < 0.01).Algorithm and debugging were moderate predictors of problem-solving self-efficacy (Hypotheses 9 and 11) (p = 0.02), but decomposition, pattern recognition, planning, and reuse did not predict problem-solving self-efficacy (Hypotheses 6, 7, 8, and 10) (p = 0.04-0.30).

V. DISCUSSION AND IMPLICATIONS
This study aimed to explore the structural relationships among learner affective factors, CT self-efficacy, and PS self-efficacy in the context of CT learning via block-based programming.These relationships could have meaningful implications for evaluating the affective factors, thereby deriving insights on instructional designs to facilitate computational thinking.
According to the model analysis findings, the overall theoretical framework was statistically established, and two affective determinants (i.e., programming self-efficacy and computer science usefulness) explain students' CT development.Additionally, for the significant effect of CT self-efficacy on problem-solving self-efficacy, the theoretical assumption from previous studies was statistically confirmed.Some previous studies have revealed a strong link between CT and PS by examining CT knowledge and skills [36,[57][58][59].For this reason, the current research has implications for contributing to the validation of affective factors predicting CT and the predictive relationship between CT and PS.
Interestingly, program self-efficacy was the most vital affective factor promoting computational thinking.Program self-efficacy represents how well students can plan and write blocks of code and explain a Scratch program they created.In other words, the ability to create a Scratch program has been confirmed to be closely related to computational thinking, which is consistent with the findings of previous studies [14,[36][37][38].The National Research Council [10] also highlighted the role of programming in constructing a sequence of steps for solving a problem.Hence, it can be concluded that programming experience is critical to promoting computational thinking skills.Also, the perceived usefulness of CS exerted positive effects on computational thinking.However, the present study found that attitude toward CS was not a significant factor.Since the attitude toward computer science asked to what extent the participants were interested in CS, computer science usefulness was about the perceived benefits of computing skills in their lives, meaning that fostering the value of CS usefulness in curricula may facilitate computational thinking skills.
Another finding was the significant relationship between computational thinking components and problem-solving self-efficacy.Although every CT component has a positive relationship with problem-solving self-efficacy, the current

TABLE III :
BIVARIATE CORRELATIONS OF VARIABLES ** Correlation is significant at the 0.01 level (2-tailed).

TABLE IV :
UNSTANDARDIZED AND STANDARDIZED ESTIMATES OF THE PREDICTIVE EFFECTS ON COMPUTATIONAL THINKING

TABLE V :
SUMMARY OF MODEL FIT INDICES AND CUT-OFF THRESHOLDS