Coding For Noobs

Types of Programming Language

The types of programming languages is a very old topic that noobs have been discussing a lot. This topic should actually be discussed. One should know how many programming languages are deployed on a machine that he is working on, especially if he is a student of programming.

Before we starting discussing programming language, Let me clear the picture of a programming language in your mind.

Just like the languages we use to communicate among other human beings. Programming languages are used to establish communication between machines to machines and machines to humans beings. Since the machines are human-made so obviously the languages which are designed to communicate with machines are also human-made. That is why these programming languages are also called artificial programming languages.

Types of Programming Languages

There are two types of programming langauges.

  1. Low-Level Programming Langauge.
  2. High-Level Programming Language.

Low-Level Programming Langauge

Low-Level programming languages are those languages those who directly in contact with the hardware. You might know the hardware only understand the binary instructions because firmware that runs on hardware is designed to take instructions in binary. The firmware is designed in machine language.

Machine Langauge

The machine language is also written in binary codes like the series of 1s and 0s. Due to the complexity of this 1s and 0s and the possibility of making an error was high, it was not a good idea to write the code in machine language, that is why the second layer of programming language was introduced called assembly language.

Assembly Language

Assembly language was designed to communicate with machine language. This language was designed to take instructions in simple human language, and pass on those instructions to machines by writing the instructions in 1s and 0s. After the invention of assembly languages, the life of programmers was easy. They could write the instructions in simple human words like Mov A1, Jump A2, stop run etcetera.

The life of programmers became easy but the computer scientists did not stop at that point. Making a computer perform some task was still complicated and only computer scientists could do that. The scientists were visionary and their vision was to enable future generations to write programs for computers. That is why a whole new concept of High-level programming language came into the picture.

High-Level Programming Langauge

The high-level programming languages were designed more like human languages. The high-level languages were designed to take instructions from Human beings in more human-like language and those instructions were supposed to be passed on to Assemble language and assembly language was supposed to transfer the instructions to the machine in machine languages like 1s and 0s. Initially, Procedural Programming Languages were designed.

Procedural Programming Language

Procedural programming languages have variables that hold the data, Conditional Statements like If, If Else, and some procedures or also called functions that perform some operations on that data. Initially, the computers were designed to perform some simple tasks like sorting some alphabets in alphabetical order. Or converting some data from one form to another. In Procedural programming language, the focus was on diving the big programs into small procedures. These procedures the programmers used to code to work together and perform some action.

A lot of pre-defined procedures were provided to programmers to perform some complicated tasks. This is why these languages were called procedural programming languages.

Some examples of Procedural Programming Languages are C, FORTRAN, PASCAL, BASIC etcetera.

Evolution is the rule of nature. Everything evolves. Every time a human was successful in writing some code for computers and made computers perform his or her desired task, he or she moved to the next more complicated task.

The tasks became more and more complicated and the programming languages were also supposed to be evolved. Initially, the code was written in simple procedures. There were limitations of programming language and new problems were in the picture. The new problems were.

  1. Data Protection.
  2. Code Repetition.
  3. Error Correction.

To tackle the above problems, the Object-Oriented programming concept came into the picture.

Why we Need Object-Oriented Programming

This time computer scientists looked towards a different approach to design a programming language that is closer to the real world. Before we talk about the Object-Oriented Programming concept, let’s talk about this new approach.

In the real-world when you see a person, do you instantly get his/her name or his/her phone number? Why don’t people write their names and phone number on their foreheads for other people? It can make the life of other people and on the other hand, everyone would be called by their name.

I know there is a smile on your face at the moment because this idea of writing name and phone number on the forehead is funny. This is funny because there are two types of information about every person.

  1. Public information.
  2. Private information.

Public information.

When you look at the person some information is instantly transferred to the other people. You have no control over it. Such information is.

  1. The color of your skin.
  2. The color of your clothes.
  3. The color of your hair.
  4. Your sense of clothing etcetera.

I hope you get the idea of public information.

Private Information

Some information is not revealed when you look at the person. Such information is his/her

  1. phone number.
  2. Name.
  3. House Address.
  4. Sexual orientation.
  5. Family background.
  6. Criminal record etcetera.

I hope you get the idea of private information. Such information does not need to be revealed to the entire world for a person to live his/her life happily. If such information is revealed to someone who misuses it. The person can be targetted and tortured physically/mentally. Private information should not be left unsecured. The owner of private information should have full control over who accesses his/her personal information.

There is a service called Google Fit. This service is used to sync your health-related data to their servers. The Google Fit application in your phone sync with your smartwatch or smart band or other medical device application and save your personal health data to their servers. Google fit is just one example, there are hundreds of services and applications that are like that.

The services and applications like Google fit need to be designed in a programming language that keeps your data protected and at the same time should be user friendly as well so that programmers can design more complicated application with less complicated code.

Object-Oriented Programming Language

When we discuss the types of programming languages, Object Oriented shines out. It has got all the features that a programming language needs to meet today’s programming requirements.

  1. Data Protection.
  2. Code Repetition.
  3. Error Correction.
  4. Less Complicated code and more complicated tasks.

Some examples of Object Oriented Programming langauges are –

  1. Jave
  2. C#
  3. C++ also supports the OOPS concept.
  4. Python etcetera

The object-oriented programming has 6 pillers.

  1. Object
  2. Class
  3. Inheritance
  4. Polymorphism
  5. Abstraction
  6. Encapsulation

Object

Everything is an object that you can imagine and has a name. In OOP (Object Oriented Programming). We consider everything as an object and divide its properties into two categories private and public.

Class

A class is a way of designing an object in programming. If you want to create a car in programming, means you need to create a class named car and declare its properties as variables, the actions that a car can perform will be declared as methods.

Inheritance

Inheritance is a way of using the properties and methods of one class into another class. You can make a class and sub-class. The sub-class will have the access to properties and methods of parents class if access modifiers allow.

Polymorphism

Polymorphism is when a program or a piece of code is designed to perform a certain task. But when it is bound with some other code its functionality changes. For example, a function called PrintShape() is created to print the shape on the console. There are two other classes which are Circle and Square. When PrintShape() is used with Circle it will print a circle, when it is used with Square it will print a Square on the console.

I hope you get the idea of polymorphism.

Abstraction

Abstraction in the terms of a programming language means, hiding complex code and reveal the functionality to the user. The dialer of a cell phone is the best example of Abstraction. The user does not need to know the code of dialer, he just needs to dial the number and make a phone call.

Encapsulation

Encapsulation is used to protect the data, whenever a programmer is writing a class he needs to keep data encapsulated inside the class by using access modifiers like Public, Private, and Protected. The data should not be accessible outside unnecessarily. If the data needs to be accessed outside the class it should be in a very controlled manner like using getters and setters or using custom methods.

Conclusion

Types of Programming Languages topic is explained in detail in this topic however there are a lot of things that are not explained like setters and getters and custom methods, I will be explaining them in future articles.

After reading this article I hope you have developed some level of understanding of Types of Programming Languages. Below is the short version of this article.

Low-Level Programming Langauge.

High-Level Programming Language.

See you next time guys. Good Luck!

Exit mobile version