To better understand the world of software, we should at first understand the difference between programming and computer programs.
Programming is the activity of writing computer programs, while a computer program consists of instructions for the computer and its Central Processing Unit (CPU).
Programming languages are a subset of computer languages and their grammar is usually very rigid. Programming languages are also usually Turing complete.
During the history of programming languages, we have already had 5 generations of programming languages. From first to the third generation are considered imperative, from 4th to 5thdeclarative, even though each programming language has characteristics of both paradigms.
1th Machine language.
These languages are computed directly on the machine (hardware).
2d Assembly language
Assembly languages need an assembler to be compiled by the machine, they are strictly related to the hardware
3rd High-level language
High-level languages focus on the problem
4th Domain-specific language
These languages are used in a specific domain and they focus less on the problem but more on how the solution should look like
5th Problem-solving language
These new languages are mainly used for artificial intelligence and machine learning, they focus on specifying the problem and defining solution constraints
In order to translate the code to machine language, computers need utility programs called assemblers. But starting from 3rd generation programming languages, assemblers aren’t enough: computers also need compilers to be able to transform abstract descriptions to computer instructions.
A compiler enables a program to be launched directly on the hardware.
An interpreter, instead, emulates hardware that would be able to run that high-level language.
Some languages like Java use a hybrid method: a Java program is first compiled into an intermediate language called Java Bytecode, and then is interpreted on the virtual hardware Java Virtual Machine
The process of software development isn’t just programming. We can define 5 different phases:
- Design. Design is the conception of the software
- Coding (or writing). Coding is the actual implementation
- Testing. In this phase, functionalities previously created are tested
- Debugging. Correction of so-called “bugs” (errors in the code)
- Maintenance. Further enhancements, updates
In this article, we have discussed the foundations of programming and the distinction between programming and computer programs. You should now have a better knowledge of what programming is and how it is used.