Вы находитесь на странице: 1из 46

A BRIEF HISTORY OF

PROGRAMMING
LANGUAGES

Jones Apawu
Department of Maths
Education
University of Education,
Winneba
ICTD 121 1
Why Programming
Languages
• In order for computers to accept
commands from humans and
perform tasks vital to
productivity and e-commerce, a
means of communication must
exist. Programming languages
provide this necessary link
between man and machine.
ICTD 121 2
What is programming
language?
• A programming language is a
set of written words, symbols,
and codes, with a strict set of
usage rules called the
language syntax, that a
developer uses to
communicate instructions to a
computer. ICTD 121 3
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming Languages
• Basically, programming languages can
be classified as low-level and high-
level languages.
• A low-level language is a
programming language that provides
little or no abstraction of
programming concepts and is very
close to writing actual machine
instructions. ICTD 121 4
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming Languages
• Low-level languages are considered to be
closer to computers. In other words, their
prime function is to operate, manage and
manipulate the computing hardware and
components. Programs and applications
written in a low-level language are directly
executable on the computing hardware
without any interpretation or translation.
• Two good examples of low-level languages
are machine language and assembly
ICTD 121 5
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming Languages
• Machine language, which is referred to
as a first generation programming
language, is used to communicate
directly with the computer and uses
0s and 1s to communicate with the
computer.
• Lying between machine language and
high-level languages is assembly
languages. ICTD 121 6
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming Languages
• Assembly language uses the same
instructions and structure as machine
language but the programmer is able
to use meaningful names or
abbreviations instead of numbers.
• Assembly language is similar to
machine language, but it is much
easier to program in because it allows
a programmer to substitute names for
ICTD 121 7
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming
Languages
• Machine language consists of
numbers only.
• Assembly language is referred to
as a second generation
programming language.
• An assembler translates assembly
language into machine code.
ICTD 121 8
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming
Languages
• High-level programming languages,
are often referred to as third
generation programming
languages (3GL) and were first
developed in the late 1950s.
• High-level programming languages
have English-like instructions and
ICTD 121 9
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming
Languages
• High-level programming languages,
while simple compared to human
languages, are more complex than
the language the computer
actually understands, called
• machine language
ICTD 121 10
TYPES OF PROGRAMMING
LANGUAGES
Hierarchy of programming Languages
• Languages such as C, C++, BASIC
(Beginners All Purpose Symbolic
Instruction Code), ALGOL (ALGorithmic
Oriented Language, released in the
1960s), COBOL (COmmon Business-
Orientated Language, the initial
specifications being released in April
1960), Java etc. are all high-level
languages. ICTD 121 11
Other HLLs
• FORTRAN
• Visual Basic, Visual C++, Visual
Foxpro, Visual J++/Java
• Scala, F#, Clojure and Lisp (LISt
Processing).
• Java, C# and C++, object Pascal,
Smalltalk, Simula, Ada, Eiffel
ICTD 121 12
Note
• Regardless of what language you
use, you eventually need to
convert your program into
machine language so that the
computer can understand it.
There are two ways to do this:
• compile the program
• interpret the program
ICTD 121 13
Compiler
• A compiler is a program that
converts an entire program
into machine code before the
program is executed.

ICTD 121 14
Interpreter
• An interpreter program executes
other programs directly, running
through program code and executing
it line-by-line.
• As it analyses every line, an
interpreter is slower than running
compiled code but it can take less
time to interpret program code than
to compile and then run it
ICTD 121 15
4GL
• Lying above high-level languages are
languages called fourth-generation
languages (usually abbreviated 4GL).
4GLs are far removed from machine
languages and represent the class of
computer languages closest to human
languages.
• A fourth generation language is
designed with making problems in a
specific domain simple to implement. 
ICTD 121 16
4GL
• Some examples include: SQL (Structured
Query Language), SAS (Statistical
Analysis System), R, MATLAB's GUIDE,
ColdFusion (Adobe ColdFusion is a
commercial rapid web application
development platform created by JJ
Allaire in 1995. The programming
language used with that platform is also
commonly called ColdFusion), CSS
(Cascading Style Sheets), etc.
ICTD 121 17
5GL
• Many researchers speak of 5GL
languages as constraint systems.
 The programmer inputs a set of
