Computer program is a set of instructions that guide a computer to execute a particular task. It is like a recipe for a cook in making a particular dish. The recipe contains a list of ingredients called the data or variables, and a list of steps that guide the computer what to do with the data. So programming is the technique of making a computer to perform something you want to do.
Programming or coding is a language that is used by operating systems to perform the task. We know computer understands binary languages with digits 1s and 0s. These binary languages are difficult to understand by human; so we generally use an intermediate language instead of binary language. Again the program uses high-level language that is interpreted into bytes that the computer understands. So a programmer writes a source code and uses a tool or interpreter that allows the computer to read, translate and execute the programs to perform a function.
Today there are different user friendly and easily understandable languages supporting different styles of programming. Some of the computer languages are like formula translation (FORTRAN), C, C++, PASCAL, BASIC, Java, C sharp(C#) and many other high-level languages. Further an interpretable p-code or byte code is generated in case some advanced languages like Java and .NET.
These languages enable one to create and perform various kinds of applications. However, in the whole process of programming it is important to understand that a program written in any of the high-level languages needs to be converted to machine language to run on a computer. This conversion is done with a complier or an interpreter. In all kinds of programming languages a complier and if required an interpreter is available. But the basic difference between these two is that the complier converts the entire program into machine code. An interpreter, on the other hand, converts one statement at a time to machine language and executes it.
The most important aspect of programming is to analyze and adopt specific solution while solving any problem. This needs a programming approach that defines the modularity of program that one writes and how it is related to others in an application. Basically there are two different programming approaches; procedure oriented and object oriented. The procedure oriented programming (POP) approach focuses on creating and ordering procedures or a block of code keeping in mind to accomplish a specific job. The key features of this kind of approach are: use of procedures, sequencing of procedures and sharing global data.
However, in case of the object oriented programming (OOP) approach the focus is totally towards identifying objects or data and not on creative activities. Unlike the procedure oriented programming approach where a peace of code uses data, the object-oriented approach the data uses a peace of code to execute tasks. Principal features of the object-oriented approach are: data classification into classes and objects, data encapsulation, abstraction, inheritance, and polymorphism. This kind of approach provides a realistic representation, flexibility to change and data security. Now a days most of the high level programming languages such as Java, C#, C++, and Visual Basic are based on object oriented approach.