What is Programming and Programming Language?
"PROGRAMMING" is the word which we all come across quite often. But did you ever
give a thought to it, as what does programming or as many people say computer
Well, here is the technical definition.
A computer program is a set of instructions.
I know while looking at the word initially many people tend to think it might have a technical definition of a bunch of lines which tries to convey quite a few things. But actually, that one single line of the description says it all and carries everything that has programming linked to it.
Set of Instructions
On one end you hear this definition, and on the other, you see some specific program like,
- Paint 3D
- Games like FIFA18, Counter Strike
- MP3 player
You might think "Yeah but that can`t only be a set of instructions." Well, that`s what these are, all of them. A sequence of separate small commands, one after the other. It doesn`t matter whether there are ten instructions or ten million. With each instruction, the computer is directing to perform some task which might be at a minimal scale but is very specific. That is the whole idea behind programming, breaking large segments into smaller parts or strictly speaking into these individual steps.
Let us take an example to get a fairer idea as to what we are really talking
Here we have the recipe for Egg curry.
- Add oil to the frying pan.
- Fry the eggs.
- Remove the eggs from the pan and add bay leaf, red chilli, cinnamon to the pan.
- Add finely chopped onions after a couple of minutes of stirring the raw spices.
- Sauté the contents of the container for 5 minutes.
- Add powdered spices, salt, and tomato puree to the mixture and again stir it for 5 minutes.
- Add the fried eggs, after adding half a glass of water to the pan close the lid of the container and let it cook for another 5 minutes at medium flame.
- Turn off the ignition and garnish with coriander leaves.
That's it. Egg curry is ready.
Now, you are given this recipe, and it is said that you have to prepare egg curry. So, how would you proceed? Analysing and executing the procedure step by step, right? If you follow these eight steps in order, what you will get is a ravishing egg curry.
That`s exactly what programming is. You have a particular set of instructions to analyze and to work upon, and here your computer does the work of interpreting and executing these steps. Take a case where you messed up on the recipe and interchanged certain vital steps, then the output received will not be what you had desired it to be. Likewise, in programming, the order of the instructions does matter.
So, there is one critical thing which every programmer should remember, computers will do precisely what you tell them to do. Though they have a speed to perform a task in an impossible time frame, at the same time they have zero IQ, so you better be right with your instructions, and that's it leave the rest of the job for your computer.
While we are at it, let us go through one more thing.
To write any program, you need a programming language which will have a
predefined meaning for a set of words or as we usually say them "keywords"
technically. There are a bunch of programming languages, and each language has
its own set of rules and protocol which needs to be followed. Some languages
are case sensitive some are not, some end with a semi-colon some don`t. What
all programming languages have in common is, writing any instructions with the
help of writing what are called "statements." These statements may contain
numbers, words or even some special characters whatever it may be.
Understanding the rules of any language are directly proportional to understanding the syntax of it. So you get it, for programming anything you need to break down the idea you got into small segments and write the instructions corresponding to those small segments in the programming language. But since I told you there are a bunch of it, how do we choose which one to use?
Choosing the right language
Though there are hundreds of programming language, only a few dozen or so are popular enough. By popular enough, I am implying its use in the current market and a community of people working on it. As years pass by, some languages become obsolete some still have that power of not to be replaced. But once you have your foundation laid adequately, it is not a tough task to learn and use a different language. When we look at the larger picture, there are two types of programming language.
- Low-level languages.
- High-level languages.
Low-level languages are those who are closer to the machine code. Your CPU,
chips don`t understand any language but the machine language.
If you are asking me, then why don`t we write everything in terms of machine code rather than selecting and learning programs like C++, Java, Ruby, Python, etc. Well, writing machine code takes plenty of time and even more hard work. It is always preferable to choose smart work in place of hard work, right? That`s why we have high-level languages.
Why high-level languages?
Here are some of the perks of using high-level languages as a substitute for low-level languages.
- Worry less about the hardware.
- Easier to write.
- More accessible to share among different platforms.
Let us fall back to our main problem, which programming language to use? Well, it depends upon the task sometimes if not always. Say if you are working on developing software for the desktop applications or mobile applications, you might use Java. While developing web apps, you might use Python. For windows phone applications, we use .NET.
Coding or Programming is nothing but a set of instructions, where those
instructions contain certain numbers, words, special characters or maybe even a
combination of all or some of them. Since the computer has zero IQ, you have to
be precise with your instructions. It only executes the instructions which are
fed by the programmer.
To write these programs, we have specifically dedicated programming languages for the numerous applications. There is a big list of programming languages, but at the same time, we have a pool of various applications too, right? So according to the need, as which application we are working on, we can choose our programming language accordingly.