Teaching Methods: Programming for Physicists
Student experience 19th February 2021
Dr Lloyd Cawthorne discusses his experience of teaching the core undergraduate module PHYS20161: Introduction to Programming for Physicists, and the ways that this course has successfully adapted to current teaching and learning practices.
I teach a second year core course called Introduction to Programming for Physicists. Programming is a core skill for any physicist. At the most basic level we can use it to analyse our experiments. Often, we need it to interact with our equipment. On a theoretical level, it can perform extensive calculations we could not begin to do by hand. We can also code simulations of complex phenomena which we are unable to experiment on directly. Here we teach the programming language Python as it has a far simpler syntax compared to other languages and is extremely versatile and widely used in research and industry.
I expect all students who take this course to subsequently update their CV to include knowledge in Python, as this is skill is often required by potential employers.
Like any introductory course, we assume no prior experience in the field. Looking at a piece of code for the first time can be quite daunting. One needs to know a variety of data types, how they are manipulated through operators and how these combine to create programme as a whole for its purpose. For that reason it is important to build this up in steps with regular learning activities to apply what has been covered. Conversely, there will be a significant number of students that have prior experience with programming. So we have created tasks that are both challenging to more experienced programmers but also accessible to novices (this is easier said than done!).
We have been teaching this course for a couple years now by making use of interactive live polls and quizzes that can be done in the students’ own time. The final assessment is a 3 week project focussed on data analysis that is directly applicable to the lab. This is supported by ample computer lab time, where students can seek support for their weekly tasks, larger assignments and raise general questions about the course and programming. These are all supervised by demonstrators that are researching computationally demanding tasks (modelling gravitational waves in the cosmic microwave background, analysing vortices in superfluid helium at 0.1 Kelvin, inspecting matter-antimatter asymmetries from LHCb data, etc.). We also have online discussion boards where students can post questions outside of working hours, these can also be posted anonymously.
In the wake of Covid-19, and the removal of face-to-face teaching, this course coped very well. We already had a mix of activities that were done live and those done in the students own time. The need to develop videos meant I could break up one hour lectures into smaller chunks focussing on particular topics or methods, this was far more beneficial to students than having to search through a one hour recorded lecture. It meant I could practice delivering and edit to ensure clarity. The lectures had to succumb to Zoom, but with no need to deliver content as new, I could focus on including more polls to ensure comprehension and also dedicate time to relevant history in the field. The labs migrated easily to Microsoft Teams as it enabled a simple means for one-to-one video calls and includes a useful chat feature.
I definitely missed not seeing the students in the lecture theatre and in the labs. There we can often have more casual conversations and I am able to see that a student needs help before they have raised their hand. However I was greatly reassured by the overwhelming positive feedback from the students.
“The online material was structured well and was of a reasonable difficulty. As someone with not much prior programming experience I found the material accessible. The live sessions were very engaging as well, the use of turning point was great.”
“I felt as though the online format of the course worked very well, as having easy access to the lecture videos which were split up and categorised according to their topic was very useful when completing the weekly quizzes and assignment. Making the code used in live and pre-recorded videos was a good feature. The live lectures were engaging, due to both the weekly ‘person of interest’ feature and the use of polls, with the latter being very helpful with regards to understanding content.”
“The course genuinely felt better suited for an online environment. The way that the videos were available in small clips for each section made them extremely useful for refreshing my knowledge and answering any questions I had. Additionally the assignments and online quizzes were always just about the right level of challenging to ensure I was learning.”
Moving forward, I plan to continue using a combination of videos and quizzes done in the students own time, with face-to-face lectures and labs to allow smaller discussion to flourish.
See an example video from week 1 of the module below!
You can investigate undergraduate courses in Physics and Astronomy via the Department website.
analysing vorticsantimattercomputer sciencelanguagelearningmattermodelling gravitational wavesphysicsprogrammingpythonsuperfluid heliumteachingundergraduate
Leave a Reply