logical constraints, with no specified
algorithm, and the AI
(Artificiconstraint systemsal
Intelligence)-based compiler builds
the program based on these
constraints. Some examples include:
Prolog (Programming in Logic),
ICTD 121 18
The Best Programming
Language
• The question of which language is best is one
that consumes a lot of time and energy
among computer professionals. Every
language has its strengths and weaknesses.
For example, FORTRAN is a particularly good
language for processing numerical data, but it
does not lend itself very well to organizing
large programs. Pascal is very good for
writing well-structured and readable programs,
but it is not as flexible as the C programming
language. C++ embodies powerful object-
oriented features, but it is complex and
ICTD 121 19
The Best Programming
Language
• The choice of which language to use
depends on the type of computer the
program is to run on, what sort of
program it is, and the expertise of
the programmer.

ICTD 121 20
Some Factors to be Considered in
Selecting a Programming
Language
• Nature of the task on hand
• Company policy
• Availability of the language
• Availability of trained staff
• Reliability
• Development and maintenance cost
• etc.
ICTD 121 21
PROGRAMMING
What is programming?
• Computer programming (often shortened to
programming or coding) is the process of
writing, testing, debugging/troubleshooting,
and maintaining the source code of computer
program.
• It can also be the act of writing computer
programs, which are a sequence of
instructions written using a Computer
Programming Language to perform a
specified task by the computer.
ICTD 121 22
PROGRAMMING
Getting Started/Choosing a Language
• Many people think they must choose
a specific programming language in
order to become a programmer,
believing that they can only do that
language. They ask themselves, "
Should I be a C programmer or a
Java programmer? That's completely
the wrong question.
ICTD 121 23
PROGRAMMING
Getting Started/Choosing a Language
• The right question is "How can I become
a good programmer?" It is not necessary
to master many different languages or
even more than one – a programmer
could excel in one language and have
only a vague working idea how to
program others. It is useful to know
many different methods for solving
computer problems, also known as
ICTD 121 24
PROGRAMMING
Getting Started/Choosing a Language
• Different languages tend to be used to
create different types of programs,
however, so choose a language that you
feel is relevant to what you want to do. If
you decide that a language does not suit
your needs, you can always move on to
a new language.

ICTD 121 25
Why learn Computer Programming?
• Programming teaches you how to solve
problems
• You may not be programming, but knowing a
little bit about Programming will help you work
with people who do.
• Programmers make lots of money.
• Programming really is fun.
• Programming is very intellectually rewarding.
• Learning Programming teaches you real life
lessons. ICTD 121 26
A computer is a tool for
solving problems with
information, hence writing a
program without knowing
what problem one is trying
to solve is the equivalent of
swinging a knife without
knowing what it is that one
wants to cut.
PROGRAM
What is a program?
A program is a set of step-by-step
instructions that directs the computer to
do the tasks you want it to do and produce
the results you want.
Computer program also known as an app,
application, software application or
software program is the most common
software on the computer that performs a
special function or task.
ICTD 121 28
Apps Vs. Program
• When Apple introduced the iPhone they
popularized the term 'App,' but an app
(application) and program are really the same
thing. Today, most people think of an 'app' as
an application on an Apple computer or a
program on a smartphone or tablet and a
program as something that runs on a
computer.
• With all the different ways companies and
people use these terms it is best to think of an
application, app, and program as the same
ICTD 121 29
Some Examples of Computer
Programs
• There are millions of different programs
available for computers, phones, and
other devices today.

ICTD 121 30
Some Examples of Computer
Programs

