Notes on Computer Programs, Languages, Algorithms, Pseudocode and Flowcharts
Computer Program
A set and sequence of instructions given to a computer, telling it what to do.
Also called software; instructions are program source code.
Computer Programming is also called program coding.
Types of Programs
Systems Programs: Keep hardware/software running (e.g., Operating Systems like Linux, Windows).
Application Programs: Used by people to get work done (e.g., Word Processor, Games).
Compiler: Translates code into machine language (ones and zeros).
Programming Language
A standardized communication technique for expressing instructions to a computer, with its own syntax and grammar.
Enables a programmer to specify data, storage, and actions.
Common Programming Languages
Python — Artificial Intelligence & Machine Learning
JavaScript — Rich Interactive Web Development
Java — Enterprise Application Development
C/C++ — Operating Systems and System Tools
C# — Application & Web Development Using .NET
PHP — Web Development
SQL — Data Management
Computer Programmer and Types of Programmers
Someone who can write computer programs.
Types: Software Developers, Game Programmers, Software Engineers, Data Developers, Web Developers, Network System Administrators.
Coding and Debugging; Program Development Life Cycle (PDLC)
Core activities in software creation.
Compile-Time Errors: Syntax errors detected by the compiler (e.g., missing semicolon). Program won't compile.
Runtime Errors: Errors that occur while the program is running, after successful compilation (e.g., logic errors, infinite loops).
Categories of Programming Language
High-level Programming Languages: User-friendly, somewhat platform-independent, abstract from low-level operations. A statement translates to one or several machine instructions via a compiler. Examples: Java, C, C++, Python.
Low-level Assembly Language: Closer to machine language; uses symbolic names instead of numbers. Translated by an assembler and specific to each CPU family.
High-Level vs Low-Level Language (Analogies)
High-Level Language (e.g., Python): Like speaking human language; easy-to-read instructions. \texttt{print("Hello")}
Low-Level Language (Assembly): Detailed, robot-like instructions, closer to the computer's native tongue.
Analogy: High-Level = Ordering at a fast-food restaurant (easy); Low-Level = Cooking it yourself (manage all details).
Algorithm
A step-by-step procedure to resolve a problem; a finite set of well-defined instructions.
Emphasizes a replicable process (Algorithmic thinking).
Elements: Input, Set of rules/steps, Output.
Representation: Input $\rightarrow$ (processing steps) $\rightarrow$ Output.
Pseudocode
Informal way of describing an algorithm using plain English mixed with programming-style keywords, without strict language syntax.
Flowcharting
A design tool to graphically represent solution logic or an algorithm pictorially.
Flowchart Symbols
Terminator: Start/End.
Process: An operation.
Document: Printout.
Decision: Branching point (diamond).
Data: Input/Output.
On-Page Reference: Flow continues on same page.
Off-Page Reference: Flow continues on different page.
Delay or Bottleneck: Identifies a delay.
Flow: Lines for sequence and direction.
Guidelines for Preparing a Proper Flowchart
Must be neat, easy to follow, with a logical start and end.
Include necessary steps in logical order.
Only one flow line from a process symbol.
Decision symbol: one incoming, two or three outgoing flow lines.
Terminal symbols: one flow line.
Symbols should clearly contain information.
Reduce flow-lines using connectors