as the title says. many people have told me that Ada Lovelace invented the first computer code. as far as i could find, she only invented some sort of calculation for Bernoulli (sorry for spelling) numbers.

seems to me like saying “i invented the cap to the water bottle, before the water bottle was invented”

did she do something else? am i missing something?

edit: ah! thank you everyone, i understand!!

In: Mathematics

Computer code is ultimately just a formal description of how something should be done by a machine.

And she described such a process how the analytical machine which charles Babbage planned could calculate the Bernoulli numbers.

Thats pretty different from what we would recognize today as Computer programming, still the idea is the same. Describing how a (universal) machine should perform a task.

The first machines that you could safely call a computer were invented by a scientist who didn’t quite know what to do with them. He had sketched a couple of ideas for how the primitive contraption might be programmed, but never really took it upon himself to get it done. Enter his assistant Ada, young, full of energy and armed with a stupendous math education. She sat down with the machine Babbage created and wrote the first programs it would operate on, essentially providing proof of concept for the computer/program paradigm we enjoy today.

Her work revolved around a proposed Analytical Engine, mechanical computer designed by Charles Babbage. The machine as designed would have been Turing Complete, which means it would have been able to do anything a modern computer would be able to do. The first ever.

I’m not that clear on the exact details of what exactly she proposed in her notes because I haven’t read them, but while everyone else was focusing on just crunching numbers like a glorified calculator, she realised the machine had more capability than that. Basically, she understood a computer to be a computer as we know them, not just a mechanical abacus.

But since the Analytical Engine was never actually built, all that insight came just from the designs. So her insights and algorithms pre-date any actually built computers.

There was not a computer, but there was a design for a computer that was under construction. (It only did not get finished because the inventor kept updating the designs and the craftsmen building it had to keep starting parts over and it ran way over budget.)

So she understood the designs and wrote algorithms for the machine for when it was built and recognized it had far more potential (even as designed) than others realized with the correct programming. She even considered things very similar to Turing Completeness, like how one day computers could be programmed to write poetry.

So it really was incredible she did so much before a computer was even built.

She came up with the idea that you could create a loop to repeat simple instructions. It’s one of the most fundamental aspects of coding – instead of writing out “take the number 1, then add 1, then add 1, then add 1”, you can write “take the number 1 and add 1 three times”. Instead of there being 4 steps there is now 1. Doesn’t look that impressive in my example but when you’re calculating something like how many dots does a triangle shape with 4098 rows contain it’s pretty powerful just writing one instruction instead of seperately writing out each of the 4098 rows.

## Latest Answers