Lurker News
I'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 168 of 192

clintonb3 replies#
If you publish it, please make sure it works today, and can work tomorrow. Pin the versions of any dependencies, or bundle them if feasible.

Also, include basic instructions for running your code.
I helped my wife with a replication study that should have been straightforward, and I was unable to get the code running after about a week. I don’t necessarily believe the research was suspect, but broken code does draw more suspicion.

TrueDuality#
I disagree that this is a requirement. It is a strong nice to have, but even if the code isn't maintained or runnable on other systems it is incredibly valuable as a reference when reading through ambiguous sections in a paper to go look at what the author was trying to do.

Will it take some work to reproduce the results with broken code? Sure, but its better to have the code than not. Cleaning it up might be the straw that prevents that code from getting released at all.

jonnycomputer#
Nice to have. But it is often the case that it is often difficult to avoid things like hard-coded paths, system-specific environment variables, etc. that simply won't translate to another environment. Most of the times, those things don't interfere with comprehension.
ur-whale#
> please make sure it works today, and can work tomorrow.

This would fall in the "nice to have but not required" column.
Publishing messy code that's hard to run is a million time better than no code at all.