COMP0233: Research Software Engineering With Python



In this course, you will move beyond programming, to learn how to construct reliable, readable, efficient research software in a collaborative environment. The emphasis is on practical techniques, tips, and technologies to effectively build and maintain complex code. This is a intensive, practical course.


  • You need to have taken a formal course in at least one programming language, including variables, control flow, and functions. This could be a semester-long course, or a shorter workshop like Software Carpentry.
  • You are required to bring your own laptop. We have also provided setup instructions for you to install the software needed for the course on your computer.
  • Eligibility: This course is for UCL post-graduate students.


Members of doctoral training schools, or Masters courses who offer this module as part of their programme should register through their course organisers.


Version Control

  • Why use version control
  • Solo use of version control
  • Publishing your code to GitHub
  • Collaborating with others through Git
  • Branching
  • Rebasing and Merging
  • Debugging with GitBisect
  • Forks, Pull Requests and the GitHub Flow

Introduction to Python

  • Why use scripting languages?
  • Python. IPython and the Jupyter notebook.
  • Data structures: list, dictionaries, and sets.
  • List comprehensions
  • Functions in Python
  • Modules in Python
  • An introduction to classes

Research Data in Python

  • Working with files on the disk
  • Interacting with the internet
  • JSON and YAML
  • Plotting with Matplotlib
  • Animations with Matplotlib

Testing your code

  • Why test?
  • Unit testing and regression testing
  • Negative testing
  • Mocking
  • Debugging
  • Continuous Integration

Software Projects

  • Turning your code into a package
  • Releasing code
  • Choosing an open-source license
  • Software project management
  • Organising issues and tasks

Construction and Design

  • Coding conventions
  • Comments
  • Refactoring
  • Documentation
  • Object Orientation
  • Design Patterns

Advanced Programming Techniques

  • Functional programming
  • Metaprogramming
  • Duck typing and exceptions
  • Operator overloading
  • Iterators and Generators

Programming for Speed

  • Optimisation
  • Profiling
  • Scaling laws
  • NumPy
  • Cython


Examples and exercises for this course will be provided in Python. Python will be introduced during this course, but we will assume you can already program. That means that you may find supplementary python content useful.


You can find the course notes as HTML via the navigation bar to the left.