0% found this document useful (0 votes)
4 views7 pages

Program Development Notes

The document provides an overview of key programming terminologies, language translators, generations of programming languages, and program development stages. It outlines characteristics of algorithms, pseudocode guidelines, flowchart symbols, control structures, and modular programming concepts. Additionally, it discusses debugging methods and the differences between compilers and interpreters, highlighting their functions and performance aspects.

Uploaded by

michaelkoech468
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 views7 pages

Program Development Notes

The document provides an overview of key programming terminologies, language translators, generations of programming languages, and program development stages. It outlines characteristics of algorithms, pseudocode guidelines, flowchart symbols, control structures, and modular programming concepts. Additionally, it discusses debugging methods and the differences between compilers and interpreters, highlighting their functions and performance aspects.

Uploaded by

michaelkoech468
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

1.

Key Terminologies in Programming


Term Definition
Program A set of instructions a computer follows.
Process of developing a program using a programming
Programming
language.
Programming A set of symbols/instructions that can be translated to
Language machine-readable form.
Human-readable instructions of a program yet to be
Source Code
translated.
Machine-readable output generated by a
Object Code
compiler/assembler.
Syntax Rules of a programming language.
Translator Software that converts source code into machine code.
Short abbreviations in assembly language representing
Mnemonics
machine code.
Step-by-step logical solution to a problem (can use
Algorithm
flowcharts/pseudocode).
Flowchart Diagram representing algorithm or process.
Informal, English-like description of an algorithm or
Pseudocode
process.
the manual, step-by-step simulation of an algorithm or
Dry Running code on paper (or in one's head) without executing it on a
computer
The systematic process of identifying, analyzing, and
Debugging removing errors (commonly called "bugs") from software
so that it functions as intended.

Control
Blocks of code that manage execution order.
Structure
Documentation Written explanation of a program for developers/users.
Coding Writing instructions in a programming language.
Script Instructions executed by an interpreter at runtime.
Linking Combining compiled object files into an executable.
Iteration Repeating a block of code until a condition is met.
Machine
Lowest-level language directly understood by the CPU.
Language

2. Language Translators
Translato
Function
r
Converts the entire source code into object code at once,
Compiler
generates executable, and identifies errors.
Assemble
Translates assembly language (mnemonics) into machine code.
r
Interpret Converts source code line by line and executes immediately
er without saving object code.

3. Generations of Programming Languages


Generatio
Name Level Examples Notes
n
Machine Hardware-dependent,
1GL Very Low Binary code
Language difficult to read/write
Assembly Uses mnemonics, requires
2GL Low x86, ARM
Language assembler
Medium– C, C++, Java, Portable, easier to
3GL High-Level
High Python maintain, procedural/OOP
Focus on rapid
Very High- SQL, MATLAB,
4GL High development, database
Level SAS, ABAP
queries
Prolog, AI & constraint-based
5GL Logic-Based Very High
Mercury problem solving

4. Program Development Stages


1. Problem Recognition – Identify problems and interpret them.
2. Problem Definition – Determine input, processing, and expected
output.
3. Program Design – Structure a solution into an algorithm using
flowcharts or pseudocode.
4. Coding – Translate the algorithm into source code using a
programming language.
5. Testing & Debugging – Detect and correct errors:
o Syntax errors – Violations of language rules.
o Logical errors – Program produces incorrect results.
o Methods – Dry running, debugging utilities, test data.
6. Program Implementation – Install and run the executable program.
7. Documentation – Explain program for users, operators, and
programmers.
5. Algorithm Characteristics
 Clear start and end.
 Unambiguous, each step has one meaning.
 Finite – terminates after a limited number of steps.
 Effective – simple enough to execute with available resources.

6. Pseudocode Guidelines
 Use plain English.
 One statement per line.
 Indent for readability.
 Capitalize keywords.
 Avoid language-specific syntax.
 Clearly show start and end.
 Use descriptive variable names.

Advantages of Indentation:

 Improves readability
 Shows nested structure clearly
 Easier debugging

7. Flowchart Symbols
 Oval – Start/Stop
 Parallelogram – Input/Output
 Rectangle – Process/Calculations
 Diamond – Decision/Condition
 Circle – Connector

Flowchart Guidelines:

 Must start and stop


 Show input, processing, output, and controls
 Logical flow using arrows
8. Control Structures in Programming
Type Description
Sequenc
Execute statements in order.
e
Selectio Execute statements based on conditions (IF…THEN, IF…ELSE,
n Nested IF).
Iteratio Repetition of statements (WHILE…DO, REPEAT…UNTIL, FOR
n loops).

9. Modular Programming
 Breaks programs into smaller, independent modules for easier
management, testing, and debugging.

1. Terminology Questions (Short Answer /


Definitions)
1. Define the following terms:
a) Source Code
b) Object Code
c) Mnemonics
d) Algorithm
e) Dry Running
2. Explain the difference between a compiler and an interpreter.
3. What is the purpose of documentation in programming? Name three
types of documentation.

