Murphy's Law is commonly expressed as "If anything can go wrong, it will." Sometimes "and at the worst possible time" is added at the end of the saying. Many problems, failures, and annoyances are attributed to Murphy's Law, but most people do not know where the name came from.
Murphy's Law is usually thought to be named after Captain Edward Murphy, a development engineer with the United States Air Force. In the 1940s and 1950s, he was working with acceleration and deceleration experiments at Edwards Air Force Base. Murphy's Law most likely originated during his projects with Dr. John Paul Stapp.
Dr. John Paul Stapp designed experiments around gravity forces, or G-forces. He rode on a rocket-powered sled that accelerated to over 630 miles per hour (over 1000 km per hour). The G-forces were extreme and unpleasant, but even worse was the fact that all the sensors malfunctioned. When Stapp got off the sled, every sensor read "zero."
Captain Murphy checked the sensors and, to his chagrin, learned that every single sensor had been installed the wrong way. He commented that if people had options about how to do something, with one of those options resulting in catastrophe, people will always pick the option that has a catastrophic outcome.
Murphy's Law is one good reason why engineers always test, test, and test everything. They need to imagine every possible disastrous outcome in order for these outcomes not to be realized. Using Murphy's Law when designing new technology is also called "defensive design," or "Murphy Proofing." Designers need to take into account all the possibilities that a user will mess up, and somehow make them impossible or at least incapable of causing harm.
Many variants of Murphy's Law exist in today's culture. It is generally accepted, for example, that bread will always land jelly side down when dropped, that there will be rain as soon as you wash your car, and that you will always pick the line in the supermarket that doesn't seem to advance at all. People have even been known to try to use Murphy's Law to their advantage, for example, washing cars in order to bring rain.