This study was designed to explore how secondary students perceive the use of flipped classroom for learning computer programming. Specifically, it aimed to investigate the effects of flipped classroom on students’ learning and acquisition of programming knowledge and skills. Flipped classroom is known as a blended learning approach in which learning materials are delivered online, out of class for self-study in advance of classes, while homework assignments are transformed into class activities. This approach leverages technology and digital resources to support students in independent and online learning. It also enables teachers to minimize direct instruction and maximize student involvement in both teacher-student and student-student interactions. In this study, forty students from two Information and Communications Technology (ICT) classes (18 students in Secondary 4 and 22 in Secondary 5) in a Hong Kong secondary school were involved. Flipped classroom was adopted to teach students about computer programming topics (conditional, repetition and array) in both classes. Data were collected from a questionnaire and two interview sessions to explore students’ views on using flipped classroom to learn computer programming. The findings of this study indicate that students in the flipped classroom, regardless of their performance level, experienced stronger grasp of programming knowledge and higher engagement in learning programming concepts. Our findings also highlight limitations with this study that could be addressed in future work. Copyright © 2019 Springer Nature Singapore Pte Ltd.