I am building a small application that supports a research project. My goal is to make the code to be painlessly executable and readable on as many operating systems as long as possible.
My reasoning is that 2-3-5-10 years down the line I will work on a completely different research project, but my software may have to run again as well as modified again. The person who manages that code at that time should then be able to do that as painlessly as possible. This means, ideally, avoiding to install an entire OS from the present, that is outdated at that future time, together with legacy libraries, to make the software work and make changes to it. Note that I'm not looking for absolute solutions, as everything in computer science always changes, but something that is good enough! I.e. I would like to know what runtime is still useable yet changes sufficiently slowly and base my approach in that, so that my software's half-life is longest.
Non-solutions and their reasons (but correct me if I'm wrong):
Docker. While Docker makes code be more easily reproducible in present runtimes, by making the steps to have it run more uniform, sharing any code in a Docker container exposes my code to any change in the software that makes up the Docker ecosystem itself - so if Docker changes significantly in 10 years, there is no guarantee of backward compatibility. Thus, there's not guarantee for future-proof reproducibility, which I'm aiming for.
Assembly: I could of course code the whole thing in assembly (or compile it down to assembly if I code in a higher language, as I would), using a set of CPU instructions that is as restricted as possible that has high likelihood to stay fixed over the time span (e.g. a carefully chosen subset of x86). But that would introduce a number of problems:
-- It might be the case that things might break in such a process (already converting Python GUI applications to C can introduce weird bugs), making it harder to code the application.
-- An even bigger issue: I cannot read or make changes to my application. For that I would have to supply the (high-level) source code, but then there's again the issue the a future run-time will not support that source code.
Question 1: What would a good trade-off be in terms of future-proof reproducibility?
Question 2: I guess one good approach is to think 2-3-5-10 years backward. What existed back then that I could still painlessly execute but also read today? (Perhaps coding in C, as it is well supported and its standard barely seems to change with time?)
Question 3: How should I deal with 3rd party libraries? Assume C would be the best answer to the previous questions. To make everything work, I would need all the 3rd party libraries I use to also be in C and also ship them together with my application. Is there a better solution for that?