Live data from Hacker News

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

nature.com

1–10 of 487 posts

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

#3
Back in the 80s/90s I was heavily into TeX/LaTeX—I was responsible for a major FTP archive that predated CTAN, wrote ports for some of the utilities to VM/CMS and VAX/VMS and taught classes in LaTeX for the TeX Users Group. I wrote most of a book on LaTeX based on those classes that a few years back I thought I'd resurrect. Even something as stable as LaTeX has evolved enough that just getting the book to recompile with a contemporary TeX distribution was a challenge. (On the other hand, I've also found that a lot of what I knew from 20+ years ago is still valid and I'm able to still be helpful on the TeX stack exchange site).

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

#4
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, dependency management, deployment, and so forth. The result is you get these fragile pieces holding up some very complex logic, which takes a lot of effort to understand.

IMO there should be a sort of code literacy course that everyone who writes anything needs to do. In a way it's the modern equivalent of everyone who writes needing to understand not just grammar but style and other writing related hygiene.

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

#5
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 engineers would be wrong. I don't think they should have to tangle with this, tools should aid them somehow.

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

#7

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.

If it's still in production, it's most likely still getting some level of maintenance attention as well. When I was an undergrad I did some coding for some of the professors at the college. A lot of scientific programming is stuff that gets written and run once and never run again. Try dusting off some 10-year-old C++ and try compiling it with the current version of your compiler.

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

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

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

#10
Scientific programming is a perfect storm of extremely smart people, with strong abilities to do it themselves, distain for the subject matter, and no direct experience with the price of failing to write portable code. In some circumstances, even parameterizing scripts so that they aren't re-edited with new values for every experiment is an uphill fight, never mind having promotion through environments.
Post reply on HN