Ask HN: Should I publish my research code?
421 pointsI'm looking for advice om whether I should publish my research code? The paper itself is enough to reproduce all the results. However, the implementation can easily take two months of work to get it right.
In my field many scientists tend to not publish the code nor the data. They would mostly write a note that code and data are available upon request.
I can see the pros of publishing the code as it's obviously better for open science and it makes the manuscript more solid and easier for anyone trying to replicate the work.
But on the other hand it's substantially more work to clean and organize the code for publishing, it will increase the surface for nitpicking and criticism (e.g. coding style, etc). Besides, many scientists look at code as a competitive advantage so in this case publishing the code will be removing the competitive advantage.
Comments (353) 192 threads
Show all comments
Showing thread 70 of 192
What can go "wrong"
- Someone may find a minor rounding error and now you have to issue a correction to the paper which, laudable as it is, is a bad thing
- You 'll end up having to maintain an open-source-something and possibly forks
- Your open source code may end up as a github repo in which you are just one of the contributors, not the owner and others are leeching credit from u
- People who want to criticise you will find excuses in the coding style.
Research code is messy -- it must be messy imho, or else it's probably insignificant. People who don't publish it are definitely shielded by the obscurity , while i have received scrutiny for entirely inconsequential details. You can choose to publish it in a less accessible way , which will thwart people with bad intentions. Even publishing it as a tarball in a web server is enough work to keep them away.
The world suffers for acting off of untrue information, and eventually the author suffers for having been wrong all this time.
1) if we acknowledge that paper production is the wrong way to do science, perhaps papers with attached published code are a step in the right direction. A critical mass of papers that are easy to reproduce because anyone can execute the code attached with them could, hypothetically, come to dominate the zeitgeist and push out papers with grandiose but unverified claims.
To be clear in my field the journals require publishing the code, but in my experience the code that gets reused gets more scrutiny, often without benefit to the researcher.