Introduction to Python, Version Control and Testing: Agenda

The following agenda outlines what will be taught on the course. Additional notes on the teaching materials will be made available shortly after the course.

The software prerequisites for the lessons can be found here.

09:15 - 09:30 Arrival (following Hans' welcome talk)
09:30 - 09:50 Introduction
09:50 - 11:00 Building programs with Python
In this session, you'll learn good programming practices with an introduction to the fundamentals of Python, how to design and build programs more productively and the tools and techniques that you can adopt to produce better code. The following topics will be covered:

  • Basics - e.g. starting Python, using variables
  • Basic program control - loops and conditionals
  • Working with arrays
  • Creating and using functions
  • Using Python from the command line
  • Using libraries
  • Reading and plotting data
11:00 - 11:30 Coffee break
11:30 - 13:00 Version control with Git
This session will teach you how to track and manage changes within your code, how to collaborate with other developers through a shared code repository, and generally improve the reproducibility of your research. The following topics will be covered:

  • Creating and cloning repositories
  • Committing changes to files: add, commit, ...
  • Viewing changes: status, diff, ...
  • Working with remote repositories, e.g. through GitHub: clone, pull, push, ...
  • Resolving conflicts
13:00 - 14:00 Lunch
14:00 - 15:30 Writing robust code and unit testing
Does the code developed by you work the way it should do? Can you (or others) verify these assertions for themselves? And perhaps most importantly, to what extent are you confident of the accuracy of results that appear in publications? This session will teach you techniques of developing robust code and good unit tests to improve the predictability of a change, make development more productive and produce code that works as expected and produces desired results. The following topics will be covered:

  • Introduction to Nose testing framework
  • Writing and executing unit tests
  • Defensive programming
  • Handling exceptions
  • Test-Driven development
15:30 - 16:00 Coffee break
16:00 - 17:00 Wrap-up and feedback