A program is a set of instructions used to control the behavior of a machine. Examples of such programs include:
The sequence of cards used by a Jacquard loom to produce a given pattern within weaved cloth. Invented in 1801, it used holes in punched cards to represent sewing loom arm movements in order to generate decorative patterns automatically.
The automatic flute player, which was invented in the 9th century by the Banū Mūsā brothers in Baghdad, is the first known example of a programmable machine. The work of the Banu Musa was influenced by their Hellenistic forebears, but it also makes significant improvements over Greek creation.[1] The pinned-barrel mechanism, which allowed for programmable variations in the rhythm and melody of the music, was the key contribution given by the Banu Musa.[2] In 1206, the Muslim inventor Al-Jazari (in the Artuqid Sultnate) described a drum machine which may have been an example of a programmable automaton.[3]
The execution of a program is a series of actions following the instructions it contains. Each instruction produces effects that alter the state of the machine according to its predefined meaning.
While some machines are called programmable, for example a programmable thermostat or a musical synthesizer, they are in fact just devices which allow their users to select among a fixed set of a variety of options, rather than being controlled by programs written in a language (be it textual, visual or otherwise).