Professional Documents
Culture Documents
Programming LAnguages & Techniques (NTA 5) Lecture 1
Programming LAnguages & Techniques (NTA 5) Lecture 1
S COPE
TERMINOLOGIES
EVOLUTION OF PROG LANGUAGES
PROS & CONS OF LOW-LEVEL LANGUAGES
PROS & CONS OF HIGH-LEVEL LANGUAGES
CHARACTERISTICS OF A GOOD COMPUTER
PROG.
LINKERS & LOADERS
TERMINOLOGIES
COMPUTER
An electronic device for storing and processing
data, typically in Binary Form
COMPUTER PROGRAM
A collection of instructions that performs a
specific task when executed by a computer
TERMINOLOGIES …CONT
LANGUAGE
A set of rules and structure for expressing ideas
in spoken or symbolic form
PROGRAMMING LANGUAGE
A set of rules that provides a way of telling a
computer what operations to perform
TERMINOLOGIES …CONT
COMPUTER PROGRAMMING
An iterative process of writing or editing source code
of computer programs, followed by testing, analyzing
and refining such code
SYNTAX
Represents the correct fundamental rules of a
programming language.
TERMINOLOGIES …CONT
SEMANTICS
Describes the processes a computer follows when
executing a program in that specific language.
COMPUTER PROGRAMMER
A programmer is an individual that writes/creates
computer software or applications by giving the
computer specific programming instructions.
TERMINOLOGIES …CONT
TRANSLATOR
A computer program that performs the translation of a
program written in a given programming language into a
functionally equivalent program in a different computer
language, without losing the functional or logical structure of
the original code.
SOURCE CODE
A set of program instructions in their original form .
TERMINOLOGIES …CONT
INTERPRETER
A computer program that reads program code line by
line and does what it says.
INTERNET
A global computer network providing a variety of
information and communication facilities, consisting
of interconnected networks using standardized
communication protocols.
TERMINOLOGIES …CONT
PSEUDO CODE
An English-like nonstandard language that lets you
state your solution with more precision than you can in
plain English but with less precision than is required
when using a formal programming language
TERMINOLOGIES …CONT
Difference of Interpreter and Compiler
Interpreter Compiler
1. Translates the source program 1. Translates the entire source code
one statement at a time at once before execution
2. Translate the program each 2. Compiled program (object code)
time it is run hence slower than can be saved on a storage media
compiling and run as required, hence
3. Interpreted object code takes executing faster than interpreted
less memory compared to the programs.
compiled program. 3. Complied programs require more
memory as the object file are
EVOLUTION OF PROG LANGUAGES
Evolution of computers are based on the
levels of programming languages.
Programming languages developed over the
years are classified into two major levels;
1. Low level languages
2. High Level languages
EVOLUTION OF PROG LANGUAGES …CONT
Low Level Languages
Can be crafted to run very fast and with a very small
memory footprint. However, they are considered more
difficult to utilize because they require a deeper
knowledge of machine language.
Generally, LLL refer to either machine code or
assembly language.
EVOLUTION OF PROG LANGUAGES …CONT
Machine Language (code)
The only language that is directly understood by the
computer
It does not need any translator program
It is written as strings of 1's (one) and 0’s (zero). When
this sequence of codes is fed to the computer, it
recognizes the codes and converts it in to electrical
signals needed to run it.
EVOLUTION OF PROG LANGUAGES …CONT
Machine Language (code) …CONT
It is not an easy language for you to learn because of
its difficulty in understanding
It is efficient for the computer but very inefficient for
programmers
It is considered to the First-Generation Language
It is also difficult to debug the program written in this
language
EVOLUTION OF PROG LANGUAGES …CONT
Assembly Language
The first step to improve the programming structure
The set of symbols and letters forms the Assembly
Language
A translator program is required to translate the
Assembly Language to machine language
It is considered a Second-Generation Language.
▪ Eg. ADD 10010101 , 10110100
EVOLUTION OF PROG LANGUAGES …CONT
High Level Languages
HLL represent a giant leap towards easier programming
The syntax of HL languages is similar to English
There are different generations of HLL and each one of them
addresses a particular problem solving Domain
▪ 3rd Generation Languages
▪ 4th Generation Languages
▪ 5th Generation Languages
▪ Object Oriented Programming (OOP)
▪ Web Scripting Languages
EVOLUTION OF PROG LANGUAGES …CONT
3rd Generation Languages
Also called Structured language OR procedure languages
A procedural language makes it possible to break a program
into components called modules
The structural Programming emphasizes that large programs
can be broken down into smaller sub programs each
performing a single task
Examples of (3rd GL) are Pascal, FORTRAN, COBOL,
BASIC, C, ADA
EVOLUTION OF PROG LANGUAGES …CONT
4th Generation Languages
Made programming an even easier task than the third-
generation languages
It presents more programming tools for instance
command buttons, forms
The programmer is freed from the tedious work of writing
the code
Examples of (4th GL) are Visual Basic, Delph Pascal and
Visual Cobol
EVOLUTION OF PROG LANGUAGES …CONT
5th Generation Languages
Are designed to make the computer solve the problem
for the programmer rather than the programmer
spending a lot of time to come up with the solution.
The programmer only worries about what problem to
solve meeting what conditions
Examples of (5th GL) are PROLOG, Mercury OCCAM
EVOLUTION OF PROG LANGUAGES …CONT
Artificial Intelligence (AI)
Intelligence demonstrated by Machines, as opposed to
natural intelligence displayed by animals including
humans.
Machines that mimic "cognitive" functions that
humans associate with the human mind, such as
"learning" and "problem solving“
EVOLUTION OF PROG LANGUAGES …CONT
OOP (Object Oriented Programming
A program having variously objects interacting to make
up a whole
Each object has a specific data value that are unique to it
called State
The Process of having data and functions that operate on
the data within on object is called Encapsulation
Several objects can then be linked together to form a
complete program
EVOLUTION OF PROG LANGUAGES …CONT
OOP (Object Oriented Programming) …CONT
Examples of (OOP) are C++, Java, etc.
OOP has contributed greatly to the development of
graphical user interface (GUI), Operating Systems and
application programs
EVOLUTION OF PROG LANGUAGES …CONT
Web Scripting Language
Used to develop or add functionalities on a web page
Web pages are hypertext documents created in a
Slanguage called (HTML) Hypertext Markup
Language
Consists of tags that are interpreted by web browser
software to display text. A tag is special work enclosed
between the less than or greater than (<>)
EVOLUTION OF PROG LANGUAGES …CONT
Web Scripting Language …CONT
Unlike other programming languages HTML does not have
the declaration part and control structures and Due to this
reason, it is not considered as a true programming language
HTML has many limitations and cannot be used alone to
develop functional websites
Some Special block of code known as scripts are inserted
into html page using java script, VB script and Hypertext
Preprocessor (PHP)
A script is a small program fragment, written in a different
EVOLUTION OF PROG LANGUAGES …CONT
A program written in a high-level language is called a
source program (source code). Since a computer cannot
understand a source program. Program called a compiler
is used to translate the source program into a machine
language program called an object program
ADVANTAGES OF LOW LEVEL
LANGUAGES
The CPU understands machine language directly
without translation
The processor executes them faster because
complex instructions are already broken down into
simpler ones
Low level languages are stable and hardly crash or
break down once written
DISADVANTAGES OF LOW LEVEL
LANGUAGES
Low level languages are difficult and cumbersome to
use and learn
They require highly trained experts both to develop
and maintain programs
Removing errors in low level languages programs is
difficult
Low level programs are machine dependent (i.e.,
they are not transferable from one hardware or
software platform to another. Hence, they are not
ADVANTAGES OF HIGH LEVEL
LANGUAGES
High level languages are portable. i.e., they are
transferable from one computer to another
Are user friendly and easy to use and learn
Are more flexible hence they enhance the
creativity of the programmer and increase
productivity in the workplace
They are far much more easily to correct errors
DISADVANTAGES OF HIGH LEVEL
LANGUAGES
Their nature encourages use of many instructions
in a word or statement hence the complexity of
these instructions causes slower program
processing
They have to be interpreted, complied to machine
readable form before the computer can execute
them
CHARACTERISTICS OF A GOOD
PROGRAM
EFFICIENCE
A program should be laid out in such a manner that it utilizes
the least amount of memory and processing time
PORTABLE
The ability of an application to run on different platforms
with or without minimal changes
READABLE
Should be written in such a way that it makes other
programmers or users to follow the logic of the program
without much effort
CHARACTERISTICS OF A GOOD PROGRAM …CONT
STRUCTURAL
To develop a program, the task must be broken down into a
number of subtasks
FLEXIBLE
Ability to handle most of the changes without having to
rewrite the entire program
CORRECTNESS
The degree with which software adheres to its specified
requirements. Well-designed software should meet all the
stated requirements
LINKERS & LOADERS
Linkers
Also Known as link editor is a computer utility program that takes one
or more object files generated by a compiler and combines them into a
single executable file, library file, or another 'object' file
Loader
The part of an operating system that is responsible for loading
programs and libraries as it places programs into memory and prepares
them for execution
Loading a program involves reading the contents of the executable
file containing the program instructions into memory, and then
carrying out other required preparatory tasks to prepare the
IMPORTANCE OF PROGRAMMING
Programming is important as it is used to create software and
applications that help computer and mobile users in daily life
Programming is important for learning to innovate and create
eco-friendly solutions for global problems
Programming is important in our daily life to enhance and
increase the power of computers and the internet
Programming is important for speeding up the input and output
processes in a machine
Due to all these reasons, it’s really important to learn Computer
Programming and how to use different programming languages
in our daily lives
SUMMARY
What is the difference between a Computer Program
What is the difference between a Computer Program and
Computer Programming?
Elaborate on the difference between a Language and a
Programming Language?
Differentiate Syntax from Semantics
Distinguish a Translator from a Compiler
What is
a. Source Code
b. Interpreter
Who is a Programmer?
SUMMARY …CONT
Mention Two Major Classification of Programming Languages
How does Machine Language Differ from Assembly Language?
There are different generations of High-Level Languages, Mention
Five
What are the Advantages and Disadvantages of Low-Level
Languages?
What are the Advantages and Disadvantages of High-Level
Languages?
Mention the characteristics of a Good Programming Language
How is Programming Important?