Hero of Alexandria was a mathematician and an engineer about the time of Christ in the 1st century AD. He built a machine that could dispense holy water by accepting a coin. This was the world’s ﬁrst vending machine. Its internal structure comprised essentially of levers resembling a balance beam. On one end of the beam, a pan was attached. On the other end of the beam, a plug was attached by a string to a plug that stopped the ﬂow of water. When the coin was dropped inside, the machine, it fell into the pan. The weight of the coin caused the lever to open a valve through which water trickled out. The pan continued to tilt due to the weight of the coin. Finally, the coin fell off and the plug at the other end of the beam shut off the valve, and subsequently the ﬂow of water.