What is programming😕
Tags: tutorial, programming, beginners
Published: 2022-10-23 00:18:47

* Usually you want to write a computer program to solve some sort of problem.

* Programming is figuring out how to break down your problem into a series of commands that your computer 🖳 will know how to execute.

* It is important to remember that the computer only does what you tell it to do.

* You give the computer commands (add, print, draw, etc.), and it will do exactly what you say, at extremely high speed. 

* A computer can execute several million commands each second🤯. 

* But, it is not actually intelligent if you give the computer incorrect instructions, the computer will still follow them, even if it breaks the computer.

* If you tell the computer to add (0 + 0) together until it equals 1, the computer does not know that is impossible.

*  It will add (0 + 0) together, millions of times a second, and will continue working on that problem forever.

* Ultimately, programming is a matter of *translation*.

* Your task as a programmer is to translate a question you have into a set of instructions the computer can understand, so that the computer can find the answer for you. 

* There are different strategies for organizing the information the computer needs to answer your question.

* These strategies are called programming *paradigms*.

*There are also different programming languages you can use to translate your question into code.

Different languages use different programming *paradigms*.

## Procedural Programming?

* Procedural programming is one type of programming paradigm. 

* Procedural programming follows a "first do this, next do that" process. 

* This is also sometimes called *imperative* programming.

* Procedural programming is a lot like writing a recipe you come up with a specific series of instructions to achieve a desired outcome.

* The ingredients of the recipe are like the variables in your program, the instructions are the procedures of your program, and what comes out of the oven ♨️🎛️ is the final output of the program.

### What is a Procedure?

* A procedure is the basic building block of procedural programming.

* Procedures are also sometimes referred to as *routines*, *subroutines*, or *functions*.

* Procedures help organize your code into specific parts.

* Each procedure can perform a specific task, and can be called upon at any point in the program to fulfill that task.


### Procedural Programming Example

* Let's look at an example of how a procedural program would be structured.

* Each block in the Sales Report program pictured to the right represents a procedure.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kugepy2kw00mpny473y8.png)

* This program can Get a Transaction, Process Reports, or Print Totals.

* The Process Reports procedure works by calling other procedures in this case, Process States and Print State Totals.

* And the Process States procedure in turn calls other procedures - including the Get a Transaction procedure also seen at the top.

* Remember, procedures can be reused multiple times and can be used anywhere in a program.


### Connect with Me 😊

#### 🔗 Links

[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/mahmoud-el-kariouny-822719149/)

[![twitter](https://img.shields.io/badge/twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/Mahmoud42275)