Ancient Greek mathematician Hero of Alexandria invented the first vending machine which dispensed holy water after you put in a coin. He also invented the first steam engine and the first wind powered machine, 2000 years before the industrial revolution.