Wednesday, February 24, 2016

What is coding?

What is coding?

Programming languages are fictional universes described by some of the brightest minds of our times. These universes come with their own rules and conventions, cultures and demographics. Just as authors use books to help you interact with their universes, you interact with programming language universes by casting spells that do everything from displaying a picture of a cat on the screen to obtaining classified military information through the Internet. We call these spells code.

Code is the essence of programs just as spells are the essence of magic. Just as magic is the whole process and experience from creating the spell to saving the world, it's hard to pinpoint what a program really is. Is it a program just because cannot or does not perform anything meaningful? Is it a program just because it's written on sand? Is it a program if nobody knows how to cast it anymore? These are questions we don't try to answer. The experience of coding is magical enough.

If you are familiar with casting spells, you will know that actually creating spells is no small feat. Spells work within specific realities, and code allow you to see the world through specific lenses.

Back in the old days these lenses tend to be centered around a computer - which is, for those of you who are old enough to remember, the equivalent of using magic wand gestures back in the days when magic wands were necessary for magic to happen. Nowadays, these lenses really depend on your context. Someone who casts code in the clouds would see the world very differently than someone diving into the mysterious intelligence of the Deep Blue. Pretty much like how young people nowadays cast spells with their toes or by blinking, whichever is currently fashionable. I still don't understand what is so sexy about casting spells with their toes.

How does one code? Same as casting spells. You need to know the basic invocation techniques, the actual words to use, be in the correct mental frame when performing the spell, and understand how spells interact with the other spells your peers or enemies may cast. You need to voice each spell with perfect accuracy - computers, just like magic, have no tolerance for incompetence. Spell casting is a performance art in itself.

Having said that, I'm sure the more experienced wizards are starting to ask, isn't coding, unlike magic, merely a matter of technical competency? That's where it starts getting exciting.

You see, unlike magic, where wizards rarely create new spells, in the coding world, each invocation of a spell is in itself a new spell. And just as it takes decades to learn how to create a good spell, it's the same for code. Good code is like good magic - it hints at you what it was created for and what it is capable of, while at the same time foresees how you may use it in an entirely different situation. It does not judge you, but when you invoke it, you judge yourself through its invocation.

Bad code is like a bad spell - ambiguous what it is supposed to achieve, and falls apart when you try casting it a second time. Certainly there are those who master bad magic so far that it becomes black magic - these are the masters we rarely get to know about.

So how does this code magic actually work? That would be another lesson.

No comments: