Can Software Be Durable?

39 points by maraoz ↗ HN
What would you change about software development if your apps must last 50 years? What must software developers do differently to build apps that will still work 50 years from now? Can software be durable?

22 comments

[ 2.1 ms ] story [ 48.1 ms ] thread
I've thought about this problem also, and I would love to see in-depth analysis. It would be important to pick hardware that has been widely deployed and can be easily sourced in the future. Documentation must be written in a timeless manner rather than a concise manner. Dependencies should be kept minimal, even OS level system call dependencies.
I've been in this industry now for 35 years, and while there is some tech from my starting point that is still around, works fine, and could still be used effectively today... few people know how to use it, so from a pragmatic perspective, it is useless.

So your starting point for this question needs to focus on that evolution of talent. Your app needs to be well-defined and compartmentalized so that each layer can be refactored when (not if) the talent pool dwindles to nothing. You need to develop a strong refactoring culture not only to handle the reality that the best thing you deliver today will be tech debt before the 50 years are up, but that whatever problem it is solving today will likewise evolve.

The durability you seek needs to be ironically focused on change management.

This is based on fundamentalky wrong assumption that software is something like a hammer or a bulldozer.

Software is more like a plumbing. It a) wears out b) requires maintenance c) people maintaining it is integrated part of the whole system.

I do have a project that's been running about 25-years. But it's not static - new features are added, bugs are fixed, and it just keeps going. Some of the code and the overall architecture are original but there's plenty of new.

That said though, the vast majority of projects I've been on are probably no longer in existence. This is why I take a more casual approach to most projects - I see it as somewhat temporary and it doesn't make sense to put so much effort into a clean project.

We’re coming up on 50 years for Space Invaders. We can say that it’s endured because:

- it’s self-contained: it works without dependencies, and with the hardware it was designed for

- there’s an ongoing need: peope want to continue playing Space Invaders

- it’s transposable: the environment it runs in can be recreated through additional layers (emulators here)

- it’s recreatable: the core concepts behind Space Invaders can be reimplemented in the prevailing contexts of the time

Given existing examples, be useful (or appealing) enough relative to the complexity of the ecosystem it depends on that people are willing to maintain the means to run it, whether by porting, compatibility layers, or full emulation. Being open-source helps a lot there. Being small and/or efficient enough to run acceptably even with these layers can also help.
(comment deleted)
Stop chasing trends and changing for the sake of change. At my job, management is constantly forcing us to reinvent the wheel. The systems we used 15 years ago would still work fine, and be very robust and mature by now. Instead, with each re-write new gaps and bugs come to the surface. For some reason we choose to live in Groundhog Day, instead of making the choice to prioritize cheap, boring stability. Each new solution feels more fragile than the last. When we know someone will tell us to throw it all out in 2 years, there is little incentive to prioritize durability.
> At my job, management is constantly forcing us to reinvent the wheel.

It's called; sustaining the gravy train. Why fix something once when you can "fix it" over and over again...? Grifters and posers.

An example worth considering is TeX, which is now 43 years old (considering only TeX82; the earlier TeX78 was a substantially different piece of software). There has been some maintenance over the years, it's true, including a few feature additions in 1990 (TeX 3.0), but I would suggest it has shown itself to be extremely durable.
Simplify as much as possible and reduce the surface area: the least amount of code, the least amount of dependencies, the least amount of infrastructure.
Use the least amount of dependencies, only old mature stable APIs, obviously offline only. This way you can be pretty sure the environment can be easily emulated.
There's fifty year old simulation software in use today. I ported some to semi-modern x64 and learned things I've gratefully forgotten about floating point in the process. Also that "VAX" and "SUN" Unix behaved differently, for whatever that's worth.

I would say that was viable because it had zero dependencies and could be built with the equivalent of gfortran *.f77, provided one changed the source in plausible looking ways first.

If your software relies on fetching things from the Internet it is probably doomed within a year or so and surely within a decade.

Wouldn't bet on today's up and coming language still existing either. C89? Will probably still build fine with some compiler passing appropriate flags.

Hardcoding x64 or aarch64 assumptions likely bad for longevity too, as both are surely gone before 2075 ticks around, though equally I couldn't find a VAX and still got that code running. So that's more about minimising the cost of porting rather than anything fundamental.

C and Java are the most durable in different ways.

- C gives you the least likely to be broken by evolution of OSes without added effort, because they need backwards compatibility.

- Java will be even more durable as it can be implemented/fixed after you compile your software. I ran my games compiled 20 years ago on a Risc-V computer flawlessly = not a single glitch! That said it requires JVM efforts to be maintained.

Oracle is heading the wrong direction in every aspect (removing fundamental features like sandbox without a clear path to replacement), but the bytecode standard will prevail, ahead of clones like C# and WASM.

That said if you make a VM why not have it JiT/AoT on all 3 bytecodes?

Either way the JVM is the final emulator, as long as it's maintained.

You need to answer this from many directions:

* Hardware * Network * Storage * Electricity

Before go to software, because if the hardware break then what?

After it, you need an OS where you can be certain don't depend on the cloud or phone home ever, then after that you probably need a decent set of:

* Solid programing lang: Like Rust * Or very barebones: Like C * A RDBMS like sqlite

Set of tooling like code editor, image, etc

You mean like the Voyager probes? https://en.m.wikipedia.org/wiki/Voyager_program

Almost 50 years old now, and still sending data.

What would I change about software development now to program like they did 50 years ago? I would program like they programmed 50 years ago: assume it has to work. Assume updates will be risky and expensive. Build in failsafes and watchdogs and redundancy. Be able to replicate the build every year for 50 years. Train people to know what the logs really mean, every year for 50 years. And launch it before the bike shedding can begin!

I just saw somewhere else that NASA has a manual on exactly this -- apparently there's software running on satellites 30+ years without crashing

Also those tales of C64s running HVAC systems for 30+ years. Aren't there German trains running Windows 3.1?

I guess i am making an assumption that if it's lasted 30 years, it'll just keep going.

Could you post that manual? I'd be interested in it!
The suite of amateur radio applications I began developing in 1990 are still under active development, with an estimated tens of thousands of users around the world. I typically make several new public releases per month.

The current number of reported but uncorrected defects across this suite? Zero.

This is a principle that can be applied outside of this question, but is applicable here. Many non-engineers view software as an asset, *it is not*. Every line of code is a liability, so minimizing the size of a codebase and limiting the complexity of distributed systems (If posible avoid DS's) is key for good reliable software.

If the code needs to be fast (written in a systems language like C, C++, or Rust) write it in Rust. It will limit the amount your can shoot your foot both at the compilation stage and while writing the code (You have to think about what you're doing to avoid the compiler yelling at you. Otherwise, for the love of god write your project in a simple garbage collected language. Not having to handle memory directly removes a lot of what can go wrong.

The most consistent non-durability I see these days is business logic intertwined with external (API / file system / env vars) resource access - all scattered throughout layers of a codebase.

(Basically a violation of Factor IV in "Twelve Factor App" [^1])

Certainly not the _only_ durability concern present, but it seems to crop up more extremely and in more places.

Dependency Injection can help mitigate this a little but seems to often be a crutch which covers for poor architecture and enables eventually atrocious readability (a sad admission as I'm fundamentally a fan)

TLDR I find a good question to ask is whether the core logic and journeys can be executed in total isolation from any real resources. If it can't, you'll likely have a rough time testing, maintaining, or scaling - or at least changes will be more troublesome than they could be

(NB: bunch of sibling comments saying similar - but felt worth highlighting the local-first / isolated / separable aspect)

[1^]: https://12factor.net/backing-services