The earliest machines capable of being programmed were mechanical. Then analog programming provided a new level of flexibility and ability to handle more complex instruction sequences at lower cost.