
Athanasia M. Mowinckel | Make a package - Make some friends | RStudio
In 2017, I had never exposed my code to anyone other than a select few before, and I was terrified. I had some functions made from a colleagues script that I thought might be useful for others, and dared myself to make a package and push it to github. In stead of the dreaded ridiculing of poor code and development, people embraced the package and helped us make it better. Within just a couple of days, pull requests came from others to help us improve the code, implement tests, and improve documentation. I learned so much just by looking through the PRs and seeing how others worked. Rather than make me shy off development, the R neuro community's positive feedback has helped me find a new interest and joy in developing tools. About Athanasia: Athanasia M. Mowinckel is a staff scientist at the Center for Lifespan Changes in Brain and Cognition, at the University of Oslo. She has a background on cognitive psychology, and uses R for almost everything. She goes by the nickname "Mo" (closer to 'Mou' than 'Moe'), and is a member of the R-Ladies Global team
image: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
Hi, I'm Athanasia Mowinckel, but everyone just calls me M. And today I'd like to talk to you about how I made a package and in that process made some friends.
So to know a little bit about me, I have a background in psychology with a specialization in neuroimaging. And in this field, there's quite a lot of us who do a lot of coding, but we have no formal training in it, so sharing our code is kind of scary. At least for me, it was completely out of the question putting my scripts publicly online. I would just share them with my closest collaborators.
Why is it so scary to put your scripts online? Well, you have this idea that other people know what they're doing, so when they see your code, they're just going to think it's like this sloppy mess that is completely useless, and they're just going to throw all these negatives at you. And in the end, the end message will come, and you have no business doing what you're doing. And it's terrifying.
Making the package
But that kind of changed a little bit over time, and that started when my colleague D-Duck approached me and asked me if we could plot brains in ggplot2. So I'm obsessed with ggplot2, I plot everything in it if I can. Well, I force myself to plot everything in it no matter what. So he had this idea, and he kind of just turned around and made it happen, and we had brains in ggplot2.
And it was such a cool process to be able to create our stats and immediately project them onto areas of the brain in a way that we would put in a publication. I hadn't been able to do that in R before, and I thought it's not just our labs that needs this. We have international colleagues that we know also could use something like this. So maybe this is a time to figure out how to share your code. So D-Duck gave me his script, and I turned the script into a function. And I took that one function, turned it into many functions in a package, and I shipped the package off to GitHub.
And I was terrified, excited, but terrified of what people would think. But it turns out I didn't have to be. Because people started tweeting about it, like Mara started tweeting about it, and other neuroscientists that I respect a lot started tweeting about the package being really good, easy to use, giving them pretty plots, and suddenly all this unequivocally positive feedback that I'd never gotten in academia before. It was so exciting and thrilling, and it was so much fun having made something that was useful. I'd never made anything useful before. And it was just so cool.
It was so exciting and thrilling, and it was so much fun having made something that was useful. I'd never made anything useful before.
Making friends through pull requests
But kind of the next thing that happened was even cooler, because people started doing pull requests to our packages. People we didn't know from before, and they helped us improve the efficiency of our functions, making sure they passed our command checks, adding unit tests. I'd never heard of unit tests, sorry, before that PR came, and suddenly I was obsessed about writing unit tests for everything. And this user, John from Johns Hopkins, he helped us prepare our package to be included in the neuroconductor, which is like a bioconductor for neuroimaging that we didn't even know existed before this.
And suddenly, we were connected to this network of our developers for neuroimaging that we didn't know before, and we have this reciprocal community. And it's so extremely cool. And now, I'm not so scared about sharing my code and putting it online. I do it quite often in my blog, and in the multitude of packages I've made since that first one.
It's just nice to connect with people who do and appreciate the same things you do. So, make a package, and make some friends.
It's just nice to connect with people who do and appreciate the same things you do. So, make a package, and make some friends.
