As a matter of fact, Percy Spencers invention was an accident! Spencer worked for a company named Raytheon, developing microwave radar transmitters during World War II. One day in 1945, he noticed that a candy bar he had in his pocket was starting to melt.