 is what happens when you push the button. And at this point, we also talked about variables, because here, what we need to do, in order to change the headline text when the button was pressed, we had to keep a hold of the headline object in order to change it later. And that was a really interesting discussion. But I think they got it. It was pretty easy. I was like, okay, well, we've got a headline. We said it originally, the first time we go through, we said it the hell of a world. But then, when you press the button, you need to still have that around, to still have a handle of that in order to be able to change it. So then, you know, it adds the button, you can push the button, very exciting. So then we did, the next step we did was we replaced the button with an event loop. And I thought that this would be really difficult for them to get, because we had not really been thinking about UI applications of having an event loop. But actually, they did that pretty quickly. So what we're doing here is we are setting these three variables to the mouse coordinates. So the first one tells you whether or not any buttons are pressed. Left and top tells you how far from the origin you are, where the mouse is. And so, by default, this animate block, I believe, runs every five or 10 times a second. So every five or 10, every, so five or 10 times a second, this animate block is being run. And what we're doing here is we're displaying what we're getting back from the mouse. And the hardest part about this was the string interpolation. And I've played around with different ways of doing it, right, so this is essentially a magic incantation. You're like quotes, hash, bracket, at button. Okay, I'll take your word for it. And here's what it looks like when you run it. And when you move the mouse around, it actually updates the numbers at the top, right? And so, I thought about, I don't like that. I don't like having the sort of magic incantation in that line, but I think it's very valuable for them to see what exactly the mouse method is returning to them, right, and what does that mean? So like, if you have your mouse down in this application or rather if you don't have your mouse down and it'll say zero, you have one mouse button down and it'll say one, you have the right mouse button down if it says two. So they were able to actually play with it at this point. They could interact with it, they could move their mouse around and the numbers would change, they could push the buttons and the first number changed and they got this idea, okay, so this loop is actually being called multiple times a minute and it's updating itself. And I was surprised actually that that was pretty easy for them to pick up. So the next thing we did was we changed what happened in the animate loop. And what we're doing here is we're drawing a line between zero, zero and the value of left and top. And I did this step because I wanted to, you know, these are incoming seniors. They had enough math to have sort of XY coordinate in their math classes, or 2D coordinates rather. And so what this does is when you move your mouse over the window, it draws a line between where your mouse is and the origin. And so this really drove home like that, you know, that's the origin up there. That's zero, zero and you're drawing a line between that and where your mouse is. And you can also see, one of the other things that we tried at this point was we did, you can pass the animate loop a parameter that tells it how often to update. So if you don't pass any parameter, it just does the default, which is not super, it doesn't have super high fidelity, but you know, it has a number, a larger number and it'll have a much more smooth animation as you're moving your mouse across. So the next thing we did was we said, okay, well actually I really don't want it to draw unless the mouse button is down. So we changed it so that if no mouse button is down, it doesn't do anything. It only draws the line if the mouse button is down. And that meant that they could draw, you know, they could control where the lines were drawn in the window. And so that meant that you could make little shapes. And the next thing, and I thought this would take a long time but I was surprised again that this actually did not. We kept track of our previous location and we drew, instead of drawing from zero, zero to our current location, we drew from our previous location to our current location. And this was like the magic step that made it actually an interesting and useful program. Because at that point, then you can draw whatever you want because it only draws when the mouse is down and it draws from your previous location to your current location. And again, here we talked about, we talked about variables and how we need to hold on to our previous version so that we can draw from that to where we are now. And they already had this idea of, okay, this is running multiple times a second, right? So each time it's being updated with the new coordinates as if we keep the old ones around, then we can do that drawing. And so the last thing we did was we added a clear button so they didn't have to quit the application and restart in order to do it again. And this was pretty straightforward, we already done buttons. So we just redrew the background and redrew a headline, which is pretty straightforward I think. And at all of these different steps, some of the girls went faster than the others, of course. And so there were some girls who actually did a lot of experimentation. So like in the step where we're drawing from 00 to our current location, some girls experimented with different origins so that they could draw stars. You know, an origin of like 50, 50 and then you could draw like this little sun starburst rather than just a set of lines. And one of the girls actually figured out how to get a color picker up for the background color. This shoe's manual is actually really good. And a color picker is one of the things that's built in so you can just say, instead of saying background carry, you can say background color picker. And every time it runs that it'll, well, you don't want to put it probably there, but it'll run and it'll just pop up a little color picker which is like Photoshop, so you pick the color you want, click on it, it comes back and it changes the background to that color. So there was a lot of room for experimentation here, which was, I think, key. And so that's the last, so I wanted to talk a little bit about why I think this was successful and how you could apply this to whatever you're working on, whatever set of kids you're thinking about teaching. I think one of the things that made it really successful was the Ruby language itself. I think the Ruby language is a great first language. It's very easy to understand relative to something like Java. There's not as much punctuation involved. There's not a whole lot of gotchas, I think, sometimes the way that other languages have. And I think about this sort of like, there's a lot of small A agile principles that are essentially very similar to this. So what I think about this as is choosing the right tool for the job, right? There are tons of different ways to teach kids how to program. There are lots of different environments. Most of them are either too close to sort of what I think of as real programming, and therefore it's too much of a jump, or they're too far away from it. And I think that Ruby, in this case, with the ages of the kids that I had, was a good tool for the job. Second, it is visual. And I've actually seen this with mixed gender groups as well, and this was a group of girls. So I think they were particularly attractive, perhaps, to the color changes and things like that. But I think having something visual was really key. We had talked about, when we first started the class, I talked a little bit about, okay, what is Ruby? Why would you want to use it? And we talked about, okay, what's a web application? Who knows what a web application is? Nobody raised their hand. I'm like, okay, so who uses MySpace? They were like, everybody uses MySpace. So it was, they had this, and I was like, okay, so you could use Ruby to write something like MySpace. They were like, awesome, let's do that. I was like, but you can't do it in three hours. They were like. They were like. So I told them, okay, next year, if they give me a whole day, I'll try it. Maybe Sinatra. But I think that having something visual and having something that you can see as you're working on it was key. And I think of that similar way of way, I think of frequent deployment, right? You're like, okay, we finished something. Let's put it out there. Let's see how it reacts. And being able to look at it and interact with it. Rather than doing something like the Java class we had done where it was all like, let's write a post-fix calculator, you know? I mean, it's not that exciting. It's not, it doesn't have that same like visceral feedback. I broke it down into really small steps. And I know that each one kind of probably felt like, oh, that's all we're doing. We're just adding some attributes. But each step to a new programmer is kind of a big deal, right? Each step is a different set of things that you're doing. And so giving them things that were achievable and provided, again, the visual feedback of something changing was keeping them off of Facebook. And I think about that the same way I think of short literations, right? And especially that meant that I could do a bunch of visual stuff that I hadn't been planning to do because I was like, oh, okay, well, they love that. Let's do more of that. And so I think about that kind of the same way. And it was flexible, again. Similar idea, but you don't want to go in there with a set of like, okay, first we will learn this and then we will learn that and then we will learn this third thing. Because each group of kids you get every time is gonna be different. Each group of kids you work with is gonna be different. And so you need to be able to go in there and be like, okay, so if they wanna learn about color, we'll go off and learn about RGB. Sure, why not? Which is I think of similarly the customer interaction. So for younger kids, I think this worked really well for the age group that I had, which was older high school kids. For younger kids, Sarah Ellen has done work teaching shoes with late elementary school slash middle school students. And again, they did a lot of stuff using colors. They did a lot of RGB stuff. I think Sarah at one point brought in a flashlight with little gels so that we could mix the colors together and see what it looked like. And she's written a couple of blog posts about that and about how she did the classes with, I believe it was fourth and fifth graders. In the non-Ruby realm for even younger kids, there's actually nothing I could find that's based on Ruby that's good for like really young kids. But Scratch is a visual framework for programming from MIT, which is actually really awesome. You can learn some pretty sophisticated things and it's all drag and drop, and it's pretty easy. Yeah. I mean, check out Alice. Alice I think is good for older kids. I don't think it's good for really young kids. And the question is just about Alice. I like Alice especially because it's so visual. I like the storytelling aspect as well. Yeah, there's some really neat things about it. One of the things that I didn't like about it so much, I like to try and work with frameworks that are kind of like at least have some tangential relation to something you could actually use in the real world. And I like Alice, but I think I would prefer to use something that's based on Ruby if I can in many ways. Yeah. I want to stop that while I build a Hackety hack or something. I don't know if he obtained to do it works, but I think he was working something for his work. Well, yeah, the question is about Hackety hack. I believe that Shoes was originally written as a basis for Hackety hack. That was the reason Shoes was written. Hackety hack was intended to be an environment for learning on a program, but it never actually quite got finished. I believe there are people working on it. Yeah. I had to try Hackety hack with my kids and this was a couple years back. I think Shoes came after it because Hackety hack was like kind of a browser based approach and it just didn't work really well and we decided we needed to do great work. Okay, maybe Shoes was gonna be the basis for Hackety hack too well or something. Yeah. I know that a conference in Pittsburgh in March and then was indefinitely about to be released to everybody the next day, but never. Never actually quite made it. It was really awesome. I had to work for like, within 30 minutes, why went from teaching kids on a program with a, what was it, a live auto? Yeah, auto harp. And then again in this class, this kid who was never forgotten before has made this thing that plays the Mario song. Oh cool. Using Loupsophone, it's also built. Yeah. That's cool. Sorry, I'm not gonna dominate here. But another very interesting thing that he did which I think I would use in any classroom setting was he had set up something where on the projector he had basically a four by four grid of squares and each color was some random thing but you from your Hackety hack program could connect to it and change, programmatically change the colors on the screen and everybody was affecting the same thing. Oh, that's cool. So people could write programs like dominate the screen or combat somebody else or just make an all crazy color or whatever. Like better than Facebook, because now you're writing the like social network. Yeah. Very interactive. But you're still talking about the classroom. So the question just to repeat it for people that couldn't hear it is that there was a, when, why did his presentation in Pittsburgh is what you're talking about? They had a four by four screen grid up on the screen and the kids could all connect and change, programmatically change the colors of each of the squares and so then you could get at fights or you could try and change the different colors faster than someone else. And I think that if I were gonna, if I had more time, it would be awesome to try and do something with the social networking component because obviously they were, they were super into that. They all used Facebook, they all used MySpace and they were all disappointed that we couldn't write Facebook in three hours. Even with Rails, maybe not. But yeah, go ahead. This is a question about very young children that are learning some of the ideas behind computers. Have you done anything that didn't actually involve computers? So the question is for very young kids to learn the principles behind computers whether I've done something that actually doesn't involve computers at all. I have it, I have a four year old daughter and what, and obviously she's still learning to read. She can pick out individual letters she can't actually read yet so no programming for her at this point. But she does have an exo laptop. Any of you are familiar with them? They were the OLTC One Laptop for Child. They're green, they got little antennas, she loves it. And they've got a bunch of stuff on there. It's all Python based, sadly, but it's still pretty cool. And there's some logo, there's a logo, sort of logo-ish turtle thing where you can go and she likes to do that kind of stuff. They have a, there's a particular thing you can do where you can, you know, it's essentially like learning how to use the mouse, learning how to hit particular keys and stuff like that. So it's not really sort of theoretical stuff behind computers, but I think that that is a good, I think it's a good introduction. And a lot of the stuff in the exo operating system which is called Sugar, which might be interesting, you can download it and actually run it inside of another operating system. It's a variation of Linux and it's, they don't use a whole lot of words. So it's designed to be multi, or designed to be accessible to anyone no matter what language they speak. So it's all very pictorial. And my daughter, who is not reading yet, can go on her exo and can pick out the game she wants to play, which I don't even remember what it's called, but it's one of these games where, you know, you've got this stack of colors and you need to click on the ones that are more than three and they'll disappear and it'll collapse the ones down. Your goal is to try and get rid of all of them by getting more than three of each color together. And she can do it, she loves it. If you win, if you actually make them all disappear, you get a happy face. And so, you know, I think that for really young kids who maybe aren't even at the point where they can read, there are some things you can do. But, and she, I think she's got the idea that like she could change this if she wanted to. We've talked about it, but I don't know if there's actually an environment that would let her do a whole lot of actual hacking at this point. Yeah. Yeah, it's not really, but you ever play with sweet, sweet new toys at all? I've played with it, it has, so Scratch has a very similar approach. The 917 Scratch. And I think it's a little cleaner, it's a little better done than Squeak. I think it's the same idea though. So I check out Scratch. Sort of, the new toys on the exo is the same as the new toys on the Sweet. Oh, is it? Yeah. Cool. Yeah. What was your biggest stumbling block in terms of understanding? Stepping through those examples of other points where you had trouble explaining things? So the question was, what's the biggest stumbling block in terms of understanding? I would say it was, one of the things we did have some trouble with was strings and non-strings. So the idea that within quotation marks, you can say whatever you want. It's a string, it's a literal. Or outside of the quotation marks, they're very picky about what is outside of the quotation marks. So I think in general dealing with the difference between strings and commands, and also kind of in that vein, you know, why do some words have an at symbol in front of them? Why do some words have a colon in front of them? You know, most adults who do Ruby don't really understand symbols. So it's a little bit of a stretch. She explained it to me in the first place. So, and that was a lot of, you know, and we did get some kids who were asking those kinds of questions, which was actually really awesome for me, because it meant that they were actually engaged and they were looking at it and they were trying to figure out like, why is this different from that? Sorry? Just tell them Matt's was bit by a camel. Matt's was bit by a camel, he said. Yeah. So I used to teach computer science with Ruby and if you're interested in teaching, the one most important thing, like kind of teaching in a box, is to just learn about gradual release of responsibility. If you have a longer term instruction, you know, very obviously in half a day you can only do so much. But if you're looking at years or months or a semester, look at gradual release of responsibility in both your daily context and in your kind of unit context. Just the model of, I do, so you, the student are observing me, that we do, we're doing it together, and then you do, and if you like leave that into all your work, then you can have successful learners. So the question, or the comment was gradual release of responsibility as a teaching principle, which I haven't actually heard of before. And it goes from I do and you're observing me, to we do, we do it together, to you do, and you do it on your own. And I think we actually managed to incorporate that even at a very small level, right? Because what would happen is that I would, we would say, okay, so the next step is we're gonna add a button. I would bring up NoCAD, I would write out the code that does a button. And then we'd wander around, I had a couple of TAs, we would go around and make sure that all the girls were doing it themselves and entering this perspective and understanding what they were doing. And then usually, then there would be a couple of girls who finished early and would go off and do things on their own, which would be, I guess, the third step of that. So that's an interesting point, though, thank you. Yeah. What kind of a student's nature ratio would you recommend for those, how many TAs did you have? We had, I had 20 girls and I had two TAs. I would have liked to have one more. So I think, what is that? One for four, one for four, one for five, something like that. That seemed to work pretty well. We were just a little bit stretched. Yeah, yeah. You said in the beginning, if you're talking with it, and your intent going into this was not necessarily to teach them how to be fantastic professional programmers, but rather to get them very enthusiastic about the material so that they can go ahead and continue that. And I know, as we've developed this, we can give a talk at a code camp and get some dotnet. They'll be really excited for 50 minutes, you know, 50 minutes, and they go home and forget about it. Right. How do you, what did you send, and I think, you know, when the kids were installing, you know, shoes, maybe a roadblock, you know, let alone just the initiative to do it, what do you send the kids home with? How do you maintain their excitement? And, you know, I mean, obviously, there are limitations to what you can do, but I mean, did you incorporate anything or do you have any recommendations for continuing people's excitement beyond the scope of what you were able to teach them at that period? So the question was, whether there was anything that I did to sort of get them excited about it and then send them off with something they could actually use at the end of it and keep the momentum going. I didn't have a chance to do it with this group, but my recommendation for next year, if I could figure out how to do it, is I would like to get a thumb drive for each girl, and they're pretty cheap these days, right? Get everything installed on that, and then give that to them and they can take it home. Rather than having to install stuff and put it on the desktop and do this and that, I would like to have everything contained within a little drive that I could just take with them and plug in anywhere, you know, even if the wherever they are, school, computer lab, for example, doesn't allow them to install stuff and they can still work on it. So that would be my recommendation. And the other thing that I would have liked to do and didn't get a chance to do was handouts with challenge exercises, right? So like beyond for each step, right? So at each step, you're like, okay, so here's what we're gonna do. We're gonna add this button. And then if you finish that, you can also try, you know, that kind of stuff because there was definitely a need for that for some of the girls that were mobile faster than the others. And that would also work as part of the take home stuff too because even if you didn't get them, get them in class, if you thought it was interesting, you could try them at home. So that would be my recommendation, yeah. Also, like in terms of a kind of curriculum type thing, the Chris Pine will learn to program is awesome. It's really excellent. So it's what I used to use as a textbook and along the lines of, I'm sorry, Chris Pine. Chris Pine learned to program. You can get the first edition free online as a PDF on the author's website. It's a really small book, good for kids to carry. And then kind of what you're saying about handouts and so forth, if anybody's interested for that book, I have all my labs that I wrote. I'm happy to get to anybody that are kind of more like academically structured than just exercises in a book. Cool. So Jeff has some exercises related to the Chris Pine book that you can share. What's the best or ediest way to get involved with a group? I mean, are schools pretty open to this or do you go to summer school? It depends a lot on the school, I think. And if you, I mean, whatever school your kid's in, it's probably gonna be the most receptive one. Or if you have a family friend or an instance of nephews and they'll have you. I've found that the schools in San Francisco are actually pretty receptive. They're open to the idea of programming and something that's becoming more important. And they're actually usually pretty willing to accept help from people who are willing to give them their time for free. There are summer camps of things. There are dozens and dozens of summer camps that people pay to go to. The one that I was volunteering at is actually, it's all volunteer and it's all free for the girls and it's all donation driven. But there are lots of summer camps out there. And for me, it was just kind of, learning how to teach programming to kids is one of those things that I thought, yeah, that would be awesome, I wonder how I do that. And it just came up, I was kind of looking forward and I wasn't really looking forward against it. But it just ended itself. What was the result? Okay. And so if anyone else has suggestions for how to get started, I have to find groups to work with. Yeah. Well, there's two. If you have a child, your teacher is definitely gonna be receptive and especially if you start younger. Yeah. Los Angeles, a lot of the magnet schools are very open to parents involvement, particularly if you have specialized skills, 3D animation, software development. Something that we're trying to put together in LA right now is a one day event where we're gonna try and invite kids from a couple of the different magnet schools. So that's kind of the approach that we're taking. We're pretty early in the development. Yeah, I know in San Francisco there's, Sarah Allen is working with a couple of teachers in at the middle school level, I believe, to put together some kind of curriculum for people to implement in middle school in San Francisco. Yeah. For giving girls involved specifically, there are a few good advocacy groups you can reach out to. So there's She's Geeky, or Women Who Tech, or Dev Chicks, are all organizations of women interested in helping young women become programmers. So that's what we'll be able to reach out to. Also an Asian Women's Society of Women Engineers working with Girl Scouts throughout the country. Yeah, I mean, the Get Set program is run by the Society of Women Engineers in Silicon Valley and there's an organization called AAW American Association of University Women. They run a bunch of summer camps around the Bay Area called Tech Trek, I believe, which does very similar stuff to Get Set. It's all scholarship-driven. And there's the Sally Ride Science Foundation, which does some stuff related to programming and sort of a general science curriculum that they do for summer camps. So there's a lot of groups out there that are doing similar things. And the biggest challenge is that the general school is gonna be in the machines. So be prepared, you might need one day of IT volunteering and then one day of instruction. You're not gonna walk into a lab that has 20 functioning machines. I agree. Yeah, this is pretty... Something like the Boothis, anything like that, it is a good plan. Yeah, definitely bring live CDs and some back up. My daughter's in Girl Scouts and they're going the Lego lead. And so they're using the visual Lego programming tools to me it's not really real programming that they're doing, but it really has her interest in it's gotten her so that she wants to learn to program and stuff. Cool. I think that's a really good step too. It kind of drives the interactivity just like the shoes does just on a more physical level. Is that like the Lego Mindstorms? Yeah, exactly. Yeah. So Lego Mindstorms are another sort of avenue we need for a lot of things, I think. Any other questions? Do I have anything else? Are your slides up or online somewhere? They're good. Yes, right there. There they are. And I'm on Twitter and email me and I'm interested to hear about any similar projects you're doing in other places. Maybe we could share some resources. Thanks. Yeah. I would like to start with Chris, why you wouldn't string interpolation rather than string addition for the... Because those are numbers. So you can't do plus with the string. So you have to call 2S on them. You have to call...