Magic and Progamming

By David Pineda

| Aug 31, 2026

Magic as a model for computation? Or language as a model for both?

For the last week, I have not been able to think about anything but magic—programming, actually, but the two are related.

On my quest to better understand how to construct software, I began with the abundance of resources available online. Most of them seemed to teach the same logic and pedagogy for learning. However, I felt that something was missing. What I found was mostly an introduction to concepts and good coding practices, but there was never really anything that unified software as a craft with a set of underlying principles. It seemed as though writing code was an art that had no shape. And as someone who hoped to make a career out of it, it felt colorless.

That was until I began to realize that magic and programming could be understood as two faces of the same metaphor.

I started noticing how technology constantly alludes to magic, sometimes even claiming that the two are identical. I don’t know exactly how I made the conceptual jump, but I began to wonder whether there might be something deeper behind these comparisons than metaphor alone. What if, after searching so long for an art, I was to find it in magic?

To be clear, I am not a practitioner of magic, nor am I referring to the stories about Satanists in Silicon Valley supposedly conjuring demons to construct software or computer chips. There were also claims that magical seals had somehow been used in the construction of computer chips. The rabbit hole went deep.

Nevertheless, I began to wonder whether the rules of a magical system could serve not only as a pedagogical tool for learning software construction, but whether software construction itself might be understood as an application of similar kinds of rules.

There was no authoritative source for these claims, save for one paper titled Software Engineering as an Alchemical Discipline. The paper does not answer whether the principles and practices of magic can actually be used to create software. Rather, it helped explain why someone like me might come to ask the question in the first place.

After some time, I realized that what I was looking for had already appeared as a problem within computer science. Is there a model or representation into which computer programs can be translated, whose rules can then be used to modify the program itself? There were several answers to this question. But it was enough to realize that I was not looking for a flowchart.

This realization came, ironically, from thinking about magical seals. I had initially thought that perhaps learning how geometric seals were constructed could somehow teach me how to construct better code. Instead, I discovered that I was really looking for a different way of representing computation.

Eventually, I found a useful graph-based model called interaction nets. With interaction nets, I can visually construct programs according to a set of formal rules. Yet even this is not completely satisfying. I Want to find a model who also creates the thing they are representing. 

What I really want is something that would help me construct a language of relationships and structures, rather than relying on the typical idea that programming is simply a sequence of instructions. And perhaps this is where programming becomes an art: in its ability to change the very model through which computation is expressed.

Perhaps my attraction to magic is not solely mystical curiosity. In this respect, I think of Newton’s interest in chemistry and alchemy. Whatever we think of alchemy today, it represented an attempt to understand and manipulate the world through a symbolic and procedural system. Perhaps my own attraction to magic comes from a similar place.

The discipline of software engineering is not solely defined by strict logical and mathematical understanding. Its current pedagogy may have overlooked a wider ground for language and expression—one that has contributed greatly, over the centuries, to the development of mathematics itself: the creation of larger and more powerful languages.

From an anthropological point of view, magic might be understood as a language for representing and manipulating processes. Perhaps, by respecting this primal human endeavor to create symbolic systems through which the world can be understood and acted upon, we can begin to see programming differently.

Creating a better model for computation might make software engineering more like magic than it already is.

Related Content