inicio mail me! sindicaci;ón

Reflective Surface

Still powered by a contradiction in terms

Black magic, singularities, and genies

“On two occasions, I have been asked [by members of Parliament], ‘Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?’ I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question.”

Charles Babbage (1791-1871)

This is one of my favorite quotations in the field of computing. In the course of my career in IT, I had many opportunities to see similar situations happen. In fact, there are entire sites dedicated to collect real histories about incidents caused by this kind of perception, this cognitive dissonance between common sense and computer use.

The funny thing about such incidents is that IT professionals tend to blame users for most of them, even knowing they are as liable to fall in this kind of trap as people who only use a computer occasionally. After all, we, IT professionals, are still users, albeit of a different order of applications.

This reminds me of cargo cults. To those who are not aware of the term, it comes from the aboriginal religions that became common in the South Pacific after World War II. During World War II, the Allies established many bases in the Pacific islands. The necessary transport of large amounts of industrialized goods to those bases changed dramatically the lifestyle of the islanders, who benefited enormously from the contact.

After war, the soldiers moved on and the bases were abandoned. The cargo stopped coming, and many of the islanders started to imitate the procedures established by the soldiers in an attempt to bring the cargo back. They built new airstrips, and carved control towers, planes, and headphones from wood. They sat on the control towers they had built and waved landing signals in the airstrips, thinking that would attract the “favor” of the new gods. Of course, it brought them nothing.

In programming, there is also a kind of cargo cult where certain tools and techniques are concerned. Sometimes, the interface to a library is so esoteric and complicated that domain over it is never achieved, and programmers try to guess the parameters needed to result in certain responses. The fragility of the resulting code always leads to problems and hard to trace bugs.

Another example is the practice of trying to fix bugs by randomly changing parameters and code until the program works. There’s no attempt to understand the problem, only to solve it. The use of some functions and methods becomes a ritual, motivated only by the knowledge of what worked before.

Arthur C. Clarke, the famous science fiction writer, once said that any sufficiently advanced technology is indistinguishable from magic. It’s interesting to realize that many times programming is compared to magic, due to the arcane nature of some techniques.

The Jargon File defines some terms of this nature. For example, we have voodoo programming, which is the use of advanced programming recipes that not completely understood by their users, but that can be followed without the knowledge of their operating details. The use of Apache’s mod_rewrite is frequently mentioned as an example of this kind of programming since mod_rewrite incredibly complex but it’s also possible to find abundant examples to implemented almost anything a site administrator will need.

We have also black magic, which are techniques that work but nobody understands how or why. Black magic is a less evolved form of black art, which are theoretical techniques that nobody understands except their creators, and have not been implemented in code yet. As black art becomes practical, it stops being black art and turns into black magic. With time, it may become just heavy wizardry. There is also deep magic, which is more practical, but still not as accessible to common programmers. It’s interesting to see how Clarke’s law applies here. For example, comparatively few programmers understand how a TCP/IP stack works, but most of them can use one.

That also reminds me of the Singularity, the feared technological convergence that will cause the transcendence of some kind of intelligence to a level above the comprehension of our normal intelligence. Sometimes I think the Singularity is just a reformulation of Clarke’s law applied to a fast, exponential technological growth. The proliferation of technology, which tends to prevent generalization, would cause the emergence of more and more black boxes whose interfaces can be intuited but not fully understood. As those black boxes “learn” to replicate themselves and build even more sophisticated black boxes, full of Clarke’s black magic, the Singularity would arrive.

So we are back to the beginning. To the common user, those black boxes seem like magic wands, genies who are able to implicitly understand their masters’ desires and make them happen even if those masters can’t formulate their desires meaningfully. This explains the confusion Babbage perceived.

I think most of the success of languages like Ruby and Python (and also Smalltalk) is due to the clarity and readability those languages bring to the programming process. (Indirectly, it also explains why professionals who know arcane languages are valued.) Few languages are able to offer the kind of systemic vision present in both, which results in simplified development and learning, preventing the emergence of cargo cult programmers so common in languages like Java and C#. The interfaces to systems created using Ruby, Python, and similar languages are more explicit and easily understood.

All that makes me curious about the future of programming languages. I wonder if we will ever have a truly natural programming languages, and what would happen if we developed one. Programming would come close to the genie nature of black magic, where it would be able to process concepts instead of commands. I don’t know what would happen, but I’d certainly like to see it. Until then, I will keep having fun at the expense of my own mistakes, cargo cultism, and light wizardry.

Comments are closed.