0% found this document useful (0 votes)
4 views

COMPUTER L12 GRADE 10

Computer L12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

COMPUTER L12 GRADE 10

Computer L12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Information and Communications technology I.C.

T-10

Lesson 12 Understanding Programming


A robot is machine that can carry out a complex series of actions through a computer program. Using
the program, a robot can complete a task as exactly as what the program tells it to it. It cannot deviate from it
because it cannot think nor do other things all by itself.
Computers and Humans
A versatile tool, computer is capable of performing various activities. it allows easy and immediate
exchange of information regardless of its physical location. It simplifies various everyday tasks while
automating many processes that would be tedious or boring to perform by us, humans.
But computers are not “intelligent” as humans. They have to be told in no uncertain terms exactly what
they’re supposed to do. Their native languages are quite unlike anything spoken by humans. So there is a
language barrier between computers, that require instructions in its native language, a machine code, to do
anything, and humans who wishes a computer to do something. So far, computers cannot figure out why they
are supposed to do on their own, and thus they rely on programs which we create, which are sets of instructions
that the computer can understand and follow.
What is Computer Programming?
A computer is program is a sequence of instructions that tell a computer how to do a task. So when a
computer follows the instructions in a program, it executes the program and gives results to a certain operation.
It should be written logically that it goes through a certain flow of operation. So before writing a program, there
is a need to decide the flow of the program first.
Though it is an intelligent machine, a computer can perform only what you as its programmer asked it to
do. So if the program goes wrong, it means that there is something wrong with your set of instructions.
Programming Languages
A programing language is a set of written symbols that instructs the computer hardware to do specific
tasks. Usually a programming language consists of a vocabulary and a set of rules, or syntax, that the
programmer needs to learn. These programming languages make the communication process between the
machine and its users easier and faster.
High level or Low level
The level of the programming language refers to how similar or different the language is to the native
language of a computer. The higher level, the less similar it is. The lower the level is, the more similar it is to
the computer’s language.
A low-level language is similar to machine code and is more suitable for programs like device drivers or
very high performance programs that really need access to the hardware. A high-level language, on the other
hand, focuses more on concepts that are easy to understand by the human mind, such as objects or mathematical
functions.
Compiled, interpreted, or JIT-compiled
Compiled languages are translated to the target machine’s native language by a program called a
compiler. This can result in very fast code, especially if the compiler is effective at optimizing however the
resulting code may not port well across operating systems and the compilation process may take a while.
Interpreted languages are read by a program called an interpreter and are executed by that program.
While they are as their portable as their interpreter and have no long compile times, interpreted languages are
usually much slower than an equivalent complied program.
JIT-compiled or Just-in-time compiled languages are languages that are quickly compiled when
programs written in them need to be run (usually with very little optimization), offering a blanace between
performance and portability.
Type System
Type system refers to the rules that have different types of variables of a language have to follow.
 Type Strength: Strong or Weak – a strong typing system puts restrictions on how different types of
variables can be converted to each other without any converting statements. While a weak typing system
would try to find some way to make the cast work.
 Type Expression: Manifest or Inferred – this deals with how the compiler/interpreter for a language
infers the types of variables. This languages require variables’ types to be explicitly defined, and thus
rely on manifest typing.
 Type Checking: Static or Dynamic - if a language is statically typed, then the compiler/interpreter does
the type checking once before the program runs/ is compiled. If the language is dynamically type
checked, then the types are checked at run-time.
 Type safety: Safe or Unsafe – These refer to the degree to which a language will prohibit operations on
typed variables that might lead to undefined behavior or errors.

Supported Paradigm
A program paradigm is a methodology or way of programming language supports.
 Declarative – this language focuses more on specifying what a language is supposed to accomplish
instead of what means it is supposed to accomplish. Such a paradigm might be used to avoid undesired
side-effects resulting from having to write one’s own code.
 Function – a sub-set of declarative programming, functional programming tries to express problems in
terms of mathematical equations and functions. It avoids the concepts of states and mutable variables
which are common in other languages.
 Generic – these programming languages focus on writing skeleton algorithms in terms of types that will
specified when the algorithm is actually used.
 Imperative – these languages allows programmers to give the compute ordered lists of instructions
without necessarily having to explicitly state the task.
 Structured – structured programming languages aim to provide some information of noteworthy
structure to a language.
 Object-Oriented – a sub-set of structured programming, object-oriented programming expresses in
terms of “objects” and are meant to model objects in the real world.

Generations of Programming Languages


At present, there are five generations of computer programming languages. In each generation, the
languages syntax has become easier to understand and more user-friendly.
First generation languages (1GL) – introduced in 1940’s, this is the earliest language consisted of 1s
and 0s or programs that are entirely in binary. The memory had to be managed by hand in binary, too.
Second Generation Language (2GL) – the second generation programming language allows of
symbolic names. This generation is known as the assembly language and designed to support logical structure
and debugging. Code written in an assembly language is converted into machine language.
Third Generation Language (3GL) – used in the general purpose programming today, third generation
languages use words and commands instead of just symbols and numbers. This generation is also known as
“high-level language” and had syntax that was easier to understand.
Fourth Generation Language (4GL) – these languages are designed with making problems in a specific
domain simple to implement so in effect they reduce development time cost. With close resemblance to human
language, these are user-friendly, portable, and independent of operating system.\
Fifth Generation Languages (5GL) - fifth generation languages, categorized as constraint oriented, are
currently being used for neural networks. A neural network is a form of artificial intelligence that attempts to
imitate how the human mind works. However, there are still arguments on the existence of 5GL so it is not
commonly used.
Program Development Process
The program development process is a step-by-step procedure in building a good application or
computer software. There are different models or program development process but all these include the same
stages in developing a software or program. Every stages is important because missing a step can create a big
effect not only on the succeeding steps but also on the outcome of the project.

1. Requirement Gathering and Analysis


Requirement
Considered as the stage in the process, this involves Gaherings
brainstorming to identify and define the problem, determine and Analysis
its requirements (both input and output), and plan for the
Designing
solution. Maintena
the
2. Designing the Program nce
Program
In s designing the program. There is a need to understand
the logic behind the performance of the program.
3. Coding the program
At this stage, the design needs to be translated into an
application using a programming language or application Documneati Coding the
development tool by creating the user interface and writing on Program
codes. Testing
4. Testing and Debugging the Program and
Testing is the process of validating and verifying that a Debuggin
g the
computer programmer application meets the requirements that Program
guided its design and development.
5. Documentation
When the program is complete and thoroughly tested and debugged, there is a need to review its
documentation both internal and external, and revise, if necessary.
6. Maintenance
Part of the maintenance stage is to provide education and support to the end users. This also covers
correction to any unanticipated errors that emerge.

Name: ______________________________________________ Date: ___________ Score: _____________


A. Identify the generation that each of the following can be associated with. Choose the letter of your
answer in the box below and write it on the line.

a. 1GL d. 4GL
b. 2GL e. 5GL
c. 3GL

_________1. Artificial intelligence _________6. Commands


_________2. Assembly language _________7. Brain
_________3. Words _________8. Application specific
_________4. Binary _________9. High level language
_________5. Symbols _________10. Logical structure

B. Compare the Following


1. High Level and Low Level Programming language
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________

2. Compile and Interpreted Languages


_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________

You might also like