A Programmer's View of The World

Tuesday, March 07, 2006

A Case For The Immutable Future

"Well, this sucks!" I remember saying to myself a couple of years ago when I first pieced this together.

For you see, I had just realized that despite all of my non-belief in any fate mumbo-jumbo, the future really is set in stone. We can't predict it, and that's pretty good for our sanity, but fact remains that the future can occur in one way and one way alone.

For a proof, I'm going to crop up a programming analogy. (If you're not into programming, I'm sorry, but you're not likely to get this.)

Suppose you were writing a Universe simulator. Ignore the fact that you'd never have the technology to actually run it at more than 1 frame/year. We're only after the theoretical aspects of writing it here.

You decide that it will be made up of these things called atoms, and you create a CUniverseAtom base class for them. You give it properties for X, Y, and Z coordinates within the Universe, number of electrons, and so on. Now, don't get on my case about how there be smaller particles than that in the universe. This is a simplistic analogy, and it still applies, even if you go 1000 orders of magnitude below atom level. I'm just trying to make it understandable.

Okay, so you have your little CUniverseAtom thingies, and you decide to put them to good use. You create a blank Universe, and run it. Sweet! It doesn't crash. :) Of course, it's duller than watching pies bake, but it runs.

What next? Since we're still in testing, you decide to prefill it with a number of CUniverseAtoms, and see how that goes. You run the Universe again, and now you have these CUniverseAtom thingies just lying there, scratching their electrons, and mainly being a waste of good energy.

Somehow it dawns on you that you'd rather be milking cows than watching those CUniverseAtoms do nothing, so you decide to put them to work. You spend a couple of minutes thinking up a really fancy function name, and you come up with UniverseTick. You set your program to run this UniverseTick thingy forever and ever, sort of like while(true) do{ UniverseTick() }.

Now for the difficult part. What should those atoms do? Oh, I've got it, let's have them attract and repel each other, so that instead of looking like boring blobs of goo, they look like interesting blobs of goo. So you start cranking this out, and you make the UniverseTick() function go through every single CUniverseAtom in your Universe, compare it with all the other atoms that are close to it, and decide where it should move. You translate this into new X, Y, and Z coordinates that you will apply at the end of the Tick().

You run it, and now on every tick the CUniverseAtoms move a little bit. It seems like you're finally getting somewhere. Then you spend the next 10 years in Xerox PARC "working on it". You run scrillions of tests, create more scenarios than you could shred in a lifetime, and come up with all these fancy ideas like exchanging electrons (where the little atom thingies go to the exchange office and trade electrons), quark degrees (where the atoms sit in class for hours on end learning about what they're made up of, as if they cared), and so on.

And it dawns upon you that this is as good a time as ever to end the R&D phase of the product, and finally release it. At which exact time Xerox PARC burns down, and since they had a no-offsite-backup policy (due to security reasons), you lose ten years of work.

Depressed, you start wondering how it all began, and manage to trace it back to an article you were reading on a blog about how the future is immutable. By which time, I'll have fled for Mars.

And so, if your thick skull didn't yet register why this makes the future immutable, let's just imagine we were living in the Universe you wrote. We're all made up of CUniverseAtoms all mistifyingly arranged together. Do you suppose your UniverseTick() function will ever misbehave? I'd bet that it will for the rest of all eternity do exactly what you programmed it to. That means there's absolutely no entropy in what goes on in that Universe. The UniverseTick() function will move the CUniverseAtoms in your head and body exactly as they're meant to move. There's no leeway there. We're talking about code here, not pizza that might or might not have enough pepperoni.

I don't think anyone will challenge the fact that everything that happens in our real universe happens because of strict rules. The atoms in your head are not random. They react to each other. The mouse you're now holding is made up of atoms, and they react with your hand the way they do because of a set of very strict rules. There is no randomness. It might seem to us that some things are random, but that's just because we don't really understand them yet. Anything that seems random, is in fact very strict. It's just that we don't know enough about it to be able to predict it.

What I'm basically saying is that the state of the universe ten years from now cannot be changed by anything. It will be what it will be, period. The future is for all eternity set in stone. If we had all the variables, we could predict exactly what will happen a zillion years from now. Nothing will go differently, because nothing can go differently.

Some of you might have thought of a way to disprove my little surrogate universe analogy. Let's assume that we indeed are currently nothing more than a set of CUniverseAtoms running in someone else's computer. What if one of the RAM modules in that computer is faulty? What if it sometimes corrupts CUniverseAtom locations? That's certainly going to change the output of the UniverseTick() function, and it's as random as random could get.

Well, no. Whether that RAM module is faulty or not is also set in stone, and it has no choice but to misbehave in the real universe if it is. It makes it all that more impossible to predict the future, but it doesn't change it. That RAM module would have misbehaved no matter what. It's what that entire universe's sequence of events led to.

And so I reach the end. I doubt anyone read this far, but if so, I'd like to hear your opinions. Realizing that the future is set in stone was surprisingly inconsequential to me. It made for great conversation material with my friends, but other than that I couldn't care less. It's not like I can predict it or anything. Now that would be a bummer, although for the sake of argument it wouldn't make the future any less immutable.

Or would it?