Abracadabra – July 3, 2011

Magic has traditionally used the spoken word, or incantation,1 to precipitate its power. In the Harry Potter world of J. K. Rowling, the spells are just one or two words—usually with a Latin flavor—spoken with particular emphasis by persons of a wizarding nature, and the spell is usually supported by a wand or other prop. In the memorable Black Easter of James Blish, all magic is performed by conjuring and contracting with demons, but the conjuration must still be spoken, aided by the use of particular configurations, signs, and instruments, and adhering to strict rules and formats.

We are now living in a magical age indeed.2 We have achieved, on an everyday level and accessible to the common man, a degree of magic to which priests, conjurors, and charlatans going back to the ancient Egyptians could only pretend. With a few words, whether written or spoken, we can control vast machines, both physical and metaphysical, to produce vast riches, carry us bodily to far places, spread our voices and bring us tidings, and otherwise do our bidding.

The incantation may be as long and as complicated as writing a hundred thousand lines of C++ code or Java script. It may be as simple as placing a fingertip on an icon on a touch screen—which then invokes those thousand or million lines of complicated script.

My fellow Baen Books author Rick Cook caught the flavor of this in his Wizardry series. A systems-level programmer from our world is transported to a world where magic is ascendant. He quickly becomes a champion wizard by regimenting all the complex magical spells under programming rules and automating them with a Unix daemon. The fun ensues as he befuddles the archaic magic users who are stuck in their old ways.

If you don’t believe that computers and their code run our modern world and provide us with the power of truly advanced magic, consider the following.

Every robot you’ve ever seen or known about, from the tiny Roomba that sweeps your floor to the Cave Crawler that explores old mines and performs underground rescues, is controlled by a computer. They have sensors for detecting their environment and chips with hard-coded rules for moving and stopping. They and the machines to follow are the golems of our time.

In modern factories, the flow of goods—from the incoming materials deposited at the loading dock, through all the steps of processing and manufacture, then into inventory and out to the loading dock again—everything is tracked by a computer using barcodes and scanners. No one is running around with a clipboard anymore, asking where the boxes of vacuum tubes have gone. The individual processing lines and their robots are certainly controlled by computer. Where refrigeration (called “cold train” in the industry) or other special environmental factors such as humidity are required, storage conditions are monitored and adjusted by computer. In the most automated factories, the physical movement of goods and their processing with machines and robots is orchestrated by a computer system that runs the motors on conveyor belts, measures the entry and exit of materials and goods in surge bins, and adjusts the processing speed of each section to keep the flow smooth. The software controlling the computer may be hard-engraved on a chip or called into memory from a disk, but somewhere in its history are lines of code written by a programming wizard.

If the factory is automated, so is the store where you buy the goods it makes. If you go into a Home Depot or Wal-Mart, you won’t find anyone with a clipboard running around taking inventory of goods on the shelf. All modern packaging bears a universal product code (UPC) that uniquely identifies the item. Pallets are scanned at the loading dock and entered into the computer’s inventory. Items you buy are scanned at checkout and removed from inventory. When the inventory gets low, computer software notes the fact, consults purchasing trends both in store and nationwide, and reorders goods at the prevailing sales level. Every transaction goes through accounting, along with your payment and the invoice from the supplier. Accounting is a computer, too, as are payroll and purchasing.

If you step onto the local subway, light rail, or train system, you’re putting your trip under computer control. Every block of track, switch, train movement, and station announcement is either controlled or monitored by a computer. No one is running around throwing switches by hand. In the most automated systems, like BART in the Bay Area, a central computer directly senses the presence of the train on the tracks, controls its speed, stops it at the station, and announces the train’s imminent arrival with real-time estimates. And every action is a line of code—a written incantation—in the computer.

Computers are essential to the design of every new aircraft. Humans may suggest new wing shapes and engine capacities, but computers finalize the details. And no one is producing engineering drawings and schematics with a pencil and a T-square. The final shape is dreamed in a computer. In the most advanced planes, the pilot is no longer heaving on controls that move the flight surfaces with pulleys and cables. They move by hydraulics—oil running through pistons, pumps, and pipes—and computers operate it all based on inputs from strain gauges attached to the pilot’s familiar control yoke and rudder pedals. It’s called “flying by wire.” Behind the wire is a programming incantation. The movement of airplanes through the sky are tracked by computers attached to radar stations. Human air traffic controllers may give voice commands to human pilots, but those controllers know about the situation in the air only by staring at computer screens.

The car you drive used to respond to mechanical inputs. When you pushed on the gas pedal, a lever opened a throttle plate in the carburetor. When you pushed on the brake, it put pressure on hydraulics through a master cylinder. Now electronic systems—computers backed up by lines of code—operate the engine and monitor the braking system. If you drive into the mountains, the engine management system adjusts the fuel/air mix for reduced oxygen. If you brake aggressively on a slippery surface, the computer in the ABS system will override your foot pressure and ease the brakes to prevent the wheels from locking up and skidding.

