Source Details
- Video Title:
- Early Programming: Crash Course Computer Science #10
- Channel/Author:
- CrashCourse
- Publication Date:
- May 4, 2017
- URL:
I. Core Concepts of Computer Programming
Definition of a Program
A computer program is defined as a "sequence of operations" that a machine performs.
Loading Programs into Memory
A central theme is the transition from programs being magically in memory to understanding the necessity and mechanisms of "how a program gets into a computer." This process of loading programs into a computer's memory is crucial for execution.
Operations on Values
Computers utilize complex circuits to "save and retrieve values from memory, and perform operations on those values, like adding two numbers together."
II. Pre-Computer Programming: Early Mechanized Automation
The concept of "programming machines existed way before the development of computers."
Jacquard Loom (1801)
This textile loom is highlighted as "one of the earliest forms of programming."
- Mechanism: Patterns for cloth were defined by punched cards. The "presence or absence of a hole in the card determined if a specific threat was held high or low in the loom."
- Sequencing: "To vary the pattern across rows these punch cards were arranged in long chains, forming a sequence of commands for the loom." This sequential command structure foreshadows later computer programming.
- Significance: Punched cards proved to be a "cheap, reliable, fairly human readable way to store data."
III. Early Data Storage and Limited Automation: Tabulating Machines
1890 US Census
Punched cards were repurposed to "help tabulate the 1890 newest census."
- Data Storage: "Each card held an individual person's data." A "hole would cause the running total for that specific answer to be increased by one."
- Distinction from Computers: It's critical to note that "early tabulating machines were not truly computers as they can only do one thing-tabulate. Their operation was fixed and not programmable. Punished cards stored data, but not a program."
IV. The Rise of "Business Machines" and Early Programming Methods
Over sixty years, tabulating machines evolved, gaining capabilities for "subtract, multiply, divide, and even make simple decisions."
Plug Boards
To control these new functions and perform different calculations, programmers used "control panels" full of "little sockets, into which a programmer would plug cables to pass values and signals between different parts of the machine." These were also known as "plug boards."
- Challenge: Rewiring the machine for each new program was "unacceptable" due to significant "downtime."
- Evolution: By the 1920s, "plug boards were made swappable," improving comfort and allowing for different pre-wired programs (e.g., "one board might be wired to calculate sales tax, while another helps with payroll").
- Complexity: Despite improvements, plug boards were "fiendishly complicated to program." The example of an IBM 402 accounting machine program in the 1940s demonstrates a "tangle of wires."
ENIAC (1946)
The "world's first General-Purpose electronic computer" heavily utilized plug boards. "Physically wiring up the Eniac and getting the program to run could take upwards of three weeks," highlighting the inefficiency of this method for complex tasks.
V. The Paradigm Shift: Stored-Program Computers
The late 1940s and 1950s saw a critical development: "electronic memory was becoming feasible."
Core Principle
"Instead of storing a program as a physical plug board of wires, it became possible to store a program entirely in a computer's memory." This allowed programs to be "easily changed by programmers and quickly accessed by the CPU."
Von Neumann Architecture
This unified approach, where "programming data into a single shared memory," is called the von Neumann architecture, named after John von Neumann.
Hallmarks of a von Neumann computer include:
- A processing unit containing an arithmetic logic unit, data registers, an instruction register, and an instruction address register.
- A memory to store both data and instructions.
First Implementation
The "very first von Neumann architecture stored program computer was constructed in 1948 by the University of Manchester, nicknamed 'Baby'." Modern computers still use this architecture.
VI. Input/Output Methods for Stored-Program Computers
Even with stored-program capabilities, data still needed to be loaded.
Punch Cards (Continued Use)
"Well into the 1980s, almost all computers had a punch card reader." Cards were "suck[ed] in a single punch card at a time and write the contents of the card into the computer's memory." Dropping a stack of cards could lead to "hours, days, or even weeks to put the code back in the right order."
Punched Paper Tape
A "close cousin to punch cards," this offered a continuous medium rather than individual cards.
Panel Programming
Pre-1980, this was another common method, using "huge panels full of switches and buttons" instead of physical plugs. These panels often had "indicator lights to display the status of various functions and values in memory." This method was extensive in early home computers like the Altair 8800 (1975).
VII. The Need for Simpler Programming
Regardless of the method (plug boards, punch paper, or panel switches), "programming these early computers was the realm of experts." It demanded "intimate knowledge of the underlying hardware," including "processor Op codes and register wits."
Programming was hard and tedious. Even professional engineers and scientists struggle to take full advantage of what computing could offer.
The clear conclusion is that "what was needed was a simpler way to tell computers what to do; a simpler way to write programs," setting the stage for the development of programming languages.