Homepage

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:

  1. Document your code.
  2. Have a system for your files.
  3. Commit as often as possible.
  4. 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.
  5. Learn how to run your jobs on remote servers with dedicated resources for your taks. This will help when reporting computing times.
  6. For the previous one too: Use tmux (and iTerm).
  7. Keep a style when writing code, this helps with readability.
  8. Test your code.
  9. Use virtual environments. Specially if you just want to test a specific feature of that xyz library.
  10. Use libraries and software that will have maintenance. Don’t make your code depend on that xyz library.
Follow me

Let's connect 👩🏽‍💻