Programming: Source code, application domain, algorithms, logic, language syntax, patch, art/craft/engineering, qualifications
Requirements analysis, specification, software architecture, coding, compilation, testing, debugging, documentation, integration, maintenance
History: Al-Jazari's robot, Jacquard loom, Babbage's Difference Engine and Analytical Engine, Hollerith's punched cards, direct binary, programmable, assembly language, high level language, abstraction (fourth/fifth generation), offshore outsourcing.
Algorithms, Inputs, Outputs, Termination, natural language, pseudo-code, flowcharts, programming languages, maximum and minimum values, searching, sorting, Big O notation, greedy algorithm, recursion, Travelling Salesman Problem,
Methodologies: Top-Down structured, OOAD, MDA, E-R
First: machine code, entered as binary, octal or hexadecimal. Clumsy, slow, late 1940s and early 1950s.
Second: Assembly language. Better way to produce machine code but instructions still expressed in terms of machine actions.
Third: High level imperative. Examples: FORTRAN, ALGOL, BASIC, COBOL, PL1, ADA, Pascal, C. Express actions in logical terms removed from machine instructions. Not address parts of computer like CPU registers and memory.
UC Berkeley CS10: Programming Paradigms
Imperative/Algorithmic/Procedural;
Object-oriented (C++, Delphi, Java),
Declarative (Prolog)
List processing (LISP, Logo)
FORTH (in its own category).
Basic distinction: Scalar versus structured types. Scalar is single object with a single type e.g. integer, Boolean, real.
Basic distinction: strongly typed languages versus weakly typed. Strongly typed languages (e.g. Pascal) insist that, in most circumstances, an integer is an integer (variant types allow flexibility). Weakly typed languages (e.g. Visual Basic) allow a variable's type to be set at run-time by data in it (VB is strongly typed as well).
Structured or complex types include one or more elements. Array is a vector or group of data objects of the same type, accessible by an index (e.g. [i]). A string is an array of characters. A record is a group of one or more data items that can be of the same or different types e.g. an integer and a string . A set is an unordered group of objects of the same type e.g. set of numbers in range 0-10.
Abstract data types (ADT) are complex data types with associated methods. e.g. a stack, which can be implemented as an array or using pointers, has operations of Pop and Push (add to stack and remove item from stack respectively). Stack is LIFO (Last In First Out, like a pile of plates). Queue is FIFO (First in First Out, like any orderly queue). Binary tree is organised by data held in each node - usually smaller items to left, larger items to right.
Constants: retains same value throughout e.g. a tax rate. Change it in one place and it changes everywhere.
Types: include system types, integer, real, Boolean, character plus user-defined e.g. ADTs, enumerated types (have order).
Variables: take on values at run-time. Variable types (Java but principles apply to all imperative languages); article
Assignment: give a variable a value.
Selection: if, case.
Repetition: (aka iteration, looping): for, repeat, while
Statement blocks: program, procedure, function, class, unit (in Pascal). Procedures and functions can take parameters (data passed in or out of procedure). Function returns single value. Parameter declarations in procedure/function header are formal parameters; parameters passed when function/procedure is called are actual parameters.
See algorithm to merge two files.