Programming is a set of instructions you give to a computer to perform a specific task or execute a programming idea.
Example:
Once you learn programming, you will create your first program to help you with an idea in your life. For example, many times you might space out while sitting in front of your computer and fall asleep without shutting it down. Imagine that we want to create a program that shuts down the computer after a certain amount of time. Therefore, we will give the following instructions to the computer:- Ensure that the keyboard and mouse have not been used for one hour.
- Display a countdown on the screen from 10 to 0.
- After reaching zero, shut down the computer.
How to communicate with the computer:
Communicating with the computer is similar to communication between humans. There is a language made up of words and some rules that govern its use. In the world of programming, there is a programming language to communicate with the computer, and the words used in this language are called "Source Code."There are languages that allow direct communication with the computer, and then there's the type you will learn, which requires an intermediary to translate your Source Code into Machine Code so the computer can understand these instructions. This intermediary is called a "Compiler."
Now, using the Compiler, you will write instructions in the programming language you're learning, and the Compiler will convert them into a language the computer understands. The computer then executes the instructions.
How to write instructions for the computer:
To write instructions for the computer, you need a program called a Text Editor or IDE (Integrated Development Environment) — we will explain the difference later.Example of writing instructions:
In this example, using a language called Python, we ask the computer to print the word "Welcome"
Now, we've simply understood the meaning of the word programming, programming language, and code. It's time to expand your knowledge by researching the following terms:
- What Is a Compiler in Programming?
- How Does the Compiler Work?
- Compiler vs Interpreter