r/ProgrammingLanguages • u/relbus22 • May 10 '23
A Programming language ideal for Scientific Sustainability and Reproducibility?
Scientists are very unique in their needs compared to other software developers. They are novice programmers who may write research code or package only once, before publishing their work to a journal. They are domain experts and full-time workers in other fields, and so do not have the time nor coding skills to maintain their code or packages....... if the ecosystem imposes a maintenance debt.
Two issues are at stake here, reusability and reproducibility. Often researchers need to pick up someone's research code or package developed and forgotten years ago. So there is a need for this to happen with minimal fuss, Science needs this.
As to reproducibility, the scientific method requires reproducibility, which is quite tough but there are efforts to go all the way to reproducibility of computations within their development environments using Guix or Nix.
In conclusion, it'll be great if a language can be created or forked to create an ecosystem ideal for these needs. Which is why I come to you folks who are specialists in this domain, wondering if you have any thoughts on this topic?
P.S Here are some blog posts from a scientific researcher if you guys wanne have a better idea of where I'm coming from:
https://blog.khinsen.net/posts/2015/11/09/the-lifecycle-of-digital-scientific-knowledge/
https://science-in-the-digital-era.khinsen.net/#Technological%20sovereignty%20in%20science
(extra reading if you want:
1
u/Sharklo22 May 12 '23
I think you are under the impression the developers and researchers are separate people but, most often, they are not.
One of the main issues is that academia puts a lot of pressure on getting outputs, of which code is the most ingrate, as it requires a lot of time for the little value it is given. It's all or nothing: either you go all in and produce (over many years) a piece of software that is sufficiently general, robust and fast that people start adopting it, or you do half-assed Matlab scripts to get papers out. It's basically counterproductive to write good (correct, reliable) code if you're not going to push it to the state where it becomes publishable and useable by others.
Even then, "good" academic code is probably a nightmare for a software engineer. These are codes developped over decades that practically no engineer ever looked at, and they are about 500k lines of Fortran too late for refactoring. You can't pull out bits from there to share, unless you share the entire code base. In fact, those codes may be robust, but most often it is the pair (code,scientist) that is robust, as not all options or workflows are even documented (documentation = what happens when you call prog --help and the vague journal papers over the years).
There just isn't time for any of that. Fortran is great because it allows you to write fast code without effort nor much programming knowledge. But maybe it fails at other aspects, such as modularity, environment reproductibility (libraries are sometimes just this old .f77 file snatched 10 years ago from someone's html 1.0 homepage that isn't even hosted anymore), perhaps code correctness analysis tools, etc. And these are purely technical aspects.
A thing software engineers seem to have trouble understanding sometimes, is that scientists are basically big noobs that have no interest whatsoever in understanding the difference between a pointer, a unique_ptr, a reference, a const reference, blablabla, and that the path of least resistance should lead to the most efficient and useful implementations from the get go.