The year is 1962. NASA’s Mariner I spacecraft has just taken off aboard a rocket from Cape Canaveral, destined for a flyby of Venus. Only a few minutes into the rocket’s flight, it flies off-course, and a self-destruct order is sent. Mariner I explodes. $80 million (almost $630 million in today’s money) falls into the sea.
As it turns out, the reason for Mariner I’s fault was a simple one – a lone, omitted hyphen that was accidentally left out of mathematical code by a NASA programmer.
NASA official Richard B. Morrison explained to Congress:
““[The hyphen] gives a cue for the spacecraft to ignore the data the computer feeds it until radar contact is once again restored. When that hyphen is left out, false information is fed into the spacecraft control systems. In this case, the computer fed the rocket in hard left, nose down and the vehicle obeyed and crashed.”
So, when writing code, CHECK IT – or else you too might end up costing someone tens of millions of dollars.