It is reported that Ada Lovelace was the first programmer, and that the first program was an algorithm to calculate Bernoulli numbers, isn't that too complex to be the first program ever written?

by Frigorifico

I would expect the first program to be a code that added 2 numbers, or something simple like that.

Could it be that this is the oldest surviving code from Ada Lovelace but that she wrote other simpler programs before it?

DogfishDave

Ada Byron (Lady Lovelace) was a polymath who'd inherited her father's ability to see the world as an abstract, poetic place but who had been well schooled in mathematics at the wish of her mother.

Ada's prodigious mathematical skill led to her meeting Charles Babbage, designer of a number of seminal computational engines. They corresponded over many years which allowed Ada to express and shape her ideas of 'poetical mathematics' (her own words).

Whether or not the first computer program should be described as such is a subject of much debate - it was a theoretical exercise as no machine existed that might execute it. In theoretical exercises the principles of, for example, 2+2 had been passed millenia before. What Ada demonstrated in her correspondence was that she imagined a computer as a machine built to execute multiple tasks rather than a machine built to complete a single task. The machine could be re-programmed to undertake new tasks by giving it a new set of instructions. She was the first person to express this idea and it is for that reason that she is considered the first programmer and the first to describe what we define as a computer today.

The program that she wrote (the one to which you refer) is the first one we know about. It may be that she drafted other instructional sets that we don't know about but there is no reason to think that this couldn't have been the first. Interestingly, when programmers later transcribed the program into 'modern' instructions it was found to contain bugs. With these ironed out the program does indeed work.

​

In summary: Ada Byron Lovelace's program was intended to demonstrate changeable instruction sets for computational engines, in this she described and demonstrated mathematical procedures in a form that we consider to be the first computer program.

Sources:

Translator’s Notes to M. Menabrea’s Memoir, Ada Lovelace, 1843

Sums of Powers of Positive Integers: Jakob Bernoulli, Janet Beery, MAA 2018

The Innovators, Walter Isaacson, 2015