Episode 16: When Philosophy and Python COLLIDE! - Part 2 [00:00:00] Sean Tibor: [00:00:00] Hello and welcome to Teaching Python. This is Episode 16: When Philosophy and Python COLLIDE! - Part 2, recorded on March 20th, 2019. I'm one of your co-hosts Sean Tibor. I'm a coder who recently became a teacher and I'm joined by my other co- host. Kelly Paredes: [00:00:28] Kelly Schuster-Paredes and I'm a teacher who recently started to code. Sean Tibor: [00:00:33] Welcome Kelly. How are you doing today? Kelly Paredes: [00:00:35] I'm doing well. I'm uh we're enjoying this Wednesday day. Sean Tibor: [00:00:00] It's kind of a rainy day here in Florida uhm and so it's a great day to talk about Python and computer science and uh philosophy and all of those uh things have been kind of running around in our heads uh for the last week or two. Wins of the Week [00:00:15] But before we begin, let's start how we always do, with the Wins of the Week. So, Kelly, have you [00:01:00] had any big wins inside or outside of the classroom? Kelly Paredes: [00:00:02] So this week I've been focusing on getting some data on information literacy and how it affects students' learning with Python and coding and just trying to figure out reading comprehension strategies. I've been working a lot with an English teacher and she's been giving me strategies on things to use within the class and finding out some really great personal studies with with my students. They're like little guinea pigs, but uhm just teach them how to skim and scan and then read for detail. It's been helping them a lot with trying to figure out products and I think it's nice because then they're able to uh answer their own issues with something that they're doing the coding and search it online and then find a suitable website or a project on Hackster or on Adafruit that they can use to build their own. So it's been a really fun when and I've seen a lot of kids feel a lot success, especially when we were using the breadboards this week. Sean Tibor: [00:00:22] I've been [00:02:00] piggybacking off of that success also this week. So from our conversations about it earlier this week. I've spent some time with my students talking through how we read things and how we look for the detail when it's the right time and I want them to understand that this is not just something that's generational. That it's something that happens with kids their age or "get off my lawn" sort of thing, but it's really something that we're all struggling with across the age spectrum. With such a deluge of information out there and the ease of just skimming through and scrolling past content. So, it's turned into some really interesting conversations and very reflective conversations about how do we read? And how do we find information? And how do we solve our own problems? Because there's just such a glut of information out there and we've trained ourselves to skim through it until we get that thing that we're looking for, scan through it, and frequently, that's not the thing we actually need. [00:03:00] Kelly Paredes: [00:00:32] And I think we're seeing it a lot with our topic today as I was looking over our information from our workshop and then trying to supplement it with things that I have been reading on my Google Alerts. There's just so much information and you really can't sit there and read everything that comes to you, especially now with machine learning and artificial intelligence. So it's if you just put those two words into Google it's, I don't even want to know how many queries come up from that. Sean Tibor: [00:01:03] So for me the big win this week has been actually a lot of wins with my students going into the last two weeks of their wheels. We're in weeks eight and nine right now of their their course in computer science, and we've switched over to a project-based approach for the last two weeks. So the parameters or the constraints on this are that it has to be groups of one or two. They have to write at least 20 lines of python code and they can't copy and paste from from the internet. They have [00:04:00] to create something new. Fresh code that they can write themselves and they can type in someone else's code. But I really want them typing it making it themselves and I've seen such a range of projects. I have one student who's maybe not the strongest coder but got really into programming the cosmo robots and we went through the whole setup of that. We spent probably two days just getting the SDK installed and the correct version of Python and just training her how to use it. I had set the expectation in the beginning to say look the set-up time for this is going to be huge and that's gonna be the hard part once we get through the setup to make it drive around and do all these things, that part becomes much easier. She was able to get the Cosmo robot to drive a square on the table. So of course, the first thing we did was we taped a marker to it a dry erase marker and had it draw the square on the table with the Cosmo and I don't know who's more excited about it, [00:05:00] her or I, when it actually worked. So we've had robots we've had games. I have a couple of students that are making a commercial for the Mu editor to tell their the next group of students why they should get excited about Python and why Mu is such a great editor for what they're trying to do. So it's been really fun to see all the different things that they're coming at up with and the different ways that they're approaching it to make these projects. I'm just super excited about it and it gives me so much energy to see how many different things that they're coming up with and how engaged and focused they are. They walk in the classroom and I say, okay get to it. And they just do it's amazing. And then when I walk in the classroom, you're like, oh this one's coding and making their own website. And this one's doing a Story Jumper. And so it's quite interesting that I had one student who came back 24 hours later and they had written a hundred and fifty or two hundred lines of story-based interactive Adventure code between the two of them with just branching if then [00:06:00] 's and everything and so they use the Bullet package that we heard about on Python Bites a few weeks ago. They're making all these menu systems everything. There's just flying through it and I asked them. What's so great about this. Like why are you so into it? And they just said I just like doing this and I can tell a story with it and it's interesting and I think their favorite part is finding all the creative ways that you can die in the interactive story. Kelly Paredes: [00:01:54] That's great lot of fun stuff going on. Practical Classroom Applications of Machine Learning [00:01:57] Sean Tibor: [00:01:57] So we're going to continue our conversation from last week about philosophy and Python and machine learning in particular. So if you didn't catch our episode last week just to recap briefly: Kelly and I spent about two days in total in a workshop with two professors from Florida Atlantic University's Machine Perception and Cognitive Robotics lab learning about machine learning and specifically deep learning. So it was a we described it as about six weeks of [00:07:00] computer science and machine learning content in a two days workshop so it's been a really compressed, dense period of time and last week we talked about the philosophical questions that came out of that. The ethics of AI. What does it mean to have a an AI designed car or algorithm or model? How can we influence that to reflect proper ethical behaviors and what are proper ethical Behaviors? So really, the underlying principles of artificial intelligence. But specifically around machine learning deep learning and applications. So if you haven't had a chance to listen to that episode, it just went live yesterday. So I think those the 19th of March so it's out there you're able to get to it. What we want to talk about today was more of the practical applications. How do we take that theoretical philosophical discussion and bring it into the classroom? So Kelly, tell us a little bit about how [00:08:00] were defining AI, machine learning, and deep learning in this context of of middle school. Kelly Paredes: [00:00:00] In our workshop, everyone hears the buzzword AI and they coin everything as Ai and what we know that's not really everything out there. We just kind of lump everything together. This is AI and it's a machine doing stuff. With this workshop we were looking more into machine learning, that specific study of the algorithms and the statistics that we use in order for a computer to do a task a specific task and on how that computer. Sort of teaches itself to identify patterns with it. The guys from FAU were most focused on the image, right so they did perception and images, correct? And they were showing us how the machine learning what the machine would build a training data based [00:09:00] on whatever known data they were giving it. So I think machine learning is an easy way to jump in with students because it's something that they can physically see when they pick their training data and then they can see the output of whether it's right or wrong. Sean Tibor: [00:00:03] We spent a lot of time discussing. How to position this with students at different grade levels. So in this workshop, we had lower school/primary school teachers, we have middle school teachers like ourselves and we had upper school uh teachers that teach students that are going to college and university next. So we had a wide range of teachers. They're all seeking ways to try to apply this to their students and make it relevant for them. Kelly Paredes: [00:00:31] Yes, and we also had don't forget the few of our students that were had taken the course a while ago and are actually using the libraries that they have they were using Tensorflow, most of them. Sean Tibor: [00:00:00] In our workshop, [00:10:00] maybe we'll work backwards. So at the end of the workshop, where we got to was this place where we were using a Python notebook running in Google Colab that was using PyTorch to do a categorization exercise. You could give it two different sets of data, say airplanes and helicopters, and it would go out to Google Image search and download a hundred pictures of airplanes and a hundred pictures of helicopters. Put those into two different sets of data and then the machine learning algorithm would run to train the model to distinguish between the two of them. Then at the end you could see how accurate was it. Did it actually categorize it and classify it effectively between the two different categories you chose. So that's where we wanted to end up and we could just give that out at the beginning and say here click this click this click this and it would have worked. But where we wanted to start was all the way back at the beginning to understand how the model was built and what it was doing. So that [00:11:00] started with an understanding of how the brain and human vision actually work. Human Vision and Neurology [00:00:02] So Kelly, I know that you're more of the science teacher, or the biologist here, and I know that you're not necessarily a neurology expert, but could you share a little bit about how we started and how we began this model of the human system of vision and cognition and how we translated that to machine learning. Kelly Paredes: [00:00:08] There's been a lot of studies about neuroscience and what we do not know about the brain and how we learn and so the way that the professor's brought in the first feature was just talking about how our neurons and the brain have have a way to connect all the impulses of the synapses in order to send them down into one filtering neuron, without going too complicated and they take all this information and they sift through and send it to the correct part of the body. And so that [00:12:00] analogy was a nice place for us to be because if we take a picture of you know, or cats and we think about all the senses that happen when we see a cat. It will determine where it goes down into our part of the body. That was how I took it when I was thinking about the different layers of the neural network. And I guess what what was difficult for some and it took us a couple took me a little bit to process was the fact that. If you think of the neural layers as a place of the dendrites of where the neurons go through it has to pass through each layers in order to make a decision. It's almost like when you go to stick your hand out on a stove, your body's doing this process of, "do I touch the stove? Is it hot?Should I move my hand away?? We don't really realize that and that's kind of what's happening within the neural networks. That was my take on the comparison of the Neuroscience, which I thought was really nice because once you go and you look into the brain, you can [00:13:00] actually go in to teach the kids as well. This is sort of how a machine learns as well. Sean Tibor: [00:00:12] We started talking about a bit of history of machine learning and this idea of a neural network, mathematically is not a new idea. So the examples that were given were a hundred years old and we had some really gorgeous mathematical diagrams and sketches that we could refer back to to see how this worked and there's some fascinating videos AT&T has a video showing neural networks in action. There's some mathematical videos. I think one of the professor's said that his part-time hobby is collecting antique videos on YouTube of all these different experiments that were the precursors to modern machine. We start at the beginning with what's the mathematical model and the way that we created it is if you can envision a series of nodes, like neurons, that are connected in a layer are not [00:14:00] connected to each other in the layer, but they're connected to every neuron in the lair before them. So say I have a three by three grid of neurons. So three neurons Why by three on neurons tall? It's like nine square square, right and right next to that is another three by three grid. Each of those neurons is connected to the previous nine neurons and they receive information from each of those neurons. And then there's another layer around the other side of that three by three grid and that neuron is then connected downstream to the other. The next nine layer of nine. So that's what we call a fully connected neurons So within this cube now of three by three squares everything is fully connected. And so what happens, if you can imagine this, is that as information comes in through that first layer. It makes decisions on that information. Each of those neurons assigns a mathematical weight [00:15:00] to the information that's coming into. And then passes that information downstream, assembles at all together and sends that information downstream to all of the other neurons that are downstream from it in the next layer. And so it ends up being essentially Matrix math. You're just doing a dot product of each Matrix with its corresponding weight. So the values times the weights gives you the information that you then send down the stream and. The idea is that that works very similar in a very similar fashion to the way that the brain works where each neuron is receiving information from all of the connected neurons upstream from it and sending out information to all of the neurons that are connected downstream from it. Now if there are any neuroscientists listening, I'm apologize if I butchered the actual neurology or the science behind what's actually happening, but this is the way that we're conceptualizing it to be able to relay it to our students. So that was the way the machine learning worked for a long time was these [00:16:00] neural networks, but we spent most of our time and effort trying to fully describe all of the inputs into this layer and the big breakthrough came when we realize that that is not necessarily how the brain works. We don't spend all of our time trying to trying to define everything that we put into our brains. We look at it. We see it. We use our senses to understand it. And then we process that information through our own neural nets. So that led to the first convolution that seem to have a lot of success called AlexNet which we played around with a little bit but this this convolution net that acts almost like it has the input layer from all the vision components of your brain. So the eyes, the optic nerves, all those initial connections from your eyes to your brain. It processes the images that we see to extract features from them and those features could be lines, dots, colors, shapes, motion and movement. [00:17:00] Those convolutions happen to extract features and then we pass those features into the neural network to extract meaning from them and classification TensorFlow Playground [00:00:07] Kelly Paredes: [00:00:07] One of the best tools that actually helped me to visualize all that Sean just explained was when they showed us the playground from TensorFlow, which is not the same program, the library of Python, but it was actually a visualization. And it allows you to tinker with a neural network right there in the browser. It was it was at this point of time where it started to kind of make sense, where you would talk about the fully connectiveness and the layers and the features and you could actually change the weights. So if you wanted to see how the `machine would do in order to find the output you can add in different features you can add in different layers. You can correct and change that way and then you would see the [00:18:00] output of the test and at the same time you can see the test loss in the training loss and it was almost like an aha, because when they were showing. They're showing a cat and trying to trace it through those the features and the layers. It wasn't as clear when they're just speaking about it. So one of the things that we thought is is this is a good place for kids to see as well after we get done discussing a little bit about neural networks is you know, here's a visualization. Here's where you can go Sean Tibor: [00:00:02] You can find this on playground.tensorflow.org. And we're going to put this in the show notes. Essentially what it does is it tries to classify a scatterplot of data. Orange dots and blue dots. You can use these features to extract classifications of where those dots could be and then the layers train themselves to classify the regions in which the orange dot should be and the blue [00:19:00] dot should be. So for example, if you have a checkerboard pattern, the machine should learn okay, the orange dots go up here in the upper left. The blue dots go in the upper right, more blue dots in the lower left, and more orange dots in the lower right. And you can add your own layers and add more neurons to it and the more complex you make it, it could in theory be more accurate in creating these regions. It's so you can play with it yourself. It's kind of fun and a little bit addictive to iterate through it. What you're looking for is what's the smallest neural network that I can use to classify this information? Because it's really about the efficiency. Why use more of your brainpower then you need to to make the classification? What's interesting about it is that because humans are so visual when you look at this you can immediately see what the classification should be. You can mentally draw. "Okay, it should be a checkerboard. I can see that" The computer, the neural network doesn't know that until you train it so [00:20:00] you can make changes you can iterate it and you can just run through a bunch of training epochs and it will ultimately get to a pretty good place with the classification. Kelly Paredes: [00:00:14] That's when we got into the difference of deep learning is that when we have those neural networks with a lot more hidden layers. Sean Tibor: [00:00:03]The best way to visualize this for me was a great slide that the professor had where if you can picture that there's an input circle like an equation. A plus b equals c and so there was a circle for inputs. That was a. There's a circle for rules and that was B. And then C was the output. So the idea was if you have inputs and you apply rules to them that you can have outputs. And the traditional form of machine learning has focused on what are the rules so we'll create all the rules we need to accurately describe how to categorize these scatter plot dots. Kelly and I could sit here for the next three hours [00:21:00] and she'd probably want to gouge her eyes out about 10 minutes in. But we can sit here and define all the rules for how you classify these dots on the screen. When we go into deep learning the difference is that we take the input is now A, the output is B, and then C is the rules. So we are taking input and the output and we're making the computer or the neural network learn the rules for how to take inputs and get the outputs reliably. Kelly Paredes: [00:00:21] He also showed the video of the convolutional neural network and visualizing how it's scanned. Not just every single region of the letter or the picture and it would take and whatever came out through that other end. It would put that image. It's a nice little video where it would just go through and scan a letter A and that was one of the visual intuitive design that they showed with that. Sean Tibor: [00:00:00] So that's another tool that we used for convolution to visualize features [00:22:00] and extract them. There's a classic data set for training from NIST, the National Institute of Standards and Technology that is handwriting samples and it was gathered a long time ago, but essentially it has a visual representation of someone's written number or letter and the label for that. This is an uppercase H. This is a four, this is a six, this is whatever and you can run this visual tool to sketch in your own numbers and see how accurately it can Interpret and understand the letter or the number that you wrote in Kelly Paredes: [00:00:22] I actually know that one because I found that and I wrote it down was the Lynette one which was the first Convolutional Network that can recognize handwriting. So they showed us that there and I was looking through my notes and I remember writing that down thing. It was really cool and I didn't get the date on that. But I know it was a long time ago probably before I was born. Sean Tibor: [00:00:20] It's really fascinating [00:23:00] because it's the same sort of idea extract the features is and you can the computer itself determines which features the most important and what it really comes down to is the reward: the success, the failure, how accurately it predicts the the output and we measure that in terms of the loss. So the loss is the the cumulative error in the model when run against the training data set. Kelly Paredes: [00:00:26] There was an article that just came out which is more my speed on March 18th. It was, Like Animals, AI is Learning From Experience. So now they're starting to relook at the way animals are learning and add it to the recent developments of AI. That's the whole idea of trial and error like a monkey who's trying to dig out their food, they might find a stick or a leaf in order to get some termites out of a hole, but it's just trying different things and biologists don't really have that full understanding of how animals solve problems. They're trying to [00:24:00] analyze the way that animals solve problems in order to corporate that as well with reinforcement learning. Sean Tibor: [00:00:04] So that's where we're starting. A lot of our discussions with our students is really around this idea of the analogues between the human brain the way we process information and the way that the neural network works. The big leap is that you can look at a simple neural network model and it doesn't seem like it's doing much because it might only be a few features or a few neurons or a very simplistic model in the case of this TensorFlow playground. So when we look at this information you say "oh, well, that's not that impressive." What is impressive and what has really led to the breakthrough has been this tremendous increase in computing power and availability. Google Colab [00:00:30] So that's why we chose Google Colab for this notebook that we started working with because you can get [00:25:00] access to a GPU from Google for free right in your browser. When you run your Jupyter notebook, you can turn on GPU mode and you have access to a pretty nice processor. Now, you can't run it forever. You can't train something for weeks and weeks. You can't mine Bitcoin with it or anything like that, but you can train models using Google Colab and we're talking about computing power that has just exploded exponentially. So, to give the example the first computer that I had in my household was an Apple IIGS and it ran at I believe eight megahertz. So eight million cycles per second. It was amazing and it had. I don't even I can't even measure how much , teraflops petaflops micro flops, , it's got to be something very small in terms of computing power. Flash forward another 10 years past that the most powerful computers in the world were [00:26:00] tens of millions of dollars. Giant computing clusters in data centers that took two years to build and by the time they were built may have actually been obsolete. Now, you've got access to something that's more powerful than that in your browser anytime you want it and it's free from Google. And so we've gone even in the last few years, say the last five years, through the power of GPUs and graphics cards that can massively calculate and scale up. We've seen a 50 X increase in the last five years in computing power. So the example that was given was when AlexNet, this first successful convolution network that was a breakthrough came out in 2013. I believe it took two weeks to do a classification run on a set of data. That same set run in 2016 2017 2018 is now being measured in minutes. 15 minutes to run the same [00:27:00] exact training model on newer hardware. So as this curve continues, we're able to process more complicated models. So we can go from that really simple grid to process large images or we're going to process video because we can do it fast enough now that we can process this on every frame of the video or even multiple frames of the video. So this gives us a lot of really sophisticated techniques at a very large scale for very little cost to be able to improve the quality of our classification . So we're seeing this huge explosion in AI because the computing power necessary for it is now ubiquitous. This is cutting edge stuff. This is things that are moving very quickly and this podcast will likely sound very dated in just a few months. Kelly Paredes: [00:00:06] For me, just bringing it home and into the classroom, the idea of training a computer and and being able to put [00:28:00] in an image or two images and have the computer come out with an output is something that people are starting to grasp. They're starting to understand the application of that. The other thing was the whole colorizing of old photos. I think that's something that was also easier to grasp because I read another article where they were taking photos that had color applied already. It was a color photo and they were put it into a training model and order for the machine to learn what color should be available and then they were putting in black and white photos. In order to get that output. So again, these are things that no one had to write an algorithm for and I think that's one of the biggest takeaways for a beginner person trying to learn what's going on with AI and machine learning is: no one's really writing that specific algorithm. "Oh you're going to look at that thing. It's going to be a tree and the tree is going to be brown at the bottom and green on the top." The machine is figuring out why it's brown and why it's [00:29:00] green and you don't really have to do much to that and that was a big eye-opener for me. Sean Tibor: [00:00:01] The really exciting thing for me as a teacher is the fact that there's so many new things that can happen. And that's I think where we'll probably wrap up those conversation is about all the different things you can do with this and that's one of things. I appreciate the most about the professors. They kept repeating over and over again that this area is so new that if you can come up with an idea, it's likely that no one has ever tried that before. It's a new frontier in what's possible and there's no such thing as a crazy idea in this space. So for our students there's so many opportunities and there's so many ways for them to be creative and find ways to make this work. There's a huge learning curve in some cases to do that. So if you can build up your own expertise, or you can find expertise locally that you can help [00:30:00] connect your students to the experts. Then you have the opportunity to help these ideas actually come to life. Kelly Paredes: [00:00:44] The other thing that was easy to bring home to the students was just a quick search on the internet again and you can find all the libraries that are associated. So you really don't have to necessarily understand what's going on inside of the machine and that was another aha moment for me. It was kind of like the matplotlib moment where I realized that you don't really have to write a trillion lines of code in order to get a graph but you can use some libraries to get that output. Our kids in the high score are using TensorFlow. These are all data science and machine learning: Plotly, Bokeh, PyDot you've got SciKit, which is one that they did mention us. To a SciKit XGBoost. LS and then you go into your deep learning with the tensorflow and the PyTorch and Karis and then there's even distributed deep learning which I have no idea what that is. And I'm sure we can go into that. Then the natural [00:31:00] language processing libraries. There's so many things if a student was interested. Maybe they might not get a deep understanding of really what's happening inside, but I was talking with the FAU professors again. We were thinking at one point in time, It's just going to be a block. I'm going to move that tensorflow block and I'm going to choose a couple of categories and that's going to help the kids learn how to train a model Sean Tibor: [00:00:01] There's so many different things that are out there. The important thing is not to let the tools get in the way of the idea. So if you can find ways for the student to bring their idea to life, maybe it's not PyTorch maybe that is the best way to do it, but you don't know how to use it. There's machine learning tools in Scratch that you can use so find the tools that help you at least get the idea off the ground and give the student the idea of how they can apply this new idea or this knowledge to make their idea happen. So you can look at the different tools and [00:32:00] visualizations that we use as part of the workshop. We are by no means experts. This is our new beginning in AI but as I was listening to Talk Python a few weeks ago. They had a panel discussion between beginners and experts and one of the experts made the statement that an expert is just someone who's been a beginner many times before and that really resonated with me. I feel as a teacher and as a coder that I'm always a beginner at something and that I'm learning new things. I'm trying them out and bang my head against the wall, but the difference is, when I first started, I didn't know what it looked like on the other side. I didn't know that I would always get through it and as a so-called expert now, I'm more confident that if I begin something that I know the right skills and strategies and approaches to get through it. So if that's something that looks intimidating to you to learn artificial intelligence, machine learning, and deep learning just know that there are lots of [00:33:00] resources out there. There are a lot of experts out there who can help you be a really good beginner and get through that initial phase of learning Kelly Paredes: [00:00:01] As a beginner, I'll be the first to let you know I went to the workshop and I was following along the code. The code part was the easy part for me. I was just trying to catch up with why he changed a couple of commands but that part seemed easier to understand . The machine is still kind of out there, but I was talking to a ninth grader who knows a whole lot more about TensorFlow than I do and he says that was the sixth time he sat through uhm the lecture from these professors. Each time he sits through it makes a little bit more. So this is a ninth grader who's been coding in TensorFlow and even said to me don't worry. It'll come to you just sit through a couple more episodes. So each time Sean talks about it or I look and I find another article to read, the more things that starts to click. And again, I like more of the [00:34:00] the products the stuff that you can see. There's a couple of things that I found that I will put on there. For example, just the Smithsonian launched an app that would colorize the old photos. Things that for me that are more practical teaching maybe the younger kids and seeing how they can play with things. Just showing them how they can use a machine in order to do a job. And that's really what we want them to get out. Not necessarily that they're going to be neuroscientists who do machine learning but that they can use the product Sean Tibor: [00:00:04] or recognize when it's being used. Photos are a great example of this. I love in Adobe Lightroom, they have a feature that's an auto-adjust. And the auto adjust uses deep learning based on all the other adjustments that have been made by photographic editors or professional photographers to apply those same edits to your photos to make them look better and it does a pretty good job. So it's pretty amazing to see. Workshop Wrap Up [00:00:06] So we're going to wrap up our [00:35:00] conversation about the workshop and artificial intelligence and machine learning. By no means is this conversation over its ongoing and it's new every day. So again, if you have questions you want to talk to us about it. We'll go into more detail about where to find us online at the end of the show, but we do want to get into our listener questions. Listener Emails [00:00:17] We've gotten some great questions from our listeners that have been really thoughtful and exciting. So if you have questions, please reach out to us on Twitter or submit them through our show website where we have a form for your questions. Please send them through that way where we'd be happy to address them on the air or directly back an email but we have two questions this week that we want to cover Kelly, I'm going to give you the first one to handle because I think it's a really good one for beginners. Kelly Paredes: [00:00:00] Okay. So the first one we have is from Clark Scholten. He asks, do you use Python anchor charts in your classroom? I've created one for inequalities and one for [00:36:00] operations and need one for basic statements. So he was looking for ideas. Surprisingly enough, we do not really use anchor charts so much in the purpose of having a post or looking out around our room. Actually, we don't really have many posters around a room at all because all our room walls are all whiteboard paint. We tend to allow the kids just to write all over the walls. One of the things that I find completely useful and I've been using it. I stole it from the Finxster emails, were the cheat sheats. I got the idea from the Finxster websites and they're the python cheat sheets and I really liked how they were laid out with a keyword the explanation. We use that a lot with the students. I have them have an ongoing sort of Journal. Uhm I've tried it a couple ways with the notebook and with Google doc and the kids seem to like the Google Docs cause they don't leave it behind. I show them that I use a notebook and [00:37:00] what we do is we kind of draw pictures. We sketch note or we write out some of the code. That's anchor charts. That's a really interesting idea. We might have to look into that. Sean Tibor: [00:00:05] Yeah. I can definitely see having one of those in the classroom. That would really be helpful for the intended purpose. It's a visual anchor for the content that they use on a regular basis. I think what we'd like to do is maybe reflect on the kinds of questions we get most often the how do I do this? Or how do I do that? Maybe create one of our own anchor charts. So we'll have to look into that. That's a really great idea. Yeah, I think the one issue that we have is we've constantly been playing around with the curriculum and changing the way and allowing a more of a deeper exploration versus everyone on the same page. How do you teach variables? [00:00:10] So we'll have to figure out the basics and the must needs. That's a great idea. Our next question comes from Tom Harris, who's the teaching engineer on Twitter. Tom asks the concept of variables is foreign to new programmers. And in addition is handled differently in Python than in some [00:38:00] other languages. How do you introduce this fundamental topic to new students? And it's such a great question because we spend a lot of time talking about variables and we talk about them as memory. It's a way to have the computer remember things that you want it to and so we talk about them as placeholders, as labels. We use a lot of these terms to reflect the fact that it's a reference to something that the computers remembering for you. Python's a little bit different than other languages as Tom mentions because it's dynamically typed you can change variable types at any point that you want. And if they're compared you can get type errors. You can get all sorts of things that you may not see in statically typed languages. But what I found with Python is that in the beginning stages, we're mostly working with floats, ints, and strings. And so we talked about how we store those types of data back to variables so that we can reference them later in [00:39:00] our code and I don't have a great metaphor for this or great analogy other than it's a way to give a name to something that you want to remember later, kind of like putting a bookmark in something or saving that URL in your browser so that you can come back to it later. It's like putting a contact record in your phone. so mom's phone number is blah blah blah blah blah. That's the same thing as having a variable called moms_phone_number that I can refer back to later. So. We try to connect it to concepts that they use on a daily basis in their digital life that seems to work fairly. Well, I don't have a great answer for that other than just trying to find those things that seem to resonate with them. And if you do find something that connects and gets this idea of variables, please let us know because the challenging or tricky part for our students is that pretty much anything can be assigned to a variable. I have students that are assigning functions to variables and then they can't understand why that function or method can't [00:40:00] be called directly. So there's a lot of tricks to it in Python. What I found is the more consistent you are, the more you explain to them. Here's what you expected to see. Here's what you say what you actually saw here's how the difference happened between the two of them as you're working through that process with them. They start to understand how variables are used throughout their code. Kelly Paredes: [00:00:53] I like to always have them just read out whatever that line is in English. Uhm You especially see that when you have your double equal signs and versus your single equal sign and I thought that was a big breakthrough for the kids when I would say read this sentence out and what is it that we're saying? They would say name is. And then in by saying that I was like by saying name is what is that doing? And then they would say oh that's assigning that word name to whatever's after it or that that list is something and I think [00:41:00] for me having them say it in their kid language is what I always tell them kid language. How would you say this? What is it equal to or what is it versus what is it equal to and that kind of helped. Sean Tibor: [00:00:00] The analogy that I use the most is the one about remembering phone numbers and you can ask a student. What's your mom's phone number? If they don't have a cell phone they can probably tell you their mom's cell phone number because they've had to remember it. If they do have a cell phone, they don't know anybody's phone. Worse if I don't know anybody's phone numbers, but what I do know is I have their I have that person's contact record in my phone. I put the number in and now I don't have to remember the phone number anymore. It's the same concept as storing it in memory in the computer. I don't have to remember the value of that. I can store it to a variable and then I can update it whenever I want. I can refer back to it whenever I want. It's just a way to keep things in memory so that I don't have to remember [00:42:00] it or hard code it myself and we talked about all the benefits of using variables and reusing variables throughout your code. And this is where turtle comes to the rescue in a lot of ways. To use variables in your turtle code so that they can see how they can make changes and have it, completely uhh rewrite. They can make a change to a variable in turtle and see change the output of their code. Kelly Paredes: [00:00:05] Clark, I think I just found your next anchor chart. So we're going to have a phone list and you have your numbers. Maybe we can turn that into some sort of integer and then you can also have your notes in there. Maybe you can talk about having a string within that and so that would be a really nice anchor chart thinking of variables and that way. Sean Tibor: [00:00:12] Maybe it's something that's laminated they can write new Kelly Paredes: [00:00:15] Cross it out and change the number frequently. Yeah, that's a great idea. I'll also add in a resource I got from Paul Baumgarten. I'm sorry if I pronounce it wrong. [00:43:00] He showed me the Socrates videos and one of the videos explains uhm about the integers in the floats and the complex numbers. That's another way of using that in to explain variables. Sean Tibor: [00:00:04] So lots of really great resources out there. We're still working on the best way to teach that and explain it but so far a little bit of explanation with a lot of practice goes a long way. So that's the questions we have now. If you'd like to send in your own questions, if you'd like to contact us, or if you want to send us a longer email. You can find us at teachingpython.fm on the web. We're also at @teachingpython on Twitter. So, please feel free to reach out to us at any time. I think that's everything we have this week Kelly. Can you think of anything else that you wanted to mention? Kelly Paredes: [00:00:05] Not that I can think of? Sean Tibor: [00:00:07] All right. Well, then we'll sign off. So, this is Sean. Kelly Paredes: [00:00:09] This is Kelly Sean Tibor: [00:00:10] Signing off.