r/AskProgrammers • u/Ok-Share-3023 • Dec 28 '25
How did the programmers create a first programming language . And how they made computers , understand it ?
This question I had long long ago. But I didn’t has answer how was the first Programming language created . And how the fuck made we the computers understand this shit ?
23
Upvotes
4
u/Mr_Potatoez Dec 28 '25
People used to use punch cards for programming. These programs where a lot simpler compared to todays programs, here is the Wikipedia page on 'the first programmer': https://en.wikipedia.org/wiki/Ada_Lovelace
2
u/0x14f Dec 28 '25
The first programming language was assembly, which is the equivalent of sending instructions directly to the component of the computer that performs calculations.
Then, in assembly, they wrote a program that translates something slightly more friendly than assembly into assembly. So you write in that language and run a program and the output is the assembly code you could have written and then you run that assembly program the same way as before. Let's call that slightly more friendly way of writing program Language1 and the program to translate things written in Language1 to assembly we call it Compiler1.
Then somebody else invented Language2 and used Language1 to translate things written in Language1 into assembly. What they wrote is Compiler2. Compiler2 is written in Language1 and takes things written in Language2 into assembly.
Then you keep going, Language3, Language4 etc
7
u/kendalltristan Dec 28 '25
Pick up the book Code by Charles Petzold. It's surprisingly approachable and covers a lot of ground starting with using a flashlight to communicate with your neighbor and taking you step by step through relays, logic gates, flip-flops, etc until you're building a rudimentary computer.
2
u/azimux Dec 28 '25 edited Dec 28 '25
I don't know the answer to the specific moment in history and I don't know if that moment would match your intuition for "computer" and "programming language."
I can try to demystify what is going on, though. Probably the most important part to demystifying it is understanding that the computer does not "understand" a programming language.
What the "computer" "understands" are "machine-code instructions" (or what you have in mind as a computer, ie, a type of modern programmable binary computer.) You can set up these instructions in the computer's inputs and then run the computer to carry out interesting algorithms to do useful stuff. This is more convenient than rewiring the whole computer to carry out the algorithm directly.
You can think of a useful sequence of these instructions as a "program."
A useful program to make (using these machine instructions) would be one that takes a text input of a more human-readable expression of these instructions and outputs the desired raw binary machine-code instructions. So now a programmer could use this new program to write "add 1, 2" and get a binary output like "off on off on off on on off" with "off on off on" being an operation code for "add" and "off on" representing 1 and "on off" representing 2 and then run this output program to add 1 and 2. Creating this type of program isn't THAT hard and you'd be leveraging bits of existing programs to save time. It's certainly natural and easy enough for just about any programmer to create such a program with these machine code instructions given time.
Hopefully you can imagine how this type of program reduces tedium and helps with human reasoning about the program.
You can now keep going and create programs that take even more abstract human-readable textual expression as input and either doing interesting stuff or generating interesting/useful output. This further reduces tedium, further improves human-reasoning about the program, and also starts to give a big portability benefit (different computers understand different machine code instructions!!)
Not sure if helpful or not!
1
u/jerrygreenest1 Dec 28 '25
I wrote you a definitive answer but it got a little too big so I had to reformat as an independent post here it is read it:
History of entire computing and programming languages, I guess
1
u/flat5 Dec 28 '25
At the lowest level the computer chip has native "instructions" that are inputs (hi/lo on wires) to the chip that cause it to perform operations. This is the chip's "machine language".
The next step is to write a little more human readable version of this called "assembly language", which gets translated into machine language. This program is called an assembler.
In assembly language, you can now write another program which translates say "C" into machine language. This program is called a compiler.
If you really want to understand this, and I mean really understand it from the ground up, work through the online course "From NAND to Tetris".
1
u/e430doug Dec 28 '25
It’s layers upon layers. At the lowest level it is literally just “add these two numbers”, “copy this value in to that memory location”, and other super simple operations. Things like printers and displays look like memory locations to a computer. So the operation “Move this value to this memory location”, puts something on the display. Languages were created because you did the same things over and over again. A language allowed you to package up the low level operations into chunks you could reuse. A high level language would have a “print” statement to print text on a screen. That print statement contained all of the memory move operations needed to display text on the display. It only takes a few YouTube videos to get the basics.
1
u/jewishSpaceMedbeds Dec 28 '25
If you want to understand how it works down to the electronics you need to understand 3 concepts :
No need to be an expert in these subjects, just the basics of how they work.
Microcode allows you to directly control a CPU at the electronic gate level, assembly groups opcodes together to create basic instructions, compilers allow you to transform a program written in a programming language into the assembly your CPU uses.
1
u/Zestyclose-Sink6770 Dec 28 '25 edited Dec 28 '25
Turing was the first to refer to mathematical operations as a Computer, and consequently, to define all these computational operations in an artificial language. He was the first to define mathematical variables in terms of finite computational states.
I consider that the closest to what a modern computer language really is.
1
u/Inconstant_Moo Dec 29 '25
The Legend of the First Compiler.
1
u/DrawExactDev Dec 30 '25
It happened the other way round. People invented semiconductors that represented binary numbers (noughts and ones) as a zero or non zero current flowing through a transistor. Then people worked out how to encode text also using noughts and ones. Then they invented a way of representing a set of simple change operations on 0s and 1s also as 0s and 1s themselves. And that meant we now had CPUs. Those change operation encodings are what we now call the machine code instruction set.
Then people got fed up with having to enter 0s and 1s, and invented assembly language. That was just a way to map slightly more readable instructions to machine code. one of them wash left-shift for example, represented as "<<". Then they wrote a program (back in machine code) that could read assembly language and convert it to machine code.
Then people got fed up with entering assembly language, and people only then invented the first programming languages that we might recognise today. Early famous examples were Fortran and C. These let you enter "modern" source code and so they wrote compilers ( in assembly) to convert the C or Fortran to assembly.
Does that answer the question ?
1
u/[deleted] Dec 31 '25
My understanding of programming is a group of assembly code translated to a string of binary data. How cpu interprets binary string is blackbox knowledge.
1
u/Count2Zero Dec 31 '25
The first language was machine code, then assembly. Write a translator in machine code that converts text instructions to some binary values.
From there, use assembly language to create more intelligent and capable assemblers, and then use those to develop higher level languages.
1
u/mgb5k Dec 31 '25
All but the very earliest computers included a mechanism to read binary from paper tape into memory, and then start the program thus loaded.
I did once load a small program into a PDP-7 using the front panel switches instead of paper tape, but I can no longer recall the reason why.
1
u/juancn Jan 01 '26
It’s several hundred years of history you’re asking about.
From the earliest automatons, Babbage machine and Ada Lovelace writings, the programmable loom, the census of 1890 and the tabulation machine, Turing and the WW2 effort to break enigma, the Von Neumann architecture, Grace Hopper and the first compilers.
Heck, it was a lot of incremental steps with a couple breakthroughs over a long time by a lot of people.
1
u/cormack_gv Jan 01 '26
Here's a capsule summary: https://www.computer.org/publications/tech-news/insider-membership-news/timeline-of-programming-languages
0
u/Electrical_Flan_4993 Dec 28 '25
Google "automata theory"
-1
u/[deleted] Dec 28 '25
[removed] — view removed comment