In this paper, we recount our research on undergraduate mathematics students learning to use programming for mathematics investigation projects. More precisely, we focus on how a particular theoretical perspective (the Instrumental Approach) helps us better understand this student activity. Pulling data from students' and instructors' experiences in a sequence of courses (offered since 2001), our results expose, at the micro and macro levels, how the student activity is organized (through stable 'ways of doing'), and highlights the complexity of this activity (as an intertwined web of 'ways of doing' involving a combination of both mathematics and programming competencies). We end with concrete recommendations to instructors.