You are on page 1of 16

Computer

Programming

Syed Zaid Irshad


Outline

– Why Programming?
– The Programming Process
– What Programmers do?
– Programming as a Career
– Level of Programming Languages
– Computer Languages
Why Programming?

– Programming helps you understand computers.


– A computer is only a tool. If you learn how to write simple programs, you will gain more
knowledge about how a computer works.
– Writing a few simple programs increases your confidence level.
– Many people find great personal satisfaction in creating a set of instructions that solve a
problem.
– Learning programming lets you find out quickly whether you like programming and
whether you have the analytical turn of mind programmers need.
– Even if you decide that programming is not for you, understanding the process certainly
will increase your appreciation of what programmers and computers can do.
The Programming Process

– There are five main ingredients in the programming process:


– Defining the problem
– Planning the solution
– Coding the program
– Testing the program
– Documenting the program
The Programming Process

– Defining the problem


– Identifying what it is you know (input-given data), and what it is you want to obtain
(output-the result).
– Eventually, you produce a written agreement that, among other things, specifies the
kind of input, processing, and output required.
– This is not a simple process.
– Planning the solution
– It is a map of what your program is going to do and how it is going to do it.
The Programming Process

– Coding the program


– You will translate the logic from the flowchart or pseudocode-or some other tool-to a
programming language.
– As we have already noted, a programming language is a set of rules that provides a way of
instructing the computer what operations to perform.
– Testing the program
– Program may have some imperfections for the new programmers. So, the programmers
use following steps to over come.
– Desk-Checking
– Translating
– Debugging
The Programming Process

– Documenting the program


– Documenting is an ongoing, necessary process, although, as many programmers are,
you may be eager to pursue more exciting computer-centred activities.
– Documentation is a written detailed description of the programming cycle and
specific facts about the program.
– Typical program documentation materials include the origin and nature of the
problem, a brief narrative description of the program, logic tools such as flowcharts
and pseudocode, data-record descriptions, program listings, and testing results.
What Programmers do?

– In general, the programmer's job is to convert problem solutions into instructions for
the computer.
– The programmer prepares the instructions of a computer program and runs those
instructions on the computer, tests the program to see if it is working properly, and makes
corrections to the program.
– The programmer also writes a report on the program.
– These activities are all done to help a user fill a need, such as paying employees, billing
customers, or admitting students to college.
– The programming activities just described could be done, perhaps, as solo activities,
but a programmer typically interacts with a variety of people.
Programming as a Career

– Although many people make career changes into the computer field, few choose to
leave it.
– Surveys of computer professionals, especially programmers, consistently report a high
level of job satisfaction.
– There are several reasons for this contentment. One is the challenge-most jobs in the
computer industry are not routine.
– Another is security since established computer professionals can usually find work and
that work pays well-you will probably not be rich, but you should be comfortable.
Level of Programming
Languages
– There are five(5) levels or generations of programming languages:
– Machine language
– Assembly languages
– High-level languages
– Very high-level languages
– Natural languages
Level of Programming
Languages
– Machine language
– Humans do not like to deal in numbers alone-they prefer letters and words. But,
strictly speaking, numbers are what machine language is.
– This lowest level of language, machine language, represents data and program
instructions as 1s and 0s binary digits corresponding to the on and off electrical
states in the computer.
– Each type of computer has its machine language. In the early days of computing,
programmers had rudimentary systems for combining numbers to represent
instructions such as add and compare.
– Primitive by today's standards, the programs were not convenient for people to read
and use. The computer industry quickly moved to develop assembly languages.
Level of Programming
Languages
– Assembly languages
– Assembly languages are considered very low level-that is, they are not as convenient for
people to use as more recent languages.
– At the time they were developed, however, they were considered a great leap forward. To
replace the 1s and 0s used in machine language, assembly languages use mnemonic
codes, abbreviations that are easy to remember: A for Add, C for Compare, MP for
Multiply, STO for storing information in memory, and so on.
– Although these codes are not English words, they are still from the standpoint of human
convenience-preferable to numbers (0s and 1s) alone.
– Furthermore, assembly languages permit the use of names- perhaps RATE or TOTAL-for
memory locations instead of actual address numbers.
– Just like machine language, each type of computer has its assembly language.
Level of Programming
Languages
– High-level languages
– The first widespread use of high-level languages in the early 1960s transformed
programming into something quite different from what it had been.
– Programs were written in an English-like manner, thus making them more convenient
to use.
– As a result, a programmer could accomplish more with less effort, and programs
could now direct much more complex tasks.
– These so-called third-generation languages spurred the great increase in data
processing that characterized the 1960s and 1970s.
Level of Programming
Languages
– Very high-level languages
– The first is that they make a true break with the prior generation-they are non-
procedural.
– A procedural language tells the computer how a task is done: Add this, compare that,
do this if something is true, and so forth-a very specific step-by-step process.
– The first three generations of languages are all procedural. In a nonprocedural
language, the concept changes. Here, users define only what they want the computer
to do; the user does not provide the details of just how it is to be done.
– It is a lot easier and faster just to say what you want rather than how to get it. This
leads us to the issue of productivity, a key characteristic of fourth-generation
languages.
Level of Programming
Languages
– Natural languages
– The word "natural" has become almost as popular in computing circles as it has in the supermarket.
– Fifth-generation languages are, as you may guess, even more, ill-defined than fourth-generation languages.
– They are most often called natural languages because they resemble the "natural" spoken the English language, and, to the
manager new to computers for whom these languages are now aimed, natural means human-like.
– Instead of being forced to key correct commands and data names in the correct order, a manager tells the computer what to do
by keying in his or her own words.
– A manager can say the samething any number of ways. For example, "Get me tennis racket sales for January" works just as well
as "I want January tennis racket revenues.“
– Such a request may contain misspelt words, lack articles and verbs, and even use slang.
– The natural language translates human instructions-bad grammar, slang, and all-into code the computer understands.
– If it is not sure what the user has in mind, it politely asks for further explanation.
Computer Languages

– There are 7 categories of computer languages:


– Machine and assembly languages
– Algorithmic languages
– Business-oriented languages
– Computer programming language
– Education-oriented languages
– Object-oriented languages
– World wide web display languages

You might also like