Comment by dahart

Comment by dahart 11 hours ago

0 replies

Great question. It really depends. 10 years isn’t very long, so most well known languages & platforms will be fine. But 20 or 30 or 50 or 100 years, that gets more interesting.

I’ve kept all my dumb little side projects for my entire life, starting from Basic, Pascal & x86 assembly as a teenager 30 or more years ago, lots of C++ and OpenGL in college, python over the last 15 years, and HTML+Javascript mostly from ~10 years ago.

Surprisingly, the stuff that still runs with the least trouble from my teenage years several decades ago is the assembly code. Basic and Pascal I can do with emulators, but it takes more work. My C++ OpenGL projects from 15-25 years ago take some work to resurrect, but can be done. C++ command line code from 25 years ago compiles and runs without issues. Python from 15 years ago still runs, even the python 2.x code. HTML+JS from 10 years ago still runs without changes. My Arduino projects from 10 years ago might have bit rotted the most; they almost require starting over to get them going again.

Ironically even though the JS ecosystem has had some of the highest churn, I feel like it’s one of the safer bets, as long as you keep dependencies down. Don’t pull a ton of crap from npm/yarn/whatever. Use mostly vanilla JS+HTML, and it will definitely run on almost any OS and mobile device 10 years from now.

Anything with standards behind it necessarily moves pretty slowly. What C++ looks like is changing over time, but old code is pretty safe most of the time, and code written today should continue to work for 10 years easily.