Programming Logic & Design – Rapid-Review Notes
Program & Programming
- A program is a set of instructions that directs a computer to perform specific tasks such as:
• display messages, receive user input, perform arithmetic, compare values, iterate - Programming is the process (art + science) of planning, designing, and writing those instructions to solve a problem
Programming Language & Its Components
- Programming language: artificial language enabling human–computer communication
- Defined by two core components:
• Syntax – rules governing form (symbols, punctuation, keywords)
• Semantics – rules governing meaning (what each instruction does)
Classification of Programming Languages
- Two main generations:
• Low-Level Language (machine dependent, minimal abstraction)
• High-Level Language (hardware independent, human-readable)
Low-Level Language
- Types:
• Machine Language – binary codes 1/0
• Assembly Language – mnemonics translated by an assembler - Advantages: very fast execution, small memory footprint, high security
- Disadvantages: hard to code, debug, maintain; not portable
High-Level Language
- Paradigms:
• Procedural – sequence of steps (e.g., C, BASIC)
• Object-Oriented / Event-Driven – interactions among objects (e.g., C++, Java, C#) - Advantages: easy to learn (English-like), portable, easier maintenance/debugging
- Disadvantages: slower execution, larger memory due to translation (compiler/interpreter)
Program Development Process
- Planning – define problem, goals, tasks
- Coding – write source code using an IDE/editor
- Testing & Debugging – locate and fix “bugs” until error-free
- Documentation – prepare user & technical references (description, hardware, OS, specs)
- Maintenance – update, enhance, and keep program running smoothly
Key Historical Milestones (Timeline)
- 1840s – Ada Lovelace writes first algorithm for Babbage’s Analytical Engine
- 1949 – Assembly Language introduced (low-level symbolic code)
- 1952 – Autocode (first compiled language, forerunner of COBOL & FORTRAN)
- 1957 – FORTRAN developed for scientific computing; later used by NASA
- 1958 – ALGOL introduces code blocks and nested functions; ancestor of C/C++/Java
- 1959 – COBOL targets business applications; dominated enterprise computing
- 1964 – BASIC designed for beginners; evolves into Visual Basic
- 1972 – C language created; foundation for many modern languages
Quick Comparison Cheat-Sheet
- Low-Level ⇒ fast, compact, hardware-specific
- High-Level ⇒ readable, portable, slower
- Syntax ⇒ how code looks
- Semantics ⇒ what code means
- Development Steps ⇒ Plan → Code → Test/Debug → Document → Maintain