Computer
Some people disagree on which early computer is programmable. Many say the "castle clock", an astronomical clock invented by Al-Jazari in 1206, is the first known programmable analog computer. The length of day and night could be adjusted every day in order to account for the changing lengths of day and night throughout the year. Some count this daily adjustment as computer programming.