Live data from Hacker News

Ask HN: Should I publish my research code?

news.ycombinator.com

331–340 of 363 posts

Re: Ask HN: Should I publish my research code?

#331
I have published research code a couple of times. I did this out of principle because I believe in knowledge sharing and collaborative science.

But to be honest, I am truly underwhelmed by the response. For several papers I created Jupyter notebooks that reproduce every single figure in the paper. It has been a huge amount of work. But in spite that the papers with code are reasonably often cited, I’ve been getting only minimal feedback.

So it‘s really difficult to judge whether the effort of properly preparing the code is worth the effort.

On the other hand I have run into several papers that turned out to be not reproducible without the code. Chances are that these particular papers would not have been reproducible with the code, too :D (there were just too many things not adding up). But it would have saved us a lot of time if the code would have been available.

Tl;dr: make the code available, but don‘t invest too much time in polishing it. Hardly anyone is going to thank you.

One exception: if you want to impress future employers, polishing code is worth it. A good portfolio on GitHub can open doors.

Re: Ask HN: Should I publish my research code?

#332

Hi, I’m a Research Software Engineer (a person who makes software that helps academics/researchers) at a university in the UK. My recommendation is that not only do you publish the code, you mint a DOI (digital object identifier, Zenodo is usually the go to place for that) for the specific version that was used in your paper and you associate them. And you include a citation file (GitHub supports them now: https://do…

I would encourage you not to use DOIs for software. They are not made for this, and have limitations which are not appropriate.

Instead, use Software Heritage https://www.softwareheritage.org/ , it provides unique identifiers and actually understand repositories, versioning, history, etc. It also allows you to cite the software and even give proper, durable links to point to the code.

Re: Ask HN: Should I publish my research code?

#333
post #6

Two times I have published my research code - both times I have found many other papers/projects plagiarized my work without giving me any credit. This happens way more than you would think, especially if you are working under less known advisor, and at less known university. As the other comment said, if you care about "advancing the science", and won't mind stuff like the above happening, then go for it. In my expe…

I wonder how often it is the case that code isn't considered an academic product per se, and so free to use. May have to make it very explicit.

> I wonder how often it is the case that code isn't considered an academic product per se, and so free to use.

As an outsider with occasional glimpses into academia, I've observed a bimodal response:

On the one hand, code seems to be seen as more available for reuse in terms of copy-and-paste, particularly in the exploratory phase.

On the other hand, code reuse is somewhat less likely to trigger an acknowledgement and citation.

This unacknowledged copy-and-paste borrowing of code seems in turn to be one influential factor inhibiting the derived code from being shared in turn.

> May have to make it very explicit.

That certainly can't hurt. I've certainly seen that reusable tools aren't cited as often as they are used, which in turn inhibits efforts from being made by academics in the production and refinement of such tools (the citation being the primary currency and reward mechanism for publication in academia).

Explicitly asking for citations (and getting them) helps with that, though the more general issue of "releasing open source software isn't seen as 'publication' for academic status purposes such as being considered for tenure" remains a problem, though it varies considerably by field, institution, and department.

But if given some thought and extra effort, a researcher might actually get more papers (possibly with different sets of collaborators) out of roughly the same body of work, especially if they look more broadly for appropriate conferences and journals.

BTW, again as an outsider with occasional glimpses into academia, it seems to me that there are many vacant niches for cross-disciplinary journals and conferences focused on reusable assets such as datasets and tools necessary for research.

Re: Ask HN: Should I publish my research code?

#334
I work as a researcher and I try to publish full source code for all my publications. On the point of increasing surface for nitpicking, I agree in principle that's a risk, but in practice I have not experienced any such problems in my field. I am in a field of applied natural science where most researchers write terrible code, if any, and so I suppose there are not much expectations or even concepts of coding style.

There is a nice Perspective piece in Science from 2011 [1] touching on the question of cleaning up the code. It suggests basically the same thing as several of the comments in this thread: if you don't have time or motivation to clean up the code, don't.

"even incremental steps would be a vast improvement over the current situation. To this end, I propose the following steps (in order of increasing impact and cost) that individuals and the scientific community can take. First, anyone doing any computing in their research should publish their code. It does not have to be clean or beautiful (13), it just needs to be available. Even without the corresponding data, code can be very informative and can be used to check for problems as well as quickly translate ideas. ... The next step would be to publish a cleaned-up version of the code along with the data sets in a durable non-proprietary format."

[1] Peng (2011) Science 334 1126-1127 https://doi.org/10.1126/science.1213847

Re: Ask HN: Should I publish my research code?

#336
Please publish. Even if you are filing some patents or working on some other commercial licensing, you could publish under a source available licenses. Just yesterday I saw in the 3D printing Reddit some academics developed an interesting approach to segment large panel sections and posted a paper. A number of people are interested to try it but no source code seems to be published - so I just moved on as I'd have to take the trouble to reimplement the paper even to just try it .

Re: Ask HN: Should I publish my research code?

#337
post #332

Hi, I’m a Research Software Engineer (a person who makes software that helps academics/researchers) at a university in the UK. My recommendation is that not only do you publish the code, you mint a DOI (digital object identifier, Zenodo is usually the go to place for that) for the specific version that was used in your paper and you associate them. And you include a citation file (GitHub supports them now: https://do…

I would encourage you not to use DOIs for software. They are not made for this, and have limitations which are not appropriate. Instead, use Software Heritage https://www.softwareheritage.org/ , it provides unique identifiers and actually understand repositories, versioning, history, etc. It also allows you to cite the software and even give proper, durable links to point to the code.

Why not just link to a specific commit hash? What more do they provide?

Re: Ask HN: Should I publish my research code?

#338

Earlier quoted context omitted.

notoriously Philip Wadler says that computer science has two problems: computer and science. It's not about computers and "You don't put science on your name if you're a real science" He prefers the name informatics. source: https://youtube.com/watch?v=IOiZatlZtGU

Kinda like countries that feel the need to put “democratic” in their name.

Also applies to newspapers which include some version of "truth" in the title. (Russian propaganda "Pravda", Polish tabloid "Fakt", etc.)

Re: Ask HN: Should I publish my research code?

#340
Well I'm no scientist, but the one thing I do know about science is that if it can't be replicated then it ain't really science. Seeing as how the code is pretty important for expediently replicating your work, it seems like doing so in the interest of facilitating that replication takes precedent over any sort of "competitive advantage". If that sort of transparency ain't common in your field, then maybe this is your opportunity to lead by example and change that?
Post reply on HN