Photo by Sanni Sahil on Unsplash

Member-only story

A Software Bug Caused by the Phase of the Moon

Mikhail Klassen
3 min readAug 28, 2020

--

Bugs are an unavoidable reality when writing software. In the age of vacuum-tube transistors and electromechanical computers, the earliest software bug was a literal insect (a moth) that crawled into the machine and got trapped in a relay. The original account was given by computing pioneer Grace Hopper, though she was not the one to find the moth. The guilty moth was taped to the log book and software errors have been called bugs ever since.

Courtesy of the Naval Surface Warfare Center, Dahlgren, VA, 1988. — U.S. Naval Historical Center Online Library Photograph NH 96566-KN. Public Domain.

Debugging code can be so painful that entire methodologies and dogmas have emerged around ways of writing code to be more robust against bugs (see test-driven development).

Most bugs, like a missing semicolon ;, are easy to fix (as long as you can find them), but others can be much more subtle.

There’s an old story in physics lore about a bug so mysterious that someone joked about it being caused by the phase of the moon.

It just so happened that the guess wasn’t far off.

The large ring is the location of the underground tunnel for the LHC. It straddles the border between France and Switzerland near Lake Geneva. Source: OpenStreetMap contributors / CC BY-SA

One hundred meters below ground, underneath the Alps near Lake Geneva, sits the Large Hadron Collider or LHC, a gigantic machine designed to slam particles together at nearly the speed of light to study the fundamental properties of the universe. It is operated by the European Organization for Nuclear Research, known as CERN. Discoveries made at CERN have been awarded no fewer than three Nobel Prizes. It was also the place where Tim Berners-Lee and Robert Cailliau invented the World Wide Web.

The tunnel for the LHC has a circumference of 27 km. Inside the tunnel is a pipe kept at a near-perfect vacuum. The pipe is ringed with superconducting electromagnets that bend proton beams into their circular orbits before they are slammed into each, creating a shower of secondary particles precipitating…

--

--

Mikhail Klassen
Mikhail Klassen

Written by Mikhail Klassen

Entrepreneur, Data Scientist, PhD Astrophysicist, Writer, Mentor

Write a response