State permutations are to software what imagination is to reality

Every now and then, visionary people come along in the world who seem to be able to predict the future and create ambitious things from seemingly nothing. It’s not magic – rather, these people have a solid framework of the world that allows them to navigate it effectively. To understand this concept deeper, let’s use an analogy from computer science: software testing.

On the surface, testing may seem like tedious, repetitive work. This can indeed be true for performing the test steps themselves. However, the tricky part is knowing -what- to test for. In fact, it is one of the hardest parts of creating quality software, harder than writing code. Why? Because nearly all real-world software has an infinite number of states1 that it can be in, and discerning which of those states are important can be really tricky. And since it’s not realistic to test everything, we need to pick a few of the most important test cases, test those, and have reasonable confidence that the software will perform well.

Note that the key term here is “important.” You can test a thousand meaningless test cases, and be worse off than testing one critically important one. For example, if you’re building email/password login functionality, then the two most important test cases are 1) a valid email + password should log in and 2) an invalid email or password should show an error. Other test cases, eg. whether the system works with emails ending in .ca, .fr, .de, if it was already tested with .com, are meaningless from a technical perspective.

Writing code often focuses on a specific use case, a single path of execution, while testing focuses on a full understanding of every possible state. Developing this understanding is challenging, but it gives a much deeper insight than merely understanding a single flow of execution.2

The same idea applies to the physical world, and society in it. People’s imaginations about the future are analogous to test cases – each person has their own future “state” of the world that they want to see come true. Likewise, the what-actually-ended-up-happening is analogous to a specific flow of execution in a program. As an example, consider a vacant lot in a city – different people will have different ideas about what the future of that lot should be. A real estate entrepreneur might want to build a residential complex, while residents might want it turned into a park. A foreign dictator might even want the lot, along with the surrounding city and region, to become part of their country. A skeptical observer might think the lot will remain empty. All of these ideas are potential futures for the lot, and yet in a few years, one of them (or a combination of more) will eventually come true.3 In a sense, this is the "vector sum" of all the different directions, after they collided and interacted with each other.

In the example above, the imaginations of people are analogous to the possible future versions of the world, and the thing that actually gets built on the lot is a specific “flow of execution.”4 Just like in software, a deep understanding of the different potential futures and being able to discern which ones are likely to affect the physical reality is a valuable skill. It can mean the difference between being able to predict and navigate changes in the world, rather than simply reacting to them as they happen.

Programming isn’t the only area where this concept appears. It pops up in other areas of the world as well, only if you look close enough.

Notes

[1] Here, states refer to all the potential permutations of data in a program – the possible values of variables, data in RAM/SSD, user-provided inputs, etc.

[2] This, by the way is why automating programming tasks with ML is really challenging even for fairly easy tasks – it’s very difficult to teach the concept of relative importance to machines.

[3] To paraphrase Jung (great excerpt here): "if you observe the world outside, you see houses, people, you see the sky. You see tangible objects. But when you observe yourself within (through self-reflection), you see a stream of moving images, generally known as fantasies. You may say that “oh this is not real, it’s just my fantasy.” Yet, these fantasies are facts. It’s a fact that a person has such and such a fantasy. They're such tangible facts for instance, that when a person has a certain fantasy, another man may lose his life. Or a bridge gets built." A lot of things around you that you look at, your car, the house you live in, the company you work for. They were all fantasies at one point.

[4] The analogy has its limits, of course. The two most important ones being are that 1) the physical world is highly probabilistic, unlike software and that 2) at any given time, we can only see a single "flow of execution" that ended up happening, as opposed to software, which can be cross-tested many times. This, incidentally, makes it hard to do scientific experiments in the physical world, as there is never a good way of knowing "what could have been."

Thanks to Akshat Prakash, Laszlo Mari and Zsuzsa Baran for helping with drafts of this.


November 21, 2022
Subscribe
I send out occasional emails about new posts, scientific discoveries, frontier tech, and insights I found interesting. No promotions.
Thank you. You are now subscribed.
An unexpected error occured