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.
2
u/satanikimplegarida Nov 11 '19
Piecemeal answers to points in your post:
Magic is by definition non-understandable, as it is not real, and that is my whole point about framing computing science as magic; CS is the complete opposite of magic; structured, algorithmic, disciplined, observable & testable, abstract, pure, a world of ideas. It may be HARD, but it is also understandable. Magic absolves you of understanding, something happens but there's no reason behind it.
I find the hand-through-table trope to be fun the first time you hear it, then it gets boring, and then it's straight up misleading. The reason for this? It ignores scale, and in CS the equivalent is the abstraction level. Emergent properties of things at larger scales are as real as everything else ; my hand not going through the table just exposes an incomplete understanding of the micro-scale world, and does not affect our understanding of the human-scale world in any meaningful sense. Using an appropriate abstraction level for conceptualizing is one of the most critical skills you can have.
If you want to discus subatomic particles, chaos theory and determinism, and by extension free will, feel free to feel 'a sense of wonder and awe' as all these things skirt the limits of humanity's knowledge. But that's not about what CS is about.
p.s. I might have gotten off the wrong side of the bed this morning. But I did tell you that I HATE magic. ;)