What is programming defined in 5 words
Every programmer needs to know these 11 terms
When you start learning to program, it quickly happens that you come across a wide variety of technical terms.
Variables? Operators? If / Else? Huh?
It is perfectly okay not to be able to imagine anything by this when you are a beginner.
I would therefore like to give you the 11 most important programming terms show that you should know. Also, I'll briefly explain how these basic programming tools work. There is an example of this using the Scratch programming language. Scratch is a visual language and ideal for adding to our basic knowledge.
Here is a small excerpt of what the Scratch programming environment looks like:
1. Programming language
The programming language is the tool that is used for programming.
2. Source code, source code, source code
When you program, you write programs in files. In theory, you can write the entire program to one file, but that would be confusing.
So you split the program into several pieces. This is how you save a piece of program in a file. These files are actually normal text files. We programmers call this source code, source code or source code.
The program is in these files in the programming language you are using.
3. Compiler / interpreter
Your computer does not yet understand your saved source code. So he has to translate it into his language. This is done either by a compiler or an interpreter.
You will find out how they differ soon enough. It is important for you that there are programs that translate your source code for the computer.
4. Function / instruction / command
A command is an instruction to the computer.
The computer or library you are using knows how to handle this command. If you write several commands one below the other, you get the so-called command sequence.
That actually only means that commands are processed one after the other from top to bottom. If you have to use many commands over and over, you can write new commands that consist of the commands.
At this point I'll show you a picture so that you can understand what I mean.
You have a little robot that you control by program. It all looks like this:
There you can see the 4 commands that control this robot.
- Wait 1 second: the program will wait a second. The robot doesn't move.
- Turn 90 degrees (clockwise): The robot turns 90 degrees (always to the right)
- Turn (counterclockwise) 90 degrees: the robot turns 90 degrees (always left)
- Step 50: The robot "moves" by 50 degrees in the direction of view
Through the program, your computer knows how to process these commands. With the programming language (here Scratch) you can combine these commands and have them processed one after the other. Take a look at the following picture. You will see the individual commands once and then the commands how they should be processed one after the other. Imagine how the robot would move by going through the commands step by step. See the following picture:
The nice thing is that you can combine several commands into new commands and then only have to execute these new commands. Let's do a new command - goRight build, in Scratch it looks like this:
We would write a new command and call it 4 times, for example. This would make the robot turn 4 times in a circle. If you want to try it out afterwards, you will get the link for the scratch project again afterwards.
Summary of commands:
Let's briefly summarize what we have learned. When you program, you give your computer commands and instructions. A source text therefore consists of many instructions / commands. This list of instructions / commands can also be combined into functions. This means that you do not have to keep recurring lists of instructions twice in the source text.
Imagine if your robot had to return to the point of origin on its own after taking a few steps. It's a bit difficult if he can't remember which steps he has already taken. Or the robot would have to pick up 3 balls and then bring them to a warehouse.
Somehow he has to be able to remember certain information. There are variables for that. As soon as a variable is defined (ie “invented”), values can be stored in it and read out. It's like taking a notepad and jotting down information there and reading it later.
Look at the picture, then it should become clearer:
Summary of variables:
A variable can remember values such as numbers or words. Whenever you have to remember a number or a word, you use a variable.
You need a variable because you first have to reserve the space for the value. Think of it like a memo or placeholder. If you want to memorize something, you take a new notepad and write down your number or your word.
6. Type / variable type
As already mentioned, variables can store numbers or words.
We already have the type. A variable can either be of the type number or of the type word.
If you write in your program that you want to memorize something, i.e. you need a variable, you have to write down in the program what type it is. Quasi: I need a variable that can store a number.
There are many different types in programming languages, and you can even create your own variable types.
7. Operator / Operation
An operation is a specific type of instruction. If you work with an operator, this is already a so-called operation.
When I speak of operations I mean arithmetic operations or logical operations. In plain language, this means that programs are able to solve arithmetic problems
You can e.g. "Greater than / Less than comparisons" perform and shortcuts like AND / OR operations evaluate.
What do i need this for?
Let's go through an example. You saw that there is an order to move 50 pixels. That would then be a step for the robot.
If you want to take several steps here, you would have to call up the command more often. Or you calculate 5 * 50 and enter this value in the command. And so the robot moves by several steps by simply multiplying the value.
There are many other operators, the picture shows a few of the most important ones. These operations all work the same way.
Whenever you do something with two or more variables, it's called an operation. For example, you can calculate with numbers, which is called an arithmetic operation.
If you add two variables you use a plus sign "+". The sign is the operator. This indicates which operation has to be carried out. Examples of operators are: + - = * / and many more!
8. Input and output
This means everything how you (i.e. the person / computer user) interacts with the computer program. Entries are everything that goes into the computer in terms of data, e.g. keyboard entries, mouse movement, pressing the joystick button.
With the output it looks exactly the other way around, this is about what information you get from the computer. This means screen output, data in the form of files or even printouts.
Each programming language treats the inputs and outputs somewhat differently, but in principle there are these inputs and outputs to be treated in every programming language. Ultimately, the programmer determines what should happen to the input and what the output should look like.
When entering the keyboard, there is already a program-based decision based on the IF…. THEN pattern.
If something happened then do something. In the case of keyboard input, this is "IF", pressing the space bar. "THEN" take a 50 step.
These decisions can, however, be expanded. For example, you can enter comparisons of numbers or check other things. So you enter a condition and if this is met, i.e. TRUE, then certain commands should be executed. Almost all operators that return a TRUE or FALSE value can be used here, e.g. for comparisons.
Imagine that you wrote a command in which your robot should search for balls.
You want your robot to search for balls until it finds more than 3. So he must give the order searchballs to repeat.
You can do this with a loop, and it's not that difficult to understand because it's similar to decision.
It works something like this: REPEAT search balls UNTIL collected balls> 3. There are different types of these loops, these actually differ only in the way when the condition is evaluated. However, it is important here to understand that the commands within the loop are repeated as long as a condition is met.
You have already heard of helpful programs like the compiler. The debugger is a practical helper, but unfortunately totally unknown to novice programmers.
While the compiler is translating your source code for you, the debugger will help you find errors!
What does a debugger actually mean?
A programming error or a program crash is what programmers call a bug.
The "bug" comes from the English and means beetle in German. The "De" in front of Debugger means the opposite, translated into German a Debugger is a Entkäferer.
How does a debugger do that?
You can stop your program with a debugger and it shows you where in the source code your program is currently. Then you can look at all the variable values in peace and find the error.
That was a brief description of the most important basic elements of a modern programming language. There are a few more elements that do work for you or support you with your work, but you've already got to know the basic tools.
Just by knowing these elements you will not be able to program for a long time, for that you definitely have to work with them first. You can find them in every programming language and once you have understood how it works, you can switch to other programming languages really quickly.
The basic elements of programming are easy to understand. The crux of these basic elements is how to combine them.
Depending on which tasks or which feature you want to solve / program you have to use these elements together. The next difficulty then is how to actually implement your program idea with its help. However, this would go beyond the scope of this declaration.
To start with, you should get used to these terms first. In our LearnProgramming beginners course you will also learn all the basics of programming. here we start completely without prior knowledge. Have a look.
Do you know any other terms? Comment this post.
- What is your favorite gaming mouse
- What is the French term for ankle
- Taylor Swift owns her music catalog
- How do I find jobs in Slovakia
- How much has Hungarian influenced Slovakia?
- Has Aman Goel haters
- Where do the Canons' overhauled cameras come from
- How do I understand biochemistry correctly
- Find a copywriter
- What are amateur drama
- Must landlords allow service dogs
- Who is the best yoga teacher online
- You can repair a broken mini fridge
- Houston Airport is Uber Rideshare friendly
- What is a pump and dump group
- What is the best school in Anchorage
- How does a cat make a noise?
- Why does fructose 6-phosphate inhibit glucokinase
- Why is it a No Shave November
- Generally works overrated
- Can exercise improve my sex life?
- Real estate agents may accept bank transfer fees
- What is time lapse photography 1
- Which exam should I give for CBI