Introduction to Programming
Introduction to Programming
Basic Model of Computation:
"Computer" mean any electronic high-speed data processing device or system which performs logical, arithmetic, and memory functions by manipulations of electronics and includes all input, output, processing, storage, Computer software, or communication facilities.
Externally it is seen as a system of several inter-connected equipment such as keyboard, monitor mouse, printer, CPU etc. Internally it can be depicted as
In this working model of computer we give data and instructions to (Central Processing Unit) CPU as input, using input devices such as keyboard, mouse, scanner etc.Control Unit of CPU then transfer this input to primary memory so that it can be saved temporarily. Primary memory, after saving, sends a copy of input back to the control Unit. Now, the Control Unit sends into the Arithmetic Logic Unit (ALU) where arithmetical and logical calculations take place and input gets converted into output. This output is then sent to the output device by the control Unit where it is received by us. From giving input to computer to receiving output from computer all the activities are called Processing.
Computation, Calculation, Presentation, sorting printing etc. are the activities which are collectively called processing. A basic data processing model performs this computation in the following six steps :
- Recording:
In this first step of the computation model, data entered through the keyboard, for processing are stored in the memory of the computer.
- Classification:
After recording input data into the memory, the second step is to arrange them in the desired order.
- Sorting:
Sorting means arranging the categorized data in any order of value present in them.
- Calculation:
In this step of computation the data which was recorded, classified and sorted earlier is processed using a computer program.
- Summarization :
During the step of calculations when the computer processes the data to prepare the required result, some extra and intermediate results are also generated to prepare the required result. In this step of computation we remove those intermediate results from the memory and keep the required results only.
- Reporting:
This is the presentation step of computation. Here we format the obtained results in a presentable manner.
Programming Languages
Language is a Medium of Communication. Hindi, English etc. are all Medium of Communication between persons. But, the language we are talking about called Computer languages or Programming Languages
Steps of Programming:
Programming Analysis :
In this step of programming the given problem is analyzed for solution. This analysis includes identifying what output is required; to prepare this output what inputs are required; which steps will be required to convert the given input. Into desired output etc.
Program Design :
In this step of programming, the programmer prepares the general structure of the program. Program design is a diagrammatic representation of logic used in the program to solve the problem. Flowchart, Data Flow Diagram, Decision Table, Decision Tree etc. Are the tools used to prepare program design.
Program Coding :
representation of logic used in the program to solve the problem. Flowchart, Data Flow Diagram, Decision Table, Decision Tree etc. Are the tools used to prepare program design .
Program Debugging :
In computer terminology bug means error in the program and debug means removing error from the program. In this step programmers try to search and remove errors from the program if there are any.
Program Documentation :
A computer program is always difficult to understand and operate for the person who has not developed it. Therefore it is the responsibility of the programmer to prepare an instruction manual along with the program. This instruction manual should serve the purpose of guiding users about how to operate the program . It is also called program documentation and user Guide .
Program Maintenance :
In commercial data processing applications, user requirements from the computer program do not always remain the same, it changes with time. Whenever a user's requirement from the program changes, the programmer has to amend the program. Modification in the program after implementation is called Program Maintenance.
-: Compilation :-
In the modern time computer programs are written in high level language or the languages developed after HLL. Computer being a machine understands only machine language (0s and 1s). So to run the program on a computer and get the result of data processing we first have to convert it from HLL to machine language . Compilation is the process to convert a program written in any High level language to machine level language. Programs written in high level language are called Source Codes and programs of machine language are called Object Codes. So, converting source code into object code is called Compilation.
Some special ready-made programs are used for the compilation process and they are called “Compiler”. In addition to Compiler several other programs available for language translation such as Interpreter, Assembler.
-: Testing and Debugging :-
Process of searching and removing errors from the program is called “Testing and Debugging”. There are several approaches to program testing and debugging. Some of them are as per given below:
- Paper Walk Through :
In this approach of debugging, the programmer, who has developed the program, hands over the program to another fellow programmer to check for errors? No help from the computer is taken in this process of testing and debugging .
Test Pack :
In this approach of debugging, we first prepare a set of dummy data called Test pack, which resembles actual or live data. Then the program to be tested for errors is fed into the computer and run over this dummy data set. The results obtained are then analyzed for accuracy. If results are accurate it is assumed that the program is error free and can be put to use.
Diagnostic Software:
Nowadays some special software is ready-made available which can find errors present in the program. Some of them only identify and mark the errors in the program. And some more experts can even rectify the errors from the program. These special programs are called Diagnostic Software.
-: Algorithm :-
Algorithms can be defined as- “The sequential steps of solution of a given problem which is written in human understandable language like English, is called Algorithm”. After thorough analysis of the problem when the programmer begins to design its solution, the first step that it takes is the development of algorithms.
- Algorithms are written in human understandable language like English so it is easy to understand by both technical and non-technical persons.
- Since it depicts the logic of the program it is easy to write a new program in computer language.
- Algorithms also help in program maintenance.
- There is less standardization in writing algorithms, so two people can wraith different algorithms for the same problems and both can be correct.
- Writing algorithm is a manual process so no help from the computer.
Thanks for Reading this Article
This Article is presented by Mansi Khokoran
if you like it leave your positive comment below :)
Comments
Post a Comment