The heating effect of microwaves was discovered accidentally in 1945. Percy Spencer, an American self-taught engineer from Howland, Maine, was building magnetrons for radar sets with the American company Raytheon. He was working on an active radar set when he noticed that a peanut chocolate bar he had in his pocket started to melt. The radar had melted his chocolate bar with microwaves. The first food to be deliberately cooked with Spencer's microwave was popcorn, and the second was an egg, which exploded in the face of one of the experimenters. To verify his finding, Spencer created a high density electromagnetic field by feeding microwave power into a metal box from which it had no way to escape. When food was placed in the box with the microwave energy, the temperature of the food rose rapidly.