Programming is both art and science. It is used to make hardware usable. Basically, programming solves one/many problems. Like we communicate with each other using languages, programmers use programming languages. There are several of them. The language is a high level abstraction. This language when translated into machine language makes the computer execute the instructions. Every CPU has an instruction set which describes its vocabulary and grammar. A CPU cannot execute an instruction outside its instruction set. There are the following types of programming languages :
Procedural Programming Language
Procedural language, as the name implies, relies on predefined and well-organized procedures, functions or sub-routines in a program’s architecture by specifying all the steps that the computer must take to reach a desired state or output. They contain a set of procedures or functions written to make the program modular. They use multiple variables, heavy loops and other elements. For e.g: ‘C’ language, Fortran
Functional Programming Language
Functional programming language typically uses stored data, frequently avoiding loops in favor of recursive functions.The functional programing’s primary focus is on the return values of functions, and side effects and different suggests that storing state are powerfully discouraged. For e.g: Lisp, Haskell
Object-oriented Programming Language
This programming language looks at the world in terms of objects and imbibes the same concepts into the language. An object has two things : Attributes and Methods. Attributes are the properties of an object and methods are things that the object can do. Encapsulation, Inheritance and Polymorphism are some of the things that these languages support. For e.g: Java, C#
Scripting Programming Language
Logic Programming Language
These types of languages let programmers make declarative statements and then allow the machine to reason about the consequences of those statements. In a sense, this language doesn’t tell the computer how to do something, but employing restrictions on what it must consider doing. for e.g: Prolog, Mercury
Some languages are a mix of the above.
The program is losing the charm in the world of data. Earlier, we use to take the data to where the program is residing. Now the shift is towards taking the programs to where the data is. This is a concept in Hadoop.
Unlike the CPU which has a fixed instruction set, our brains are neural networks. They keep adding to their vocabulary – new experiences every day. Instructions come together to form super instructions. Thus our brain keeps on expanding its instruction set. The similarity is that both the CPU and brain works on electricity. In the brain, there is chemistry also.