ICTD 121 31
SOFTWARE DEVELOPMENT LIFE
• Software development life cycle (SDLC)
is a process that consists of a series of
planned activities to develop or alter the
Software Products. Also, program
development life cycle is a set of phases
and steps that are followed by
developers to design, create, and
maintain a computer program.
• The phases of the program development
life cycle are: ICTD 121 32
SOFTWARE DEVELOPMENT LIFE
• Gather and Analyze the Program
Requirements — The developer must obtain
the information that identifies the program
requirements and then document these
requirements.
• Design the User Interface — After the
developer understands the program
requirements, the next step is to design the
user interface. The user interface provides the
framework for the processing that will occur
within the program. ICTD 121 33
SOFTWARE DEVELOPMENT
LIFE
• Design the Program Processing
Objects — A computer program
consists of one or more processing
objects that perform the tasks
required within the program. The
developer must determine what
processing objects are required, and
then determine the requirements of
each object. ICTD 121 34
SOFTWARE DEVELOPMENT
LIFE
• Code the Program — After the
processing object has been
designed, the object must be
implemented in program code.
Program code consists of the
instructions written using a
programming language such as
Visual Basic that ultimately can be
executed by a computer.
ICTD 121 35
SOFTWARE DEVELOPMENT
LIFE
• Test the Program — As the program
is being coded, and after the coding
is completed, the developer should
test the program code to ensure it is
executing properly. The testing
process is ongoing, and includes a
variety of stages.

ICTD 121 36
SOFTWARE DEVELOPMENT
LIFE
• Document the Program/System — As a
program is being designed and coded,
and after that process is completed, the
developer should be documenting the
program. Documenting a program
means writing down in a prescribed
manner the instructions for using the
program, the way in which a program
performs its tasks, and other items that
users, other developers, and
ICTD 121 37
SOFTWARE DEVELOPMENT
LIFE
• Maintain the Program/System—
After a program is put into use, the
program likely will have to be
changed, or modified, sometime in
the future. The process of changing
and updating programs is called
program and system maintenance.

ICTD 121 38
SOFTWARE DEVELOPMENT
LIFE
• The program development life cycle
rarely is accomplished in a linear
fashion, with one phase complete
before the next phase starts. Rather,
programs are developed iteratively,
which means phases and steps
within phases might have to be
repeated a number of times before
the program is completed.
ICTD 121 39
Flowchart
• It is a chart that graphically
presents the detailed series of
steps needed to solve a
programming problem. The
flowchart uses standard symbols
called ANSI (American National
Standards Institute) symbols.
ICTD 121 40
Flowchart For Cash
Register

ICTD 121 41
Flowchart

ICTD 121 42
Flowchart
Common Flowchart Symbols

Terminator. Shows the starting and ending points of the program. A


terminator has flowlines in only one direction, either in (a stop node) or out
(a start node).
Data Input or Output. Allows the user to inputdata and results to be displayed.

Processing. Indicates an operation performed by the computer, such as a variable


assignment or mathematical operation.

Decision. The diamond indicates a decision structure. A diamond always has two
flowlines out. One flowlineout is labeled the “yes” branch and the other is labeled the
“no” branch.

Predefined Process. One statement denotes a group of previously defined statements.


For instance, “Calculate m !” indicates that the program executes the necessary commands
to compute m factorial.

Connector. Connectors avoid crossing flowlines, making the flowchart easier to read.
Connectors indicate where flowlines are connected. Connectors come in pairs, one with
a flowline in and the other with a flowline out.

Off-page connector. Even fairly small programs can have flowcharts that extend several
pages. The off-page connector indicates the continuation of the flowchart on another
page. Just like connectors, off-page connectors come in pairs.

Flowline. Flowlines connect the flowchart symbols and show the sequence of
operations during the program execution.

ICTD 121 43
Pseudocode
• It is a method of designing a
program, using English – like
statements to describe the logic
and processing flow.
Pseudocode is written in the
programmer’s native language
and concentrates on the logic in a
program -not the syntax of a
ICTD 121 44
Pseudocode
• sum=0
• While More items do
• Input price
• sum=sum+price
• End While
• vat=sum x 0.25
• total=sum+vat
• Output sum, vat, total
ICTD 121 45

Вам также может понравиться