last day (15 days later) » 

16:57
18
Q: Can one demand to see code used to generate an article?

GabrielAn article is published and the results depend heavily on a piece of code that the author wrote her/himself. The author has not shared the code with the community, even though he/she has been using it possibly for years now. If I request the source code from the author and they refuse to share ...

If they refuse to share it (for any number of reasons), why will demanding it from the journal help?
Because they published those results, and without access to the source code there is no way to check/reproduce them.
I understand you want to see the code - that is clear. But, what role is the journal supposed to play here? The journal has no power to compel release of the code.
Sure, you can demand it, but it won't do you any good.
Well, that's one of the strategies I can think of to pressure the author. I'm not saying it would definitely work. The question is more related to the right of the community to audit code used to publish a set of results.
@JonCuster well, they did publish that article. It should contain all relevant information. If it doesn't then somethings wrong.
@JonCuster For the question, I cannot tell if the journals have a role, but two scenarios come to mine: 1) reproducibility of results (e.g., one thinks the authors got something wrong) 2) Open code/open data policies for journals (although the decade old policies would likely not fall under the second scenario). Depending upon the subfield, the journal may or may not care about making the code public.
@RichardErickson - I agree that code should become available (although frankly I'd be embarrassed to release some of my old code - just ugly). And, a journal could well request/require the code for articles submitted in the future. But they really have no power to go back and demand release of materials for a past article.
Just write an article saying their results are proven invalid by their cowardly act of hiding the process they used to forge their results. Either they'll get mad enough to defend themselves by publishing the code, or they'll act even more shady and prove they're a fraud.
Suppose results were generated using Microsoft Excel or some other commercial software? Could you reasonably expect to see the source code for that?
16:57
In that case you can simply share the spreadsheet. I believe it's even easier.
@Gabriel "Demanding" and "pressuring the author" are good ways to make things antagonistic quickly. There's plenty of ways the authors can be shitty back.
AJK
AJK
Also, see some of the related questions on how to improve your odds of not getting ignored, etc: academia.stackexchange.com/questions/26159/… academia.stackexchange.com/questions/44333/…
@jamesqf no one expects that but that's commercial software, everyone can buy it and replicate the results. If you write your own code and you don't share it then no one can replicate it. Therefore the publication is worthless.
I have had students request source codes from me. However, most of the time it's just students doing an assignment and wanting to hand in my source code or my results as their own. E.g., their professor might ask them to implement X, they couldn't understand the work or have poor programming skills, so they ask me for 'help'. In most cases, my answer is an emphatic 'no'. However, if the student has shown clear evidence/effort, I would respond to question such as, in part-Z of your method, where you did A,B and C, I was hoping to implement C this way. Is my understanding correct?
@Prof.SantaClaus that is beyond the scope of this answer. The issue revolves around code used to generate published results.
16:57
@Gabriel I'm talking about code I used to generate my results. So it is definitely relevant.
If you used that code in your research simply make it publicly available and save yourself the trouble of having random students come and ask you for it all the time.
Why would I make it available so that students can take the easy way? They should understand the work and implement it themselves.
without access to the source code there is no way to check/reproduce them [the results] This is wrong. In order to reproduce the results, not the code, but the numerical method should described in sufficient detail (for others to reproduce with their own code). Results obtain by only one code should never be trusted (the code could be faulty, which is not unheard of).
@Prof.SantaClaus because you don't make it available for students, you need to make it available so the scientific community can both learn from and audit your code (which you used in a published research).
@Walter the fact that the code could be faulty is one of the main reasons to demand that it be made available for revising.
I am studying outbreaks of disease in salmon farms. The code is useless without also seing the data files it reads, and those are not anonymised. The companies that supplied the data did it because they want help getting the disease under control, and publisjhing the data will only make their business harder, which in turn would make it almost impossible to get similar data in the future.
16:57
So anonymize the data before sharing it?
@Gabriel It's not that simple. For instance, geographic information is a key feature in my models, and much of that (for instance, all distances between farms) is open knowledge. I take away the geography (how far the sick farms are form the healthy ones, and so on), and no one can really check that what I've done is correct, so what is the point in publishing it? Keep it, and a day's study of the not-so-anonymised data would un-anonymise it.
If you are allowed to publish research using data that no one else has access to ever (not sure how it qualifies as research though) then you can at least share the code so it can be run with random data with the proper format.
Let's recall our Shakespeare: (Henry IV, scene I): GLENDOWER: "I can call spirits from the vasty deep" HOTSPUR: "Why, so can I, or so can any man; but will they come when you do call for them?". Basically, you can "demand" all you like, but getting the author to submit to your demands - ay, there's the rub...
This is Academia, not a play. There's a valid reason for "demanding" that whatever you published can be revised. That's how science works. It's not a childish tantrum.

last day (15 days later) »