Embedded - 482: Reference the Same Dog Object

Episode Date: August 8, 2024

Professor Colleen Lewis joined us to talk teaching pointers with stuffies, explaining inheritance through tigers, and computer science pedagogy. Check out her YouTube channel to view her videos explai...ning CS concepts with physical models. These are also collected on her website: Physical Models of Java. If you are an instructor (or thinking about teaching CS), check out Colleen’s CS Teaching Tips. You may also be interested in some other research: John Edwards Study on Syntax exercises in CS1 Daniel Willingham on why learning styles aren’t a real thing A Beginner's Guide to Teaching with Algebra Tiles Colleen is an Assistant Professor at University Illinois, Urbana-Champaign’s Siebel School of Computing and Data Science. You can find her papers on Google Scholar (including studies on teaching and learning).  Transcript Memfault is a leading embedded device observability platform that empowers teams to build better IoT products, faster. Its off-the-shelf solution is specifically designed for bandwidth-constrained devices, offering device performance and product analytics, debugging, and over-the-air capabilities. Trusted by leading brands such as Bose, Lyft, Logitech, Panasonic, and Augury, Memfault improves the reliability of devices across consumer electronics and mission-critical industries such as access control, point of sale, energy, and healthcare. To learn more, visit memfault.com.

Transcript
Discussion (0)
Starting point is 00:00:00 Welcome to Embedded. I am Alicia White, alongside Christopher White. Our guest this week is Professor Colleen Lewis. We're going to talk about teaching computer science. Hi, Colleen. Thanks for joining us. Yeah, thanks so much for having me. Could you tell us about yourself as if we met, I don't know, at a women in technology meetup in Chicago? Oh, okay. Very specific. It's very specific. I was going to go in front of the lion's den at Lincoln Park, so it wasn't as specific as it could have been.
Starting point is 00:00:41 Yeah. Well, first we need to have like an elaborate conversation about the weather, but then I might tell you my name is Colleen Lewis. So I'm currently an associate professor of computer science at the University of Illinois Urbana-Champaign, and I study how people learn computer science and how people feel about learning computer science. My PhD is actually in education rather than most of my colleagues that have a PhD in CS. I have a bunch of questions about that, but I think we want to do lightning round first. Great.
Starting point is 00:01:09 We're going to ask short questions. We want short answers. And if we're behaving ourselves, we won't ask for more detail, but we'll see. Yeah. And I'm a professor, so I obviously can't give you short answers. No, I'll be good. Teaching or research? Teaching.
Starting point is 00:01:25 Favorite building at Harvey Mudd College? The Hawk. Specifically, like the dining hall. I know that a lot of things have Shanahan's name on it. Worst part about teaching at Mudd? The students. We only got two free meals a week in the dining hall. I could have eaten there every meal.
Starting point is 00:01:43 This is such a shock to hear about how people wanted to eat in the dining hall. It was so awful when we were there. No, as an adult, like, I never had a salad where I have cucumbers and carrots and mushrooms. Like, I love a salad bar. We had a nice cream bar. I think the food got a lot better, too. Yes, it did. What is your favorite LeapFrog toy?
Starting point is 00:02:12 You know, I worked on the Didge, which I wouldn't say is my favorite LeapFrog toy. But I'm pretty excited that I helped make the included game on it. So anyone, and I think not that many people bought it, but anyone who bought it got to work on it. That was the little tablet-like thing, right? No, it was after the tablet, but had fewer, had less functionality. So maybe I'll say CS Clickstart.
Starting point is 00:02:38 So it was this like big remote control that was shaped like a keyboard that allowed like three, four or five year old to interact with the TV as if it was a computer. It was pretty cool. My food got better after we left, but I think LeapFrog was more fun when I worked there. I didn't realize you worked there. That's awesome. What is your favorite way to learn new things? I really love audiobooks. I'm not an amazing reader, and I jazz to sit or walk or exercise
Starting point is 00:03:14 or put away dishes while learning new things. Do you prefer to complete one project or start a dozen? I wish that I could say that I didn't like to just start dozens and dozens and not always finish all of them, but that's definitely my tendency. Favorite fictional robot? I don't think I have one.
Starting point is 00:03:36 Okay. Maybe if it was multiple choice, I could give you something, but I'm not that robot-y. Fair enough. Do you have a tip everyone should know? I have so many tips that I think everyone should know. I'll give you a recent one, which is I've started giving myself M&Ms when I take my vitamins. And now I take my vitamins every day.
Starting point is 00:03:56 It's like a miracle. You should try that. Anyway. Okay. Okay. Thank you to Memfault for sponsoring this show. We appreciate their sponsorship and the work that they do. Memfault is a leading embedded device observability platform that empowers teams to build better IoT products faster. What that means is that if you have just realized that you're going to build 5, 10, 100, 50,000 units and you need to keep track of them, they'll let you
Starting point is 00:04:33 create your own dashboard to observe how your system is doing in the field. Memfault gives developers a more scalable and sustainable process. This accelerates the time to market and de-risks product launches. You can cut product costs and deliver more high-quality software. Trusted by leading brands such as Bose, Lyft, Logitech, Panasonic, and Augury, Memfault improves the reliability of devices across consumer electronics and across mission-critical systems, such as access control, point of sale, energy, and healthcare. Thanks again to Memfault for sponsoring this show. Check out memfault.com and the Interrupt blog, which is filled with incredible amounts of information. So LeapFrog, I worked there at the end of the LeapPad era, but before the little tablet thing really took off.
Starting point is 00:05:32 And I worked on the Odyssey Globe, and then I had the preschool line and the pre-K lines. Oh, cool. And I had, and so, I mean. It was an endless series of frogs is what I remember. There was the karaoke. Don't forget the karaoke. Right. It's the most irritating toy possible.
Starting point is 00:05:52 And yet people learn with songs. So why didn't LeapFrog make an iPad app with all of the content they had? Too early. Yeah. They still had all the contents. I mean, the iPad didn't come out until 2010, right? Where were they at that point? Still existed.
Starting point is 00:06:10 Oh, okay. They still existed. I started in, I think it was 2006. And on my first day of work, they laid off 100 people. Yeah. So I think it was the beginning of the end. But I mean, it was such a perfect place to work because I feel like everyone there was 100% focused on kids' education. And I feel like I
Starting point is 00:06:31 don't have any background in business, but I was like, whoa, whoa, whoa, are we making good business decisions here? Like, I get them. Like, this is aligned with my values, but this isn't going great. But it was what I loved working there. It was just perfect. It was so fun to work on kids educational and you're right. Everybody was so happy to be doing something that was both fun and worthwhile. Yeah. Okay. But these days, these days you, you, you, you teach computer science. Okay. Um, but you days, these days you teach computer science, okay? But you also do this thing called Java 3D, which is not a game engine for Java as I initially read it to be. Could you tell us about what Java 3D is?
Starting point is 00:07:18 Yeah, so as I mentioned, I have a PhD in education. And so I read a lot of sort of broader education stuff. And a really popular thing in how we teach math is using physical objects. Like, I think we sort of can't imagine a child learning about what the number three is without using physical objects, whether they're their fingers or blocks or apples. And I think if we think about what we accomplish in math education of being able to help people map a squiggle that is to us a three to this idea of a quantity, which is such an abstract idea, I just think like, wow, one, we've been teaching math for a really long time, but like we're accomplishing, I think, really impressive cognitive feats in getting essentially every human to be able to understand this squiggle means the quantity three. So sort of inspired by this math practice that is so
Starting point is 00:08:17 ubiquitous. At Harvey Mudd, I started trying to get better at teaching Java. So I was teaching at Harvey Mudd Java all the time. And I mean, I am a teacher who cares about their students. And it wasn't always great. And students will give me like thumbs up or thumbs down about how it's going. I'm like, okay, thumbs up, that made sense. Thumbs down, it didn't make sense. And I was getting a lot of thumbs down. They were very honest, and it was helpful. And I started throughout my semesters there experimenting with using physical objects to teach aspects of Java. They do different things at different times, but I've continued to try and develop those and continued working a lot with high school math and computer science teachers who have helped me make them, I think, hopefully more
Starting point is 00:09:05 pedagogically valuable. So I've got this project funded by the National Science Foundation. I've got it on my website, csteachingtips.org slash 3D, but it's sort of a collection of all the ways I use physical objects to teach Java. Okay. So I saw some stuffed animals, and they had little tags on them, bookmark tags. Yeah. References? Pointers? Yeah, totally. What does a tiger represent? Yeah. So, you know, in Java, because it's OOP, we're always talking about creating objects. I was drawing them as like little boxes, you know, with like instance variables inside and stuff like that. And I transitioned to starting to use stuffed animals. One, I sort of like that it challenges some of our stereotypes about what it means to do computer science. Like you come into the classroom and there's stuffed animals on the
Starting point is 00:10:00 board. I don't hate that. But this idea that in our code, we're creating an object, I think is quite complex. And specifically, I try and help, one of the things it tries to do, I try and do is help students understand how two variables could reference a single object, and that that's actually different than two variables referencing equivalent objects. Like that key learning goal, if you don't have it, essentially nothing in programming makes sense. And I think my students weren't getting it before I was using physical objects. So let me walk you through in a podcast version what this looks like. So I have two pockets. So each one would represent a variable. To the left of those pockets, I write the variable name. So say I've got X and Y,
Starting point is 00:10:54 and both are variables that can reference, say, a dog object, and I've got a dog stuffed animal there. Then what I do is I put a little like bookmark or remote control that has, that goes in the pocket. And then from the top of that little remote control or bookmark, I have a ribbon that connects to the stuffed animal. Okay, so try and picture this. I've got two pockets, each of which has a bookmark or remote control with ribbon connecting it to a single stuffed animal. So there, X and Y are both referencing a single dog object, versus I could have Y, its little bookmark, is referencing a completely separate dog object,
Starting point is 00:11:34 but maybe it looks identical to the other dog object. Okay, so we have two dogs. We have one dog, two leashes that go to X and Y, versus two exact same dog yeah each with their own leash two leashes going to x and y so okay dogs and leashes got it yeah yeah yeah i mean maybe the idea of coming on a podcast to talk about your work with physical objects we've talked about way more way more visualize stuff, so you're fine. But is this just because people don't understand pointers at a deep level?
Starting point is 00:12:11 Oh, yeah. Or is there something else? Oh, what else might it be? So to me, abstraction is always something that people seem to struggle with with computers if they're not exposed to it. They can do abstraction in their daily lives, but as soon as you put a computer program in front of them, it's supposed to be... I think the initial impression a lot of people have is that a computer program is a set of recipes, instructions to make the computer do something, not a description of how the computer is organized. And I think that leap is really tough for people. And then I do think we do try to make physical abstractions, right?
Starting point is 00:12:51 That the word object is in itself. And I think saying this is a thing. And I've, I've read books about object oriented program where they try all kinds of things like, Oh, this is a car and you might have a special instance of a car and the car has wheels and those wheel up and all that kind of stuff. I mean, my book makes the point that object-oriented and embedded is easier because when you talk about an inertial sensor, that's an object.
Starting point is 00:13:17 It's an actual physical object. Yeah. So I wonder if it's that shift from computer as kind of instruction interpreter versus computer programming as coming up with structures is the leap. is when a student who doesn't know Java looks at Java, they might have a lot of different ideas about what it's doing. And for any of their ideas, probably we could create a programming language or a programming language exists that actually does it that way. Do you know what I mean? That they have reasonable ideas. Those probably exist somewhere in the world. And so I think our job as teachers, they do need to understand the abstraction. That's challenging. But I think as teachers, we need to be like, hey, here's some Java code, and let me try and communicate to you what is actually happening. And in the code that we just talked about where X and Y both
Starting point is 00:14:21 reference the same dog, I had shown students that code and box and arrow diagrams of that for years and years and years. And when I started doing it with physical objects, students would raise their hand and they would say, Colleen, what you've got on the board is wrong. That would mean that either variable X
Starting point is 00:14:41 or variable Y could modify the dog. And I'm like, oh, damn. Like, I love that they are accurate and overconfident in their interpretation in some ways of what the memory of the model is communicating. And it's just like, oh, man, how many times had I drawn the equivalent, from my perspective, the equivalent boxes and arrows, and they hadn't understood it? It's actually, at Mudd, I often would get two questions where someone tries to correct me per lecture section. That doesn't sound to surprise me at all. No, I mean, I think of it... Maybe I love mutters more than you guys do, but I just think, like, that day for people who haven't seen this kind of idea and who haven't thought about aliasing is so cognitively demanding that they can't even pay attention to other people's questions, you know? I don't know.
Starting point is 00:15:42 Students just ask more and better questions. And I think partially it's about just ask more and better questions. And I think partially it's about, it's a better medium. They more accurately are able to interpret the models when I create, when I do that instead of these boxes and arrows. I think for me, one thing I still struggle with sometimes if somebody hands me a code base in an object-oriented programming language, like C++ or whatever, figuring out the actual flow of what's happening and where it starts, often it's like, okay, we've got 15
Starting point is 00:16:12 objects here. Here's main, and it instantiates this. It instantiates everything, but doesn't call anything because the instantiations do it all. Something happens in the constructor. Where is the code? And it takes a long time. Because something happens in the constructor. Where is the code? Yes. And it takes a long time.
Starting point is 00:16:33 And I think that's kind of a microcosm of the bigger problem with object-oriented programming. It's like, this is very loose in some ways. Flexible. Yes. Yes. But I don't hate it for some of the big ideas. I think we don't need to be talking about OOP to be thinking about two variables referencing an array. Sure. Yeah. And so I still think I was doing a bad job teaching two variables referencing an array. And so hopefully it gets better here.
Starting point is 00:16:58 Sometimes my students will think like, oh, but Colleen, I'm like not a visual learner. I'm like one like visual kinesthetic auditory learner. Google it. It's education pseudoscience. You can Google Dan Willingham. But I think that basically- Really? Yeah, yeah, yeah. Oh, it's like not a thing. All the things that you would predict would be true based upon that are not true. And so, they give teachers this really crap advice, which is, oh, you know, mix up the modalities. And that's bad. You should only communicate information in modalities that actually make sense for the content. So if I'm going to teach you about the, this is the common example they use, like the shape of the United States. Like, I'm going to make it visual.
Starting point is 00:17:46 If you are low vision or blind, okay, I'm going to use a different modality for you. But for people who are sighted, the modality that makes sense is visual. No modality that's kinesthetic makes sense. Okay, sorry, that was a hot take. No, no. Oh, yeah, no, I actually concentrated in education at my, well, at Claremont Grad School, but so yes, I am all, yes, yes, yes, tell me more. But do you know what? A lot of colleges of ed still teach about learning styles. So, yeah. There's been some reports about, like, the number of colleges of ed who, like, teach, like, things that we know to be untrue. That's a separate story. But I think the, you
Starting point is 00:18:37 know, my students would tell me that they're not visual learners. And it's like, oh, you know, when I'm talking to other professors or colleagues about Java, we just look at Java or talk about Java. But like, you don't know what Java means or does. And so I need a secondary representation to communicate what is happening when this code runs. And I think that's the role that the physical objects play. And I think they, in particular, play that in a better way than diagrams. Do your students take stuffed animals to their exams? Can we do that anyway without using them for visualization? That is a good question. So originally I was using like a stuffed dog that I had from my childhood. And it was like a little bit ratty and not that cute. And then one day, I was walking back from my office, and I put my box of props on my trash can, and it got taken to the trash.
Starting point is 00:19:35 And I was so, so sad. And then I found out that money can buy happiness, and I bought eight replacements on the internet. I spent like $400 in total. And so then instead of having one of this like cherished childhood possessions, I had eight of them. And so then obviously they don't all need to be used in class. Like I would come up with the most elaborate code to try and justify having eight of them. But students would ask if they could sit with one of the stuffed animals in their lap during class, you know? And I think they're just, stuffed animals are pretty comforting. I mean, one of my pieces of advice going back to when I
Starting point is 00:20:17 was a TA at Mudd was, don't tell me about your problem. Tell the stuffed animal that sits outside my office about your problem. Yeah. And animal that sits outside my office about your problem. Yeah. And then come in if you still need it, but the chances are you just thank the bear and walk away. Yeah. And now it's rubber duck debugging. They gave you an office? Yeah, when I TA'd for, but only like for the hour I was supposed to be there was not like my office.
Starting point is 00:20:43 That's fine. That's awesome. Yeah, yeah, yeah, totally. And I think like often I do well by like writing a question I have to somebody, for somebody in an email or on Slack. And then I'm like, oh, okay, sorry. Now I can like, I've broken this down enough that I can Google it or I actually just know the answer. It turns out that the act of asking a specific question for help or explaining it to somebody else or a rubber duck helps me a lot. And do you think the stuffed animals provide a level of security and comfort that maybe if you had used Hot Wheels?
Starting point is 00:21:28 Star Wars action figures. Yeah. Yeah. I think it creates a different vibe. You know, one of the high school teachers I work with also teaches math and she's always got the stuffed animals sort of magnetized and attached to her whiteboard. And so the math kids will come in and be like, oh, like, what's that? And she's like, oh, these stuffed animals. Oh, that's just computer science. And I think it... That would be a good way to get people to take a CS course. Right? I think like, you know, I had this very fortunate public school experience where from second through ninth grade, I was in a mandatory computer science class.
Starting point is 00:22:10 I mean, in elementary school, we just did it once a week or whatever, but I was learning Logo and Basic. It was so cool, and I did not opt into it. And then in high school, after taking the ninth grade required class, I did not opt into it because I was like, computer science is not for me. When I got to college, I was like, well, I'm not going to major in electrical engineering and computer science. That's for like super smart people, not for me. Little did I know I was going to meet somebody who was going to drag me into EECS and that was going to be my major. But I was confident that it was for people unlike me. And I think stuffed animals could help. Where did you get that impression, do you think? It's a good question, because I don't
Starting point is 00:22:53 know that I was consuming a lot of media that portrayed it. Certainly at Berkeley, there was like a lore of like, at the time, the stereotype was you needed to be like an antisocial man. You needed to not want to shower. You needed to want to stay up all night. You needed to have no other interest. Yeah. Yeah. Yeah. And it was like, that's not me.
Starting point is 00:23:15 I like to go to bed at like 9 p.m. and wake up in the morning. And I like to socialize. And computer science is one thing I love, but it's not the only thing I love. It's good to be a morning person in CS. That means you get access to the computers. You don't have to fight for them. Unless somebody's there overnight, like me. Yeah, but then they're so sleepy, you just push them off.
Starting point is 00:23:36 Yeah, at LeapFrog, I would easily have like four hours of work time before any of my coworkers got in. Yeah, I don't know. But people have told me, as a kid, the number of people where even when I had decided like, okay, EECS or computer science, this is what I'm going to do. I met so many adults who were like, oh, Colleen, you won't like it. You won't like sitting in a basement coding until three in the morning. It's like, oh, like, oh, yeah. And I was also alone, sitting in a basement alone, coding until three in the morning. And it's like, yeah, I wouldn't enjoy those things. None of which are necessary.
Starting point is 00:24:12 You like go to racetracks and have to deal with race cars while during pit stops or you have to work in a multidisciplinary team with people who speak an entirely different language because they work with mechanical engineering stuff. Embedded, it's where it's at. You don't even need stuffed animals here. Or even better, you can make your own. You say that now. I know. I want to go back to pointers for a second because it's a concept that when we're talking to people who are learning, either embedded or something else, or even people who have graduated and are working in the field,
Starting point is 00:24:52 still struggle with. And I cannot explain it because it seems completely obvious to me. And this isn't a dig at anybody that they're being dumb. It's, I just don't, I don't remember the time I didn't understand it. I'm sure it was very hard for me, but I really don't remember it. And now it's just like, yeah, it's this and it's this. And what's the problem? I wanted to do a conference talk about it and I realized I couldn't explain it because it, my talk was like, pointers. Yep.
Starting point is 00:25:20 Cool. I don't know how to bridge that gap and like figure out how to explain things that are just so ingrained and understood by me now that I can't even articulate a different way of explaining them beyond. It's a pointer. It's right there in the word. Yeah. It references objects. Sometimes, but sometimes it's just memory. It it's just memory it's just an address yeah yeah i think it um i think there's like two main pieces one we see in java where they only have to deal with references of just like this idea of like what is this indirection i think yeah you know um i think another piece in c plus plus in particular or c is just like the syntax i think is like yeah not obvious to people
Starting point is 00:26:17 do you know what i mean of like oh but like if we use a star over here it means this thing and but if we put it over here means this other thing i thing. I don't know. We have two stars. Well, that's a totally different ballgame. Yeah. I've become a little bit obsessed with some work around syntax exercises. I saw it first from this guy, Professor John Edwards at Utah State. And what he does is he just has students practice syntax. So, it's like you give them a for loop and it's missing a semicolon after the initialization and they have to fix it. And then you give them a for loop and you have them add the initialization because it's missing. And you like in these tiny exercises that each take about 10 seconds, you draw students' attention to specific aspects of syntax and have them write them,
Starting point is 00:27:07 eventually to the point where you're like, oh, now write the for loop that prints the numbers one to 10, you know, from scratch. And I think we often just go for the conceptual understanding and give an example or two and don't give people enough credit or enough opportunities to practice that syntax. Like how much time did we spend learning to spell as kids? And I think we're not doing that sort of equivalent scaffolding for people as they're developing the syntactic fluency that can really get in the way of their conceptual understanding. That's a really good point. At Mudd, I started doing something where on the first day of the mainly Java-focused class,
Starting point is 00:27:56 I'd be like, hi, here are six programs. It actually was Racket and Java. So I'd be like, here are six programs. You need to memorize these. And they're like, what? I have to memorize something? And I was like, yeah. They would complain and complain. And they're like, what? I have to memorize something? And it's like, yeah. They would complain and complain. And they were like, oh my gosh, we hate this. And I was like, did it take you a long time? And they're like, it didn't. They're like, it did not. And I'm like, cool, cool, cool, cool. I think that's going to be fine. And I think one of the programs was like a basic class and the extent to which when I'm trying to introduce the idea of instance variables or objects and how is an object different than a class and the extent to which when I'm trying to introduce the idea of instance variables or objects and how is an object different than a class and what is a constructor, having them
Starting point is 00:28:31 already have the syntax that I was going to use in all of my examples memorized, I think made it easier for them to like pay attention to the, uh, like the words I was saying and the examples I was providing and not being sort of distracted by the syntax. Oh, I would never have thought that method, but yes. It is something I see with students. We do in other disciplines. Yeah. Just, yeah.
Starting point is 00:28:59 Do you want to know how many pages of cheat sheets I have on my desk that have little syntax cookbooks because I forget things so easily. Yeah. Yeah. And some of it is just like helpful to remember like, oh, the object and then a dot and then the method name and then I need parentheses. Like some of it is, I think, better memorized than cheat sheeted. Oh, you know? Oh, yes. But yeah. And for my cheat sheets, I do tend to, when I need them, read the whole thing. And then, but when I change big topics, like, like I don't, it's kind of like which program I'm loading into my cache right now.
Starting point is 00:29:43 I love that. I love that. Yeah. But you also, okay, so back to the right now. I love that. I love that. Yeah. But you also, okay, so back to the stuffed animals. Because that's really where, I mean. Yeah. Stuffies. It's where it's at.
Starting point is 00:29:55 Yeah. You also use them to represent polymorphism and inheritance. Wait, wait. Before I get to the good question, I have a terrible question. Did you of stuffed animals and magnets and clothespins. On a share grant. So it's maybe on multiple grants I've had stuffed animals as a line item. Okay. Polymorphism and inheritance with stuffies.
Starting point is 00:30:42 Okay. Yeah. So I had been teaching inheritance very poorly for many years. And I think I was often using an example of like an animal and then an animal has a child of a dog and maybe also a child class of cat and the dog has a child class of Dalmatian. Okay. I figured through working with high school teachers and like refining my practice, I think I figured out students don't find it confusing that one class can be extended by multiple classes. So I think I was kind of just distracting them by giving them a second example.
Starting point is 00:31:16 Like I don't think it was buying me anything. I think also like, what is an animal? Like, I think you kind of can't visualize it. So one of these eight stuffed animals that I bought as replacements to my childhood toy actually was not a dog. It was an elephant. And so I would use that as the animal, but it didn't make like logical sense. And so now I have a series I do for inheritance where my base class is a cat, and it looks like a little house cat stuffed animal. And then its child class is a tiger. And I think, okay, those are sort of distinguishable. And the cat, both of them are kind of recognizable. I think about, oh, they make different sounds, purr versus roar. Tigers like to swim. Cats don't like to swim. And then I have a child
Starting point is 00:32:04 class of tiger, which is cartoon tiger, cats don't like to swim. And then I have a child class of tiger, which is cartoon tiger. And I use a tigger stuffed animal. Okay. And so I think like a few things, I stopped distracting people with multiple classes. There are other pieces where I like just got better at explaining things about like, oh, we look in the parents class for the code. And I got sort of more routinized in the ways I explained some of what was happening for students. But I think like the actual hierarchy that you're using, particularly if you're going to visualize it like I do, I think you need to be able to visualize an object of each of the types. And I spend actually a lot of time helping,
Starting point is 00:32:46 like creating those classes with the behavior and having students understand what a cat can do, what a tiger can do, what a cartoon tiger can do, and how they're different. So I almost want them to like memorize that behavior. And then we can pay attention to the syntax of how we get that same behavior that we can make without inheritance, but now with inheritance. That's a big idea. I have a paper that I've written about this that has been rejected roughly twice a year since January 2021. So maybe someday you will be able to read about this. Because a cat isn't, A tiger isn't a cat. What?
Starting point is 00:33:29 A tiger and a cat are both felines. Oh. Oh, here we go. Oh, okay, okay. Yeah. I mean, because a tiger isn't a cat. Maybe that's why the paper keeps getting rejected. Oh, sorry.
Starting point is 00:33:43 Sorry. Yeah. You toss a fox in there and you talk about hardware. What? What? You talk about a dog hardware
Starting point is 00:33:51 running cat software. I think that's not going to help. No, it's definitely not. Foxes are cool. Okay, changing subjects unless you want to talk about evolutionary branches. No, I'm okay.
Starting point is 00:34:10 We've been watching the Olympics some, and it's always amazing to me that people do better and better. Gymnasts go higher and further. Runners run faster. Swimmers, well, except for Ledecky, who just keeps swimming and swimming. It's always, do humans get better because we have learned to teach better? I think that's reasonable. Yeah, that we have better coaching. I think like flying through the, how to convince people to fly through the air,
Starting point is 00:34:49 that one, I sort of don't have my mind wrapped around, but you know, um, I enjoy lap swimming. And so I've joined a lot of like lap swimming teams. I'm not a strong, I'm not like a fast swimmer. I'm not competitive, but I, I got to swim with someone who, um, as a teenager had trained for the Olympics. Um, and she, maybe, maybe she was 50, 10 years ago. Um, and she explained that, you know, she was a sprinter, but at the time the training regimen she did still involve like a lot of long distance stuff and now we know not it's not a thing i know but she explained now we know that like oh it's really better to just focus on sprinting and to not do a lot of long you know distant
Starting point is 00:35:40 workouts and so i think i think you know from from one would be, would have been Olympian with better training. I think your argument holds water. Maybe there's also additional opportunity, like social value of people participating in the Olympics, which then makes people more focused on identifying potential Olympians and training them. So maybe it's both like more searching and seeking for those people and also improved pedagogy. But I really, I honestly don't know. No one should listen to anything I just said. I mean, the Olympics were my example, but it's more with CS. Are we actually getting better at teaching people to understand these concepts so that they can approach more complex concepts earlier in their careers, earlier in their education? I think so. You know, I've done a lot of stuff with the programming language Scratch, and I'm really intentional in calling it a programming language because kids will be like, oh no, that's just a game. Like, look at it. It's colorful. And I'm like, no, there's like, I can teach you all the content from my intro programming course using Scratch. I can get you to more complicated concurrency bugs in Scratch than I can in my intra-programming
Starting point is 00:37:06 course. And so I think things like Scratch, particularly compared to something like Logo, which it's based on, I think it just enables students to engage more powerfully. Early on in my career, I did a study where I was like, oh, you know, when students program in Logo and like when I programmed in Logo, I like really had to think about what I was doing. And so that's the really meaningful thing. or in this like written with characters rather than dragged and dropped language called logo versus um oh sorry uh versus scratch and i really thought that logo was going to be better because the fifth graders i was working with wouldn't be great typist and so they would really think through their program before they wrote them down. And I was wrong. The students doing Scratch- Well, no, because they had to learn to type as well. Yeah. And it just takes cognitive demand to plan it and then type it. And it turns out,
Starting point is 00:38:13 my hypothesis of why I saw this is with Scratch, you can just try it and then try it and then try something else and then try something else. And you can just do rapid prototyping and rapid sort of experimentation to try and understand the semantics of a Scratch program in ways where, particularly for the typing skills of fifth graders, like wasn't possible. So I think we're getting better and teaching people more. What other types of things are good to teach in CS with physical objects? Yeah. So maybe I'll give you one other example that's quite different than the Java ones we've been talking about. So that was all about like a low level understanding of the semantics of a few lines of code. That's what
Starting point is 00:39:05 I was using for the pockets and the animals. Okay, I think as students are learning about arrays and algorithms on arrays, I like to use physical objects there too. And it's not about the low-level semantics. At that point, they understand what an array is and they know how to access an index, et cetera. An element in an index, yada, yada, yada. But something like code for quicksort or code for merge sort or any of these sort of intro programming, complicated nested loop sort of programs, I think it's really important for students to be able to understand the big picture. And I find that if I trace the algorithm using physical objects, I can help illustrate the big picture of the nested loop in ways that
Starting point is 00:39:54 sort of if they do it themselves, trying to reason through the code just kind of takes too long. And so it's hard for them to see the patterns or the, you know, we might talk about them as the invariants that are constructed as you're like doing a sort. And so I think that's another thing that's helpful to have physical, but for a very different reason or like with a very different goal. And that one's pretty easy. I mean, a pile of blocks, even a bunch of post-it notes. It's pretty simple to have somebody, you know, scramble these and now using this algorithm, we will walk through and order them. Yeah. Yeah. Another one I like to do is little like Dixie cups. I don't know what their like generic brand name is. Sorry. But I'll write, like the values in an array at the bottom of the cup. And so if
Starting point is 00:40:46 you've got a row of cups, you have to explicitly pick up the cup to see what's on the bottom of it. You could do that with cards that are face down, but they're just like more annoying to pick up. And I find it's very helpful to get students to think about like, oh, I can't just look at an array and see the smallest number. I have to like walk through the array and figure out the smallest number. So I think there's like interesting ways where sometimes a physical representation can map well to specific like tokens of syntax where it's like picking up a cup maps really cleanly to an array access. That's really, I mean, yes, exactly. I think I've done the post-it thing and it didn't occur to me that I was missing the step of accessing the variable, which, I mean, I'm an embedded
Starting point is 00:41:41 programmer. I know that that has cost, but it isn't always obvious when you're explaining to someone what parts you need to represent. Yeah. Yeah. And it's arbitrary, right? Like whoever designed the programming language decided our level of abstraction. How do you decide what you want to teach with this method? Do you have like a list of, if only someday I can figure out how to represent the flywheel, flyweights in design patterns? Do you have a list? I don't, but whatever I'm teaching, I'm always thinking about it. Like, I love like having something that I don't know how to teach and then like randomly going down rabbit holes on Amazon, seeing if I can find any objects that
Starting point is 00:42:33 like spark some creativity. So like an example where I think this happened was students in this Java class were fine working with dictionaries or like hash tables or hash sets. They like could write code with them, reason about programs with them, no problem. But they were like, Colleen, consistently at the end of the semester, they were like, the main thing I don't understand is how hash tables work. And I'm like, you write all, you do, everybody a great on all the coding questions related to this. Um, and I think I was just doing a bad job explaining like the internal workings of them. Um, but I started, uh, using file folders. So with the file folder representing an element in
Starting point is 00:43:21 the array, I mean, my friends make fun of me because they're like, kids don't know what file folders are, but ignore that. Teach students what file folders are. And then I would like label them with indices like we would have. And it's like, oh, you know, I'm gonna like, I use a hash code on this. It gives me a value. I'll just use sort of it's, you know, one's digit to figure out which of these spots to put it in and then like showing doing like a three minute demo putting some strings into a file folder like it just students stopped complaining about not knowing how hash tables work and so i think like a lot of times students will be like, Colleen, that was
Starting point is 00:44:05 not helpful. Like you made it worse. But sometimes I like really land on something in all my experimentation that clears up a problem that I've been struggling with. So I think I just experiment a lot. And then I'm very, very open to coaching. And particularly at Harvey Mudd, students were very willing to sit around with me after class and do a play-by-play about how the physical objects could have been more helpful. You know, it's just like students were just so generous where they're like, oh my gosh, Colleen, please don't demo more than one line of code using these stuffed animals. You drop stuff, you mess up, it gets too confusing. Set up the model before class,
Starting point is 00:44:47 show us one line of code. And it really shaped how I teach with their coaching. Between them and the high school teachers I work with, where they're like, wow, Colleen, that's not a good idea. I'm like, oh, okay. Okay, great. Okay, now I need to hear what wasn't a good idea. I need to hear an example of something you tried that really didn't work the way you thought it was going to. I mean, my life is riddled with those. But going back to inheritance, I was like, oh, I've got this great idea. Children classes can override a parent method. So like, wow. I'll try and reinforce this being like, oh, children do what they want. And I was like, wow, like I'm so innovative and this is going to be great. And students were like, no. And we'll have a tantrum
Starting point is 00:45:40 function. No? No. Yeah. And I think the key thing, my, you know, a lot of times I don't understand why something was a bad idea and like, I try and figure it out later, but I think the idea is actually overriding a parent's method is not that confusing. Inheriting a parent's method is because like, oh, I look in the child class and there's the method. Like, why would I think I would call the parent one? You know, so I'm more sympathetic. Okay. Yeah. Okay. I was thinking about it as more as using the parent's credit card.
Starting point is 00:46:16 Oh, I love that. You mentioned that you have a website called csteachingtips.org. Yeah. And these aren't for computer science learners. No, they're for teachers, yeah. Are they for high school teachers, college professors? Yeah, you know, it's a mix, actually. So some of them I think that high school teachers or K-12 teachers don't need.
Starting point is 00:46:45 So I have a tip sheet on lecturing. And basically the point is like, don't lecture. Ask your students to solve problems. And I give them many options other than lecturing. And I think high school teachers mainly don't need that. But how it happened was I was TAing in grad school and I would come to my advisor who was a very accomplished educator and very thoughtful. And I'd be like, oh my gosh, Mike Clancy. I've just had the biggest insight into the teaching and learning of computer science. Let me tell you what happened and my insight. And every, I mean, maybe I'm very, very arrogant, but we had a lot of these conversations. And every time he'd be like, yeah. I was like, wait, what? Like that, this deep insight that I feel like I just discovered, you just already knew. And so I
Starting point is 00:47:31 think to some extent, I wanted to create this website to sort of capture Mike Clancy's and other educators' knowledge about teaching. I think particularly in this research sphere, we value like, oh, did you do a randomized study of it? Yada, yada, yada. But it's like, oh, actually teachers know a lot of stuff. Let me give you one example where in algebra teaching, there's physical objects people can use that are called algebra tiles. They're pretty cool. I've read a lot of papers about algebra tiles, and the story is, oh, mixed results. Sometimes they're better, sometimes they're not better, or worse. I mentioned this to one high school teacher, and so it's like, it's a mystery. Why doesn't it work? I mentioned it to one high school teacher, Angel Kuo, and she's like, oh, yeah, if you ask students to use algebra tiles on algebra problems that they find really easy, they think the algebra tiles are a little kiddish and they refuse to use them for the rest of the school year. And it's like, oh my God, none of the research captures that very simple insight
Starting point is 00:48:42 that might help us understand like the teaching and learning of algebra and like the effectiveness of this tool. And so I think I sort of lean heavily on the like, we really as a community would do better by tapping, by respecting sort of practitioner knowledge and trying to capture and compile that to make it more usable. The website has a thousand tips for teaching computer science, and it turns out that a thousand tips is just not that helpful. Like, how are you going to find what you want when you need it? That's not that helpful. But I have some tip sheets that try and synthesize around key points, and I think those are more usable. Do you have one that's your favorite tip sheet? You know, I mean, I'm like maybe keen on the most recent one, which is how to use peer instruction or how to have students solving problems in class.
Starting point is 00:49:35 I like I'm really an advocate of it because I think it gets you more feedback about how students are understanding things. If I give students problems where I think everyone's going to get the answer, here's this multiple choice question, I think I'm going to get 100% right. And then 50% of my students get it wrong. Like, we need to take a real hard fork in this lecture to like, try and try and improve it. And so I think like my broader philosophy about teaching is like, we can do a lot better as teachers if we're getting feedback from our students and have sort of insights into their thinking and what they're having trouble with. And I think peer instruction is a really powerful tool for that. And I had, in using peer instruction, had developed like a bunch of different strategies.
Starting point is 00:50:26 Like that's my second tip on that tip sheet is test your assumptions. It's just like every time I think, oh, well, no, I'll just include this one, but we'll probably spend like 15 seconds on it because everybody will know it. And if one of those is wrong, it really, really helps me avoid a terrible lecture. So pure instruction seems like a term. Oh, yeah. Yeah, yeah, it is. Sorry. So it's created in physics education.
Starting point is 00:50:59 And what they do is you give people a multiple choice question. They answer it individually. Then you have them discuss it. then they answer it in a group. And so it's quite common. I think I'm like a little loosey-goosey with whether I do each of the steps in all the times. I'm using a little polling software so I can see like, oh, within 10 seconds of me putting this question on the board,
Starting point is 00:51:26 you know, 90% of my students answered correctly. Like, I'm not going to force them to discuss it, you know, let me try not to waste their time. And so I don't use it in the rigid way that it's sort of the capital P, capital I, pure instruction is, but yeah, sorry, a little lingo. Christopher is pointing out to me that I keep saying pure, P-U-E-R-E, and you keep saying P-E-E-R. Yeah. Peers, like colleagues, not pure, like innocent. Yeah, yeah. Okay, okay. Moving on.
Starting point is 00:52:00 Peer instruction. That I actually do understand. I have heard that. Peer instruction is like where it's instruction that you've got to fill in yourself, like a peer virtual phone. Never mind. Oh, I see a peer. Object-oriented humor. How do you get people to like computer science?
Starting point is 00:52:27 And this is actually— Why would you do that? Sorry. Why would you do that to them? Actually, this is a multi-part question, because when we say like computer science as a tool, as a career, as an academic field of research, I think first, since you were talking about high school students, it's getting people to like computer science as a tool. Is that valid? Yeah. I mean, I think that everyone deserves to understand how the computational world around them works. So I'm like a big advocate for, I think you can't understand how to interact online privately, interact online securely, and understand the ways in which companies and the government collect data about you
Starting point is 00:53:11 if you don't understand like conditionals and loops. And so I think everybody deserves to understand a little bit about the internet so that they can adult a little bit about computer science so that they can adult. I really about computer science so that they can adult. I really bristle at computer scientists who are like, everyone should be a computer scientist. Everyone, sorry, everyone should learn computer science because computer scientists are the only ones who think logically. I'm like, what? Excuse me? Send those people to me. People literally say that. As a math major, I find that offensive.
Starting point is 00:53:47 I mean, it's offensive to everybody. I think there's so much sort of colonial energy in the computer science sort of community that I think, oh, I think this have a lot of stereotypes about who does computer science, who can be good at computer science, who's likely to be interested in computer science. And I think that those stereotypes are bad and encourage people to try it, particularly if they are stereotyped as not being likely to be successful or interested or commonly participate. Does everyone need to love computer science? Like, no. I think people can have different passions. Like, I go to the doctor and I'm like, wow, I can imagine no job that I would hate more than being a medical doctor. Like, we don't all have to like the same things, but I do want students to think that like, oh,
Starting point is 00:54:49 that's a path that they could take. And that interest in computer science is not innate. It's something that can be developed. Why is it important for there to be more diversity in computer science? Am I really going to ask that question? Yeah, I guess I am. Go ahead. that we have all these barriers that exclude and exclude through harassment, exclude through limited opportunities, et cetera. So I think it's unjust, our current system. And so I think we need to make a more just system where everyone has equitable access to computer science learning opportunities. Then within computer science specifically, I think like I get, okay, you know how people talk about like, oh, you know, if there were a woman in the room,
Starting point is 00:55:53 like there were a woman engineer on the team, they wouldn't have made that mistake. And I think that's like a little bit naive. So I think of the example of seatbelts and car crash test dummies. So they used to use crash test dummies that were all different sizes. And then they created much more sophisticated crash test dummies that had a ton of sensors in them, were very, very expensive to produce and design. And so they started using only one crash test dummy size, which was the size of the median American man. Do I think that any of the engineers did not know that people come in different sizes, that people have boobs? I think they all knew that. But I think that the people who were deciding whose lives were valued, they decided that there was only going to be one crash test dummy. And I think often I get really frustrated when we think about my little mutters that we
Starting point is 00:56:59 were sending out into the world being like, oh, and then they're going to go into these tech workplaces and make them less sexist and racist. And I'm like, that's not their job. That's everybody's job. And so I don't think we need people from marginalized communities in tech so that they can do the heavy lift of making tech less racist and sexist and ableist. I think that we all need to do that. And then we benefit from like the talent that we can recruit, et cetera. And the viewpoints we didn't expect. Yeah. And the perspectives that they can bring us and the markets they can bring us. Yeah. Yeah. There's, we had a talk at Mudd from a trans faculty member who studies biology and like all the ways in which like biology questions that were open to the possibility of something beyond a gender binary or a sex binary has only been done by trans individuals. It's just like, oh, I think there's something to this, particularly in spaces where employees or people have a lot of autonomy of like what questions we
Starting point is 00:58:12 ask might be fundamentally different based upon our perspective and our worldview. I think if you're like a random pregnant woman with boobs working at a seatbelt manufacturing company, like you still might not have a lot of autonomy to decide whether or not there are crash test dummies that allow you to exist in a car with safety in mind. And the engineer part of me totally understands. These crash test dummies started to get expensive, which means they needed to be manufactured in a central location with regulated parts. And they needed to be safety regulated. So you couldn't just change things willy-nilly like they used to with the different sizes.
Starting point is 00:58:59 And somebody had a gigantic book of statistics and they just pointed to the top of the normal distribution and said, how about this? You needed an answer. You didn't have time, money, or mental capacity to deal with multiple answers. There's also a reason why they didn't pick the median American woman. Do you know what I mean? Yeah. Yeah. Yeah, no, I think your point of putting the onus on people, the people in marginalized communities. Here are all the problems that we've caused. And we think, get yourself into a company and, you know, and go fix, you know, go fix Apple or whatever.
Starting point is 00:59:55 Some giant company that's going to grind you to dust in 10 minutes. Not only do we want you to do this job, which we've told you is hard. Be the savior of your community. Yes. Yes. That's fine. Well, everybody else is like, you know, trying to ignore that because it's inconvenient. And I think you see that a lot in academia with faculty from marginalized communities. They come in and everyone's like, oh my gosh, we're so glad you're here.
Starting point is 01:00:19 Mentor these 30 people. Our problems are solved. Create this institutional change. And then at the end of six years, they're like, sorry, you didn't get tenure. You just didn't do enough research. It's just like, I did what you asked me to do. Like, I think that happens more often than we would like. And so I don't know exactly what that looks like in industry, but I, I don't support it. Like that. It looks like that. Yeah. I'm sorry you did not accomplish your technical goals.
Starting point is 01:00:51 And therefore we cannot promote you. Yes. Yeah. Anyway, I'm not going to bring up chat GPT and LLMs now because I don't want to. Great. Colleen, what would you wish you could tell early career you? Yeah. So in grad school, I started giving myself stickers for doing work. And it's been a life changer. Like I used to like sit down and do some work and then sort of not
Starting point is 01:01:18 accomplish anything. And then I would say mean things to myself about how I was never going to finish my dissertation or whatever, stop wasting time like this, whatever, you're lazy. And now when I do work and have accomplished some delta or epsilon of work or maybe even nothing, maybe I've just thrown away stuff, I give myself a sticker for every 45 minutes and I think, yeah, good job, Colleen. And I think I could have started that sooner. What do you do with the stickers? Do they go in a book? Yeah. So every week has its own eight and a half by 11 piece of paper organized by the project. And then I save them forever. So I just have a whole box of like old sheets with my stickers. And do you get different stickers or are they all
Starting point is 01:02:08 like gold stars? Thank you for asking. You're just being kind. Oh, no, I assure you she's not. Yeah. So every day... I'm honey my sticker collection. She wants to know exactly what you're into. Yeah. I use rainbow colored stickers. And so Monday I can earn red stickers and Tuesday I earn orange stickers. So I have a Google Doc that has the minutes not above 45 minutes that I have earned on particular projects. And so when I get over the 45 minutes mark on a particular day of the week, I get that sticker. It really adds a lot of value in my life. I got these little stickers that are apparently to use with day planners. It wasn't why I got them, but now I'm kind of tempted to get a day planner so I can give myself stickers.
Starting point is 01:02:59 I think you could just take out a Post-it note and give yourself stickers. I would feel terrible throwing it away yeah okay um then save them forever i maybe exactly just flip free slope i think i need to save it forever yeah yeah i don't know i don't know what to do to help you there do you have any thoughts you'd like to leave us with um maybe one of your listeners will make a thing that I want to exist come into existence. So at one point, my mom was using oxygen and also was using a wheelchair or a walker. And you really worry about rolling over the wheelchair with, or sorry, rolling over the oxygen tubing with the wheelchair. So I bought online some like industrial cord wrap and I wrapped it around
Starting point is 01:03:46 the oxygen tubing. And so then you could roll over it. And I think this, it was so, it was such a game changer in their household. And I think that this should exist. It took me about two hours to wrap one 50 foot piece of oxygen tubing. So I would like some entrepreneur who's listening to this podcast to email me. I will send them the links to the cord wrap that I purchased, and I'd like them to make it commercially available. That's my request. I need no credit. I just think this should exist. Yeah, that's not a singular type of that problem. Our guest has been Colleen Lewis, Associate Professor of Computer Science at University of Illinois Urbana-Champaign. Thanks, Colleen.
Starting point is 01:04:33 Thanks so much. This was a lot of fun. Thank you to Christopher for producing and co-hosting. Thank you to our Patreon listeners Slack group for their support. Thank you to Memfault for their sponsorship. We really appreciate it. And of course, thank you for listening. You can always contact us at show at embedded.fm or at the contact link on Embedded FM.
Starting point is 01:04:55 And now a quote to leave you with by Krista McAuliffe. I touch the future. I teach.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.