This empirical study demonstrates that students’ learning of computer science takes place in qualitatively different ways. The results consist of categories, where each category describes a certain way in which the students approach their learning. The paper demonstrates that some of the ways of tackling learning do better than others in producing a good learning outcome, and that they should therefore be encouraged. The data underlying these results were collected through interviews with third and fourth year students in two countries, and were analysed using a phenomenographic research approach. Keywords Computer science education research, the act of learning, phenomenography.