Code Refinery Training for Research Software Development

Posted by s.aragon on 30 July 2019 - 9:22am
Red and black building
Image courtesy of Mr Thinktank.

By Lucy Whalley, Software Sustainability Institute Fellow.

Some, or perhaps most, of the readers of this blog will be aware of The Carpentries project, which teaches foundational coding and data science skills to researchers. The Carpentries has been a huge success, training thousands of researchers worldwide. But I’ve often thought – what happens after the basics are in place? This is where initiatives like Code Refinery come in.

Code Refinery is a nordic project that works with students, researchers and research software engineers across all disciplines. They develop, maintain and deliver training material on software best practices, aimed at researchers who already write code. The workshop lessons read like a recipe for sustainable software: automated testing, documentation, modular code development, collaborative version control, social coding and open software. 

My Software Sustainability Institute Fellowship project hopes to support researchers to publish their code in journals such as The Journal of Open Source Software (JOSS). For some researchers, publishing their work in JOSS will mean using testing and documentation tools for the first time – exactly what the Code Refinery covers – and so I was keen to attend a workshop and learn more about their work. 

The workshop took place at Aalborg University in northern Denmark. Aalborg is perhaps one of the quietest cities I have visited – rush hour is equivalent to the 2am traffic in Birmingham – but there was a liveliness in the room as ~25 participants gathered for three days of training. I was primarily there to observe teaching and act as a helper, but also learnt plenty that I will incorporate into my own work (how did I not know about Git grep before?). 

The workshop started with Git lessons, including more advanced topics such as branching, merging and rebasing. Later topics, then built on this Git knowledge: using a GitHub repository and Sphinx to publish documentation on ReadTheDocs, and using a GitHub repository and Travis CI to trigger automatic tests. There was a clear emphasis on supporting  those who don’t feel they are “in” the software development world: by avoiding technical jargon for example (see Code Refinery’s “tips for helpers”). The lessons also incorporated the stickies (green for “I’ve got it”, red for “I’m stuck”) and live-coding (where participants type along with the instructor) approach favoured by The Carpentries.

One challenge in running this type of workshop is that participants use different programming languages – at Aalborg there were Git, R, C and Bash programmers. The Code Refinery approach is to teach concepts using Python, as this is a readable language, then break into programming language groups for deeper discussion and to share language-specific tools.
This was my first mission as an Institute fellow, and it was a success – I now have plenty of ideas for my Fellowship project, and plans to collaborate with Code Refinery in the future. Code Refinery are very open to contributions and collaborations – contact  details can be found here, and their Twitter handle is @coderefine.