Abstract structures in narrative and code

Michael mentors Josh on Ray Bradbury's "The Foghorn," which works without a traditional hero despite its unusual structure, then connects that insight to Josh's progress in Harvard's CS50 course. Both narrative and code require learning to see abstract structures before mastering syntax.
Chapters
I am well. Tell me about school last week. What did you read, think, talk about?
Last week, I think one of my favorite things that we read in humanities is we read a short story called The Foghorn by Ray Bradbury. Uh, it's a really good read. I thought it was really interesting. Um, and then Yeah, I think that was probably my favorite part of humanities. I love reading short stories.
Got it. I read Ray Bradbury when I was your age. I don't remember that story. Can you give me just a super quick version of what it's about?
Yeah, so it starts off with these two men at a lighthouse, like, so, and then when the action kind of starts to rise The senior, the guy who worked at the lighthouse the most, tells the other guy about this thing that comes to visit the lighthouse every year, I think. And then a few— a little while later, the thing comes, and it turns out it's a 100-foot monster whose cry is the same as the foghorn. And it kind of goes into depth about the pain and the sadness that they assume the monster has gone through because it's probably the last of its kind, um, and that since humans came, its life has been so different, and now it's just drawn to the foghorn.
Got it. Actually, this is ringing bells now. I vaguely recall it. Um, Ray Bradbury is usually known as a science fiction author. Would you describe this story as science fiction or not necessarily?
Um, I don't think so.
Would you describe it as fantasy?
I mean, I, I, I think so because 100-foot monster.
Okay, okay. Um, would you say what, what's the point of the story? It doesn't sound— well, actually, you Is there a hero's journey in the story? We've been talking about the hero's journey. Is there a hero's journey in the story or not really?
Um, I guess in a way the monster leaves its home to come to the lighthouse. I'm not sure it's a hero's journey, but it is a journey.
When, you know, when you write, you build towards a climax. Is there a climax in this story or not necessarily?
I think, well, I— a climb— the climax is once, and I did forget to mention this, but, um, I think one of the guys, the older guy, experimentally shuts the foghorn off and the monster gets really mad and it tears the lighthouse apart. I think just in action sense, that's probably the climax, but I think like the heat, not the action, but everything else but that is sort of when the monster comes out because it's like shocking.
So sometimes, you know, I think of a lot of conflicts between the protagonist and the antagonist kind of like almost good versus evil. I mean, I would say in The Lord of the Rings, it's very much good versus evil. You know, we, we have to fight Sauron and destroy the ring. And in general, I think a lot of stories have kind of a good guy and a bad guy. Would you say there's a good guy and a bad guy in the story, or not necessarily?
Um, not necessarily. Um, I don't think the monster, especially at the beginning, did anything wrong, and neither did the humans. There's nothing morally wrong anyways.
So what I'm wondering then is, if it's not a hero's journey, if there's no kind of good versus bad, if the monster is not quite a hero, how does it work as a story? I mean, I think of those things as common in stories, clearly not universal. This seems to be a story that has a different structure. What would you say makes it effective as a story, given that it doesn't have the grand we're beating the bad guys kind of thing.
Well, I mean, I think it has a structure, but it's just different. Instead of beating up the bad guys, it's like the two men are trying to understand the monster. And so, yeah, the monster feels something, he does something, it ends in some way. To be honest, I'm not quite sure, but I think it still does have a structure.
Do you think that maybe the more important dynamic is between the two men than between the monster and the lighthouse?
I think the point at least was mostly between the monster and the lighthouse, but the dynamics between the two men and their conversation are important as well.
What kind of issues did you guys, did you guys discuss in class about the story?
What do you mean issues?
Well, presumably you had a conversation about it and wondered what were the things that— what was the substance of your conversation?
Part of our conversation, um, or we had— we were talking about different things, but one of the things we were talking about, uh, was that in the story, um, the older guy, the guy who was working at the lighthouse longest was talking about the monster's journey or what he thinks the monster has been doing. After he visits the fog horn, he slowly goes back down, but then he wants to come up. He slowly comes back up because I didn't know this before that day, but apparently you have to come up really slowly if you dive down deep. But the older guy called where the monster goes down the deep, or the— yeah, something like that. And I think that kind of resonates with me, not personally, but I think that's really interesting because it is literally deep into the ocean. But it has— or it's really important into the story.
It sounds like part of what you discussed were kind of the details of the story and how various details of the story made sense. In light of the bigger story. Is that accurate?
Yes.
Got it. Did you talk at all about, um, whether or not it might be Hero's Journey?
We didn't.
Okay. There are lots and lots of different ways we can discuss stories. Um, just to check in on your story, how is your story going?
It's going pretty good. Um, I'm almost done with the climax. It's getting there.
During school, do you have much less time to work on it?
I have— I still have time to work on it. I think it fits in with my schedule good.
Got it. And did you resume Harvard CS50 with Salokey, or are you taking a break from that?
I resumed it. I'm doing that.
Are you still on Lesson 0?
I'm on Week 1. I've actually just done with the video, so I'm going to start doing the activities on Monday.
Wow, officially from Lesson 0 to Week 1. That's good. How was the lecture for Week 1?
It was interesting. I've done— I haven't done C, which is the language that they were covering in Week 1, but I have done just a little bit of Java. So I'm kind of familiar with the format. So I think that might help, but we'll see how it goes.
Got it. And I, I watched, I think, most of the Week 1 lecture long ago and far away. As I recall, he kind of talks about structure in computer science and what computational thinking is. Am I correct about that?
I think so.
How would you describe what he talks about?
Well, I think, I think so. They separate the video, I think. Yeah, they separate the video in like the different sort of structures of the language. They talk about conditionals and functions, and I think they go through different problems like how to— good formatting and ways to do things differently. And I think it's really nice because he does it one way, but then he shows you how to do it a different way but better. I think that's The biggest thing that I take away from that.
Well, and I don't know if you remember it, but last spring we were talking a little bit about, you know, the structures and programming languages and how Scratch and Python were both similar and different. And now if you look in C, you'll have a different example. Would you say you're beginning to get a sense for both the abstract structure of code as well as different ways to kind of organize particular pieces of code?
I think I'm getting there, but, or if you mean like sort of getting how to restructure the code or making it better?
That's part of it certainly, but even I think, I think it's the case that just take if-then, that both Scratch and Python both have if-then statements. Is that true?
Yes.
And then loops, both Scratch and Python allow you to do loops. Is that correct?
Yes.
So you can look at these as particular structures, and then depending on what you want the larger program to do, then you can make decisions about how to arrange different, different kind of components or modules of code. Does that make sense?
Yes.
And when he gave you two examples of code, one that was better structured than the other, in what way would you say the second one was better structured than the first?
I think one, most of the time it took less lines. Two, it was easier to read. And three, it just made more sense overall. Like instead of, I think the most common example is if he was printing something over and over and over, and but then he used a loop to just change that.
Got it. And so you can see how thinking of different ways to use loops changes how you make decisions when you design a program. Does that make sense?
Yes.
Um, do you remember the conversation we had about going from expert to novice? I mean, I'm sorry, the other direction, from novice or beginner to expert.
I think so.
So it's kind of about as we become— when we're just learning something, when we're novice, when we're beginning, we're focused on the details. So in code, you're just like, where, where does the parentheses go in the Python? You know, where does the semicolon go? You're totally focused on the details. Or to go to the example of writing, when you're writing, you're, how do I write this sentence? And how do I write— where do I put the punctuation? But But then as we become more expert, we kind of go beyond the details. And so in the case of coding, we go beyond the kind of semicolons and parentheses to what is the bigger structure? Where do I do loops and if-thens? And why am I organizing the whole thing like that? And then in the case of writing, we go from this sentence and this punctuation to what's the longer narrative? What's the, you know, hero's journey or the climax I'm going to? Does it make sense that in both, I would say, coding and in writing books, you're moving from learning the details, which are important, to getting kind of a bigger, big picture view of what's going on?
Yes.
And I would say that's part of becoming an expert. Obviously, you're a long ways from like a super high-level expert, but you're going beyond the details. And I think the way I think of it as a learner is You kind of have to get the details clearly enough so that you're not stuck, you know, you're not stuck where your mind only has to figure out, you know, the details. So you have to develop a certain fluency with the details. But then once you do that, then you can start to get a bigger picture and then you can kind of design the code, the program or the story or novel. And would you say you're a little bit at the design stage in coding as well as in the novel writing?
I think so, especially in the novel writing.
Yeah, I would expect in the novel writing you're way more advanced than in the coding, for sure. But I guess I'm wondering if, because you're way more advanced in the novel writing, you're definitely thinking of the big picture structure there, if you can kind of glimpse the possibility of getting to that point with a code, especially after watching that Lesson 1 where he showed you different ways to organize the code.
I think so.
And it will, it will get easier to think big picture with coding the more comfortable you get with the details. And this is tricky because now you have to learn the details of a new language, C. But in some ways, I think the advantage of learning a new language is even though Scratch and Python and C are different at the detail level, the idea is the bigger structure, how to think about loops and if-then statements and all that, that is mostly independent of the details. Does that sound accurate?
Yes.
Okay, well, cool. I, I want— I don't want you to get exhausted by learning details. I, I think the more interesting part is the big picture stuff. Does it make sense that that's more interesting stuff?
Yes, I think so.
So yeah, I'm really excited that you're having a great time at school. Oh, Quick thing with STEM. What's going on with your STEM class?
In STEM, I'm really enjoying all the math conversations we're having. Recently, we've been doing this activity where one person comes up with a sum and a difference, and using those two numbers, the other people in the group have to solve or have to figure out which numbers add up to the sum but also have that difference. So we've, we've been doing that and I think it's really fun. And then for science, we've been doing Brilliant and I've never done it before. So, and I think it's awesome.
Very cool. This is Josh, is that correct?
Yes.
Marvelous. Marvelous. All right. So you're getting lots of math thinking going on too and science thinking. All right. In which case, have a wonderful week and I'll see you next week.
Awesome. Thank you, Michael.
You're welcome.










