r/computerscience • • Nov 22 '25

General How did coding get invented

My view of coding right now is that it's a language that computers understand. But how did the first computer makers invent the code and made it work without errors? It look so obscure and vague to me how you can understand all these different types of code like Java and Python etc.
Just wondering how programmers learn this and how it was invented because I'm very intrigued by it.

438 Upvotes

161 comments sorted by

View all comments

Show parent comment

9

u/stevevdvkpe Nov 23 '25

Babbage's Difference Engine was just a series of cascaded mechanical adders. The number in one stage was just added to the number in the next stage. A constant was always added to the first stage. You didn't have to rebuild the entire thing to change what it did, you just had to set the constant and the initial values in the adders. This allowed implementing the method of finite differences to calculate polynomial approximations to functions (like logarithms and trigonometric functions) to assist in creating printed tables.

Charles Babbage designed an Analytical Engine that was essentially a complete mechanical digital computer, but it was too difficult to build with the engineering technology of the time and Babbage was unable to attract funding to develop it. He encountered significant problems just building a limited prototype of the Difference Engine, which required mass-manufacturing a lot of high-precision parts at a time when parts were typically machined by hand, and some early prototypes would not work because the gears were not sufficiently within tolerances having been manufactured by many different people. The Analytical Engine would have had a quantity of 50-decimal-digit registers, mechanical addition, subtraction, multiplication, and division, and a stored program encoded on punched cards similar to those used in the Jacquard Loom.

9

u/Kallory Nov 23 '25

I heavily appreciate the fact that this guy and Ada played a huge role in what would become the computer we know and love but God does it make me sad for them. They pretty much had it figured out but were born a century too early to make it work.

6

u/TheAfricanViewer Nov 23 '25

That’s so depressing