Skip to main content
Toggle menu

Search the website

Walking the Walk on Code sharing

Posted:
Written by:

Here at the Bennett Institute, we are a bit obsessive when it comes to code sharing.

For years we’ve been making the effort to share the code behind all of our projects, tools, and analyses to the fullest extent possible. For instance, if you ever wondered how our TrialsTracker project works, you can see for yourself by looking at the two main GitHub repositories that make it work. We also share the code for all the project’s related papers, such as those in The Lancet or JAMA IM.

Same with OpenPrescribing. Even OpenSAFELY, our secure electronic health records analytics platform, is fully open source, as is every piece of analysis run against patient data as a precondition of using the platform. Here’s our full team GitHub organisation. We fully believe in the numerous benefits of open code, allowing for transparency, reproducibility, and reuse by the community - even in situations where the underlying data cannot be openly shared.

A talk from Kamran Abbasi at the OpenSAFELY Symposium

Recently at our OpenSAFELY symposium we were lucky enough to have a keynote by Dr. Kamran Abbasi, Editor-in-Chief of The BMJ, highlighting the importance of open code (click the picture above to see the full talk).

In his talk he said:

What is the value of a trusted research environment like OpenSAFELY? They deliver quality, diversity and integrity. There’s data sharing, with code sharing built in. It’s mandated. What could be better than that? It solves the problem of sharing routinely collected observational data. […] This is an exercise in transparency and trust in medical science, and I want to thank you and everybody involved for what you’re doing. You get into our publications because this is credible science, done in a timely manner, on important topics.

Earlier this year The BMJ announced that all published analyses in the journal must now share their underlying code. A fantastic step for transparency and open science, in our opinion. As part of his talk, Kamran pointed out our code sharing history, often unfolding in the pages of the BMJ: a letter from Ben in 2016, an editorial in 2019, and the numerous BMJ publications produced by the OpenSAFELY collaboration all featuring open code.

For the entire existence of our research group, we have tried to be explicit about what we think are the benefits of sharing code and why we think the community should embrace the practice. Not only that, but we have made every effort to walk the walk, rather than just talk the talk. Unfortunately, recent research has shown that outside of fanatics like us, code sharing in the health and medical sciences is virtually non-existent. We hope The BMJ’s new policy starts a movement toward more widespread adoptions of mandatory open code policies.

We’ll have some exciting news to share on the next chapter of our code sharing work in the new year so stay tuned!