Episode 49: Python Tutor Sean Tibor: [00:00:00] hello and welcome to teaching Python. This is episode 49 Python tutor with Phillip . My name is Sean Tibor and I'm a coder who teaches. Kelly Paredes: [00:00:24] and my name is Kelly Schuster Perez and I'm a teacher who coats. Sean Tibor: [00:00:27] Yeah. So welcome, Phillip. It's great to have you on the show this week. Philip Guo: [00:00:31] Yeah, it's great to be here. I'm a long time listener. I forgot where I discovered this podcast actually, but I'm glad I discovered it. Sean Tibor: [00:00:38] Well, we're glad to have you. And we're also very thankful for the thing that you've created, which is Python tutor. if you haven't used it already, it's a website that allows you to visualize your code in new and interesting ways so before we get into the meat of that conversation, we're going to start the same place we always do, which is with the win of the week and as is our tradition where it can make Phillip go Philip Guo: [00:00:59] Oh, wow. Wow. I thought one of you want to get affairs. I guess the one of the week for me is we're, we're about to start teaching at UC San Diego where I work and that, usually before teaching starts, we have these research deadlines in my field. So the one of the week was that my students that I've successfully submitted a few papers that we, we got these research papers submitted, I think it was. Friday is that right before this weekend? So that was definitely a whip. Kelly Paredes: [00:01:23] that's. a huge win, trying to get one of those papers submitted. That's great. Congratulations. Philip Guo: [00:01:27] Great. Thanks. Kelly Paredes: [00:01:28] I'm going next. Sean Tibor: [00:01:29] All right, go ahead and tell me. Kelly Paredes: [00:01:32] So he picks me and then I don't have anything. He does the same thing to me, Phillips don't worry. So, it is our, we just finished our six week or our five and a half week of our first quarter. And this is my favorite time of the quarter because we have quarter classes, nine week classes. And I teach sixth graders that know absolutely nothing. I tell them I just dropped them off in Germany and they don't even, I know how to use the bathroom and because no one speaks English, but everyone speaks English in Germany, but I still lie to them. So anyways, but it's the five and a half weeks Mark and all the light bulbs have been clicking. And it's such a huge when for me this time of, The quarter, because I go through five and a half weeks of parents calling me and telling me that I'm a miserable, horrible, hard teacher, and I'm scaring their children and they can't believe that they're going to code. And then all of a sudden I'm getting like, love letters. You're the best teacher ever. And I love coding. So it's a really good one. It's always my time of the year that I look forward to. Sean Tibor: [00:02:34] that's really great. I look forward to that click, happening in all of our classes, it seems to happen right around this time. And the best part about it is it happens at a different time for everyone. So it's not something you can immediately predict, but every student has their own click and that's pretty awesome to see. Kelly Paredes: [00:02:49] yeah. And your win Sean Tibor: [00:02:50] So for me, the win was something that I haven't, I actually taught before. And I was a little bit scared of it, actually, to be honest, I started teaching my eighth grade students who I've had for the previous two years. I started teaching them about options, object oriented, design principles in Python. And I was always a little worried that they weren't ready for it, or that it would be too hard or too complicated for them. And it was. Phenomenal. It went way better than I thought it was going to. And I don't know that it was necessarily me explaining it in a certain way or a specific way, but just taking the time to really slow down and talk through, it seemed to work really well for them and they got it and we got all the way to making subclasses and inheritance and things like that. So the students were seeing how they could define some of this data. And I think. It also helped that the expectations that we set at the beginning for all of us were pretty reasonable. The goal is not that they're going to write all their own classes from now on, but that they can start using classes and understanding how they can use them in their programs. my favorite part was we were using the classic case of, we're going to define a car class, and then we're going to make like a Nissan class, or a subclass of it. And when they saw that it inherited everything from the parent car class, they're like, this is really smart. Like, so who came up with this idea? This is really smart. And I said, well, of course I did. this is my idea. I said, no, it was really smart people that have been working on this for a long time. And I think they really just thought that it was a cool thing then and went way better than I thought I was going to. So that was pretty satisfying. Kelly Paredes: [00:04:23] Very cool. Yeah. I, we always talk about that and it's something that people always throw in when they do the game design and they start with all these classes and the kids come in and they can copy the code, but they really don't get, understand the concept. And I know I struggle with it. Constantly even rereading that chapter from Paul Craven's book about constructors. And it's still something that is still not tangible as much as for me. And it was good to see the kids starting to get it. It was pretty cool. Sean Tibor: [00:04:56] Yeah, I think it's really going to help them. So, we also have the fail of the week and we don't make our guests go first on the fail of the week. So the, the fail of the week is just something that has happened that didn't go as planned and what we did to try to fix it and make it something that is, acceptable. failure as a part of success, and we want to make sure that we're modeling that for our students. So, Kelly, would you like to go first on this one? Kelly Paredes: [00:05:19] Yeah. And I'm actually gonna throw, kind of Philip in, I was researching about him and it made me think about this, this fail. you were talking about that fear, how of. Of kids, computer science. It's more than just, it's more than just teaching them how to code it's first trying to get through that fear. And I think that's, I kind of had an aha moment last night when I was reading it, I was like, I probably could do get rid of that four or five weeks of, parents emailing me, kids, getting upset cause they don't understand and kind of, I've got to think of a different way. Maybe like a timeline. I'm going to have them Mark off a timeline, but I realized that I need to get something, for them to look forward to when that click moment. So something visual, like here we are guys. Here's where's the clicks going to happen? I promise you I've seen it now for three years, eight, 16 times a year. Cause we have, a lot of classes with in a year and we see it and I think that's a huge fail that I just recognized yesterday. Like why haven't I been documenting this better? So I'm gonna try that next quarter. Sean Tibor: [00:06:26] Maybe we can even put up like a timeline on the board, or like something that's like on the wall where people can put their sticker on the board when they have their moment. Like I got it and have it show up in almost do like a I'm like visualizing. It was like a cluster analysis now. Like we can see like the clustering of data points. Kelly Paredes: [00:06:43] get all statistical on me. Okay. Do you have a fail? Philip Guo: [00:06:47] Yeah, I guess like, just thinking about the past week. So, we had these research deadlines, it was really intense, my students and our focusing, but it was also the orientation time for the new graduate students in our department. And, I wasn't able to participate as much in these events that we plan the zoom events and stuff. So I dropped by a little bit, but you know, I could've probably. Done better on that, but we were just so focused on these research deadlines. So hopefully I'll get to connect with the newer students in the coming weeks better. But you know, there's only limited time in the week, unfortunately. Sean Tibor: [00:07:18] Yep. I think that, I had that same thing. It happened to me on Friday where it was, I was supposed to be somewhere. In fact, I think this is my failure of the week. I was supposed to be on a zoom call with my students and Kelly was covering for me. And I just forgot to give her the access to the zoom to be able to start it. So my students were the winners in this one, they were the ones that overcame the failure because there wasn't the zoom open. They all just pulled out their phones and they started texting the kids that were home and helping them get started with what needed to happen that day. So. It's pretty cool to see, 13, 14 year old kids figure out some resilience and help each other out. and it was a pretty cool thing to see that out of my failure came their own determination to make it work. Philip Guo: [00:07:56] Yeah. I mean, that's a really great point that like, I think that's something really rewarding right. Of, the assumption is if, if the teacher or the supervisors and around that, either the students just are slacking off and doing whatever where they disconnect, but I think it's really inspiring. And I guess it speaks to. Both your leadership too, that you set an environment where even when you're not around. so I've heard from colleagues that, we run research labs or we teach classes and stuff. And I think the real indicator is when, if you're out of town or you have to be gone for something, if your students actually stepped up and self-organize, then that's really inspiring. I think. Sean Tibor: [00:08:28] Yeah. Well, I, it helped that the planned lesson for the day was, figuring out how to code Python in Minecraft. So it was something they were really excited to do anyways. but they are, they're pretty special. This is a group of students that I've worked with for the past three years now. And it's, I've built relationships with all of them, and it's much easier to set expectations with students after a few years than it is in that first year. Philip Guo: [00:08:50] great. Yeah. Sean Tibor: [00:08:51] Yeah. So Philip we're so excited to jump right into Python tutor, but first, can you introduce yourself a little bit, the role that you have today, what you're working on, how you learned Python in the first place, and then how you came up with Python tutor and how it came to be. Philip Guo: [00:09:05] Wow. that's a lot. I'll try to be super brief. I'll take up the whole hour. so currently I'm a professor in the cognitive science department at UC San Diego. So my, my teaching and my research are all around kind of very relevant things. I've kind of, technologies for learning. we do studies of people learning programming. So the two focuses I have are really learning programming and data science, which are. Both are related. So we do, we do kind of empirical studies of how people learn, why, what motivates them to learn. And also we build prototype tools. So we build, new kinds of tools for helping people clean data or helping people visualize data or helping people visualize. Program execution. And, my teaching and my academic background is actually around, human computer interaction. So in industry that's commonly known as UX or user experience design. So it's actually really funny that, Thinking about coming on this podcast that, one, I have no experience with K-12 so I have no K-12 experience. second, it's funny because I actually, I'm in the cognitive science department, but I actually don't have any formal training in cognitive science or cognitive psychology or those things because, our department is really interesting cause we have people from very interdisciplinary background. So my background is in computer science. I worked in software engineering, I worked in software and the third part that's. It's really funny is that I actually don't teach fight on. So like, like I've actually never taught Python besides this one informal thing I did in grad school. I just, Some nearby company was like, Oh, we saw you wrote some blog posts back in the day about Python and stuff. So can you just come in formally teach it to our, some of our, our, like people who are kind of scientists and people who are not or engineers, they were just like, we just want to learn a little about it. So then I came up with these really informal lessons where we just drew on the whiteboard. This was, gosh, this is over a dozen years ago. This is 2008. Before any of these tools existed. And then, I ended up drawing these diagrams on the whiteboard, like what we normally draw, right? These pointer diagrams or data structures, or, numbers and variables. And then that kind of led me to thinking about how could we. Try to make a tool that generate these somewhat automatically. And that's where the Python tutor project started. And it was really just this personal open source side project and minor. Wasn't really related to my official research at school or anything. And then it just kind of took off in the past. Decade because of these online courses, right? These MOOCs, a lot of intro CS courses are taught in Python, also in universities, right? So a lot of schools switch from say Java to Python as a first language. So all this stuff got popular so that the tool just got more word of mouth and more people shared the links and there's also, Purposely meant to be easy to onboard, Just kind of paste code and there's no login, there's no accounts. We're not tracking your, status or personal information. So this like really a light weight tool, especially back when it was made like 10 years ago, there really wasn't anything like I read this is way before things like rebel ed or vs code online or any of these kinds of, Or glitch or any of these kinds of things where you can just paste code and even today, like there's a lot of online IDs and rebels, but there's really nothing else. That word you can actually pay some code and see the visual debugging kind of step by step in this very intuitive way. So it's kind of, kind of take on a life of its own in a way, which is I'm in a fortunate occurrence. Sean Tibor: [00:12:24] Yeah. In our classroom that it fills a really interesting gap in the learning process for students where they know enough about, okay, my code executes sequentially, or that it has different flows that it can take. And that in storing and retrieving information in the system, but I'm not ready to jump into an IDE with a debugger or an online system or something like that. Or the, using the rebel interactively is still kind of confusing. Like how do I even know how to get the information back out? And so. I can point students to Python tutor and say, okay, paste your code in here and then run it. And I don't have to teach them about break points. I don't have to teach them about continuous step over step into all of those things that you would get with a normal debugger, They have a next button and they can say next. And it really, for that stage of their learning really fills an interesting, gap in their knowledge. And helps them move on to that next stage of once they are ready for a debugger to be able to say, well, it's just like this part of Python tutor, but now you have a few more tools at your disposal. Philip Guo: [00:13:27] that's a great point. Like this sort of easy onboarding, right? So like, like you mentioned with the rebel or even well with the debugger, it's much harder to use. Cause they need to know to actively put a break point and say, watch this or whatever. But even like you said, with a ripple, they have to kind of actively interrogate it. They have to know, I want to print out this thing or I want to. Query this variable or whatever it is, but with something like Pottstown tutor, because everything's just laid out for you, you just step through it. And of course the caveat is you can only use it on kind of smallish programs, Because it's really executing and showing everything. but you know, for the beginner level code, you kind of want to see everything because you know that your code isn't running super long anyways. Kelly Paredes: [00:14:05] you'll have to like forgive me a little bit because I'm on the newbie side, still in the two and half years. But when I started, I introduced this to the seventh graders. We had just, completed coding, a simple app based on Michael Kennedy's birthday app. And it walks through how you set up the functions and to think about breaking apart. the entire process. And we called a lot. We didn't call it a functions. We defined a lot of functions in the beginning and it was nice just to show them how it's stepping through the function. And then when we hit the main, how it pops back up to the function, Where it was being executed and the concept of the return and the print was one of our focuses for the year week. And it was just a nice feature and they were, solidifying that idea. I kept saying to him, we're reading top down. So when you're looking for your errors or your errors in the code, this can help you go through it. And it was a neat process just to see there. Their minds go okay, top down. I got it. and pop back up from the main and it kind of worked well with the little ones, we're talking 11, 12, 13 year old. So Philip Guo: [00:15:11] Yeah, that's great. Yeah. I mean, like I said earlier, I actually don't have personal experience using this with, in the K-12 level, which is why I'm really interested in talking to both of you about it because a lot of people I know, use it or at the unit at the university level or these online courses or beyond. So that's really good to hear. Kelly Paredes: [00:15:25] it's definitely a focus. So when we break apart in the younger years, we're breaking apart, fine topics. last week we focused with the seventh graders on designing arguments and parameters within functions. And how do we return the function? How do we, what do we print the function and how do we pull it together? So I think when you are at the younger level where you're not really, a programmer, yet, if you isolate the topic that you want to look at, it, it works really well in that aspect of the Python tutor. Philip Guo: [00:15:58] cool. Cool. Thanks. Sean Tibor: [00:16:00] Alright, so just to take. Step back. Cause I think we kind of jumped right into how, what, how it works and how we're using it. but just to give it a bit of a definition. So Python tutor is this website that you created about 10 years ago. And as a new user for that site, I can go in there and paste. basically, standard Python code in there. And it will allow me to step through that code one execution step at a time. And at the same time it's doing that, it also visualizes the current working memory, the data structures, the frames, seconds, he local scope global scope, and you can see, dictionaries lists. I can see objects in there. It gives me a lot of, visualized information in. The website and I don't have to install anything for the students. I can just go to a website or even tell them, just go to Python, tutor.org. I believe it is right.com. Okay. Yeah. Dot com and they can paste in their code and start to see how their code actually works. And you have a Python in there and a few other languages too, right? Philip Guo: [00:17:00] Yeah. So it actually, despite the name, it actually works reasonably well on a few other languages. So I implemented basically backends for, for, Java script, C plus plus Ruby, which not many people use. And then, Java, which was done by somebody else, which is act who is actually a Java instructor. So it actually, Most of the languages that are common for teaching intro, it works for, but still works the best for Python because that's what, it was originally made for it. But yeah, but people have used it for other languages too. . Sean Tibor: [00:17:27] Nice. Nice. So, how many people have been using Python tutor? so far, I mean, are we talking like a thousand people, 10,000 people. Philip Guo: [00:17:36] it's been quite a lot. I mean, we estimate that, just daily right now is probably in the tens of thousands, in terms of daily users, especially, every school year, the September it ticks up and then you can see kind of the flow and it's been growing every year steadily. So I would say, the Total is maybe in, definitely in the millions, maybe even in the 10 millions, over the decades. So it's been pretty widely used. And again, I think it's just because it's such a low barrier to entry that it's just a website you visit and start typing stuff in. Kelly Paredes: [00:18:04] so forgive me again. I'm going to tell you again how I do basic with it, and then maybe you can step me through of how a college student or a programmer would use this. For example, if I wanted to show. The sixth graders or seventh graders, how we reassign a variable, I start with numb and I have it. What is your favorite number? And then I reassign number as a new number. I can see that and show them that it changes how taking it on. And this is for our listeners that are at our younger levels. How does it go up and what are the, benefits to stepping through at the higher level? what are the college students possibly using it Philip Guo: [00:18:40] Yeah. you know, it's basically really similar to what you're using it for. It's just that some of the concepts are a bit more complex. So like one of the earliest power users of the system, , who actually helped me define a lot with the instructor of UC Berkeley's intro class? So, their intro class is in Python. It wasn't schemed before, but it's in Python and it does, it goes, yeah, very advanced things with things like functional programming and higher order functions, nested functions, closures, these sorts of things. So the more sophisticated uses for it at the college level are this, these sorts of, Concepts where you actually see if you're defining functions and other functions. And there was these nested scopes and these closures, and that's really hard to understand if you're just drawing out. If you're like, we have these weird nested functions, what does this pronounce? But then you actually see in the tool like this has this parent thing here and then this other function exited, but it's still kind of around. So there was these things and also, which is more object oriented stuff. So with like inheritance. And with, kind of more current flex language features, especially for JavaScript mail, Java, JavaScript, inheritance, and object oriented stuff works kind of weird. So we kind of visualize the chains for that, but in general, it's really, I think the best use is, having a teacher or a more advanced learner guide the use, right? So it's always been a dream of mine to have this be completely self-serve right. So the dream as you paste in the code and actually tells you. it actually guides you and say, Oh, this is a variable reassignment, or this is whatever, but Brian, I would obviously it doesn't do that. It just kind of is a tool. And your question, Kelly, about the programmers use, some people have this dream of, as a professional programmer, I'm just going to paste in all my code and try to debug it. But that doesn't really work that well for that, because. It's really for this sort of self contained, pretty small, educational examples. So, I think the use cases really are broad, but they're, they're all scoped within this educational use case. And the analogy I like to make is like on a whiteboard or a Blackboard. So basically it's basically like a really good virtual whiteboard. So, whatever code you can write on the board and draw and show on the board, the Python tutor can do. So it obviously is not going to. Let you pace in 10,000 lines of code and debug your, production level software. Cause that's not what you do on the whiteboard anyways. Kelly Paredes: [00:20:54] Yeah. And it's a lot better than me. I take the recycle bin and always throw it into the garbage bin to explain variables and reassignment. Philip Guo: [00:21:01] Well, that could be cool too. that's yeah, Kelly Paredes: [00:21:03] I'm a very energetic teacher when I'm, when I, and I was laughing when I read online the other last night about your favorite hardware, you said somewhere that was whiteboards Philip Guo: [00:21:13] Oh, yes. That's right. I had this interview. Kelly Paredes: [00:21:15] and I have whiteboards everywhere on every piece of surface in our classroom. Philip Guo: [00:21:20] my, my home office here has these standing whiteboards. Cause I don't map them. I just stand them on the floor. So I have like three or four of them. This is my home office. Yeah. So I love whiteboards. Kelly Paredes: [00:21:29] Nice. Nice. Sean Tibor: [00:21:31] no we've been, actually I think that was probably the biggest adjustment for us in teaching is how do we use our digital whiteboards more effectively? Because it is a little bit different than being able to just grab a marker and start drawing. Philip Guo: [00:21:42] Yeah. Yeah. I mean, this is, we can talk more broadly about these other sorts of tools here, but I think that's like, I think that is the challenge. But you know, people have picked up their iPads and done other stuff or screen sharing and things, but yeah, just stuff. How do you get that fluidity of, like, like, using physical demonstrations or like it's, when you're in the classroom, as you both know, you can just improvise and, Do these things, but how do you do that over a screen? I think is a interesting challenge. Kelly Paredes: [00:22:05] have. Sean Tibor: [00:22:06] things that I had to remind myself with Python tutor is that as I'm stepping through it, because it can draw everything so quickly, I have to force myself to slow down because normally I'd be spending the time drawing out the boxes and the arrows and things like that. And the students would have a chance to keep up with it. Now I can just kind of click next. And like, then I have all the students saying, well, what just happened? So, the digital white boarding and using. Python tutor has been more about making sure that I have all the students coming along with me that we're all staying together as we go through the code. Philip Guo: [00:22:37] Yeah. The, the related point there is, that's, that was the appeal of, the, the Khan Academy style sketches, or just how, I mean, the, of Academy to sketches is basically people writing on the whiteboard. And the appeal of. Manually drawing math or diagrams and whiteboard is that you one, you slow down because you can only draw so fast and to you naturally talk aloud as you're drawing it. Whereas if you have a visualization or you have, these, the typical thing is people make PowerPoint slides and then just give lectures. Then you go really fast and the students don't see the process. So there is something to be said about this old school, you're actually drawing it out. Kelly Paredes: [00:23:11] Yeah, we do a lot of, stepping through, I guess I make them write notes and comments. We probably have the worst pap height designs, a code, but it's filled with comments and everything. And I think that's one of the things that the Python tutor can bring into that aspect is yeah. I was maybe having them draw it out on the whiteboard as the Python tutor is doing it. So that process that you had taken off the whiteboard and put into Python tutor, take the Python tutor and bring it back out to the whiteboard. It might be able to solidify more of that thought process for the kids. Philip Guo: [00:23:47] Yeah. So some people's activities they do, even before without visualizations, they just have the students, write out what the values are. So they kind of manually make a table say, if we have three numbers here, just tell me what the numbers are. As the loop goes, this is three, this is four, this is five. And that act of doing that, just help SEM. And I think you can do similar things. So, what does the diagram look like? After you finish running this code and, have them draw it out. And it's interesting. Cause people have done studies on this stuff, just really low tech studies of, having students draw out what they think the data structures look like. And then you can see really common misconceptions. You're like, Oh, everyone thinks like half the class thinks the arrows point. The other way we should explain why it went to this way or something like that. Sean Tibor: [00:24:25] That has been kind of an interesting thing for us that we do these class code challenges, where they are all writing code, in a time within a time limit. And sometimes it's, they're just defining functions and there's no actual code there, but it's just show us your functional structure and. It's been really interesting to see the different ways that kids think that the, even the simple function definition should be written, right? Like that should have all the, a lot of extra parentheses apparently. And, you can, you can use more than one Def key word, like, so there's all these things that we find. And from that confusion that helps us know where to really focus our, our explanations and our attention on how to help make that clearer for them. Kelly Paredes: [00:25:04] he just gave me the best idea ever when you guys were talking. So I don't know if you've ever seen a Mulas Academy, a M U L Y a M. This person steps through the patterns of, Nested for loops and makes these really cool patterns with numbers and stars Philip Guo: [00:25:22] Oh, cool. So YouTube. Kelly Paredes: [00:25:23] they write out the, I don't know who it is. Girl guy. I don't know. I can't remember the voices a little bit in between. I'm sorry. but the way that it's written out on the white board is so cool. And I'm, I think I'm going to play around with that and put some of that in the Python tutor, because trying to figure out the thought process is you'll love these. Philip Guo: [00:25:44] Yeah, I'm looking at the YouTube video. Kelly Paredes: [00:25:46] They get pretty intensive the way that they're figuring out how to code them. So I was just thinking about, that's going to be pretty cool to put in through the Python Philip Guo: [00:25:53] I see, so they're just printing it out to the terminal, the stars or patterns. That's cool. Yeah. So, Kelly Paredes: [00:25:57] thought process of how it's done is all coded out on the whiteboard. Philip Guo: [00:26:02] that's cool. Kelly Paredes: [00:26:03] Very math, mathematic. Sorry. Sean Tibor: [00:26:07] So co I have a couple other questions about Python tutor, but then we also, since you haven't taught this with K through 12, we wanted to give you a chance to ask us some questions about how we're using it and thoughts and things like that. But, with this many users on there and. The way that it's architected in terms of the, really lightweight, not a lot of logins, things like that. How do you have this running? Like what kind of a hardware does it run? Is it cloud-based? Is it on a raspberry PI sitting in your closet? Philip Guo: [00:26:34] Yeah. So it's actually, just on a, $10 a month, shared hosting plan. even though it has a lot of traffic, Nowadays modern web hosting plans are pretty good. So the main server runs on this, like this $10 a month shared hosting, just like a Linux server with Apache. And, it just kind of spawns off these Python processes in this really lightweight sandbox. And, they, I have some other servers. for the other languages, just for logistical, historical reasons. but you know, even if it gets a lot of users, I can actually just look at the real time logs. Now it's getting, maybe a few requests a second, right? So it's not like running Google, Facebook scale where things are just melting. So, even if you got a bunch of users a day, because again, it's so lightweight, it doesn't require a lot of state and everything you can just, pretty easily run on a pretty. No low cost, hosting service so that hasn't, knock on wood. That hasn't been a major issue yet. Sean Tibor: [00:27:29] Yeah, well, especially since a lot of the time is waiting, right? Like it's, the user is thinking about what they're seeing, they're looking at it and then they hit next and it, all it has to do is, render the next step in the process. So it can be, pretty, I can see where it can be pretty lightweight. Philip Guo: [00:27:44] Yeah. So actually, speaking of that, so what actually happens is when you run the code, so you write your code and when you run the code that goes to the server and it runs Python or whatever, the language I'm using the debugger. So it's using the exact same PDB or whatever debugger it's using. It runs it all. And that it logs all the values at every step into it. Jaison trace that it goes back to the front end. So by the time you actually read the visualization, everything's already in your browser. So that's why you can go back and forth instantly. So when you're going back, that's why, that's why you can go back and forth because everything's already been running it's in your browser. So when you're interacting with it, it doesn't actually go to the server anymore. So it only goes when you hit that visualize, but that's why it takes, a second or so. Kelly Paredes: [00:28:23] I in the little slider, I love the slider. Philip Guo: [00:28:26] Yeah. So that seems magical, right? The slider is cool. Cause that seems, it seems like magic. Cause you can go backwards. But in fact it's because the whole program's already there. Kelly Paredes: [00:28:34] you can tell a middle school teacher because I was showing the kids. I was like, Ooh, Philip Guo: [00:28:40] Yeah, that was great. I mean, this is, cause when people think about regular debuggers, right? You can only step forward, For most debuggers. So this ability to step backward is big because like. When you're stepping forward, you might not get everything. So let's go back a step and see what's going on and go see it. I can, but yeah, it's all theirs. There's no now reveal. There's no magic behind the scenes because the trick really is that the whole program has run. And that's why, it's really used for these small scale programs. Kelly Paredes: [00:29:05] well, we're definitely going to be putting, I don't know if we finish it. We have these choice boards where we have the students, Choose what assignments they want to complete for the week seven out of nine or whatever. I see this in the, in its future of walking through their functions for the card game. Cause we have them go through the card game of whatever card they want and that trying to organize it is the functions within the main always get some and they don't understand. How to put it in. So I see something coming out. We'll let, we'll send it to you. If we, once we make Philip Guo: [00:29:39] Yeah. And I mean, a related ideal on this front, cause y'all have been talking about screencasts and recordings. Like I think it'd be really awesome if the students. Step through it and just make a short screencast where, Oh, tell them, tell me what you think is happening. Your co just make a few minute video saying, step and then just explain it. that will be fascinating for all of y'all too, because you can see, Oh wow. These students really get it. Or wow. They actually have a misconception. They think this thing is happening, but it's actually not happening or y'all can make screencast with lessons and stuff like that. Sean Tibor: [00:30:07] Well, it really gives us, it gives us an opportunity to give them feedback. that's the most valuable thing, especially when we're distance learning, if they can send in something that we can see an insight into their thought process, that gives us a unique opportunity to help them, maybe reframe it or think about it in a different way through our feedback. So we are. Trying to go well beyond the idea of like, Oh yeah, you just got eight out of 10 points with no, no comments. It's really the feedback that. Kelly Paredes: [00:30:33] And also just thinking, These are why we love these podcasts because we generate a lot of ideas during these podcasts. But, that concept that everyone's talking about, a lot of our listeners always ask us about grading and how do we keep it everyone from, not being honest, when they're submitting code that idea of dumping and code and having that them explain what's happening is a great reflection piece. Like you Philip Guo: [00:30:59] Yeah, I think, yeah, I think that's great. I didn't even think about the grading part, but yeah. I mean, that's kind of the, the old school way of doing oral exams is like that, That, it's very hard to scale obviously, but if you have, a few students, you, if you have them and you ask them questions and you make them explain their thought process, it's pretty hard to cheat on that. If you don't actually know it, Because you have to actually explain it rather than just saying, what is this, answer print out or something. Kelly Paredes: [00:31:23] Very exciting. I'm excited. I've got two questions on my choice word for next week. Philip Guo: [00:31:28] Hopefully your students don't hate it. And then blame me, for this pot, did your students listen to the podcast? Kelly Paredes: [00:31:34] Some of them do we always joke Philip Guo: [00:31:36] That's how interesting. Kelly Paredes: [00:31:37] We're like, we made a podcast about that. Sean Tibor: [00:31:40] so, Phillip, do you have questions for us about how we're using Python tutor or what it's like to teach Python in a K-12 setting versus a university level? Philip Guo: [00:31:50] So I guess my, kind of questions that I'd have is, what features would you like in it to support teachers? So, the context for all of this is that, I have so far not really focused on making it a kind of end to end experience as you see them, It's a very bare bones sort of tool, which is. I think it works really well that way, because you don't have all these other things to do too. And the only way it's kind of sustained is because I kept it very simple, but now I've been thinking about, reaching out to teachers more directly and thinking about, what things could get. I implement that, reasonably isn't that, but actually. Could help support teachers and in using it in an interesting way. So, if you have thoughts about that, like, Oh, I really wish that we could add this thing to here. That'd be cool. There are no guarantees, but, I'm interested to hear. Kelly Paredes: [00:32:34] for me, I think the layout. For the kids, trying to get them to get into it and see what to do, even though it's completely clear for us as adults. Sometimes they, they see a little bit of small words or anything in font, less than, 12 and they're like, Ooh, it's adult stuff. Philip Guo: [00:32:52] Yeah, Kelly Paredes: [00:32:53] so I always think of how Nick Toler did designed Mo and I think even just as simple of a big button versus squares of next and first and less writing on it, Just the three boxes and the slider and the first next that you could easily implement that straight away into the middle school, high school level. The program's great. Philip Guo: [00:33:16] That's a great, that's a great thought. Yeah. And you could imagine just the styling thing and yeah. I mean, you imagine there's, systems like scratch and other things that are more geared toward younger students that like the user interface is so important, right. Because you want to have it be really intuitive for them. That's a great idea. Kelly Paredes: [00:33:32] Yup. Just colored a little bit, put a little colors on it. Sean Tibor: [00:33:36] Well, the one I was going to ask for is actually okay. Already. There is the ability to generate links back to the code. So that was the thing that, yeah, I guess I didn't realize was there, but it would be most helpful for me. When we do assignment submissions, we do a lot of our assignments with, a learning management system where the students can submit an assignment. We ask them to paste in the link to like a CoLab notebook or pasting a screenshot of their code, but having them generate a link to. here's my visualization of my code is also really helpful. So if that, permanent link is going back to a immutable, version of what they submitted, then I can use that for assignment submissions and be able to know that the code that I'm looking at is the same one that they actually created. And hasn't been changed since then. Philip Guo: [00:34:19] Yeah. So the links itself here, again, all this is super low tech, but the link itself actually just contains all the information. Like literally, that's why the URL so long, they used to Google used to have a URL shortener that we could use, but they discontinued that. So used to have these Google shortened links, you can probably hook it up to Bitly or tiny URL, whatever, but I just haven't. So if you. If you actually say generate link, not link is actually unique because it actually, what it contains is it contains the code and then it contains like if they've actually stepped through it, it contains like, Oh, we're on step five. So if you actually paste that link in your browser, it will reexecute, go to the servery, execute and then go to align five or whatever. So that those are, fairly stable. And the one thing I can improve on that is just, making a minified link. So that's easier to post. Sean Tibor: [00:35:02] that might help just because sometimes they paste it over and they're putting it into like a Google doc or something like Philip Guo: [00:35:07] yeah. That's long and stuff. Yeah. Kelly Paredes: [00:35:09] so question, what does it mean on the heap? I actually liked that style, where it shows outputs a string on the objects. What does it mean? Render all objects on the heat. Philip Guo: [00:35:20] Oh, yeah. So the, so one of the, this is a broader issue. So one of the issues is that, there's often ambiguous ways to draw these things, right? So for example, the classic thing is, and, in Python also in Java and other languages, is a string, just the primitive object that you can just, it's, a goes to the string or is it actually objects somewhere else? And you actually have a pointer that arrow that points to it. And it turns out that for Python, it doesn't really matter because the strings are immutable. So our number, so it doesn't matter where you drop, because it's not like you can modify that string or that number anyways. So by default, we just inline it so that you can say, a goes to the string, but some people want, to show that. The strings are actually objects floating around somewhere where there's a point or it also numbers to that point to it. So, yeah, y'all got these labels are not the most intuitive. but you know, there are several well customization is that people are going to do if they want the diagrams to look a little different. But in general, I've tried to just say like, here's the way we draw it. And then you just kind of have to work around it because we can't customize every single other thing. but I agree that the, That yeah. That it could be better in terms of explaining maybe what those options mean. Yeah. Kelly Paredes: [00:36:29] I just like, I liked the way that looks for them. Thinking again for the little kids. I always tell them, if you start saying STR and int, then you're going to be able to think about later on in coding and how you want to cast a different data type. So it's kind of nice to use it for me as on the heap. Philip Guo: [00:36:48] Yeah. Yeah. So the different options are, Yeah. And I think that the general theme is conversation is really a lot of this has to be kind of instructor led, That, if the students didn't have you saying, we're gonna use this option and here's why they would be confused. Cause like which one do I choose? Like why is this looking a little different? so I think ultimately, it's ultimately, we still all have jobs in a sense, right? That this is not an automated way. It's not like they can just go to this thing and paste in code and automatically learn everything. It's really a, it's like the whiteboard, It's really thing to facilitate teaching. Kelly Paredes: [00:37:16] Yeah. They still think that we don't do anything. they're just like, you're not teaching us. I'm like, what do you mean? Have you learned Python? Oh yeah. Well, I guess you have, we do a lot of facilitating, Sean Tibor: [00:37:29] so, so Feldman addition to Python tutor, what other tools and things have you worked on that maybe people should check out. Philip Guo: [00:37:37] Yeah. So, on my webpage has, a bunch of, academic research on, mostly focusing on adult learners. so there's, all of our research papers, the PDFs are online, so they're freely available for people to read. and then, my students have worked on a variety of other sorts of, educational tools and such, but none of them have, Taken off in that way. Most of them are, research prototypes that we write papers about. We do user studies on and such. So, I have a fairly broad portfolio at this point. it's funny. Cause it's like, there's by the anterior things, a really concrete thing I can point to, but everything else is like a, you can just link to my webpage and people can check, check out the stuff. But a lot of our research is around, Different user populations and how they learn programming or data now. And what kinds of unique challenges they face and stuff in conversations. We started around that. Kelly Paredes: [00:38:26] so I'm going to see if I can formulate this, This question, but you do data science, cognitive science. You're studying how people sort of learn with computers. teachers are always constantly doing that, but sometimes we don't necessarily do it right, or right away. Any tips. This is going to be crazy like how, cause we're constantly making our own studies and changing and adapting curriculum. Any tips for teachers of just. When to say aha, or how to document maybe a study that they have Philip Guo: [00:39:01] Yeah, that's a great question. I think. I mean, I think that, things like this, like these podcasts y'all running, or, some teachers have blogs where they write up their experience. I think those are so valuable or, on things like Twitter or people sharing, insights. I think that's so valuable because, as people who are in the field doing this, you have these on the ground insights and, like, especially in the K-12 while you're also busy with the day to day, That it's very. It's often hard to step back and reflect, but you know, the podcasts that you all are doing and some of the teachers with blogs or on social media, I think those are often the best sorts of. Ways for people to document, in this sort of very informal way. And then like if, people go to conferences and if they're academic researchers who go and want to collaborate or kind of work with people at your schools, these things kind of organically come about, but I'm not, I'm a very kind of empirical on the ground person. And I really believe that. A lot of really interesting science starts from observation, right? from direct observation. And this is, this is in the history of natural sciences this way. That, before we understood, we had all these equations to understand physics or, thermodynamics or chemistry, we have people, out in the field observing, We had people, trying out stuff and tinkering and saying, Oh, this steam thing seems to be good. And then people were like, Oh, let's see, understand how heat works or heat transfer work. So. I think a lot of this on the ground stuff that everyone's doing is great. And as people who are in kind of more academic research, I really love reading these sorts of blogs and listen to these podcasts. It's like that really kind of connects us to what people are actually doing, out in the world. Kelly Paredes: [00:40:38] Very cool. Sean Tibor: [00:40:40] I would love to have you come back up and talk to us about. taking those observations and, maybe collecting data like how, teachers who are trying to figure out, patterns and trends in their classroom, things to help people learn better, can gather more concrete data. So it might be a great time to come back and have you talk about, experiment design and things like that for the classroom, as just the next step. Cause that's something that is always been interesting. I know to me, and also to Kelly. Kelly Paredes: [00:41:07] why he knows to cut them. Cut me off. Philip Guo: [00:41:09] That's awesome. Yeah, I, that would be, that'd be great to talk about in the future. I mean, again, the caveat is that I'm not an expert on this at all. I've never done research in K-12, there's obviously a lot of challenges with parental consent and all the kind of privacy challenges, but. I think a lot of really interesting work could be, could be done here. And especially in the computer science realm, That you to have this, kind of this lab that you have all these students coming through, you're iterating so much on your, on your coursework even throughout the year. you know, there have been people who are researching K-12 and computer science, but I think that, like I have, I, I don't know that much about people who are actually. practicing it and also doing it as well. Cause I think there was a ton of potential in this, cause at the college level, a lot of people research education at the college level because we're in the, this environment. Because that's the, the kind of joke goes that, so much of research is on, undergraduate students, Because that's what, that's the population we all have access to. So I think that, that the younger population could be great. So that's awesome. Sean Tibor: [00:42:06] Alright, Alright, cool. So for our listeners who want to connect with us, you wanted to ask questions. if you'd like to connect with Philip, you can visit our website@teachingpython.fm, or also on Twitter at teaching Python. Kelly is at , Kelly Perez on Twitter. I am at S M Tibor on Twitter and Spotify. So if you want to follow me there, you can Kelly Paredes: [00:42:26] No pellets on this week. Sean Tibor: [00:42:28] Okay. Well that was last week. This, what I actually want to do is start like, just throwing in random Philip Guo: [00:42:33] Yeah, random sponsors or, non sponsors. Yeah. Sean Tibor: [00:42:36] . so yeah, they shut down my MySpace. So I can't put that in there. Kelly Paredes: [00:42:40] okay. I was somewhere out there in the dark web or are my spaces back Philip Guo: [00:42:44] Internet archive, it's probably archives somewhere. Sean Tibor: [00:42:47] Oh, I'm sure it is. And I would be horrified to go back and find it, but. we also want to thank all of our Patrion sponsors who helped keep the show running and keep the lights on for us. We really appreciate your support. If you'd like to become a sponsored, the link will be in the show notes. And I think that does it for this week. So when, just like to thank you, Phillip, for joining us and talking about your project and your research, it's been wonderful to get to know you and we hope to have you back soon. Philip Guo: [00:43:10] Yeah. Yeah, definitely be happy to talk. And then you all can check out the Python tutor.com link you can just put in the episode notes and everything would be awesome. Kelly Paredes: [00:43:17] Excellent. And are you on Twitter? Philip Guo: [00:43:19] That is a funny quote. We gotta do a whole episode of obsessed. So I used to be, I used to be pretty active online in many ways. So I had a podcast I had. Huge blog. I had Twitter. I had it all. I didn't have MySpace though. And then just this summer I decided to starting this year. It was my year of just getting off everything. So I am trying to be as invisible as possible now, but it's all in the archive, so Sean Tibor: [00:43:44] So for our listeners that want to get in touch with Phillip, just send it your carrier pigeons in the general direction of UC San Diego. And he will get it. Philip Guo: [00:43:51] That's right. Sean Tibor: [00:43:52] Perfect. Perfect. All right. Well for teaching Python, this is Sean. Kelly Paredes: [00:43:56] And this is Kelly signing off.