In the short story “The Ones Who Walk Away from Omelas,” author Ursula Le Guin describes a utopian city that has everything people want or need — beauty, religion, happiness — but it’s all possible because one child is kept in the dark, separated from all joy and light. Citizens of the city have to go and see this boy, but some can’t take the guilt and walk away.
After reading the story, Lev Fruchter and his class talk about what elements make up utopia and use the conversation as a jumping-off point to talk about equations. They talk about adding good things and multiplying them if they’re really great or, inversely, subtracting things that make people unhappy and dividing the really bad elements. This is all a way of thinking about the math that will eventually run a computer program.
“It’s a way to make equations meaningful, which is, of course, what they are in the programs when you write them,” said Fruchter, a computer science teacher at NYC Nest+m, a public K-12 school in New York City for gifted and talented students. “They are much more than a sheet of homework exercises because they make the program go.”
Using literature in this way has allowed Fruchter to make his computer science math classes entirely project-based, which in turn draws the interest of kids who might not have otherwise liked computer programming. “They’re very happy to be in a math or computer science class where they’re not having tests or doing quizzes or being asked to do sheets and sheets of problems,” Fruchter said.
Fruchter loves words, but is comfortable enough with math and science that he was called upon to teach them. Along the way, he discovered stories are a great way to make science, technology, engineering and math ideas accessible and concrete to learners who might not think those kind of technical studies are for them. He’s convinced literature is a great way to excite learners about STEM.
“I’m a narrative learner,” said Fruchter. “I nail down concepts by aligning them to stories or making up stories about them,” he said.
Fruchter used to teach English, but in the 1990s, while working at School for a Physical City — one of New York City’s New Vision schools — he was asked to step in and teach math. He ended up teaching a double period of English and math, but rather than splitting the two subjects up, he used one to support the other.
“I chose books that I knew would give us the mathematical framework to jump off from,” Fruchter said. “Instead of talking about the math concepts from completely abstract or theoretical concepts, I’d say, ‘Hey we’re reading this book.’ ”
On the flip side, he has also taught students who love math and science the way it has traditionally been taught, and who don’t see the value in reading. He’s found that attitude to be more prevalent in the gifted and talented program than at other schools. But he insists kids who excel at calculating can still learn from the human life lessons in books, and may even understand them at a more fundamental level if the abstract ideas can be connected to the numbers and equations they love.
“They may not appreciate it now, but I know that the concepts and themes that are embedded in this fiction I’m having them read are important for this field,” Fruchter said.
When he talks to professional engineers, he often hears them lament the lack of communication skills among colleagues.
“One guy said engineers are lousy communicators because their education includes no training in fiction,” Fruchter said. “He was quite vocal about the need for people who study technical subjects to have some experience in some artistically crafted communication.”
THE LADY, OR THE TIGER?
One of Fruchter’s favorite stories to teach in computer science is Frank Stockton’s short story, “The Lady, or the Tiger?” The story is about a mythical kingdom ruled by a whimsical king whose system of justice includes dropping lawbreakers into an arena where they must choose one of two doors. Behind one door is a man-eating tiger. Behind the other, a beautiful woman whom he must marry.
One day the king discovers his daughter is having an affair. He throws her lover into the pit. The lover looks up at the princess and sees that she knows which door contains the tiger. She indicates which door the man should choose, but the story ends before the reader discovers what was behind the door. The reader also learns that the princess is just as feisty as her father, so there’s a possibility she’s sending her lover to death so he won’t marry another woman.
“It’s an old-fashioned sexist story where the end comes down to the princess’ psychology,” Fruchter said. But he appreciates it for the way it beautifully mimics binary code. In computer language, this is a “one bit” story, meaning there are two possible versions and two possible endings. In a computer, the two endings would be expressed with either a one or a zero.
When teaching, Fruchter changes the story’s ending to give the lover agency. Now the story is a “two bit” problem. The lover can either trust or mistrust the princess, and the princess can either save or doom her lover. Now there are four possible endings to the story. Fruchter then adds another character to the story: the man holding the tiger behind the door. Presumably, the princess talked to this man to find out what door he would be behind. But what if he’s been in love with the princess his whole life and can either choose to tell her the truth or a lie? Now the story is a “three bit” problem.
“Instead of doing it abstractly with ones and zeros, this is a live literary experience in which the story itself is embodying the concepts,” Fruchter said. And to be clear, while he’s spinning this story, there’s no discussion of ones and zeros, or bits. The class is focused on discussing the possible outcomes of the characters, their motivations and conclusions.
Fruchter often asks students to write their own versions of the story, making sure to be clear about what each character chooses. Later they talk about other possible endings and calculate the versions. Fruchter says there are three main ways to solve the problem: brute force, using a tree diagram to show branching possibilities, and recognizing that the situation represents the function of the number of options raised to the number of choices. So this “three bit” problem has eight solutions (two options raised to the power of three characters equals eight.)
In this one combination of literature and math, Fruchter has hit on many learning standards. Students are reading and interpreting literature, writing creatively, interpreting a math problem in multiple ways, showing solutions in various ways, using functions and factoring.
“It touches so many standards that it’s a real challenge to come up with a way to list them all,” Fruchter said.
This approach to teaching computer science probably wouldn’t work for the most sophisticated students, Fruchter admits. But for kids who aren’t sure they’re even interested in STEM subjects, teaching through fiction is the interdisciplinary connector that could make it all make sense.
The students in his classes pass or fail based on the strength of the programs they write. But he finds that many kids with learning difficulties or who have struggled in other classes stay in the game longer when they have a narrative entry point. They can use their understanding of the story to try to puzzle their way through the math.
STEM FICTION IDEAS
Fruchter has worked to put what’s he has learned about teaching computer programming with fiction into a curriculum called StoryCode. He classifies STEM fiction into three categories: explicit, science fiction and implicit STEM texts.
Explicit STEM texts are novels like “Moby Dick,” where there’s a lot to learn about marine biology and ecology already embedded in the story. For younger students, “Little House on the Prairie” might fall into this category, with all its descriptions of practical engineering projects. Fruchter finds these useful, but a lot of reading without much STEM payoff.
Science Fiction texts are fertile ground for discussion because they usually involve a mostly rationale world with one irrational scientific change upon which the whole future of humanity rests. For example, Madeleine L’Engle’s book, “A Wind in the Door,” takes the reader inside the mitochondria of a character to battle a microscopic plague. Along the way, readers learn a lot about what mitochondria really do in the body.
Implicit STEM texts are ones where the literary action is a metaphor for the operation of scientific principle, like binary and “The Lady, or the Tiger?” Fruchter teaches Ursula Le Guin’s “A Wizard of Earthsea” because magic functions in the book in almost identical ways to the how CSS and HTML work. He also likes Dashiell Hammett’s famous detective novel “The Maltese Falcon” and “Mind of My Mind” by Octavia Butler, a book where psychics take over the world. Fruchter says Butler’s book is an embodiment of the proper way to write an object-oriented program.
“When you can call a line of code a spell, then you are getting somewhere,” Fruchter said. After all, isn’t computer code basically modern magic?