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.
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.
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.
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."