There was also a time when, if your battery was dead, you could start the car by rolling it downhill in second gear and popping the clutch. The distributor would spark mechanically, the carburetor would feed a bit of fuel by gravity, and the engine would catch and run. Now, of course, if your battery is dead, the engine management computer is asleep and no amount of rolling friction will wake it up. Time was, also, when a thief could hot-wire a car by rubbing together two wires leading to the ignition switch. Now that switch and the key that operates it are only a convenience. The real protection and authorization to start the car is a radio-frequency identification (RFID) chip buried in the key head. It communicates with a reader that talks directly to the computer. No signal, no start—no matter how many wires you rub together.

If you think the bank holds your money somewhere in coins or bills or gold bars, think again. Most banks on the street have some ready stash of bills and coins. If you ask for it, some of them may be denominated and handed out as “yours.” Similarly, the U.S. Treasury has some gold bars at Fort Knox—but don’t try asking for them. Nowhere is the physical amount of money in the system equal to even a small fraction of what the economy and your bank think of as “money.” Your account is an agreement between you and the banking company, and between the bank and anyone to whom you owe, or who owes you, money. The bank enters certain zeros and ones into your account on deposit, and removes them on demand, representing a sum you all agree represents “your money.” But it’s actually just promises, tracked and pledged by a computer. The transactions are just the bank’s computer talking to other computers somewhere else.

And, finally, any of our human transactions taking place between people outside the same room (and sometimes even among people sitting next to each other) are facilitated by computer. The phone system doesn’t use a “switchboard” anymore; it’s all done with computers. And your voice isn’t the amplitude modulation of a carrier signal, but instead it’s digitized, packeted, and sent in pieces down the wire. Your Tweets, your Facebook page, the information streaming over your computer or iPad screen—all are computer generated and computer enabled. Even the page you’re reading now is backed by lines of code and stored on a server. (To see some of the HTML programming, go to your browser’s command menu, pull down on the tab that says “View,” and look for a command using words like “Source” or “Coding.”)

Modern civilization, at least among the developed countries, is an interlocking series of “abracadabra” incantations, executed by software daemons, using the engines of chips, disks, and circuits.

If you’ve ever done any programming,3 you know how finicky and precise the language can be. The old English-class bugaboos of grammar, syntax, and punctuation apply with unbelievable force—but using new rules, depending on the programming language. Drop a comma, or put the semicolon inside the quote mark instead of outside, and you won’t merely be thought unlettered by the people around you. You will see the machines stop dead, or give false answers, or light up your screen with strange colors.

Bugs and glitches in even the simplest programs used to be common. Now, of course, much of the code that runs our machines is modular, written and checked by computer programs themselves. This is called computer assisted software engineering. Humans only intervene at the highest levels of programming—that is, deciding what the “abracadabra” should actually do. Glitches arise only because there are so many millions and millions of lines of code that undreamed-of combinations and conflicts are bound to arise . And in any system approaching the scale of grains of sand on the beach, random errors will creep in because of cosmic rays, mechanical errors, and tiny voltage fluctuations. And so the bug fix for the next version collects. But none of it is actually, ahem, a human error.

We live in a world run by sufficiently advanced magic that humans are not really in control anymore except at the very top level. All of this has happened in the last forty years, with the advent of the microchip.< sup>4 Today, we only invoke the daemons and then stand back in wonder.

1. From the Latin incantare, meaning “to enchant.” But consider also that this word includes the Latin root cantare, meaning “to sing.”

2. Of course, as Arthur C. Clarke wrote, “Any sufficiently advanced technology is indistinguishable from magic.”

3. My own dealings with computers go back to 1979 and a spiffy little Apple II that I bought because it was, well, a computer and I never had a chance to own one before. Using it was a combination of running programs you bought on tape or disk and programming your own in BASIC. I learned a bit of BASIC and even started to learn the machine’s structured language, Pascal. I had dreams of writing code and creating games as a way to get rich. Then I saw my first Pong game that invoked gravity and I knew that, far from getting in on the ground floor, I was way out of my league and that only people with solid wizarding credentials would make a go of this. But I still like using computers.

4. My father was a mechanical engineer who started working between the world wars at Bell Labs and finished his professional career at Sylvania. He used to say that two facts of modern life in the twentieth century had gone generally unnoticed by the general public. One was the revolution in materials—with the chemistry of polymers and alloys replacing basic materials like rubber and steel in everyday goods. The other was the increasing number of small motors in our lives. When he was a boy, the average person might have one pump out at the well to draw water, an engine under the hood to power the car, and maybe a couple of household motors in electric fans and the phonograph. In his lifetime we suddenly had motors all over the car to run the wiper blades and roll up each of the windows; motors all over the kitchen to run mixers and dishwashers; motors in the bathroom to run shavers and even toothbrushes. Toward the end of his life he would add small computers. If your shaver—which a hundred years ago was a piece of really sharp metal with a folding handle—has a window to tell you the state of the battery charge and when to clean and change the cutter head, you’re served by a computer as well as a motor.