Simple math is slow and error-prone for humans. Many devices have been developed throughout history to deal with these problems.
Hardware
Initially, the solutions were simple mechanical devices - abacus, Napier's bones, knotted string, and the slide rule.
Later solutions involved clever and finely crafted machinery. Some included the idea of a stored program - Jacquard Loom and Babbage's Analytical Engine (often considered the first real computer). The programs were punch cards. Delicate, inflexible, but stored programs nonetheless.
1940s - First electrical computers. Huge machines using vacuum tubes. Giant, hot, slow. People walked around inside them. They had their own cooling systems. Some programmed by rewiring (ENIAC) others used punchcards. No real "stored" programs internal to the machine.
1950s and 60s - First transistorized computers. Smaller, less heat, faster. IBM. Minicomputers.
1960s - Integrated circuits (chips). Smaller, less heat, faster yet. IBM
1970s and 80s - microcomputers, personal computers. IBM. More powerful than the first computers.
1980s and 90s - VLSI chips. Much smaller, much faster. Workstations.
2000?
Software
Stored program concept - John Von Neumann. Program resides in the computer rather than on tape, punchcards, etc.
System software - tools to facilitate using the system. Example: File System rather than directly accessing disk blocks.
Operating system - collection of these tools that manage and abstract system resources.
GUIs - graphical interfaces to computers.
Languages:
Wires - ENIAC
Machine language - literally bits that specify the list of instructions to execute. Sometimes entered via switches. Lights showed the values.
Assembly language - mnemonics for the instructions. Assembler turns these mnemonics into bits and bytes.
High-level languages - abstractions of basic programming constructs. More natural to the user. Facilitate programming and eliminate redundancy in the code. Translated into assembly language and machine language by a compiler.
Object-Oriented - higher-level abstractions intended to further facilitate programming. Increase modularity, reusability, security, etc.
Examples: Fortran, Cobol, Snobol, Algol, Basic, LISP, Pascal, Ada, C, C++, Modula-2, Java, Eiffel, etc.
There are 5 main parts to any software development effort
These steps may be done for an operating system, a program, a subsystem (part of a program), and an individual function.
Problem analysis and specification
Can't begin without knowing what needs to be done
Example: Write a program that, given diameter of a circle, computes the area and circumference.
Description: Compute and output the area and circumference of a circle given the diameter.
Inputs: Diameter of the circle
Outputs: Area and Circumference of the circle
And perhaps:
Constants: Pi (formulas for area and circumference)
Problem Specification also called Requirements Specification or Document
Design
Once we have a clear idea of what needs to be done, we can work out how to do it. This is the design phase of the software development process.
A design is not specific to any language, although it usually is specific to a type of language (procedural (Pascal or C), OO (C++ or Java), etc.)
Example:
Data objects:
Variables:
Real: Diameter, Circumference, Area, Radius (derived for convenience)
Constants:
Real: Pi
Operations:
Radius = Diameter / 2
Circumference = 2 * Pi * Radius
Area = Pi * Radius2
Code
Once a design is complete, coding can begin. Given a good design, this should be very straightforward. All hard problems should have been worked out in the design stage. New hard problems should send the project (temporarily) back to the design stage.
Implement the design.
This will be the subject of much of the rest of the course.
Example:Compute area and circumference of a circle
Verification
Does the problem do all and only what it is supposed to do.
Each program/function should be tested against it's requirements to see that it does what it is supposed to do.
Programs should also be tested to make sure that they don't do what they are not supposed to do.
Tests should include correct and incorrect inputs, as well as nonsense inputs.
Regression tests.
Maintenance
Generally accomplished by some abbreviated version of the first four steps above.