Use good names for files, folders, functions,... and save time in the future
E-mail course: 6 steps towards reproducible research (step 2)
Hi friend 👋,
this newsletter issue shows you how to pick good names.
Good names for files, folders, functions and other things can make a research project (or any project on your computer, really) more pleasant. Both for yourself and any people you work with.
Let’s be kind to ourselves and the people around us and get into naming 🙌
Good naming
A few examples from Jenny Brian’s slides of bad and good file names:
BAD ❌
Myabstract.docx
Joe’s Filenames Use Spaces and Punctuation.xlsx
figure 1.png
fig 2.png
JW7d^(2sl@deletethisandyourcareerisoverWx2*.txt
GOOD ✅
2014-06-08_abstract-for-sla.docx
Joes-filenames-are-getting-better.xlsx
Fig01_scatterplot-talk-length-vs-interest.png
Fig02_histogram-talk-attendance.png
1986-01-28_raw-data-from-challenger-o-rings.txt
Names should be:
Machine readable 💻
Human readable 🧐
Optional: Consistent ⚙️ (decide how you use underscores _ and dashes -, if you want to use CamelCase or not, …)
Optional: Play well with default ordering ⬇ (e.g. start your file names with the creation year)
Need further help making your research open and reproducible?
Your task
Take a current project or code that you are writing on and check if you follow the naming rules we discussed.
If you don’t: go ahead and improve them ✅
Enjoy the weekend 🧘♂️
Further reading
If you want to dive deeper, I recommend reading:
Naming files, folders and other things, The Turing Way
Up next
In the next newsletter we will discuss step 3: Document with care: README, Metadata, code comments, …
Do you like this newsletter so far? Anything I could do better? Let me know, by replying to this email. I am also always happy to discuss this newsletter on Twitter.
All the best,
Heidi