the Dream of Formal Science
Whenever I was being asked “What’s your hobby?” my answer has always been programming. I never enjoyed sports, instruments, or art, those that are normally thought as hobbies.
I’ve always been a truth seeking kind of person. I liked reading encyclopedias, learning about science and biology. I was once asked what I’d prioritize between wealth, power, fame, beauty, and decisiveness, I firmly chose the last. What use would be left for everything else if one doesn’t know what’s true? I had a dream of understanding everything, maybe one day. Maybe everything would be solved, and I can confidently say whether what I’ve done were right.
Though, the deeper I learned about the world of science, the more I realized that most of the sciences run on statistics. Physics operates by generalizing phenomena, chemistry by generalizing interactions, biology by generalizing behaviors. One would rightfully question, by relying purely on statistics, won’t whole branches of such research collapse if the assumptions were found to not be correct? The answer is yes, and such events have already happened many times before.
It was dissatisfying to me that a theory could be later claimed incorrect because it only works most of the time, or rather, dissatisfied that such a theory is claimed to be true to begin with. At some point, science to me just became a field in which everybody argues whether a theory is good enough, such that most people in most circumstances won’t care.
Ah, right, there’s a field that I haven’t covered so far. Math.
Math is treated as “one of the sciences” most of the time, but is in some ways distinct from the others. Math has a universally agreed foundation, which is called axioms. In Math, you don’t worry that your theorem is incorrect because some god would suddenly come out laughing and say “well that gravity thing you’ve been working on isn’t actually a real force.” You only worry about whether you have sound reasoning or not. And when you found a contradiction, you know it’s definitely because someone made a mistake along the way, whether it’s yours or not.
Some would say people studying pure math would see their study as superior to other fields, and I’m not sure whether this article is more of an agreement or explanation. In any way, you would probably agree that the sound foundation of math would give you more confidence in your studies.
As much as I, and many others, would love to have such confidence on everything we do, there always seems to exist a cavern between math and the real world. A cavern which on one side is the sound foundation of axioms, and the other is where everyone resorts to using statistics.
Except where it doesn’t, and that field is called computer science.
Computer science doesn’t use statistical observations at its core. Instead, everything is based on Turing machines. Computer is built on proofs from the axioms of math, with a deterministic set of processor instructions, that can be made to interact with many areas of the real world. It is surprising that we could build a realm in electronics where everything is (almost) deterministic. Where even the ones making circuit boards would try to escape to, out of the fears of the complexity and uncertainty of electronic components. Just think about how few devices don’t have a microprocessor in them these days.
I approached computer science like every other science, to question everything until I’ve arrived at the bottom. I figured how to make stuff in PowerPoint move. Then, I learned about Java, which university students learn to tell their computer to do things. And learned that PowerPoint is just such an application built on this thing called programming language. Then, I learned about a more “efficient” language call assembly which every other language ultimately get translated to, and I had a miserable time writing it as well. Over the coming years, I learned how different languages gets compiled and executed, how instructions gets JITed into μops and scheduled, and how logic gates get combined to compute basic arithmetic.
After which, I come to realize, that the foundation of programming is sound. Everything is based on rigorous math. And if a program behaves a certain way, whether intentional or erroneous, it’s because someone wrote it that way. I loved creating programs that I know will behave as what I’ve described, that will be shown to others as what I thought, and help others as I intended.
After learning about open source, I also learned to consult others’ code. Whenever I thought something isn’t behaving as intended, or is uncertain about the behaviors, I know to just read the source code, and every mystery will eventually be solved. This is also what I like about open source, that everything can be read and understood, and every error can be pointed at and fixed.
It sometimes feels like I’m living in a dream, a dream in which the truth is all known and we all agree on each other by the contract of code, logic, and math. The dream of formal science.
Unfortunately, I would guess many arriving at this point of the post would already have realized the glaring holes. The uncertainty of machine failures, the lack of visibility in proprietary software, and more recently, the rise of AI generated vibe code which no one ever reasoned. In many’s eyes, programming is already far from being a formal science. Since in real world systems, you would hardly have the ability or time to reason about everything, and it mostly seems like we are continuing trending that way.
Maybe some day, my dream of working with a transparent and trustable systems will come true. Maybe some day, everyone would value about the soundness of the programs. Whether possible or not, it’ll continue be a dream of mine.