You are on page 1of 23

Introduction to

Programming
Language
PROGRAM AND COMPUTER
PROGRAMMING
Program -
instructions to control the operation of
a computer or other machine.

Computer Programming -
the process or activity of writing
computer programs to generate useful
applications needed in the industry.
Purpose of Computer
Programming

The purpose of programming is to find a


sequence of instructions that will
automate the performance of a task
(which can be as complex as an
operating system) on a computer, often
for solving a given problem.
What is the impact of
computer programming?

• Computer programming is important


today because so much of our world
is automated.
• Humans were able to control the
interaction between people and
machines.
• computers and machines are able to
do things so efficiently and accurately
The Products of Computer
Programming.

• Software Applications
• Mobile Applications
• Automated Algorithms
• Communication Applications
• Electronic Database System
• Realistic Simulators
• Electronic Commerce and Banking
• Artificial Intelligence
The Benefits of Computer
Programming.

1. Earn a good salary by building skills


2. Flexibility to work from anywhere,
anytime
3. Creatively solve real-world problems
4. Develop cool mobile applications
5. Make addictive games that users
love
The Benefits of Computer
Programming.
6. Stay ahead of the curve by
continually evolving
7. Explore artificial intelligence and
other future-ready trends
8. Accomplish anything by employing
technology to work for you
9. Become a mentor later
10. Coding is applicable now on almost
all industries
The Benefits of Computer
Programming.

11. Improve the cognitive learning of


your kids by teaching them to code
right from the start
12. Develop persistence
13. Live a life that you have always
dreamt of In a nutshell
PROGRAMMING LANGUAGE

The tools used in Computer


Programming to develop software
programs, scripts, or other sets of
instructions for computers to execute.
Programming Language

 First-generation: Machine language


 Second-generation: Assembly language
 Third-generation: High-level language
 Fourth-generation
 (Fifth-generation)
1GL: Machine language

A set of primitive instructions built


into every computer
The instructions are in the form of
binary code
1101101010011010
2GL: Assembly language
Low-level programming language to
represent machine-language
instructions
E.g.: ADDF3 R1, R2, R3
Assembly code need to be converted
into machine code by using an
assembler
Assembly program
is platform dependent
Combination of mnemonic and machine
instruction
3GL: High-level language

 English-like and easy to learn and program.


 E.g.:
 Area = 5 * 5 * 3.1415;
 COBOL, FORTRAN, BASIC, Pascal, Ada, C,
Visual Basic, Delphi, C++, C#, Java
 Sourceprogram is compiled into machine
code by a compiler and linked to
supporting library code by a linker to form
an executable file.
4GL / 5GL
 3GL offered greater power to the
programmer, while 4GL open up the
development environment to a wider
population.
 Provide a higher level of abstraction of the
internal computer hardware details,
making the language more programmer-
friendly, powerful, and versatile
 Fourth generation languages are
commonly used in database programming
and scripts examples include Perl, PHP,
Python, Ruby, and SQL.
DATABASE PROGRAM

Software that is used to manage


data and information structured as
fields, records and files. A database
program is the heart of a business
information system and provides file
creation, data entry, update, query
and reporting functions.
Category (3GL)
 Windows Application
C, C++, Java, Visual Basic, C#
 Web Application
Server Side
PHP, JSP (Java), ASP.NET (Visual Basic,
C#), …
Client Side
JaveScript, VBScript
The Binary Machine
 A modern computer can run programs
written in JavaScript, Pascal, Visual Basic,
Visual C++, etc.
 However, computers can only understand
one language: the machine language it is
not easy to use.
 The machine language of a Sun workstation
is different from a PC (or other platform),
however, they can run the same C++
program.
Two types of Translators
(3GL to 1GL)
 Interpreter:
 translate and run the source code one line at
a time. Easy to write and easy to find the errors
in the program, but running very slow.
 JavaScript, VBScript, PHP, …

 Compiler:
 translates the source code once and for all,
producing a complete machine language
program. Very fast, but when the program
fails, difficult to show the programmer where
are the errors.
 C, C++, Java, C#, and so on.

You might also like