Lec 1 Intro To Programmming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

IT2-INTRO TO PROGRAMMING

By: Benedic C. Mallari, MIT


What is Computer Program?
 A program is a set of instructions following the rules of the chosen language
 Without program, computer is useless
 A program is like a recipe
 It contains a list of ingredients and a list of directions that tell the computer what to do with the
variables.
What is Programming Language?
 A vocabulary and set of grammatical rules (syntax) for instructing a computer to perform
specific tasks.
 Programming language can be used to create computer programs.
 The term programming language usually refers to high-level languages, such as BASIC, C, C++,
COBOL, FORTRAN, Ada, Pascal and so on.
Programming Terminologies
 Compile. Transforming a program in a high-level programming language from source code to
object code.

 Compiler. Reads the whole source code and translates it into a complete machine code
program to perform the required tasks which is output as a new file.

 Computer Programming. It is a process of writing, testing, debugging/troubleshooting, and


maintaining the source code of computer programs.

 Programmer. Someone who writes computer program. Ada Lovelace is the first person to
develop an algorithm for a machine.

 Algorithm. A list of instructions, procedures, or formulas used to solve a problem.

 Source code. It consists of the programming statements that are created by a programmer
with a text editor or a visual programming tool and then saved in a file.
Uses of Computer Programs
Today computer programs are being used in almost every field, household,

• agriculture, medical, entertainment, defense, communication, etc. Listed below are a few
applications of computer programs:

 MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc., are examples of
computer programs.
 Computer programs are being used to develop graphics and special effects in movie making.
 Computer programs are being used to perform Ultrasounds, X-Rays, and other medical
examinations.
 Computer programs are being used in our mobile phones for SMS, Chat, and voice
communication.
Programming Development
• Program development
• Programming is the process of creating a set of instructions that tell a computer how to
perform a task. Programming can be done using a variety of computer "languages," such
as SQL, Java, Python, and C++.
• Syntax refers to the spelling and grammar of a programming language. Computers are
inflexible machines that understand what you type only if you type it in the exact form that
the computer expects. The expected form is called the syntax. Program with syntax errors
cannot execute.
• A logic error (or logical error) is a mistake in a program's source code that results in
incorrect or unexpected behavior. It is a type of runtime error that may simply produce the
wrong output or may cause a program to crash while running. Many different types of
programming mistakes can cause logic errors
Programming Development Life Cycles - PDLC
• The following are six steps in the Program Development Life Cycle:
• Analyze the problem. The computer user must figure out the problem, then decide how to
resolve the problem - choose a program.
• Design the program. A flow chart is important to use during this step of the PDLC. This is a
visual diagram of the flow containing the program. This step will help you break down the
problem.
• Code the program. This is using the language of programming to write the lines of code. The
code is called the listing or the source code. The computer user will run an object code for this
step.
• Debug the program. The computer user must debug. This is the process of finding the "bugs"
on the computer. The bugs are important to find because this is known as errors in a program.
• Formalize the solution. One must run the program to make sure there are no syntax and logic
errors. Syntax are grammatical errors and logic errors are incorrect results.
• Document and maintain the program. This step is the final step of gathering everything
together. Internal documentation is involved in this step because it explains the reasoning one
might of made a change in the program or how to write a program

You might also like