Lesson Plan: How Programming Became Readable
Standards alignment
This lesson supports the history and impact strands of the Georgia Standards of Excellence for computer science and technology courses, and the strands on algorithms and programming. Teachers should check the current standard numbers published by the Georgia Department of Education and match them to their own course, since the codes differ between courses and change with revisions.
Learning objectives
By the end of the lesson, students will be able to:
- Explain what a compiler does in plain words.
- Describe Grace Hopper's main contributions, including the A-0 system, FLOW-MATIC and her role in COBOL.
- Define abstraction and give one example from daily life and one from programming.
- Argue whether making programming easier is always an improvement.
Opening (5 minutes)
Ask students to write instructions for making a peanut butter sandwich, as if the reader were a robot that knows nothing. Collect a few and read them aloud, following each literally. The robot will open the jar before taking off the lid, or spread the bread with the knife handle. Laughter is the goal. Then ask: Why was it hard to be precise? What would help?
Activity 1: The human compiler (15 minutes)
Divide the class into pairs. One student is the Programmer and the other is the Computer.
- The Computer receives a printed lookup table that links a few short codes to actions, such as 01 for "add" and 02 for "subtract." The Computer understands only numbers from the table.
- The Programmer writes a simple task in plain English, such as "Add 5 and 10, then subtract 3, and say the result."
- The Programmer must now convert the task into numeric codes, by hand, using the table. The Computer then carries out the codes and reports the result.
- Switch roles with a new task. Time each round.
Reflection: How long did the translation take? How many errors did the pair make? What if a third student, the Compiler, did the translation, so that the Programmer could write in English and the Computer could receive codes? Hopper's insight was that a computer could do this translation itself.
Mini-lecture: Who was Grace Hopper? (10 minutes)
Grace Murray Hopper was born in New York City in 1906. She studied mathematics at Vassar College and earned a doctorate in mathematics at Yale in 1934, then taught at Vassar. During the Second World War she joined the United States Navy Reserve. The Navy assigned her to Harvard, where she worked with Howard Aiken on the Mark I, a huge electromechanical calculator, and she wrote its programs. Later she joined the company that built the UNIVAC, one of the first commercial computers.
In the early 1950s, programmers wrote in machine code or assembly language, sequences of numbers and short mnemonics that matched the machine's instructions. Programs were slow to write and easy to get wrong. Hopper noticed that programmers kept reusing pieces of code, and she built a system that collected subroutines from a library and assembled them into a complete program. In 1952 she completed the A-0 system for the UNIVAC. In today's terms, A-0 acted more like a linker or loader than a modern compiler, but she called it a compiler, and it began a line of work that led to the compilers used now.
She went further. She argued that programs should be written in words that people could read, and that the computer should translate them. Many colleagues doubted that a computer could handle English-like statements. Her team produced FLOW-MATIC in the mid-1950s, a language for business data processing whose commands looked like short English sentences. Her work influenced COBOL, the Common Business-Oriented Language, which a committee defined in 1959 and 1960. Hopper served as an adviser, not as the single author, and the committee included many other people. COBOL ran on machines from different makers, which let a business keep its programs when it changed computers. Billions of lines of COBOL are still in use.
Hopper remained in the Navy Reserve and returned to active duty in 1967. She retired in 1986 as a rear admiral, at the age of 79, and she remained a popular speaker until her death on January 1, 1992. In 2016 she received the Presidential Medal of Freedom after her death.
Activity 2: Reading a COBOL card (15 minutes)
Project the image below. Ask students to find the English words.
- Which words can you read? What might each one do?
- Compare the card with a line of machine code, which looks like a string of numbers. Which would you rather read? Which would a computer prefer?
- Why would a bank or insurance company welcome a language like this? Who besides programmers could check the code?
The story of the bug (5 minutes)
Hopper is often linked to the origin of the word "debugging." In September 1947, operators of the Harvard Mark II found a moth stuck in a relay. They taped it into the logbook with the note "First actual case of bug being found." Hopper liked to tell the story, which helped it spread. Engineers had used "bug" for faults long before, and Thomas Edison used it in the 1870s. Ask students: Why does a good story spread faster than an accurate date?
Discussion (10 minutes)
- Hopper wanted to make computers easier for ordinary people. Name a tool that was hard to use until someone simplified it.
- Abstraction hides detail. What is hidden when you drive a car? What is hidden when you write in Python?
- Is there any risk in hiding detail? Think of a time when not knowing how something works caused trouble.
- Hopper was a woman in a field and a service dominated by men. What does her career show about who can contribute to technology?
Teacher notes
Keep the focus on the idea of translation, not on the details of any one language. Students who have never programmed can still follow the lookup-table game. Students who code can describe what happens between typing a line of Python and seeing a result. If time is short, drop the bug story and keep both activities. If the class has access to computers, an optional follow-up lets students run a short program and then view the same program in a more detailed form, such as the assembly output of a compiler, to see how much work the translation does.
Assessment
Ask each student to write a short paragraph, five to seven sentences, that explains what a compiler does to a friend who has never programmed. The paragraph should contain an everyday analogy and one fact about Hopper. A strong answer says that a compiler translates readable code into instructions the machine can run, uses an accurate analogy such as a translator between two languages, and names a specific contribution.
Differentiation
- Support: Provide a partly completed lookup table and shorter tasks in Activity 1.
- Extension: Ask advanced students to write a tiny set of rules for a made-up language and a translation of two sentences into it.
- Reading: Offer an excerpt from a biography or an oral history for students who want more.
References
- Beyer, Kurt W. Grace Hopper and the Invention of the Information Age. MIT Press, 2009.
- Computer History Museum. Oral history and collection records for Grace Hopper.
- Georgia Department of Education. Georgia Standards of Excellence for Computer Science and Technology courses.
- Sammet, Jean E. "The Early History of COBOL." In History of Programming Languages, edited by Richard L. Wexelblat. Academic Press, 1981.



