There is a lot of emphasis on theoretical education rather than practical ability training, in programming courses at colleges and universities, giving rise to low programming ability for students, which has a severe impact on their professional development. Automatic judgement-based online judge system is both suitable for exploration learning and for collaborative learning. This paper uses the principle of blended learning and proposes a set of blended learning modes which combine online judge with computer programming courses. The paper first describes design ideas of the blended learning mode in a learning environment, resource, learning content and form and learning evaluation. Then the author takes C programming language course as an example to elaborate practical measures of the blended learning. Finally, the comparative experiments show that the application of the mode has improved significantly in the knowledge points, the amount of code and test scores of students than traditional methods. The application of the blended learning model based on an online judge system in programming courses plays a positive role to students' programming, logical thinking, research and innovation capabilities.