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.
In this hands-on workshop, you will learn to become a better programmer. We will take you through a project from research question to published code in a single (admittedly intense, but fun!) day. At the end of this day you will know:
- How to set up and use an efficient project structure;
- How to use Git for version control, and GitHub to publish your code;
- How to write robust code that allows and invites re-use;
- How to document your code well;
- How to license and release your code to ensure maximum reusability.
We require participants to have at least a basic understanding of a programming language, and preferably already have some code to work with (though this is not required). The course content accommodates most languages, but insofar as we give examples of specific tools, we will cater to R and Python users. If you are unsure if the language you use will fit our course, please get in touch.
The instructors have checked that the room and nearby bathroom facilities are wheelchair accessible. Furthermore, and we have done our best to accommodate color blindness with our slides and other material. Please let your instructors know if there is anything else in particular we can do to make sure you can take full advantage of our course.
The program addresses four main themes:
- Introduction
- Project setup & version control
- Setting up a folder structure
- Choosing a license
- using git for version control
- publishing your project on github
- Code quality
- code readability
- reusable code
- defensive programming
- Documentation
- code comments
- creating documentation and using notebooks
- Publication & reproduction
- obtaining a doi and ensuring accessibility
- dealing with requirements and dependencies
- Wrap-up
(If you are looking at a GitHub README, please note that the slides are best viewed via GitHub pages.)
Time | Activity |
---|---|
9:00 | Welcome & introduction |
9:30 | Project setup & version control with git |
10:45 | break |
10:00 | Code quality |
12:30 | lunch (not provided) |
13:30 | Commenting & documentation |
15:00 | break |
15:15 | Accessibility & reproducibility |
16:00 | Reproduction |
17:00 | Concluding remarks |
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.
All workshop material is licensed under a Creative Commons Attribution 4.0 International License. View the license here.
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 Barbara Vreede, and the course received contributions from:
- Armel Lefebvre
- 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
The results of a brainstorm on 6 May 2019 at the Utrecht University Library is on these slides.