The impact of gamification has been typically evaluated via self-report assessments (questionnaires, surveys, etc.). In this work, we evaluate the use of gamification elements as parameters to predict whether students are going to fail or not in a programming course. Additionally, unlike prior research, we verify how usage of gamification features can predict student performance not only as a discrete, but as a continuous measure as well, via classification and regression, respectively. Moreover, we apply our approach on two programming courses from two different universities and involve three gamification features, i.e., ranking, score, and attempts. Our results for both predictions are notable: by using data from only the first quarter of the course, we obtain 89% accuracy for the binary classification task, and explain 78% of the students' final grade variance, with a mean absolute error of 1.05, for regression. Additionally and interestingly, initial observations point also to gamification elements used in the online judge encouraging competition and collaboration. For the former, students that solved more problems, with fewer attempts, achieved higher scores and ranking. For the latter, students formed groups to generate ideas, then implemented their own solution.