r/computerscience • • 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.

162 Upvotes

47 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Nov 11 '19

Hmm... In the spirit of stubbornness I will offer one last reply.

I feel like you are correct in saying that posing code as magic to people who have no understanding of the rigor and structure that has been built up in the field over the last few decades is correct - you don't want people to think waving a wand gives them a hadoop framework because it is actually extremely complex. The point I am making more though, is that in order to truly understand something, you must understand all the components that relate to that thing - otherwise you have simply observed portions of the thing and understand its relational behavior, but not the thing itself. So, following this logic, given we don't yet understand the fundamental nature of reality, and rather have made observations about how pieces of reality we can observe and classify relate to one another - by definition, we do not yet understand how our technology really works and this lends it an element of magic (akin to a proto-human finding fire. Does it understand combustion equations?). You might tell me to fuck off reasonably and that compsci is about understanding abstraction levels and syntax and whatnot, but I would respond that in the spirit of abstraction levels, we can also position ourselves at different "levels" or perspectives to view the field as a whole. I have a job as a data scientist, and I never lecture my companies clients about this stuff, I'd be fired! With that said, to say that it doesn't relate to the field is disingenuous, because by definition in order to us to understand all these abstraction levels going higher and higher, we should be able to understand the nugget of truth at the bottom of the tower of abstraction - but so far as we can tell, at the risk of a cliche, it is turtles all the way down. We have not been able to find that nugget, and thus the whole tower of human knowledge (which CS fits neatly inside) appears to be somewhat wondrous.

I think perhaps where we may fundamentally disagree, but where neither you nor I can prove ourselves to be correct, is that perhaps you believe it is not magic because someday we will discover the rules, and this complete picture of the universe will be known, thus everything is explainable, and nothing is magic. I don't think this is possible, but lets say it was, and we found all the rules. So, these rules would then explain why reality spontaneously generated itself ~14 billion years ago in a massive explosion, from what we can only assume is some sort of void without time or space, with the very specific configuration of rules that we have been given? Ok, so now we are at a hypothetical point where we have discovered everything, and reality still seems arbitrary, and from this arbitrary nature beauty arises. At this point, perhaps it is a semantics issue, but I would choose to call that beauty magic - hence, my original point.

1

u/satanikimplegarida Nov 11 '19

Sure, I get it. There is a base layer from which all emergent marco properties of this world arise, and since we do not really understand that layer that well, everything is a bit magical, including CS. I get it.

...But I will still argue that this is not a terribly interesting thought to have, for two reasons.

First, regarding the magic from base layer permeating other things. Today I had a toast and coffee for breakfast, isn't this magical? After all, my breakfast was made up of electrons that I don't understand, thus it must be magical. Through this admittedly very sarcastic sounding example, the underlying point comes across: either everything is magic (including CS) or eh, magic is so common placed that it becomes overrated. The air we breathe, the rays of light coming from the sun, the sakura flower pedals in the spring... cancer, war deaths and plagues, the ebola virus... so much magic.

And the second point is this: CS has an abstract, mathematical quality in it. It comes from abstract ideas that are not tethered to the 4 basic nature laws of this universe and its constants. Think about this: 1 + 1 = 2. This is an idea, an axiom, something so theoretic that the dirty, arbitrary, magical world we live in cannot even dare to touch! This realization is chilling! If the CS-electron stuff is magic, then the world of abstract ideas is straight up forbidden black arts & voodoo! I mean, it's not even affected by this world, how crazy is that!!!

Your computer is a marvel byproduct of this world (see how I avoided using the word magic here), a marvel so advanced that can, given an input program, execute it at blazingly fast speeds. On the other hand, CS as a science is abstract, based on mathematic axioms (1+1=2) and is completely understood hence my original point that CS != magic.

Closing comments: if you want to discuss whether mathematic axioms are universal or tethered somehow into the properties of this world, a) I'm pretty sure we're entering the aristotelean metaphysics domain here so you'd be better served following that path of philosophy and b) eh.. r/computerscience is IMHO just not the place for it.

If you made it this far, let me belatedly apologize for my tone of language. It may be sharp, but I can't help myself; I kinda enjoy it ;). I thought about it for a bit and I realized I'm actually not achieving much by using it, other than coming along as standoff-ish and smug.

1

u/[deleted] Nov 12 '19

"Think about this: 1 + 1 = 2. This is an idea, an axiom, something so theoretic that the dirty, arbitrary, magical world we live in cannot even dare to touch! This realization is chilling! If the CS-electron stuff is magic, then the world of abstract ideas is straight up forbidden black arts & voodoo! I mean, it's not even affected by this world, how crazy is that!!!"

Now you're getting it! :)

1

u/satanikimplegarida Nov 12 '19

I know i "get it", but for completely different reasons to you, do you "get" that? You get why I'm unexcited by toast and Ebola?

1

u/[deleted] Nov 13 '19

I am excited by both toast and ebola.

1

u/satanikimplegarida Nov 14 '19

...we have descended into madness.