Live data from Hacker News

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

nature.com

31–40 of 487 posts

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

#31
Code written in Oak still works in Java 14. You can still write `public abstract interface BlaBla{}` and it still works. If it doesn't work (due to reflection safety changes in Java9), it sill surely compile with newer compiler.

Another thing, are tools used to compile still available? I tried to compile my BCS Android+native OpenCV project and failed quickly. Gradle removed some plugin for native code integration, another plugin was no longer maintained, it had internal check for gradle version and it said "I'm designed to work with gradle >= 1.x I'm sure if (would) put more effort into making the build process reproducible, it would work effortlessly, but I didn't care at the point. I wrote it using beta release of OpenCV that's also no longer maintained, because there are better, faster official alternatives available.

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

#32
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.

Sounds like simplicity for the win.

The complex house of cards we currently stand on seems fragile by comparison.

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

#33
post #18

Yes. 110% attributed to learning about unit-tests and gems/CPAN in grad school. IMO there is a big fallacy about the "just get it to work" approach. Most serious scientific code, i.e. supporting months-years of research, is used and modified a lot . It's also not really one-off, it's a core part of a dissertation, or research program, if it fails- you do. I'd argue that (and I found that), using unit-tests, a deploym…

And bugs can have quite big implications:

https://smw.ch/article/doi/smw.2020.20336

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

#34
post #19

Earlier quoted context omitted.

And that scientists also are rarely supported by programmers, or if they are it's an unstable and unappreciated position.

Ive seen job listings for "scientific programmers" where what they're asking for is a scientist who happens to know a little programming.

Yeah - who then likely doesn't have that much software experience, and worse, if they want to stay a scientist such a role is often a bad career move, because they help others get ahead with their research instead of publishing their own work. Even if they build some really great domain-specific software tool in that role, it often doesn't count as much.

Or it's an informal thing done by some student as a side-gig. Which can be cool, but is not a stable long-term thing.

I hope there's exceptions.

EDIT: weirdest example I've seen was a lab looking for sysadmins with PhD preferred. I wonder if they had some funding source that only paid for "scientists" or what was going on there...

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

#35

You often run into code of the "just get it to work" variety, which has the problem that when it was written, maintainability was bottom of the list of priorities. Often the author has a goal that isn't described in terms of software engineering terms: calculate my option model, work out the hedge amounts, etc. And the people who write this kind of code tend not to think about version control, documentation, dependen…

Even with all the best practices, things outside your control can cause issues. A lot of the code that software engineers write is subject to tiny bits of continual maintenance as small changes in the runtime environment take place. Imagine ten years of those changes deployed all at once. Even something employing all the best practices of ten years ago could be a challenge. You've got a subversion repository somewhere with the code which was compiled to run on Windows XP with Windows Visual Studio C++ 2008 Express but you've abandoned Windows for Linux. If you're lucky the code will compile with the appropriate flags to support C++98 in gcc, but who knows? And maybe there's a bunch of graphical stuff that isn't supported at all anymore or a computational library you used which was only distributed as a closed-source library for 32-bit Windows.

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

#36
post #8

Earlier quoted context omitted.

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.

Sounds like simplicity for the win. The complex house of cards we currently stand on seems fragile by comparison.

We also benefit, for that old stuff, from enthusiasts that build cool stuff. Like DosBox, Floppy Emulators, etc.

I doubt there are going to be folks nostalgic for the complex mess we have now.

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

#38
post #20

The two main problems in academia are that a) few researchers have formal training in best practices of software engineering, and that b) time pressure leads to "whatever worked two minutes before submission deadline" becoming what is kept for posteriority. When I started working as a full-time researcher, I had come from working two years in a software shop, only to find people at the research lab having never used…

Don't you think docker, dependencies, unit test frameworks, etc actually increase the need for ongoing maintenance as opposed to spitting out some C files or python scripts which last "forever"?

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

#39
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.

When I was in my 20s I managed to get a contract updating some control software for a contact lens company on the basis of my happening to own an old copy of Borland C++ 1.0.

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

#40

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…

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 competitive advantage". This is of course all nonsense, but my arguments are ignored.

If you want to help me (and others who agree with me), please sign this petition: https://publiccode.eu. It demands that all publicly funded code must be public.

P.S. Yes, my 10-year-old code is working.

Post reply on HN