Education and Information Technologies, 2026 (SSCI, Scopus)
It is crucial to grasp how classroom environments shape students’ psychological and behavioural outcomes, particularly in programming education, a field that is more vital than ever in today’s digital age. This paper addresses a critical gap in the literature by examining the intersection of classroom participation and self-efficacy variables and their association with engagement in programming education among K-8 students. We surveyed 868 middle school students (405 females, 463 males) in the northwestern province of Turkey. Data were collected using the Survey of Classroom Goals Structures and the Student Engagement Questionnaire, and analyzed through preliminary, descriptive, and inferential statistical methods. The results showed that self-efficacy was a predictor of student engagement. Among classroom goal structures, the motivational task was found to be a robust predictor of both student engagement and self-efficacy beliefs, while autonomy support did not predict either construct. However, mastery evaluation dimension predicted cognitive and emotional engagement. These findings show the nuanced roles of classroom goal structures play in shaping student engagement and self-efficacy in programming education. The study offers implications for instructors and policymakers in fostering student participation and motivation in early programming pedagogy. Conducting studies across different grade levels and cultural contexts will enhance the generalizability of findings on student engagement in programming education.