10 tips for reproducible code for research
Posted on May 18, 2022 • 1 minutes • 139 words
These are my pieces of advice after more than 10 years coding and 5 doing research:
- Document your code.
- Have a system for your files.
- Commit as often as possible.
- Embrace a ‘g00gl3 mode’ and save all the versions. As a researcher changing code is common and if you want to compare output versions you need to store all those versions.
- Learn how to run your jobs on remote servers with dedicated resources for your taks. This will help when reporting computing times.
- For the previous one too: Use tmux (and iTerm).
- Keep a style when writing code, this helps with readability.
- Test your code.
- Use virtual environments. Specially if you just want to test a specific feature of that xyz library.
- Use libraries and software that will have maintenance. Don’t make your code depend on that xyz library.