Best Practices for Writing Reproducible Code

If you are looking at a GitHub README, please note that the slides are best viewed via GitHub pages.

A gitbook is under development as well: check it out!

Ensuring your research is reproducible can be a difficult task. Scripting your analysis is a start, but this in and of itself is no guarantee that you, or someone else, can faithfully repeat your work at a later stage. In this workshop, we will help you not only to make your work reproducible, but also to increase the efficiency of your workflow. We do this by teaching you a few good programming habits: how to set up a good project structure, how to code and comment well, and how to document your code so that it can be used by others. We will furthermore introduce you to Git and GitHub, which are essential tools in managing and publishing code. Reproducibility requires extra effort, but we will focus on teaching you skills that will save you much more time in the long run than they cost to implement.


If you are attending this workshop, you can prepare a few things so we can hit the ground running! We have more details on this page.


Day 1

Time Activity
9:00 Welcome & introduction (slides)
9:30 Project setup & version control with git
10:45 Questions & discussion
11:00 Break
11:15 Code quality
12:45 Questions & discussion
13:00 End

Day 2

Time Activity
9:00 Code quality discussion
9:15 Documentation
10:45 Questions & discussion
11:00 Break
11:15 Accessibility & reproducibility
12:15 Reproduction of projects
13:00 End

Course materials (for reference, these are also linked in the schedule above!)


  1. Introduction
  2. Project setup and version control
  3. Code quality
  4. Project documentation
  5. Accessibility & Reproducibility: Dependency Management
  6. Accessibility & Reproducibility: Archiving


  1. Project setup & version control with git
  2. Code quality
  3. Project documentation
  4. Accessibility & reproducibility


All workshop material is licensed under a Creative Commons Attribution 4.0 International License. View the license here.

History and acknowledgements

This course was developed at Utrecht University, supported by the Open Science Community Utrecht (OSCU) and Research Data Management (RDM) support.

Workshop development is being coordinated by Neha Moopen, and the course received contributions from (in alphabetical order): Armel Lefebvre | Barbara Vreede | Bianca Kramer | Cedric Thieulot | Erik van Sebille | Jeroen Bosman | Jeroen Ooms | Jonathan de Bruin | Lukas van de Wiel | Mateusz Kuzak | Menno Fraters | Philippe Delandmeter | Renato Alves