The APIs of Religious Experience

The holy is a serious business. Wars have been fought over the proper way to worship, and the contradictions and absurdities of religion can seem limitless.

What if we’ve got the wrong metaphor? What if didn’t think of religious and spiritual traditions as competing ideas about the One True Way, or as just exercises to make us feel good, but as a structured interface like the ones programmers use to make one computer talk to the other? What if “God” is an undocumented API?

API stands for Application Programming Interface.  To quote Wikipedia, an API is a “set of clearly defined methods of communication among various components.” APIs are how one computer program talks to another, and usually this means there are protocols for connecting, for requesting information, for sending and receiving, for confirming that information has been successfully received, and for disconnecting.

APIs are everywhere. Amazon, Facebook, Twitter, and Google have dozens of them. There are all kinds of cool things you can do with all these APIs, like winning quiz shows, turning Twitter into a newspaper or populating your personal library app with weighty tomes.

What if “God” is, or has, a few million APIs too? What if we thought of a prayer like a request to Google Maps? Absurd, maybe, but let’s think about it for a few minutes and see where it might take us. Let’s give it a try.

Of course, you may think that “God” is not even a relevant concept. Luckily, I won’t argue with you. The cool thing about an API is that you don’t need to know much about the program on the other side of the interface. If you know how to use the API, and you get the desired results, what you believe is mostly irrelevant.

Research seems to be indicating that using God APIs, or attempting to through spiritual or religious activities has some positive results, such as longer life, happiness, less stress, and even, in rare cases, possibly enlightenment.

You could argue that these positive results are outweighed by negative results like religious wars, fanaticism, and really overpriced cheese sandwiches.

But, if you look closely, you’ll see that most of these problems stem from somebody mistaking their particular God API version for the Whole Big Thing. And if you’ve got the Whole Big Thing, then somebody else ain’t got it, and you must be right while they must be wrong, and this can lead to superiority complexes of pathological and dangerous proportions.

It might seem offensive to compare religion to a web app. (I know some programmers who would be offended by this at least.) But, if we put our sanctimoniousness aside for a moment, I think the analogy can shed some light on what religious practices are actually doing, and help us look at our differences a little more technically and a little less personally.

Just the API

APIs are a structured way to connect and exchange data. The whole of the Google Maps code is far too complicated to connect to and try to interact with. That would be overwhelming. The API makes a certain portion of the program accessible to people who just want to get the latitude and longitude of the nearest pizza joint.

We can look at religion in a similar way: connection protocol, maybe authentication, data transfer, maybe sign off in some way, and voilà: API call successful.

One system can have many APIs. Canada Post, for example, has three different and incompatible APIs for getting shipping rates. Figuring out which one needs to be used for a given circumstance is almost as mysterious as choosing a religion, but that’s not the point. The point is that the API is not the system.

Where are the docs?

There’s one annoying thing about the APIs of God: the documentation is not so good. This can lead to all kinds of problems. In some cases, people get so confused about their API that they start worshiping the API, rather than using it to connect and transfer data. Or, they believe that their API is the only one, and therefor everyone else is doing it wrong and might need to be corrected for their own good, by force if necessary. Or, they let their API get so encrusted with extraneous bits that no one can figure out what’s actually the essential parts of the API and what’s a hack that was added by some programmer who couldn’t get some dependency linked up properly and forgot to add a comment on why the hack was needed for some particular case.

These are all easy mistakes to make when you’re working with a mostly undocumented API that nobody knows much about other than bits and pieces patched together from millenia of reverse engineering attempts.

Security

Supernatural APIs also have some security vulnerabilities. One is the man-in-the-middle attack, where you think you’ve got a port open to God, but actually it’s connected to something else, like maybe the back of your own head. This is why it’s good to verify your data with a behavioral checksum. If your API call tells you to do something that’s contrary to what other kinds of API calls generally recommend — something like blowing yourself up, burning witches, or massacring the Canaanites — then your connection has probably been hacked. Better check the connection logs and see what happened.

History is rife with examples of hacked supernatural API calls. They are particularly dangerous because there may be enough genuine API content getting through the hacked connection to bamboozle the onlookers into thinking you’re a boss programmer and they better follow you wherever you lead, because it’s sure to be groovy. But, the back-of-your-own-head part of the data stream can turn groovy into not-so-groovy fairly quickly, which can be a disappointment to everyone.

