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

2

u/wosmo Nov 23 '25

Even assembly grows in steps.

Originally it would have just been mnemonics, giving instructions names instead of numbers, but it gets more complex from there.

Like your example of LOAD - on a lot of machines, there's different instructions of different types of loads. So LD A,h0010 and LD B,h0100 would be two different instructions. LD A,value and LD A,address would be two different instructions. LD A,address and LD address,A would be two different instructions. So having the compiler abstract these all to LD is already a huge step away from straight mnemonics.

Then you get labels - either as memory addresses (so you don't have to remember what address in the code you're jumping to, the compiler can keep track of where that :label was), or for naming values/addresses (the start of giving variables names).

Once you're naming variables, routines, etc - I don't want to say the route from there to high-level languages was obvious, but you can see a progression in that direction. Assembly wasn't like some 'dark ages' - it had advancements and progressions of its own.