As a result of the rapidly changing digital landscape, there is momentum to bring coding to K-12 classrooms in jurisdictions all around the world. A barrier to student learning and success with coding, however, is that many teachers have little or no prior coding experience. Using constructivist grounded theory, this study will seek to understand what experiences in the teacher education course, Computational Thinking in Mathematics and Science Education, affect how preservice teachers perceive coding in teaching and learning about mathematics. Experiences in the course include hands-on activities, readings, tutorials, opportunities for reflection, assignments that require preservice teachers to teach coding to intermediate or senior students, and participation in online discussions. Research questions include 1) What course experiences or other factors affect how preservice teachers come to view coding in teaching and learning mathematics? and 2) How are these views, related to coding in teaching and learning mathematics, translated into their practice teaching?