Photo by Sanni Sahil on Unsplash

A Software Bug Caused by the Phase of the Moon

And you thought a missing semicolon was bad…

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.

--

--

Mikhail Klassen

Entrepreneur, Data Scientist, PhD Astrophysicist, Writer, Mentor