Fundamentals of Programming: Make your basics strong.

Introducing the fundamentals of programming. Learn programming with me, from scratch. Take baby steps, and make your basics of programming strong. Prepare hard, for the big game.

Knowledge is the greatest wealth. When you have decided to learn something, you have already done a great thing! Now, the next thing to do is to do it in the right way. Like any subject, learn the fundamentals by heart. Learning the fundamentals of the subject is like laying the foundation stone for the future. If your foundation is strong, your chances of becoming a successful programmer are high.

So let’s learn and understand the basic fundamentals of programming.

A computer is an electronic device. It has plenty of powerful capabilities. At the same time, it is also a dumb machine that one needs to dictate every step to it, to perform even a simple task. Without this basic guidance, it cannot do anything. For example, if you press the key “a” on your keyboard, what happens? The letter “a” pops up on your screen. But do you know, there are plenty of codes already executing inside your computer? Because of this, you see that alphabet displayed on your screen. These codes are programmed by large teams of humans called Programmers or Coders.

What’s programming?

Programming is the ability to write computer programs or codes. And a computer program is a collection of instructions, written using a programming language. Programming language is the style or method in which we write codes or programs. We write instructions in a step-by-step pattern so that the computer can understand. But it is not as straightforward, as it sounds.

As mentioned earlier, a computer is an electronic device. It is a machine. The machine only understands machine language, and we understand only human language. So, we need some system, that can make communication happen. Here comes the role of an Interpreter. Code Interpreter reads every line of your code and checks if the machine can understand. If the machine doesn’t understand your code, you get an Error. If your entire program is good to the machine, the Compiler turns your human code into machine code. This machine code is finally executed to generate desired results. Every language has its own compiler.

Since everything starts from the programming language, it is also called a High-Level Language. The compiled code is the final state. This compiled code is what, a machine can understand, and is thus known as Low-Level Language. This is how a computer or any other electronic device works.

Let me put down some real-life examples, to elaborate on the above.

Real-life examples, to understand the fundamentals of programming.

What did he say?

As human beings, we use our language to speak, read and write, so that we can communicate with each other. “Hi”, “Hello”, “May I have this?”, “Can you do this?”, “Thank you.”, “Please visit again”, or whatsoever.

But what if you are communicating with a person who does not understand English? Some may try to show hand signs to explain, which at times may be successful, sometimes not.

I remember a funny situation I experienced, a few years ago. When I relocated to Bengaluru from New Delhi, for the first time in around 2009. I had a new job at that time. One fine weekend at my rented apartment, I suspected a cooking gas leakage. So I called the local vendor, who used to deliver gas cylinders to my doorstep. When he took my call, he was talking in Kannada, and I was speaking Hindi. Soon he realizes, we can’t talk like this, and he offered me other language options, Tamil and Telugu. I do not understand those two also. So, out of frustration, I offered him, my language options, English and Bengali. And he disconnected.

Although in a few minutes, he dropped in. Using sign language I explained the issue and he was kind enough to replace the entire cylinder. But the fact that still fascinates me that two Indians, having six different language options… Kannada, Tamil, Telugu, Hindi, Bengali, and English, still could not communicate with each other… incredible! Don’t you think?

Let’s take another example.

What did he say?

For a moment assume a situation. You have been randomly called on a stage. The host asks you to present a 15 minutes on-the-spot speech on “Society is turning Over-Regulated”. Around 200 intellectuals are staring at you, from the audience. I assume you and everyone else in the audience, understand English. What are you going to do?

Cannot say what you will do, but I know what’s going on, in my head.

  1. I know nothing about the topic.
  2. Have nothing to say. Nothing at all.
  3. Should not have been called on stage.
  4. I was not supposed to be in the auditorium.

So, what just happened out there? It is not like the earlier case. This time I know a language that, even the audience knew. But still, we could not communicate… why?

The answer is simple: I do not know what to communicate!

How is it related to the fundamentals of programming?

In the same way, if you know a programming language and you do not know what to write, knowing the language is such a waste. Programming is all about knowing what to communicate to the electronic device. As a coder, you write line-and-lines of code that solve a specific problem. Your code resolves a distinct task that the device or the system must perform.

Knowing the topic, or say, knowledge about the problem is important. Only then you can think of solving it. To solve it, you will prepare a list of steps, which is the Logic of the program. If you do not understand the problem, then, you cannot come up with a proper Logical Solution. And you will not be able to write the code.

Conclusion

To learn computer programming, you must learn & practice developing logical solutions. If you are good at logical solutions, you are a good coder. Remember, language is a medium of communication. Either it is a human language, like English, or it is a programming language like Java, C#, PHP, or whatsoever. If you do not know what to communicate, learning a language is not going to help anyway.

This is the first part of your learning the fundamentals of programming. So, stay tuned for the next topic, Binary Number System, and learn a Magic trick, coming up next.

Further, read Fundamentals of Programming: