One of the biggest challenges of the computerscience department at our university is handling the enormous heterogeneity of freshmen concerning both their previous programming abilities and their learning behaviors due to their biographical and social background.In this paper, we present the design and evaluation of a preliminary programming course based on the teaching method of Mastery Learning that is particularly suited for groups of students characterized by considerable diversity. Trained peer tutors closely guide the participants through a step-by-step programming exercise. We tested the method in several courses that ran for two and a half days four weeks before the start of lectures. We collected data from two different surveys(N = 200 and N = 300, respectively).First, we quantified the considerable differences concerning the prior experience in programming of the participants. Second, we succeeded to show that the outcome of our method is independent from different sensory preferences and different computer-usage behaviors of the students. Third, the results of the survey demonstrate that our method is suited to increasing the self-perception of programming ability. This helps freshmen to overcome initial self-doubts when beginning their CS studies.