The first American spacecraft sent to explore another planet, Mariner 1 was launched on July 22, 1962. But it never reached Venus. It never even reached space.
WHAT HAPPENED
Unbeknownst to its operators, the launch computer that controlled the Atlas rocket carrying Mariner 1 contained a tiny programming error. A single character had been left out of the guidance equations.
THE CONSEQUENCES
About four minutes into its flight, the Atlas rocket carrying Mariner 1 began behaving erratically. The rocket had to be destroyed, and with it Mariner 1.
LESSONS LEARNED
The disaster revealed a critical need to thoroughly debug software before launch. NASA also learned that software can be engineered so that small errors do not impact safety. Thanks to NASA's corrective actions, several Apollo lunar modules safely landed on the Moon despite minor software "bugs."