Live data from Hacker News

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

nature.com

91–100 of 487 posts

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

#91

"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 F…

Open textual formats for data and open source application and system software (more precisely, FLOSS), are just as important.

Imagine that x86 - and with it, the PC platform - gets replaced by ARM within a decade. For binary software, this would be a kind of geological extinction event.

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

#92
post #79
post #47

I wrote a C++ implementation of the AMBER force field in 2003. Still have the source code with its original modification times. Let's see: /usr/bin/g++ -I/home/dek/sw/rh9/gsl-1.3/include -c -o NBEnergy.o NBEnergy.cpp NBEnergy.cpp: In member function ‘virtual double NBEnergy::Calculate(Coordinates&, std::vector )’: NBEnergy.cpp:20:68: error: no matching function for call to ‘find(std::vector ::const_iterator, std::vec…

You probably didn't include the algorithm header that defines find directly and it stopped compiling once the standard library maintainers cleaned up their own includes. The iostreams headers you include define their own stream iterator specific overload of find and that doesn't match.

Yup, that was it.

After that, I had to install libpython27-dev, and add -fPIC. Then my 17 year old Python module that has linked-in C++ code runs just fine. I'm not surprised- I've been writing cross-platform code that runs for 10+ years for 20+ years.

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

#93

Earlier quoted context omitted.

If published research is based on a code base, then surely the documentation and working code is equally important than the carefully written paper.

No, the paper is what matters. The code is a means to generate the paper.

I agree, but that’s similar to saying the data is what matters, not the methodology.

In the research germane to this conversation, software is the means by which the scientific data is generated. If the software is flawed, it undermines the confidence in the data and thus the conclusions.

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

#94

I am not a scientist, but actually I think most of the code I wrote 10 years ago still is in production at different companies.

Companies with code in production have a short-term real incentive to keep that code running.

This is different from code from research projects, which is on many cases just run a few times, and in other times, written by somebody who has, if he / she wants to make any kind of career in the field, to change to a new workplace and will not have any time to maintain that old code.

There are a few long-running mayor science projects, say, in particle physics or astronomy, which are forced to work differently. And in these environments, there are actually people who have knowledge on both science and software engineering.

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

#96
post #82
post #60

Earlier quoted context omitted.

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

> Or is quality left up to the primary researchers? Individual researchers, and in many disciplines (like physics), there is almost no emphasis on quality. I left academia a decade ago, but at the time all except one of my colleagues protested when version control was suggested to them. Some of these have code in the 30-40K lines.

> protested when version control was suggested

Academics are strange like this. The root reason is fear: fear that you're complicating their process, that you're going to interrupt their productivity or flow state, that you're introducing complication that has no benefit. They then build up a massive case in their minds for why they shouldn't do this; good luck fighting it.

Doubly so if you're IT staff and don't have a PhD. There's a fundamental lack of respect on behalf of (a vocal minority) of academics about bit plumbers, until of course when they need us to do something laughably basic. It's the seeds of elitism; in reality we should be able to work together, each of us understanding our particular domain and working to help the other.

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

#97
post #8

Would an abandoned project I wrote 10 years ago still run? The code is probably fine, but getting it to actually run by linking up whatever libraries, sdks and environment correctly could be troublesome. Even a small pipeline a wrote a few weeks ago I had trouble re-running, because I forgot there was a manual step I had to do on the input file. Expecting more rigid software practices of scientists than software engi…

It's interesting that it's often easier to get something 25+ years old running because I need fewer things. Not so hard to find, say "DosBox" and and old version of Turbo Pascal.

This. In the last years, conventional software engineering has in many cases experienced an explosion in complexity which will make very very difficult to maintain stuff in the long run. This only works because over 90% of startups go bust anyways, within a few years.

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

#98

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…

I am all for open science, but you understand that the links in your post are the exact worry people have when it comes to releasing code: people claiming that their non-software engineering grade code invalidates the results of their study.

I'm an accelerator physicist and I wouldn't want my code to end up on acceleratorskeptics.com with people that don't understand the material making low effort critiques of minor technical points. I'm here to turn out science, not production ready code.

As an example, you seem to be complaining that their Monte Carlo code has non-deterministic output when that is the entire point of Monte Carlo methods and doesn't change their result.

By the way, yes I tested my ten year old code and it does still work. What I'm saying is that scientific code doesn't need to handle every special case or be easily usable by non-experts. In fact the time spent making it that way is time that a scientist spends doing software engineering instead of science, which isn't very efficient.

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

#99
post #87
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…

> their job is not coding To me, that's like a theoretical physicist saying "My job is not to do mathematics" when asked for a derivation of a formula he put in the paper. Or an experimental physicist saying "My job is not mechanical engineering" when asked for details of their lab equipment (almost all of which is typically custom built for the experiment).

On one hand, yes. But on the other hand, reuseable code, dependency management, linting, portability etc are not that easy problems and something junior developers tend to struggle with (and its not like that problem never pops up for seniors, either). I really can't fault non-compsci scientist for not handling that problem well. Of course, part of it (like publishing the relevant code) is far easier and should be done, but some aspects are really hard.

IMO the incentive problem in science (basically number of papers and new results is what counts) also plays into this, as investing tons of time in your code gives you hardly any reward.

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

#100
This is a challenge with many types of code.

Earlier this year it took me a weekend to get a 7 year old Rails project running again. It's a simple project but the packages it used had old system dependencies that were no longer available.

I ended up having to upgrade a lot of things, including code, just to get it running again.

Post reply on HN