Can code run forever?
From reader Jonathan, regarding yesterday’s post about code:
> Once it’s programmed, it will run forever
ORLY? ;-)
I wish this were true and would be happy to learn that it is
He’s right, of course. While it’s true to say that in some way, code can run near infinitely1, anyone who’s worked with it for any length of time knows that code is not immune to entropy.
Packages need updating. Browser standards change. Operating systems upgrade.
The code could still technically work and run perfectly, but the world in which it’s run has moved on.
That’s why code can run forever; but if it can’t change, it’s worthless.
"Most materials that you can make things from, such as metal, wood, and plastic, fatigue. They break when you use them over time. Code is different. If you leave it alone, it never breaks. Short of the stray cosmic ray flipping a bit on your storage media, the only way it gets a fault is for someone to edit it. Run a machine made of metal over and over and it will eventually break. Run the same code over and over again, and well, it will just run over and over again." - Michael C. Feathers, Working Effectively With Legacy Code


The one exception being Bitcoin - deliberately hard to change, which locks in its value.