Protocol consistency

Deistic APIs all have their own procedures, just like other APIs. You can connect to Canada Post and get shipping data with either a REST API or a SOAP API, but you can’t connect with one and then try to get data with the other. It just doesn’t work. Godly APIs also have different protocols. The Zen API might involve spending days or weeks sitting still and pondering a riddle about dogs, while the Jewish API might require wavering back and forth and reciting verses from very old books. For squeamish modern humans who might be allergic to ceremonial protocols, there’s the no-God proxy API that might involve walking through a forest at sunset, staring out from the top of a mountain you’ve just climbed, stargazing, or discovering a new mathematical theorem. Or other things.

These APIs might all work, but that doesn’t mean they are all the same. You can’t mix two API protocols for double the data. If you try to mix APIs into, for example, a Zen Shiva Christ-Consciousness Shaman Warrior Goddess Moon Kabbalah Ceremony, you’re likely to get no data at all. If you do get data, you might want to give it a sniff before you stick it in your database. That kind of a glommed-together application is usually a security nightmare of the first order and is likely to have been already hacked a few times by Russians, the NSA, the Chinese, and even the video-game nerd living in the basement down the street. Caveat emptor.

It might be more technical than you think

To get data with an API you usually have to send something first. If you want info on a book from Amazon’s API you first have to get the connection going, which involves sending your API keys. They might look something like ZBJs7deF9KLJ2342FdVO. Based on this, we might say that Amazon is a strange, powerful creature that lives up in the cloud, and is hungry for long strings of numbers and letters. If you give it some it will make it happy, and then it will bless you with data.

Of course nobody believes this about Amazon. Who would want a long string of numbers and letters? With supernatural APIs we are, as usual, more easily confused. Some connection protocols include things like singing Hosannas, Hail Marys, or Hare Krishnas. One might conclude we’re dealing with a massively egotistical system that requires a lot of praise and flattery before it will do anything. Praise might be part of the protocol, but that’s no reason to anthropomorphize the system into a petulant teenager. Praising and Hallelujahs might have more to do with prepping the input buffer in your system than propitiating a higher power.

All these APIs have protocols and procedures and data formats and complex maneuvers involved — praying, for example, or staring at the stars on a clear night, or reading a wise book. But even if all the procedures are followed, it doesn’t always work. It’s kind of like connecting to Google Maps from my small-island radio internet connection: sometimes it works, sometimes not.

API calls that don’t work may be one reason most North American and European churches are mostly empty. A defective API call might be because a well-intentioned reformer, taking things literally, decided to delete parts of the API call without knowing how it actually worked. Or, it could be because the API call is being done improperly by mistake (in which case finding someone well-versed in that API and getting some tips might be a good idea). Then again, it may just not be the right API for the connecting system. There are many others, so don’t despair.

Do these APIs change? Are they always the same — so that one could connect with equal efficacy using the same protocol, say, in ancient Greece, and in modern Athens — or do they get updated from time to time, so we have to use new protocols? Or is it the other way around: are we changing over time, and the APIs are having to adjust so we can still connect to them? Who knows, but if we want to revitalize ourselves as a species, it might be a question worth exploring. What sorts of API calls could give us renewed connectivity to the universe and all of Life, quickly?

Excuse me, I’m just making an API call

For my adult life I’ve been a daily meditator and a software developer. Meditation, I’m sure, has made me a better programmer. Programming, has probably made me a worse meditator.

In exchange it has provided a few good metaphors, and — from all that troubleshooting — a couple of useful rules:

1. don’t assume you already understand what’s happening.

2. don’t assume you can’t understand what’s happening.

Metaphors are tinted goggles we can put on and take off depending how we want to see the world. Sometimes they help us see things we might have missed otherwise. This doesn’t mean one metaphor is more right than another. If it’s useful, use it. If not, find a new one.

The same applies to API protocols. If we look at religious and spiritual practices through the metaphorical lens of an undocumented API, it can help us see them with both compassionate and inquiring eyes. They may be beautiful, mysterious, and profound, but they also have a structure and pattern and internal mechanics that holds them together — just like a symphony, a flower, or an emotion. The technical and the numinous co-exist.

Happy connections.