What Do I Need To Know Before Becoming A Programmer
- 22/01/2022
- Posted by: admin
- Categories:
Introduction
I had several discussions with non-programmers and they usually ask me questions about my job.
I noticed that several things that can be obvious for a programmer need to be explained in detail for a non-technical person. I noticed also that some people want to jump into the world of programming but find it complex or late to start.
In this article, I will prove you that programming is for everyone. We will see the basic things to know how to be able to write a computer program. We will define what means a computer program, what is it used for? And what do we need to create it? If you are a beginner and you don’t know anything about programming, then this article is for you.
In this article we will start asking the question that can be obvious, but we will see that they contain several details. Since there are several articles on the internet that help you to start to learn a specific programming language. This article will not focus on technical instruction to write your first program (you can find a lot of hello world samples on the web). I tried in this article to give you visibility about the environment that you will be using. Then when you’ll start the technical parts you’ll understand the general concept of programming and what you’ll be doing. So let’s say this article is step 0 or it’s a kind of discussion about programming around a cup of coffee.
Audience
- Everyone
- People who want to change their career and start programming
- Students that finished high school and asking what field to choose.
Prerequisite
- A brain
What is a Computer Program?
A computer program in a point of view of a non-programmer is an executable that can be run and which gives a specific result. You can consider the video games that you play or your text editor as a program. Which is right.
But in the point of view of a programmer, the executable is considered as a part of a whole ensemble that constitutes a program.
Indeed, a program is a number of instructions, written in a specific language and understood by a specific compiler that gives an output that is compliant with a certain need.
The phrase is a bit complex? If yes don’t worry the next sections will make it clearer.
Why do we program?
Sometimes, we have some needs to do some complex sub-tasks to achieve a global task. Each sub-task will take a lot of time so the global one will have a bigger amount of time.
For example, to calculate the net salary from the gross pay (the global task) we need to do several calculations (sub task). If we do it manually for a big number of employees it will be a very long task.
This is why we make a computer program that covers this need. And here we are explaining the part of the definition in the first section “that gives an output that is compliant with a certain need.”
What are the elements needed to write a program?
So now that we know what we are talking about, we will see the ingredients to make a program.
A programming language
We said at the first section “A program is a number of instructions, written in a specific language”. These instructions are written in the form of an algorithm*. Writing an algorithm means that we have to write a set of steps that represents our reasoning. This is a logic that is largely used in mathematics.
Let’s take again the example of the salary calculation.
Let’s suppose that the gross pay of a person is 5000 dollars, we need to subtract 10% to the social security and 20% taxes to get the net salary. So let’s say it’s a mathematical function f(X) = X- X*0,1 – X*0,2 where X is the Gross salary.
So logically we will process this way,
- Calculate the amount to pay to the social security : SS = 5000 * 0,1 = 500
- Calculate the taxes : Tx = 5000 * 0,2=1000
- Calculate the Net Salary : NS = 5000 – 500 – 1000 = 3500 dollars
Here in our mind we executed an algorithm with three simple steps.
And if we translate it to a code in the c# language, it will be as follows :
- Calculate the amount to pay to the social security : SS = 5000 * 0,1 = 500
- Calculate the taxes : Tx = 5000 * 0,2=1000
- Calculate the Net Salary : NS = 5000 – 500 – 1000 = 3500 dollars
Here in our mind we executed an algorithm with three simple steps.
And if we translate it to a code in the c# language, it will be as follows :