Live data from Hacker News

Challenge to scientists: does your ten-year-old code still run?

nature.com

61–70 of 487 posts

Re: Challenge to scientists: does your ten-year-old code still run?

#61

This article brings up scientific code from 10 years ago, but how about code from .. right now? Scientists really need to publish their code artifacts, and we can no longer just say "Well they're scientists or mathematicians" and allow that as an excuse for terrible code with no testing specs. Take this for example: https://github.com/mrc-ide/covid-sim/blob/e8f7864ad150f40022... This was used by the Imperial College…

The graphics community has started an interesting initiative at this end: http://www.replicabilitystamp.org/

After a paper has been accepted, authors can submit a repository containing a script which automatically replicates results shown in the paper. After a reviewer confirms that the results were indeed replicable, the paper gets a small badge next to its title.

While there could certainly be improvements, I think it's a step in the right direction.

Re: Challenge to scientists: does your ten-year-old code still run?

#62
Plenty of actual professional programmers can't manage this, how is it a fair standard to hold scientists to, when the code is just one of the many tools they're trying to use to get their real job done?

I think moving away from the cesspool of imported remote libraries that update at random times and can vanish off the internet without warning, would help a lot of both cases.

Re: Challenge to scientists: does your ten-year-old code still run?

#63

This article brings up scientific code from 10 years ago, but how about code from .. right now? Scientists really need to publish their code artifacts, and we can no longer just say "Well they're scientists or mathematicians" and allow that as an excuse for terrible code with no testing specs. Take this for example: https://github.com/mrc-ide/covid-sim/blob/e8f7864ad150f40022... This was used by the Imperial College…

Can you describe a bit more about what is going on in the project? The file you linked is over 2.5k lines of c++ code, and that is just the “setup” file. As you say, this is supposed to be a statistical model, I expected this to be R, Python or one of the standard statistical packages. Why is there so much c++ code?

Who says anything about statistical models?

Re: Challenge to scientists: does your ten-year-old code still run?

#64
post #6

The day when code used to produce a paper must also be published can not come soon enough.

In all my papers the results were produced on multiple days (spanning months), with multiple versions of the code, and they are computationally too expensive to reproduce with the final version of the code. I'm trying to keep track of all the used versions, but given that there is no automated framework for this (is there?) and research involves lots of experiments, it's never perfect. Given this context, any ideas how to do it better?

Re: Challenge to scientists: does your ten-year-old code still run?

#65

Earlier quoted context omitted.

The fundamental problem here, as you note, is that scientists are rarely also engineers, and don't really share our desiderata. The point is to develop and publish a result, and engineering analysis code for resiliency is of secondary concern at best when that code isn't likely to need to be used again once the paper is finished. The "Software Carpentry" movement [1] has in the past decade tried to address this, as I…

Nah. The fundamental problem is that scientific code is produced by entry-level developers: 1. Paid below-market wages 2. With no way to move up in the organization 3. With lots of non-software responsibilities 4. With an expectation of leaving the organization in six years As long as the grunt work of science is done by overworked junior scientists whose careers get thrown to the wolves no matter what they do, you'r…

I mean, senior researchers in stable roles don't really do any better. Just to pick the first example off the top of my head - one of the investigators I worked with, during my year as a staff member of an academic institution most of a decade ago, is also one of my oldest friends; he's been a researcher there for what must be well past ten years by now. Despite one of his undergrad degrees being actually in CS, I still find ample reason whenever I see it to give him a hard time about the maintainability of his code.

Like I said before, it's a field in which people really just don't give a damn about engineering. Which is fair! There's little reason why they should, as far as I've ever been able to see.

Re: Challenge to scientists: does your ten-year-old code still run?

#66
post #57

Earlier quoted context omitted.

Having had that exact experience - yeah, that can be a big problem too. Researchers and engineers can work really well together, because the strengths of each role complement the weaknesses of the other, and I think it would be very nice to see that actually happen some day.

It doesn't help with the issue of hard-to-reproduce work, but apparently working for a company making products aimed at scientists can be a place to see this happen (if the company is good about talking to customers).

Interesting, thanks! I'll keep that in mind for when I'm next looking for a new client.

Re: Challenge to scientists: does your ten-year-old code still run?

