The original name of this curriculum, TeachScheme! should be read as teach scheme not. It is not about Scheme language or Scheme programming. It is about program by design, as the new all-encompassing title makes clear.
We will not be using the standard Scheme language, but a specially designed variants, a collection of teaching languages, where every new level introduces new abstractions (ways to represent more general programs).
Textbook for the Level 2 (secondary schools and introductory university level) course: Original published version: How to Design Programs
Textbook for the Level 2 (secondary schools and introductory university level) course: Revised second edition: How to Design Programs, 2nd ed.
The home page for the Program by Design program contains links to other materials as well as information about workshops, mailing lists, and other ways that help you learn more about this curriculum.
DrRacket The programming environment for the Level 1 (grades 6 - 8) and the Level 2 (secondary schools and introductory university level) workshop.
For this workshop we have prepared copies of all materials you may need.
All materials have been installed on the lab computers. However, if you want to use the materials on your own laptop or at home, please use the links shown above, as well as the following link.
Programs.zip The zipped file with the programs we will work on.
Start DrRacket application. You will see two windows, the Definition window on the top and the Interactions window on the bottom. One at a time type the following things into the Interactions window and observe the results:
Download/open the Programs folder. It should have the following program in it: train.rkt, rocket.rkt, ancestor-trees.rkt, model-list-program.rkt, and cars.rkt.
Open the program train.rkt in DrRacket and hit the Run button. Explore the program to see how it is designed. Make any small changes you wish to see how the program behaves. For example, make the train go slower or faster, draw rails for the train, etc. Make sure that you have tests for all the changes you have made.
Now open the rocket.rkt program. It does have an image of a rocket, but the rocket does not fly. Design a program that launches the rocket into the outer space. Follow the design recipe.
Now bring the rocket back home. Design a new program that lands the rocket on the ground.
Open the program ancestor-trees.rkt in DrRacket and hit the Run button.
Now type in the Interactions window the following (one line at a time:
Design a function that will check whether there is anyone in a person's ancestor tree with blue eyes
Design a function that will produce a list of the names of all people in a person's ancestor tree
Open the program model-list-program.rkt in DrRacket and hit the Run button.
In the browser open the text of the second edition of the book How to Design Programs, go to the second chapter named Fixed-Size Data, then click on the section Designing World Programs.
Download the program cars.rkt and open the file in DrRacket.
The program contains the code shown in the textbook in Chapter 2 Fixed-Size Data in the section 2.3 Designing World Programs.
Open the program cars.rkt in DrRacket and hit the
Run button. Nothing much happens. In the
Interactions window type
(main 30) and you
should see one car going across the screen.
Read the section 2.3 and observe the corresponding program.
Spend the rest of the time adding new features to this world. For example: