Computers are the engines that drive our society. We get paid via computer, and we use them to vote in elections; computers decide whether to deploy the airbags in our car; and doctors use them to help identify a patient’s injuries. Computers are embedded in all sorts of processes nowadays, and that can make us vulnerable. Because of a single computer glitch, large payment systems can grind to a halt. When computers malfunction, we risk losing our power supply, our railway links, and our communications. Worst of all, we habitually shift responsibility to computers and blindly follow their advice. This is why patients occasionally receive ridiculously high doses of a powerful drug or a car driver who blindly follows his satnav may end up in a ditch. Ubiquitous computer use can cause otherwise responsible people to leave their common sense at home. We’re all too familiar with poorly designed software, computer errors, or—worse still—programs that flatly refuse to function properly no matter what we do. It is hardly surprising then that computer failures cost the world hundreds of billions of dollars a year. In the United States alone, failed computer projects are believed to waste $55 billion annually. And the media only report the tip of the iceberg— the foul-ups that cost millions or result in fatalities. For instance, in the 1980s, several cancer patients were killed by a programming error that caused the Therac 25 radiotherapy unit to deliver excessive doses of radiation. In 1996, Europe’s first Ariane 5 rocket had to be blown up a mere 37 seconds after launch in what might be the costliest software failure in history. In 2007, six F-22 aircraft experienced multiple computer crashes as they crossed the date line, disabling all navigation and communication systems. The list can be extended endlessly, and there are many more failures that we never hear about. Only about a third of all computer projects can be described as successful, and even these are hardly error-free. Why can’t we prevent programming mistakes? Could we improve computers and their software to protect society from the “moods”’ of its digital machines?