#67
"Ten Simple Rules for Reproducible Computational Research" http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fj... :

> Rule 1: For Every Result, Keep Track of How It Was Produced

> Rule 2: Avoid Manual Data Manipulation Steps

> Rule 3: Archive the Exact Versions of All External Programs Used

> Rule 4: Version Control All Custom Scripts

> Rule 5: Record All Intermediate Results, When Possible in Standardized Formats

> Rule 6: For Analyses That Include Randomness, Note Underlying Random Seeds

> Rule 7: Always Store Raw Data behind Plots

> Rule 8: Generate Hierarchical Analysis Output, Allowing Layers of Increasing Detail to Be Inspected

> Rule 9: Connect Textual Statements to Underlying Results

> Rule 10: Provide Public Access to Scripts, Runs, and Results

... You can get a free DOI for and archive a tag of a Git repo with FigShare or Zenodo.

... re: [Conda and] Docker container images https://news.ycombinator.com/item?id=24226604 :

> - repo2docker (and thus BinderHub) can build an up-to-date container from requirements.txt, environment.yml, install.R, postBuild and any of the other dependency specification formats supported by REES: Reproducible Execution Environment Standard; which may be helpful as Docker Hub images will soon be deleted if they're not retrieved at least once every 6 months (possibly with a GitHub Actions cron task)

BinderHub builds a container with the specified versions of software and installs a current version of Jupyter Notebook with repo2docker, and then launches an instance of that container in a cloud.

“Ten Simple Rules for Creating a Good Data Management Plan” http://journals.plos.org/ploscompbiol/article?id=10.1371/jou... :

> Rule 6: Present a Sound Data Storage and Preservation Strategy

> Rule 8: Describe How the Data Will Be Disseminated

... DVC: https://github.com/iterative/dvc

> Data Version Control or DVC is an open-source tool for data science and machine learning projects. Key features:

> - Simple command line Git-like experience. Does not require installing and maintaining any databases. Does not depend on any proprietary online services. Management and versioning of datasets and machine learning models. Data is saved in S3, Google cloud, Azure, Alibaba cloud, SSH server, HDFS, or even local HDD RAID.

> - Makes projects reproducible and shareable; helping to answer questions about how a model was built.

There are a number of great solutions for storing and sharing datasets.

... "#LinkedReproducibility"

Re: Challenge to scientists: does your ten-year-old code still run?

#68
post #60

Earlier quoted context omitted.

As a theoretical physicist doing computer simulations, I am trying to publish all my code whenever possible. However all my coauthors are against that. They say things like "Someone will take this code and use it without citing us", "Someone will break the code, obtain wrong results and blame us", "Someone will demand support and we do not have time for that", "No one is giving away their tools which make their compe…

I’m curious, are dedicated software assurance teams a thing in your research area? Or is quality left up to the primary researchers?

Most of the codes I am developing alone. No one else looks at them ever. My supervisor also develops the code alone and never shows it to anyone (not even members of the group).

In other cases, a couple of other researchers may have a look at my code or continue its development. I worked with 4+ research teams and only saw one professional programmer in one of them helping the development. Never heard about a "dedicated software assurance team".

Re: Challenge to scientists: does your ten-year-old code still run?

#69
The longest-running code I wrote as a scientist was a sandwich ordering system. I worked for a computer graphics group at UCSF and while taking a year off from grad school while my simulations ran on a supercomputer, and we had a weekly group meeting where everybody ordered sandwiches from a local deli.

It was 2000, so I wrote a cgi-bin in Python (2?) with a MySQL backend. The menu was stored in MySQL, as were the orders. I occasionally check back to see if it's still running, and it is- a few code changes to port to Python3, a data update since they changed vendors, and a mysql update or two as well.

It's not much but at least it was honest work.

Re: Challenge to scientists: does your ten-year-old code still run?

#70
post #24

As someone who worked with bits of scientific code: Does the code you write right now work on another machine might be the more appropriate challenge. If seen a lot of hardcoded paths, unmentioned dependencies and monkey-patched libraries downloaded from somewhere; just getting the new code to work is hard enough. And let's not even begin to talk about versioning or magic numbers. Similar to other comments I don't me…

I emailed an author of a 5 year old paper and they said they had lost their original MATLAB code, certainly brings into question their paper.
Post reply on HN