2. Programming Languages & Generations


1. Match the programming generation with its description:

Generatio
Description
n
1GL Human-readable, portable, object-oriented
3GL Very low-level, binary code executed by CPU
Focus on database interaction and rapid
4GL
development
2. Give one example of a:
o 2GL language
o 3GL language
o 5GL language
3. List two advantages of using high-level programming languages
(3GL) over machine language.

3. Algorithm & Pseudocode


1. List three properties of a good algorithm.
2. Write a pseudocode to calculate the sum of the first 10 positive
numbers.
3. Identify two advantages of indentation in pseudocode.
4. Explain what dry running is in your own words.

4. Flowcharts
1. Draw a flowchart to check if a number entered by the user is positive,
negative, or zero.
2. Draw a program flowchart that reads the names and ages of 5
applicants and prints the names of those who are 18 or older.

5. Program Development & Control


Structures
1. Name the three types of control structures in structured
programming.
2. Explain the difference between:
o IF…THEN
o IF…THEN…ELSE
o Nested IF
3. Write a small FOR loop pseudocode to print numbers from 1 to 5.
4. Describe modular programming and its benefits.

6. Debugging & Error Detection


1. Give an example of a syntax error and a logical error in a program.
2. Explain three methods of error detection in programming.
3. Describe the steps involved in debugging a program

1. The Compiler (The "Book Translator")


A compiler translates the entire source code into a machine-language file
(like an .exe) all at once before the program ever runs.

 How it works: It scans the whole program, checks for syntax errors,
optimizes it, and spits out an executable file.
 Speed: The initial translation takes time, but once it's done, the
program runs very fast because it’s already in "machine tongue."
 Errors: If there is a single typo on line 500, the compiler will fail and
won't produce the executable. You have to fix all errors before you can
run it.
 Examples: C, C++, Rust.

2. The Interpreter (The "Live Translator")


An interpreter translates the code line-by-line as the program is running.

 How it works: It reads the first line, converts it, executes it, and then
moves to the second line. It doesn't produce a separate saved file.
 Speed: It starts running immediately, but the overall execution is
slower because the computer has to "translate" every time it performs
a task.
 Errors: The program will run smoothly until it hits the line with the
error, at which point it will suddenly crash.
 Examples: Python, JavaScript, Ruby.

Key Differences at a Glance


Feature Compiler Interpreter

Translation
Entire program at once One statement at a time
Unit

Generates intermediate object


Output No intermediate object code
code

Execution Slower (translated on the


Faster (pre-compiled)
Speed fly)

Memory
Higher (creates an extra file) Lower (no extra file needed)
Usage

Rapid development and


Best For High-performance software
testing

A Note on "Translators"

Technically, "Translator" is the umbrella term. Both Compilers and


Interpreters are types of translators. There is also a third type called an
Assembler, which is specifically used to translate low-level assembly
language into machine code

You might also like