Computer programming

Rumman Ansari   Software Engineer   2022-10-09   6466 Share
☰ Table of Contents

Table of Content:


Are you aiming to become a software engineer one day? Do you also want to develop a mobile application that people all over the world would love to use? Are you passionate enough to take the big step to enter the world of programming? Then you are in the right place because through this article you will get a brief introduction to programming. Now before we understand what programming is, you must know what is a Computer. A Computer is a device that can accept human instruction, processes it and responds to it or a computer is a computational device which is used to process the data under the control of a computer program. Program is a sequence of instruction along with data.
The basic components of a computer are:

  1. Input unit
  2. Central Processing Unit(CPU)
  3. Output unit

The CPU is further divided into three parts-

  1. Memory unit
  2. Control unit
  3. Arithmetic Logic unit

 

Most of us have heard that CPU is called the brain of our Computer because it accepts data, provides temporary memory space to it until it is stored(saved) on the hard disk, performs logical operations on it and hence processes(here also means converts) data into information. We all know that a computer consists of hardware and software. Software is a set of programs that performs multiple tasks together. An operating system is also a software (system software) that helps humans to interact with the Computer system.

A program is a set of instructions given to a computer to perform a specific operation. or Computer is a computational device which is used to process the data under the control of a computer program.While executing the program, raw data is processed into a desired output format. These computer programs are written in a programming language which are high level languages. High level languages are nearly human languages which are more complex then the Computer understandable language which are called machine language, or low level language.So after knowing the basics, we are ready to create a very simple and basic program. Like we have different languages to communicate with each other, likewise, we have different languages like C, C++, C#, Java, python, etc to communicate with the computers. The Computer only understands binary language (the language of 0’s and 1’s) also called machine-understandable language or low-level language but the programs we are going to write are in a high-level language which is almost similar to human language.

The piece of code given below performs a basic task of printing “hello world! I am learning programming” on the console screen. We must know that keyboard, scanner, mouse, microphone, etc are various examples of input devices and monitor(console screen), printer, speaker, etc are the examples of output devices.


main()
 {
 clrscr();
 printf(“hello world! I am learning to program);
 getch();
 } 

At this stage, you might not be able to understand in-depth how this code prints something on the screen. The main() is a standard function that you will always include in any program that you are going to create from now onwards. Note that the execution of the program starts from the main() function. The clrscr() function is used to see only the current output on the screen while the printf () function helps us to print the desired output on the screen. Also, getch() is a function that accepts any character input from the keyboard. In simple words, we need to press any key to continue(some people may say that getch() helps in holding the screen to see the output).

Between high-level language and machine language there are assembly language also called symbolic machine code. Assembly language are particularly computer architecture specific. Utility program (Assembler) is used to convert assembly code into executable machine code. High Level Programming Language are portable but require Interpretation or compiling toconvert it into a machine language which is computer understood.

Following are the main five generations of computers and programming language of different generations.

S.No Generation & Description
1 First Generation

The period of first generation: 1940-1952.

Programming Language:

FORTRAN-i

2 Second Generation

The period of second generation: 1952-1964.

Programming Language:

FORTRAN-ii

ALGOL-60

COBOL

LISP

3 Third Generation

The period of third generation: 1964-1971.

Programming Language:

PL/I

ALGOL-W

ALGOL-68

Pascal

SIMULA-67

APL

SNOBOL

4 BASIC

C

4 Fourth Generation

The period of the fourth generation: 1971-1980.

Programming Language:

CLUE

ALFARAD

UCJID

Reformed

Pascal

MODULA

EDA

ORACLE

5 Fifth Generation

The period of the fifth generation: 1980-onwards.

Programming Language:

Artificial Intelligence Languages

Characteristics of a programming Language

  • A programming language must be simple, easy to learn and use, have good readability and human recognizable.
  • Abstraction is a must-have Characteristics for a programming language in which ability to define the complex structure and then its degree of usability comes.
  • A portable programming language is always preferred.
  • Programming language’s efficiency must be high so that it can be easily converted into a machine code and executed consumes little space in memory.
  • A programming language should be well structured and documented so that it is suitable for application development.
  • Necessary tools for development, debugging, testing, maintenance of a program must be provided by a programming language.
  • A programming language should provide single environment known as Integrated Development Environment(IDE).
  • A programming language must be consistent in terms of syntax and semantics.