01. Teacher Plan
Chapter 1 Teacher Plan
Day 1
Demonstrate the 14-15-15 card trick as a task. Work in groups to explain how it works.
- I am very interested in seeing work that contains mistakes. Any kind of mistake gives me information. A perfect answer shows me nothing; please save your mistakes to show off.
- I am going to demonstrate this trick, but afterwards you need to rely on each other for questions about what happens in the process. It’s ok to ask other groups if your group cannot agree, but I myself will not tell you what I did.
- Making examples is a key part of the understanding process.
Show them how to get started with the book. Read and answer questions in the Chapter 1 Reading Guide.
Day 2
Demo Chapter 2: one short example of each feature in the brief summary.
Re-emphasize the importance of keeping mistakes and missteps so others can learn from them.
(Discuss the answers to the chapter 1 reading guide.) Working in the same groups (possibly change a bit).
- (10-15 min) Produce examples of pure and impure functions. Make sure think the definition of pure your group uses is acceptable. Discuss and explain which approaches sound weird. This might need “digestion”.
- (3 min) List some functional and imperative languages that you know. This went well, no revision was necessary.
- Check to see if they are comfortable with the definition of lazy (don’t recite it). Think up an experiment to determine if a language is lazy or not.
- Static typing: I just told them this means types known before you run. C++, Java, Haskell are examples. Dynamic typing: Racket, Python are popular examples.
Card trick 14-15-15, day two: write an algorithm that takes in a list of cards in the beginning stack and puts out a list of cards in the face-down pile. Encourage students to think of the cards as strings (“Three of Hearts”). Push back on the idea that using numbers will be easier: “What will your numbers represent? Give me an example.” Having index and value conflated is a major problem when you use numbers for cards.
(15 min) Pick some group’s code and translate it into Haskell. Starting with a Racket-y version and changing it to a Haskell-y version seemed to go well.