https://www.grunge.com/327172/the-oldest-buildings-still-in-use-today/
While software longevity is not subject to weather and natural disasters, there are forces that impact software longevity:
http://laputan.org/mud/
If you needed to build software that does its job and stands the test of time, what choices would you make?
What programming language(s) would you use?
Why?
I don't think that the language its in matters a great deal as long as its one that has very wide and deep support. In today's languages, that would mean C/C++, Java, COBOL, and a few others that escape me at the moment.
The bigger issue is going to be hardware changes. A lot of the half-century software I've touched was written for mainframes from the '60s and '70s -- and it's still running today only because those mainframes are being emulated on modern hardware.
I think that, generally, the way you build software that will last is just to engage in excellent engineering practices. Document everything well, keep the code simple, don't get cute or clever, don't follow the fashion of the day, use good names for procedures and variables, don't use magic numbers, and so forth.
It targeted a specific niche that some government agencies have, and will likely continue to have, and which it is unlikely to have a commercial replacement. So no competition to knock it out.
It ran on UNIX, but was made to be very portable, as there were many UNIXen back then. It now is on Linux. It can still be built today, as dependencies are minimal. Even the Motif UI. People complain about auto tools, but that stuff is bomb proof and just works. Will your build system just work in 30 years? What about your operating system?
I paid a lot of attention to fundamentals, and especially smooth operation. This has enabled generations of IT support people to continue supporting the product.
I recently was re-engaged to do a new version of this software, updating it to use modern things that didn't really exist back then. Like a web UI instead of Motif. The main challenge with that so far is the short lived nature of anything in the javascript domain. Could someone build this software 10 years from now?
Modern practices assume easy connectivity to get resources from places not under your control. To achieve longevity, you need to bring all of those resources under your control and have a good plan to manage that.
For js this is what I have in mind. 1) You set and forget it, ie you work on it now or for a few years but eventually you’ll stop developing it and just let it live. 2) if the host provider dies (eg github pages goes away) you can easily deploy on the next provider. 3) you won’t ever rebuild it nor expect dependencies to be updated.
As a realistic example of this case, react is approaching 10y. I have small webapps I build with react in 2016, I certainly can’t rebuild them now, but the js produced in 2016 perfectly works. And if I want to improve them it’s faster to recreate them from scratch than going through the pain of upgrading (I actually did it for an app to learn svelte).
C/C++ for me it’s the case when you want to be able to recompile, that also means likely be able to compile on a platform that will be available in the future but is not available now. Cobol/Fortran are too old, go/rust are too new. Java I don’t know enough. But your main issue will be dependencies.
Rereading what I wrote, I think the main issue I see are external dependencies, if you really want to survive you should limit them to a minimum (or assume you won’t need access to them).
50 years: Make a library in Fortran. We are still reusing parts of old code and I'm not sure if it's Fortran 77 or older.
100 years: It may be hard.
* Minimize your footprint and test space in your application by eliminating features and options.
* Eliminate use of external dependencies. That means abandoning certain utilities and writing your own as necessary.
* Couple your application tightly to a given piece of hardware, like a very primitive RaspPi or some small hardware controller.
* Provide documentation. Keep it precise yet small, like a wrist watch instruction manual.
* Carefully consider your approach to data storage, if necessary. This can be a database or a file system or something else. Keep it primitive. Speed and cleverness are not important when the primary goal is archival.
* Consider the physical and chemical nature of the hardware. Metals degrade over time and plastic becomes brittle. A purely glass, crystal, or other silicon based media could last many thousands of years in isolation.
If you want something to last a long time make it a library and ensure it has few, ideally no, dependencies outside your language's standard library. Keep it as hardware agnostic as possible or make it clear where the hardware specific portions need to be included and how they can be separated back out and replaced with minimal disruption to the rest of the system.
If you make an application, divide it into at least two parts: presentation and business logic. Presentation portions tend to age the worst so you want your business logic portion to be as library-like as possible.
First, the technology choices are secondary to the organization that is charged with maintaining it. If the organization goes out of business and the software doesn't get picked up then it's lost. The exception to this would be widely used open source software.
Second, use boring technology that's easily extensible. If it's easier to build a new thing to replace the old rather than extending it, then it probably won't last.
Finally, the purpose of the software must stand the test of time. Think about the patterns/things in life that will still be here decades from now. For example, death and taxes :)
I have Flash games that are 20 years old that can still be played on Newgrounds or in the Flash archives. In fact I found out recently that a change was made in the Ruffle emulator specifically to allow one of my games to be played (it calls it out by name in the PR), which is pretty cool.
I worked on two Wiiware games and a Sony PSP game almost 15 years ago that you can still find in ROM collections.
Choices... Have a goal and call it done one day. Refuse to do any legacy support upgrades, only bug fixes. No external dependencies.
I think what youre talking about is a huge problem, you can't build a technologically advanced civilization if your foundation is built on shifting sand. Unfortunately, we don't yet know how to do it because all this is so new, and because the incentives are the opposite of what you need to make it happen. You tell a guy that when he's done he's fired and he will find a way to never be done. Very few will be excited to move on to something new after bearing their creation.
As an intern, I wrote some perl4 scripts to grab the output from a mainframe, modify and merge some stuff from another report. It was a quick demo intended to be used to test the “enterprise software” being developed by a big consulting company.
Their software failed the test, so they used my code temporarily… this was back in 1997. Lol
Still there as far as I know! I’d guess there’s another 5-7 years before someone does away with it!
Software is well… “soft” it must be flexible and ready to change 100% when requirements, context, environment, people change.
Im both sorry for and angry at those stubborn close minded developers who dream of creating a perfect system that will last forever — this is an ignorant utopian goal.
Please stop feeding your ego - you are not an architect of landmarks, you are just an engineer serving current business needs.
If you use minimal amount of dependencies and try very hard to keep the system simple then the language shouldn’t matter that much
The gear shop I worked in had a 1970 GE computer that used punched mylar tape controlling a 50 HP CNC lathe up to 2019 when they were acquired.
an analogy with constructions makes no sense, IMO.