Live data from Hacker News

Ask HN: Should I publish my research code?

news.ycombinator.com

321–330 of 363 posts

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

#321
There are scientific venues where the focus is the software architecture and the software product.

I previously published in one of them (SoftwareX by her majesty Elsevier the Evil) and I wish there could be more venues that could bring value and recognition to the piece of code we develop in research for other purposes.

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

#322
post #262

Earlier quoted context omitted.

I understand it fine. Like I said, it’s really not that hard to write pretty good code for prototypes. I'm not saying the code needs to be architected for scale or performance or whatever else needless expectation. I don't have a formal education in programming or computer science and write clean code just fine, as do some other non-computer science people I've worked with in advanced R&D contexts. And then some (man…

I'm not making excuses I'm just talking about the realities. For the significant majority of researchers I know about version control is still program_v1.py, program_v1.py, program_final.py, program_final2.py (and this is the good version, at least they are using python), so talking about clean code is still quite a bit away. I'm teaching PhD students and it's even hard to convince them, because they just look at how…

I still think it’s really not that hard, and actually, it’s really not even about code. It’s really just about organization, because as you point out, not everyone is great at it. But for example, messy optics tables, labs, or whatever do in fact cause problems, like efficiency and knowing what “state” of supporting tools yielded what result and several other derivative problems. I think my push would be just applying even a modicum of organization on supposedly ancillary things will go a long way rather than accepting them as reality.

I understand the realities and have even been a part of PowerPoint development where slides are emailed back and forth. Sometimes one just has to go with things like that. But I have also seen the reality of stubbornness. I have tried introducing source code control to scientists or even stuff like wikis, all supported and already up and running by IT and used by other groups. Scientists and engineers, especially those with PhDs, can a bit rejective and set in their ways. I have been told flat out by different people that they wouldn’t use tools like a wiki or that Python and C was all they ever needed. I have even noticed physicists saying “codes” for software instead of “code”. It’s fairly rampant, and I have seen it in research papers, published books, and in industry in person. I have never seen that use of “codes” anywhere else. That alone is evidence of a certain amount of culture and institutionalization of doing things incorrectly but viewed as acceptable within the field.

I have written code in some research contexts. I get the constraints. One just needs to take it seriously. But organization, in general, often takes a back seat in basically any field. The only way to change things like this are like anything, which is to push against culture.

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

#324
This is the wrong forum to ask this question because the audience here is mostly in favor of open disclosure of information and open source licensing of code, which always comes at a cost to someone. For example, publishing your code may have significant impact on whether or not you can obtain ownership protection of your inventions/discoveries. If you are interested in protecting these interests, then you should consult with an intellectual property lawyer.

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

#325
I'm a field where it's never been so easy to replicate an experiment, I really wish more people would make their code available. It can be liberating to put your code out there, sort of setting it free, and you'll be much more forgiving if other people's code quality in the future.

The negatives are overestimated, is unlikely many people will read the code.

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

#327

> The paper itself is enough to reproduce all the results. No, this is almost never the case. It should be. But it cannot really be. There are always more details in the code than in the paper. Note that even the code itself might not be enough to reproduce the results. Many other things can matter, like the environment, software or library versions, the hardware, etc. Ideally you should also publish log files with a…

To some extent Science is a big project to understand how the universe works. We should hope to understand the phenomena that we investigate to the point where library versions and random seeds don't matter so much -- assuming the code is not buggy, and the statistics are well done, those factors shouldn't come into play.

However, sometimes chemists find out that the solvents they use to clean their beakers are leaving trace amounts of residue, which accidentally contribute to later reactions.

> Ideally you should also publish log files with all such information so people could try to use at least the same software and library versions.

looks to me like a result that requires borrowing a particular lab's set of beakers. Not what we're looking for.

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

#328
post #25

> 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). Matt Might has a solution for this that I love: Don't clean & organize! Release it under the CRAPL[0], making explicit what everyone understands, viz.: "Generally, academic software is stapled together on a tight deadline; an expert user has to coerce it int…

> Matt Might has a solution for this that I love: Don't clean & organize! Release it under the CRAPL[0]

> "Generally, academic software is stapled together on a tight deadline; an expert user has to coerce it into running; and it's not pretty code. Academic code is about 'proof of concept.'"

This is brilliant!

edit: it seems that, aside from that great snippet from the text, the license itself isn't so great. another comment [1] has a great analysis of the actual license and suggests using a superior solution (copying the preamble part yet still using MIT/(A)GPL).

[1] https://news.ycombinator.com/item?id=29937180

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

#329

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

You don't put science on your name if you're a real science Having flashbacks to when a close friend was getting an MS in Political Science, and spent the first semester in a class devoted to whether or not political science is a science.

Well? Don't keep us hanging.

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

#330

Earlier quoted context omitted.

> It's the right thing to do for open and reproducible research. Everybody here talks about how publishing code helps (or even makes possible) reproducibility, but this is not true, on the contrary, it hinders it. Reproducing the results does not mean running the same code as the author and plotting the same figures as in the paper. This is trivial and good for nothing. Reproduction is other researchers independently…

This is a common misconception, but you are actually talking about "replicability" which is "writing and then running new software based on the description of a computational model or method provided in the original publication, and obtaining results that are similar enough" [1]. Reproducibility instead refers to running the same code on the same data to get the same results [2]. [1] Rougier et al., "Sustainable comp…

It's worth noting that the two provided references disagree on their definitions of reproducibility. Plesser quotes ACM as reproducibility being tested by a "Different team, different experimental setup", consistent with use in the GP's comment, but ultimately seems to favor ignoring "replicability" and instead using "reproducibility" in combination with various adjectives. The common understanding in the physical sciences is also that merely re-running the same code is not a test of reproducibility.
Post reply on HN