What is programming

What is Programming : A Beginner Guide

Have you ever noticed how your phone knows when to buzz, how google gives you the right answers or how video games respond to every click of button you press. Behind all these digital wonders is something invisible and powerful which is known as “Programming”. But what is programming ? In this article we are going to break it all down in the simplest way possible. Let’s dive in.

What is Programming

As the dictionary describes programming is the process of preparing an instructional program for a device. That is really a complex definition for beginners to understand properly. So if we want to understand in the simplest way programming is what helps a computer to complete a specific task without making any mistakes. If you think machines and computers are smart you are wrong. Computers are only smart because we program them to be smart that’s it.

Computers basically cannot understand the languages we humans use, they only understand the ‘machine code’ which is a series of 1’s and 0’s. The machines can read all instructions written in English or any other language we use only as 0’s and 1’s. Therefore in order to talk to your computer you must first translate your English instructions to 1’s and 0’s which is also known as ‘Binary’. So this translation cannot be done by hand. This is where programming languages come into play.

2150062008
Image designed by Freepik

Programming languages are basically a middle man that translate the program we write in English or any other languages to machine code so that computer can understand the program we wrote. These languages are very useful for so called software developers. Nowadays there are many programming languages in the world. Languages like ‘Java’ , ‘Python’ are used for general purposes where as ‘HTML/CSS’ are used for specific tasks such as construct a website.

Each language also varies in how powerful it is. We measure how powerful a program language is by how similar it is to machine code. Lower the power or level more it is similar to machine code. Assembly or C are examples for Low-level programming languages while Java and Python are examples for High-level programming languages. Choosing a programming language is a matter of preferences.

How to write code

No we know what programming is, let us now see how do we write code. We cannot simply type words using programming languages we mentioned above into a text document and expect that the computer is able to carry out a task. The answer to this is by using an IDE (Integrated Development Environment). IDE is a place to write, run and debug and also convert the code into machine code. This provides a user interface to write code easily for programmers. Some of the benefits of using an IDE are :

  • Built in Error-checking – When code isn’t right
  • Auto-fill – For frequently used words
  • Project Hierarchy – Organize files in a project
112218 0.6715878
Image from JetBrains

IDE typically consists of a Central area for writing code, additional windows like console(display useful information about the code) , project hierarchy, preview screens , etc. Anyways we cannot just simply type text in an IDE, convert it to machine code and expect the computer to understand it. Each programming language has its own set of rules we must follow within an IDE. They are known as Syntax. These are similar to grammar in real life languages. Breaking these rules or ignoring these syntax will result in an error in a program.

Some examples for these rules (syntax) are how we type out certain functions, what we put at the end of each line of code, how you set up certain functions and many more. If we forget one semicolon or misplace a single character, the program will not run and send you back a syntax error. This is similar to forgetting a comma in a sentence and messing up the entire context of what you are trying to say. Another cool part of IDE’s is that they will let us know if and when there are syntax errors in our code.

How computers run the program

Now that we know what is programming and how to write code now we have to know what is happening after we run the code. Programmers keep track of their progress by looking at the console. Console is a text interface within the computer or IDE that us programmers can use for a variety of purposes. The main use of the console is to output text from the program using code. More specifically by a print statement.

Print statement allow us to prints the text to the console for the programmers viewing pleasure. Print statement is actually the first coding part we are going to talk about in this articles. Print is the most basic yet one of the most important function in almost every programming language. To use this simply instruct the console to print and then include whatever you want to be printed inside the parenthesis. As an example in python print(“Hello World”) resulting Hello world text in the console. Another example is print(4+3) results 7 in the console.

The console is mainly a Developer Tool. It is not meant to be used and interacted with by the end user except in very abstract cases such as in Text-based games and simple programs. The console tends to be hidden away behind the scenes. Do not try and implement the console in the final product.

Introduction to programming
Image designed by Freepik

Uses of programming

Programming allow humans to use computers as a very obedient tool listening to every command we tell and carry out the tasks we want. In modern world we can use programming for almost everything. Some of them are:

  • Helps to control robots that take care of patients.
  • Helps to create robots that can roam around mars.
  • Manufacture self-driving cars.
  • Help doctors to cure patients.
  • Helps to create games.
  • Helps to create movie animations and effects.
  • Create websites and applications.
  • Translating texts.

Conclusion

So as we now know programming is the art of telling the computer to do a specific task. The cool part is anyone can learn how to code and programming whether you are young or old. In nowadays there are bunch of resources in the web to learn programming all you need is curiosity and patience. Programming is everywhere and it is evolving.

With the rise of AI and machine learning programming is going beyond automation. I call programming as a superpower which anyone can have if that person really want to. Programming helps you to solve problems and how to think differently. Programming is the next type of skill that every human being will need in the future to the survival of this AI- driven world. Stay tuned with TechWiseAid where we will cover more about programming fundamentals and computer science.

Leave a Reply

Your email address will not be published. Required fields are marked *