CSC 403 Lecture 1
CSC 403 Lecture 1
1.0 INTRODUCTION
Ever since the invention of Charles Babbage‘s difference engine in 1822, computers have required a
means of instructing them to perform a specific task. This means is known as a programming
language. Computer languages were first composed of a series of steps to wire a particular program;
these morphed into a series of steps keyed into the computer and then executed; later these languages
acquired advanced features such as logical branching and object orientation. The computer languages
of the last fifty years have come in two stages, the first major languages and the second major
languages, which are in use today.
Most computer programming languages were inspired by or built upon concepts from previous
computer programming languages. Today, while older languages still serve as a strong foundation
for new ones, newer computer programming languages make programmers‘ work simpler.
Businesses rely heavily on programs to meet all of their data, transaction, and customer service needs.
Science and medicine need accurate and complex programs for their research. Mobile applications
must be updated to meet consumer demands. And all of these new and growing needs ensure that
computer programming languages, both old and new, will remain an important part of modern life.
2.0 OBJECTIVES
Before getting into computer programming, what is computer programs and what they do.
A computer program is a sequence of instructions written using a Computer Programming
Language to perform a specified task by the computer. The two important terms used in the
above definition are:
• Sequence of instructions
• Computer Programming Language
To understand these terms, consider a situation when someone asks you about how to go to
a nearby KFC. What exactly do you do to tell him the way to go to KFC? You will use
Human Language to tell the way to go to KFC, something as follows:
First go straight, after half kilometer, take left from the red light and then drive around one
kilometer and you will find KFC at the right. Here, you have used English Language to give several
steps to be taken to reach KFC. If they are followed in the following sequence, then you will reach
KFC:
1. Go straight
2. Drive half kilometer
3. Take left
4. Drive around one kilometer
5. Search for KFC at your right side
Now, try to map the situation with a computer program. The above sequence of instructions
is actually a Human Program written in English Language, which instructs on how to reach
KFC from a given starting point. This same sequence could have been given in Spanish,
Hindi, Arabic, or any other human language, provided the person seeking direction knows
any of these languages. Now, let's go back and try to understand a computer program, which
is a sequence of instructions written in a Computer Language to perform a specified task by
the computer. Following is a simple program written in Python Programming Language −
print "Hello, World!"
The above computer program instructs the computer to print "Hello, World!" on the
computer screen. A computer program is also called a computer software, which can range
from two lines to millions of lines of instructions.
• Computer program instructions are also called program source code and computer
programming is also called program coding.
• A computer without a computer program is just a dump box; it is programs that make
computers active.
Computer programming is the process that professionals use to write code that instructs how
a computer, application or software program performs. At its most basic, computer
programming is a set of instructions to facilitate specific actions. A programming
language is a computer language that is used by programmers (developers) to communicate
with computers. It is a set of instructions written in any specific language to perform a
specific task. It is made up of a series of symbols that serves as a bridge that allow humans
to translate our thoughts into instructions computers can understand. Human and machines
process information differently, and programming languages are the key to bridging the gap
between people and computers therefore the first computer programming language was
created.
Generations of computers have seen changes based on evolving technologies. With each new
generation, computer circuitry, size, and parts have been miniaturized, the processing and
speed doubled, memory got larger, and usability and reliability improved. Note that the
timeline specified for each generation is tentative and not definite. The generations are
actually based on evolving chip technology rather than any particular time frame.
The five generations of computers are characterized by the electrical current flowing through
the processing mechanisms listed below:
Assembly languages: the obvious drawbacks of binary programming became smaller by the
introduction of second generation languages (2GL). These languages allowed mnemonic
abbreviations as symbolic names and the concept of commands and operands was
introduced. A programmer's work became much easier, since the symbolic notation and
addressing of instructions and data was now possible. Compilation systems, called
assemblers, were developed to translate the assembly language/symbolic programs into
machine code. Assembly languages still reflect the hardware structure of the target machine
- not on the flip-flop level, but on the register level, i.e. the abstraction has changed from the
flip-flop to the register level. The instruction set of the target computer directly determines
the scope of an assembly language. With the introduction of linking mechanisms,
assembling of code separately became possible and the first steps towards program
structuring were recognizable, although the term structured programming cannot be used for
programming assembly code. The major disadvantage of assembly languages is that
programs are still machine dependent and, in general, only readable by the authors.
Fourth generation languages/Non procedural languages deal with the following two fields
which become more and more important: database and query languages, and program or
application generators. The steadily increasing usage of software packages like database
systems, spread sheets, statistical packages, and other (special purpose) packages makes it
necessary to have a medium of control available which can easily be used by non-specialists.
In fourth generation languages the user describes what he wants to be solved, instead of how
he wants to solve a problem - as it is done using procedural languages. In general, fourth
generation languages are not only languages, but interactive programming environments.
E.g. SOL (Structured Query Language): a query language for relational databases based on
Codd's requirements for non- procedural query languages. Another example is NATURAL
emphasizing on a structured programming style. Program or application generators are often
based on a certain specification method and produce an output (e.g. a high level program)
to an appropriate specification. There exist already a great number of fourth generation
languages:
5GL is a programming language based around solving problems using constraints given to
program rather using an algorithm written by a programmer. 5GL allows computers to have
their own ability to think and their own inferences can be worked out by using the
programmed information in large databases. 5GL gave birth to the dream of robot with AI
and Fuzzy Logic. The fifth-generation languages are also called 5GL. It is based on the
concept of artificial intelligence. It uses the concept that that rather than solving a problem
algorithmically, an application can be built to solve it based on some constraints, i.e., we
make computers learn to solve any problem. Parallel Processing & superconductors are used
for this type of language to make real artificial intelligence. Advantages of this generation
is that machines can make decisions, it reduces programmer effort to solve a problem and
very easier than 3GL or 4GL to learn and use. Examples are: PROLOG, LISP, etc.
EXERCISE
• Size – Smaller than Second Generation Computers. Disk size mini computers.
• Speed – Relatively fast as compared to second generation, Million instructions per
second (MIPS).
• Cost – cost lower than Second generation.
• Language– High level languages like PASCAL, COBOL, BASIC, C etc.
• Reliability – Failure of circuits in Weeks.
• Power– Low power Consumption.
• Main Component – based on ULSI (Ultra Large scale integrated) Circuit .that is
also called Parallel Processing method.
• Memory – Optical disk and magnetic disk.
• Input Media – Speech input, Tactile input.
• Output Media – Graphics displays, Voice responses.
• Example – Lap-Tops, palm –Tops, Note books, PDA (personal Digital Assistant)
etc.
4.0 CONCLUSION
The study of programming languages is valuable for some important reasons: It gives insight
to generation of programming languages, enables to know background of computer as a
whole, and the components attached to each of the generation.
5.0 SUMMARY
This unit has explained what programming language is, classification and explanation of
different programming language generation, basic components of each computer
programming generation. You also saw different characteristics of each programming
language generation in terms of computer characteristic, their capabilities, trend and
development in computer hardware for different generation.
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 What are major reasons for studying concepts of programming languages
3.1.1 Increase ability to express ideas and algorithms
3.1.2 Improved background for choosing appropriate languages
3.1.3 Increase ability to learn new languages
3.1.4 Better understanding of significance of implementation
3.1.5 Better use of languages that are already known
3.1.6 The overall advancement of computing
4.0 Conclusion
5.0 Summary
1.0 INTRODUCTION
It is natural for students to wonder how they will benefit from the study of programming
language concepts. After all, many other topics in computer science are worthy of serious
study. The following is what we believe to be a compelling list of potential benefits of
studying concepts of programming languages.
2.0 OBJECTIVES
In Natural language, the depth at which people think is influenced by the expressive power
of the language they use. In programming language, the complexity of the algorithms that
people Implement is influenced by the set of constructs available in the programming
language. The language in which they develop software places limits on the kinds of control
structures, data structures, and abstractions they can use; thus, limiting the forms of
algorithms they can construct. Awareness of a wider variety of programming language
features can reduce such limitations in software development. Programmers can increase the
range of their software development thought processes by learning new language constructs.
In other words, the study of programming language concepts builds an appreciation for
valuable language features and constructs and encourages programmers to use them, even
when the language they are using does not directly support such features and constructs.
Many programmers use the language with which they are most familiar, even though poorly
suited for their new project. It is ideal to use the most appropriate language. If these
programmers were familiar with a wider range of languages and language constructs, they
would be better able to choose the language with the features that best address the problem.
However, it is preferable to use a feature whose design has been integrated into a language
than to use a simulation of that feature, which is often less elegant, more cumbersome, and
less safe.
For instance, knowing the concept s of object oriented programming OOP makes learning
Java significantly easier and also, knowing the grammar of one‘s native language makes it
easier to learn another language. If thorough understanding of the fundamental concepts of
languages is acquired, it becomes far easier to see how these concepts are incorporated into
the design of the language being learned therefore it is essential that practicing programmers
know the vocabulary and fundamental concepts of programming languages so they can read
and understand programming language descriptions and evaluations, as well as promotional
literature for languages and compilers.
3.1.4. Better Understanding of Significance of implementation
This leads to understanding of why languages are designed the way they are. This is an
ability to use a language more intellectually, as it was designed to be used. We can become
better programmers by understanding the choices among programming language constructs
and the consequences of those choices. Certain kinds of program bugs can be found and
fixed only by a programmer who knows some related implementation details. It allows
visualization of how a computer executes various language constructs. It provides hints
about the relative efficiency of alternative constructs that may be chosen for a program. For
example, programmers who know little about the complexity of the implementation of
subprogram calls often do not realize that a small subprogram that is frequently called can
be a highly inefficient design choice.
Many contemporary programming languages are large and complex. It is uncommon for a
programmer to be familiar with and use all of the features of a language uses. By studying
the concepts of programming languages, programmers can learn about previously unknown
and unused parts of the languages they already use and begin to use those features.
3.16. The overall advancement of computing
The study of programming language concepts should be justified and the choose languages
should be well informed so that better languages would eventually squeeze out poorer ones.
EXERCISE
4.0 CONCLUSION
This unit has explained different reasons for studying concepts of programming languages,
enables students to know language more intelligently, make programming easy to learn,
enhanced problem solving skills, help to choose language appropriate for a particular
project, internally diverse networking, it has also created opportunities for invention and
innovation which enable to learning new languages.
5.0 SUMMARY
Like any language (spoken or written), it is easier to learn earlier in life. Computer languages
teach us logical skills in thinking, processing and communicating. Combined with creative
visions, some of the most influential products were designed around a programming
language. The best inventions are born where skills and creativity meet. After all, who is
better than the young generations of the world to imagine the future if our technology? One
of the benefit of learning how to code at a young age is enhanced academic performance.
Lear ning how this technology works will prepare children for a quick advancing world in
which computers and smartphones are utilized for almost every function of our daily lives.
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Application Domain
3.1.1 Scientific application
3.1.2 Data process application
3.1.3 Text processing application
3.1.4 Artificial intelligence applications
3.1.5 Systems programming application
3.1.6 Web software
4.0 Conclusion
5.0 Summary
1.0 INTRODUCTION
Computers have been applied to a myriad of different areas, from controlling nuclear power
plants to providing video games in mobile phones. Because of this great diversity in
computer use, programming languages with very different goals have been developed. This
discuss areas of computer applications and their associated languages.
2.0 OBJECTIVES
One of the prerequisites for the development of a programming language is that we have a
definition and a clear understanding of the contents of the application domain concerned.
This is the part of an organization for which application software is developed. This means
that the application domain is our starting point and the context for programming language
to software development. Many development methodologies take this understanding of the
application domain for granted. They assume that the developers somehow know what
domain they have to deal with. In respect of this, application domain is divided into
categories:
3.1.1 Scientific Applications
These are characterized as those whose principal activity involves the manipulation of
natural language text, rather than numbers as their data. SNOBOL and C language have
strong text processing capabilities
These are characterized as those programs which are designed principally to emulate
intelligent behavior. They include game playing algorithms such as chess, natural language
understanding programs, computer vision, robotics and expert systems. LISP has been the
predominant AI programming language, and also PROLOG using the principle of ‗‘Logic
programming‘‘ Lately AI applications are written in Java, C++ and python.
System programming applications involve developing those programs that interface the
computer system (the hardware) with the programmer and the operator. These programs
include compilers, assembles, interpreters, input-output routines, program management
facilities and schedules for utilizing and serving the various resources that comprise the
system. Ada, C and Modula – 2 are examples of programming languages used.
The World Wide Web is supported by an eclectic collection of languages, ranging from
markup languages, such as HTML, which is not a programming language, to general-
purpose programming languages, such as Java. Because of the pervasive need for dynamic
Web content, some computation capability is often included in the technology of content
presentation. This functionality can be provided by embedding programming code in an
HTML document. Such code is often in the form of a scripting language, such as JavaScript
or PHP. There are also some markup-like languages that have been extended to include
constructs that control document processing, collection of languages includes: Markup (e.g.
XHTML) - Scripting for dynamic content under which there are: Client side, using scripts
embedded in the XHTML documents e.g. JavaScript, PHP Server side, using the common
Gateway interface e.g. JSP, ASP, PHP General- purpose, executed on the web server
through e.g. Java, C++
EXERCISE
1. Discuss other application domain you know that is not mention here
2. What is the disadvantages of having too many features in a language?
4.0 CONCLUSION
5.0 SUMMARY
Computers are used in a wide variety of problem-solving domains. This unit has explained
how the design and evaluation of a particular programming language is highly dependent on
the domain in which it is to be used, it has enables students to know language more
intelligently and be able to choose language appropriate for a particular project and to make
learning new languages easier.
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Language evaluation criteria
4.0 Conclusion
5.0 Summary
1.0 INTRODUCTION
2.0 OBJECTIVES
1. Expressivity: means the ability of a language to clearly reflect the meaning intended by
the algorithm designer (the programmer). Thus an ―expressive‖ language permits an
utterance to be compactly stated, and encourages the use of statement forms associated
with structured programming (usually ―while ―loops and ―if – then – else‖
statements).
4. Readability: One of the most important criteria for judging a programming language is
the ease with which programs can be read and understood. Maintenance was recognized
as a major part of the cycle, particularly in terms of cost and once the ease of maintenance
is determined in large part by the readability of programs, readability became an
important measure of the quality of programs and programming languages.
5. Overall Simplicity: The overall simplicity of a programming language strongly affects
its readability. A language with a large number of basic constructs is more difficult to
learn than one with a smaller number.
6. Modularity: Modularity has two aspects: the language‘s support for sub-programming
and the language‘s extensibility in the sense of allowing programmer – defined operators
and data types. By sub programming, we mean the ability to define independent
procedures and functions (subprograms), and communicate via parameters or global
variables with the invoking program.
10. Orthogonality: in a programming language means that a relatively small set of primitive
constructs can be combined in a relatively small number of ways to build the control and
data structures of the language. Furthermore, every possible combination of primitives
is legal and meaningful.
11. Pedagogy: Some languages have better ―pedagogy‖ than others. That is, they are
intrinsically easier to teach and to learn, they have better textbooks; they are
implemented in a better program development environment, they are widely known and
used by the best programmers in an application area.
12. Generality: Generality: Means that a language is useful in a wide range of programming
applications. For instance, APL has been used in mathematical applications involving
matrix algebra and in business applications as well. The table below show language
evaluation criteria and the characteristics that affect them.
EXERCISE
4.0 CONCLUSION
Among the most important criteria for evaluating languages are readability, writability,
reliability, and overall cost. These will be the basis on which we examine and judge the
various language features that were discussed.
5.0 SUMMARY
Evaluation results are likely to suggest that your program has strengths as well as limitations,
which should not be a simple declaration of program success or failure. Evidence that your
EE program is not achieving all of its ambitious objectives can be hard to swallow, but it
can also help to learn where to best to put limited resources. A good evaluation is one that
is likely to be replicable, meaning that the same evaluation should be conducted and get the
same results. The higher the quality of the evaluation design, its data collection methods and
its data analysis, the more accurate its conclusions and the more confident others will be in
its findings.