The aim of this study was to investigate the factors affecting the pre-service computer science teachers' attitudes towards computer programming (ATCP). The sample consists of 119 pre-service teachers at a public state university. The influences of students' demographic characteristics (gender, grade level, and high school type), their achievement in computer programming courses, perceived learning, and computer programming self-efficacy on their ATCP were tested using multiple linear regression. Descriptive, correlation and regression analyses revealed three findings: (1) students had moderately high ATCP, (2) their ATCP had significant correlations with their achievement in computer programming courses, computer programming self-efficacy, and perceived learning, and (3) three variables (achievement in computer programming courses, computer programming self-efficacy, and perceived learning) were significant predictors of their ATCP.