r/computerscience • u/[deleted] • Nov 09 '19
Code is magic
I just had a wonderful realization and I thought I might share. To preface this, I always wanted to go to Hogwarts as a kid and learn magic. I became somewhat disenfranchised with the world as I grew older, but I have recently begun to rekindle a sense of wonder and excitement for the world.
A big part of that has been learning to code. I was thinking about this the other day, and I realized that I have essentially been learning magic by any standard throughout history, and for some reason I take that for granted!
Through a high-level language, we manipulate electrons in order to create symbolic information patterns that can accomplish real tasks - to anyone from any other time in history, if they could see us they would think we were literally witches and wizards.
At Hogwarts the students learn to predict the rough future through magic. I can do the same with data analysis, game theory, and machine learning networks. They can see things from the other side of the world - I just finished coding a security cam for my dorm. They can imbue non-living matter with sentience - robotics. They can manipulate life - bioinformatics - if I had access to the right tools I could literally breed glowing animals. Artificial intelligence adds an even cooler aspect to this given we might soon be able to create sentience from non-sentient matter! Even the bad powers, killing people, controlling people etc are real - consumer programming, psychometric targeting through the internet, drone strikes, malicious hacking, etc.
By extension, everything we are exploring in modern science is really magic. We don't really know how this stuff works or why it works - if you look at the physical constants of the universe they seem somewhat arbitrary. While we do have a good sense of the relational properties between things in reality, we don't know why they are what they are - like electrons! We know the rules that dictate their interaction with other things in reality, but we don't know why they exist the way they do, where they came from, or for that matter where any of this really came from! Somehow through all these layers of abstraction, from basic properties of atoms and forces, to high-level symbolic computation, we manage to actually do stuff, and that stuff is no less absolutely amazing! I don't think it's hyperbole to say that we're all doing real magic.
3
u/[deleted] Nov 10 '19
The way I conceptualize it, saying it is magic isn't supposed to trivialize the work of scientists or engineers, instead it's meant to lend an element of wonder to what is often considered boring and monotonous. Also, I don't think that saying it's magic should absolve you of responsibility to understand how it works - I think if anything that is further motivation to understand it! We don't really know why anything is the way it is though, just why things relate to each other the way they do. I'll give an example: When you touch a table, why doesn't your hand just go through the table? It's because there is electrostatic force generated between the particles in your hand and the table right? Yes, but what are those electrons made of, and why do they exert force on each other? Well we can describe the force mathematically, and we think the electrons are sort of probability clouds that have something to do with leptons, and we can describe the behavior of those mathematically as well, but what are they made of? What I mean to say is that it seems we have found mathematical relationships between things in reality and we equate that to "understanding", but it really isn't. Unless it is mathematical relationships all the way down, and reality is simply information, but then one must ask why the information is structured the way it is, why it holds the way it does, and whether the patterns we find in it like symmetry are there because "something" chose for them to be that way, or because they simply are. So, going back to my original point, I don't think we fundamentally understand what anything really is, we have just found ways to mathematically described the things we have defined as being "real", but we do not know what gives them "realness". Somehow, through are descriptions of these relations however, we can build devices and languages which allow us to interface with reality in ways would be considered magic to anyone else in history, and I would add that they are magic, or at least they will maintain that status on a fundamental level until we discover the origin of truth for our universe. I think if we ever discover that it will be so wonderful that the only conclusion will be wonder at the beauty, and I suppose magic of our reality.