Programming is a core subject introduced in the first year of an Undergraduate Computer Science programme. Since programming is a core subject, it is a major concern that high attrition and failure rates continue to be reported in such courses. Evidence from the literature suggests that programming is cognitively demanding, and the solutions proposed have had minimal impact on students in introductory programming courses. However, in the literature on learning theory, there is evidence suggesting that the self-efficacy beliefs of students affect their engagement, and that their engagement affects their performance. In the literature on introductory programming courses, there is a lack of research examining the effect of self-efficacy on engagement, and the effect of engagement on the programming performance of students. This leaves a gap in programming research that this research seeks to fill. Based on student engagement frameworks in the literature on learning theory, a conceptual model was developed. To operationalise and validate the conceptual model within the context of learning programming, a study consisting of focus group interviews and a survey on students in introductory programming courses is proposed. The results of the survey will be analysed using structural equation modelling (SEM) techniques.