Introduction to Programming Languages
Introduction to Programming Languages
Programming Languages:-
Machine Language.
Assembly Language.
High Level Language.
System Language.
Scripting Language.
This is the language that is written for the computer hardware. Such language is
affected directly by the central processing unit (CPU) of a computer system.
Assembly Language
The high level language is simple and easy to understand and it is similar to
English language. For example, COBOL, FORTRAN, BASIC, C, C+, Python,
etc.
High-level languages are very important, as they help in developing complex
software and they have the following advantages:-
Unlike assembly language or machine language, users do not need to learn
the high-level language in order to work with it.
High-level languages are similar to natural languages, therefore, easy to
learn and understand.
High-level language is designed in such a way that it detects the errors
immediately.
High-level language is easy to maintain and it can be easily modified.
High-level language makes development faster.
High-level language is comparatively cheaper to develop.
High-level language is easier to document.
System Language
Data can be described as unprocessed facts and figures. Plain collected data as
raw facts cannot help in decision-making. However, data is the raw material that
is organized, structured, and interpreted to create useful information systems.
Data is defined as 'groups of non-random symbols in the form of text, images, and
voice representing quantities, action and objects'.
OR,
Information
Information is a data that has been processed into a form that is meaningful to
recipient and is of real or perceived value in the current or the prospective action or
decision of recipient.
Knowledge
Characteristics of Information:-
Good information is relevant for its purpose, sufficiently accurate for its purpose,
completes enough for the problem, reliable and targeted to the right person. It is
also communicated in time for its purpose, contains the right level of detail and is
communicated by an appropriate channel, i.e. one that is understandable to the
user.
Availability/accessibility
Information needs to be accurate enough for the use to which it is going to be put.
To obtain information that is 100% accurate is usually unrealistic as it is likely to
be too expensive to produce on time Accuracy is important. As an example, if
government statistics based on the last census wrongly show an increase in births
within an area, plans may be made to build schools and construction companies
may invest in new housing developments. In these cases any investment may not
be recouped.
Reliability or objectivity
Reliability deals with the truth of information or the objectivity with which it is
presented. You can only really use information confidently if you are sure of its
reliability and objectivity.
Relevance/appropriateness
Completeness
Information should contain all the details required by the user. Otherwise, it may
not be useful as the basis for making a decision. For example, if an organization is
supplied with information regarding the costs of supplying a fleet of cars for the
sales force, and servicing and maintenance costs are not included, then a costing
based on the information supplied will be considerably underestimated.
Level of detail/conciseness
Information should be in a form that is short enough to allow for its examination
and use. There should be no extraneous information. For example, it is very
common practice to summaries financial data and presents this information, both in
the form of figures and by using a chart or graph. We would say that the graph is
more concise than the tables of figures as there is little or no extraneous
information in the graph or chart. Clearly there is a trade-off between level of
detail and conciseness.
Presentation
Timing
Information must be on time for the purpose for which it is required. Information
received too late will be irrelevant. For example, if you receive a brochure from a
theatre and notice there was a concert by your favorite band yesterday, then the
information is too late to be of use.
What is a program?
A program is a collection of data and instructions that can
be executed by a computer to perform a specific task. A computer
program is usually written by a computer programmer in a programming
language.
Introduction to Computer Programming & Concept.
If you understood what a computer program is, then we will say: the act of
writing computer programs is called computer programming.
Java.
C.
C++.
Python.
PHP.
Perl.
Ruby.
Program Design: -
The next stage is the program design. The software developer
makes use of tools like algorithms and flowcharts to develop the
design of the program.
Algorithm.
Flowchart.
Coding:-
Once the design process is complete, the actual computer program
is written, i.e. the instructions are written in a computer language.
Coding is generally a very small part of the entire program
development process and also a less time consuming activity in
reality.
In this process all the syntax errors i.e. errors related to spelling,
missing commas, undefined labels etc. are eliminated.
For effective coding some of the guide lines which are applied are :
Use of meaningful names and labels of variables,
Simple and clear expressions,
Modularity with emphasis on making modules generalized,
Making use of comments and indenting the code properly,
Avoiding jumps in the program to transfer control.
Debugging:-
At this stage the errors in the programs are detected and
corrected.
This stage of program development is an important process.
Debugging is also known as program validation.
Some common errors which might occur in the programs
include:
UN initialization of variables.
Reversing of order of operands.
Confusion of numbers and characters.
Inverting of conditions. Eg: - Jumping on zero instead of on not
zero.
Testing:-
The program is tested on a number of suitable test cases.
A test plan of the program has to be done at the stage of the
program design itself.
This ensures a thorough understanding of the specifications.
The most trivial and the most special cases should be
identified and tested.
It is always useful to include the maximum and minimum
values of all variables as test data.
Documentation:-
Documentation is a very essential step in the program
development.
Documentation helps the users and the people who maintain
the software.
This ensures that future modification if required can be done
easily. Also it is required during redesigning and
maintenance.
Maintenance:-
Updating and correction of the program for changed
conditions and field experience is accounted for in
maintenance.
Maintenance becomes essential in following situations:
Change in specification,
Change in equipment,
Errors which are found during the actual execution of the program
What is Algorithm?
The word Algorithm means “a process or set of rules to be
followed in calculations or other problem-solving operations”.
Therefore Algorithm refers to a set of rules/instructions that step-
by-step define how a work is to be executed upon in order to get
the expected results.
It can be understood by taking an example of cooking a new recipe. To
cook a new recipe, one reads the instructions and steps and executes
them one by one, in the given sequence. The result thus obtained is the
new dish cooked perfectly. Similarly, algorithms help to do a task in
programming to get the expected Output. The Algorithm designed is
language-independent, i.e. they are just plain instructions that can be
implemented in any language, and yet the output will be the same, as
expected.
What are the Characteristics of an Algorithm?
As one would not follow any written instructions to cook the recipe, but
only the standard one. Similarly, not all written instructions for
programming are an algorithm. In order for some instructions to be an
algorithm, it must have the following characteristics:-
Clear and Unambiguous:- Algorithm should be clear and
unambiguous. Each of its steps should be clear in all aspects and
must lead to only one meaning.
Well-Defined Inputs:- If an algorithm says to take inputs, it
should be well-defined inputs.
Well-Defined Outputs:- The algorithm must clearly define what
output will be yielded and it should be well-defined as well.
Finite-ness:- The algorithm must be finite, i.e. it should not end up
in an infinite loops or similar.
Feasible:- The algorithm must be simple, generic and practical;
such that it can be executed upon will the available resources. It
must not contain some future technology, or anything.
Language Independent:- The Algorithm designed must be
language-independent, i.e. it must be just plain instructions that can
be implemented in any language, and yet the output will be same,
as expected.
It shows the flow of data between various functions of system and specifies
how the current system is implemented.
Square Source or
Destination of
Data.
Circle Process
transforming data
flow.
It may specify the physical programming logic without actual coding during
and after the physical design.