Hi, welcome back.
In our previous lesson, we talked about what you would expect to get out of this course — Fundamentals of Programming with Python.
Well, today we’re going to look at a very interesting topic: What is Programming?
Let’s say you want to bake a cake. You get your recipe book, open it, and see instructions on how to make a cake. This simple analogy really explains the heart of what programming is.
Programming is just instructions — step-by-step, precise instructions we give to the computer to carry out a task.
Computers are very fast and efficient, but they need someone to tell them what to do. Essentially, they don’t have a brain — and that’s why we program.
The people who program are called software engineers, software developers, or programmers (depending on what you want to call them). And how these programmers give instructions to computers is through the use of what we call programming languages.
One of these programming languages is Python.
Like I said in the previous lesson, Python is one of the easiest languages to get started with. But we aren’t using Python just because it’s easy — Python is also an extremely powerful language. And we’ll see that in action soon.
If programming is the instruction we give to the computer, does that mean we can just tell the computer “Do A, B, C” and it will understand?
Well, that would have been great, but no — that’s not how it works.
Computers on their own do not understand human speech. They understand something called machine code — which is essentially zeros and ones (yes and no).
So how do we move from programming languages (which humans understand) to machine code (which computers understand)?
There are two main ways: compilation and interpretation.
After you’ve written your programming code, you have something called a compiler, which takes your code and converts it into machine code — an executable.
This executable is run by the computer, and because it’s just binary (zeros and ones), the computer understands what to do.
On the other hand, the interpreter works a little differently.
Let’s say you speak English and you want to communicate with someone who only understands Spanish. How do you do that? You need a translator — someone who understands both English and Spanish and can help translate what you’re saying.
That’s essentially what an interpreter does. It takes your code, and while your code is running, it translates everything into what the computer understands.
These are the differences between compilation and interpretation — and this is how programming works under the hood.
Not a member yet? Register now
Are you a member? Login now