- Podcasts
- Talk Python To Me
- #184: Teaching Python with BBC micro:bit
#184: Teaching Python with BBC micro:bit
Talk Python To Me
- November 2, 2018
- 1 h 8 min
- Episode 184
About this episodeSee the full show notes for this episode on the website at talkpython.fm/184
Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
#184: Teaching Python with BBC micro:bit
How can we make learning Python and teaching Python more real for students, especially younger students? The BBC in the UK had a great idea. Make it more physically real with actual devices. That's where Nicholas Tolerwey got involved. He helped bring the BBC, Microbit, and Python to millions of kids in the UK. Join me to hear a story on this, episode 184 of Talk Python To Me, recorded October 12, 2018.
Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via at Talk Python. Nicholas, welcome to Talk Python.
Thank you. Good to be here. Yeah, it's great to have you here. We've been trying for a long time. And finally, after, you know, summer vacations and all sorts of traveling, we've managed to get together here on the show. Yeah, it's going to be good. I'm looking forward to this. Yeah, so am I. It's going to be a lot of fun. Now, we're going to talk about teaching and education and IoT and Python and all sorts of cool stuff you've been involved in. But before we get into that, let's start with your story. How do you get into programming in Python?
So a long time ago, perhaps not in a galaxy far, far away. When I was a child, I grew up in the 80s. And every school in the UK was given an 8-bit computer for the BBC Micro. And my dad was a head teacher, a school principal. And one school holiday, he brought this machine home to try and figure out how am I going to use this in school. And it took about half an hour for my brother and I to grasp it from his hands and take over and do the, you know, print, you are an idiot, go to line 20 type stuff.
Yeah, yeah. My brother is an idiot or, you know, some other insult you can inflict on your siblings. Yeah, it's funny enough, Andrew, my brother, he's also a programmer. It can't have been that bad. But the point I'm trying to make is that as kids, we had computers around. And then when I was, I don't know, 12 or 13, I started doing music stuff and ended up being a professional musician for a while.
And that was actually as a .NET developer. And I ended up working in an investment bank in London. And I worked with a whole bunch of quants who wanted to script the tool that I had written for them. And you're like, hey, maybe we'll just teach them all C-sharp. No, maybe not. No, exactly. Oh, man. These are very, very clever people, these quants.
But it was around this time that Iron Python was coming out. And so in my naive sort of way, I typed in scripting language for the common language runtime, and Iron Python came out on top. And I ended up going to the very first PyCon UK in 2007 at that time. And I was welcomed by a rather jolly gentleman called John Pinner, who sadly passed away now.
Totally agree with that statement. Yeah, exactly. And so I had saved up some money, and I took some time off, and I started to reimplement a website that I'd done in .NET, in ASP.NET, in Django. And I found that within about three weeks, I was more productive in Python and Django than I was as a sort of expert level C-sharp developer.
And the rest, as they say, is history. I started again at the bottom of the program, a stack as a junior Python developer. And since then, I've been working mainly in Python as my full-time freelance job. Yeah, that's a great success story. I do want to dig into that just a little bit because I've gone through the same experience myself where I was at a hyper-expert level in one technology, not Python.
And I said, but I kind of like Python more. Yeah. So you have to decide, do I want to go back to being this kind of newbie that doesn't really know things all that well? And, you know, not just in my knowledge, but in my maybe career position and things like that. Like, that is a scary place to be because once you get high in some technical ability, you're like, well, this is kind of working.
And in terms of jobs, that's probably the least secure job you could possibly ever have. But anything else sounds better. And I guess the outlook and the attitudes that I developed as a student musician or a freelance musician when I was starting up my music career, you are literally living for your art, as it were, rather than making an awful lot of money.
Anything else feels good. And I knew that, well, what's the worst that can happen? I tried Python for a few months and it doesn't work out. I can become another C-sharp developer doing more bank-related boring stuff. Yeah. Yeah. That's a super attitude just to say, like, okay, what is the worst failure position?
The failure position is I'm where I am. So if the worst case scenario is I just keep doing this, like, why don't I try for something I'd rather do, right? Yeah. So, excellent. Yeah. I'm happy to chat with that about it. That's really cool. But the point is that we're in a very privileged position as software developers.
Yes. The skills that we have are relatively rare and people are prepared to pay us plenty of money to do this sort of thing. So it's definitely a developer's market. And so for anybody thinking, well, should I make that jump and go do that thing in startup land if I'm in enterprise land, if it were, totally go for it.
Because, like you said, the landing position is always, well, I did that for six months. I'll just go back to doing, you know, I'll phone up my old boss to see if he still wants me. You know, that sort of thing. Chances are they do, right? Chances are they do. Exactly. You know, that's very different than saying I have a, you know, first string position at the London Symphony Harmonica and I want to try becoming a professional runner.
Right? Like that would be a very different thing to quit upon, right? Yeah, exactly. So it's got to keep it in context. But yeah, awesome. I guess one more question before we get to the main topic is, you know, what do you do? You said you do consulting now. What do you do day to day just to give people a concept of where you're coming from?
Okay. So I guess I feel old for maybe over a decade now. I've been a freelance Python programmer. I'm starting out as a sort of a junior freelancer and now I tend to work in senior type position. I will do a, what I call a gig for a few months for a client. And sometimes I'll save enough money up to be able to take a couple of months off and I can work on personal projects.
Working remotely on some Python project that they have. So what I like about this job is that I have flexibility because I'm my own boss. So I don't have to ask permission if I want to go to Python, for example. I can just go. Yeah, just go. So I'm going to enjoy this. But I also get to work with a real diversity of industry as well.
It's really a special place to be because so many people in their jobs, they're at a company for five or ten years and they see that world, right? But as a person, as a consultant or as a trainer, I had a lot of similar experiences doing in-person training. Yeah. You, every week or every month, there's a different experience.
And it really gives you, I think, a broader view of the software industry. Oh, I totally agree with you there. I think to begin with, it feels frightening, a little bit scary because you're always just a little bit out of your comfort zone. Yeah. You know, you always, you know, if you're established in the company, you kind of know, who do I need to ask about this?
I'll just ask Bob. He knows. You've established your network in that company, whereas this sort of stuff, you don't know who Bob is. And you're kind of treading water a little bit. But at the same time, that's kind of exciting. And I like that. Yeah. And with the life of a musician, at least I've got a job.
They see also the stuff that we were just talking about. But it's a highly desired skill set for people. So I found that if I said, hey, I'm going to be running a course for beginner Python programming over the next eight weeks, which is something I'm doing at the moment, that course sold out in terms of places in about four hours.
And that was just word of mouth is me tweeting. So getting people motivated to learn to program is not a problem. I guess one of the damaging aspects of the stereotypes that programmers, the stereotypes associated with programmers is that people tend to think that this is going to be highly mathematical.
You need to be a particular sort of, how can I put it, loner type mentality. You know, like the loner genius, the kid who could totally just nail the homework, but was kind of awkward. So just stayed behind the computer. That view is not necessarily. Someone like that. Yeah. And you and I, and I guess listeners of the podcast will know that that is completely not the case.
But if you're not part of the programming world, it's hard to see that. So people, and again, this resonates with this work that I was doing yesterday with beginner programmers, is getting them to realize that this could be me as a programmer. There's a place for me here, and I might not fit the Hollywood stereotype of the lone, socially awkward, genius loner who sits with a hoodie over his head in a dark corner typing furiously all day.
Typically in green, on a green terminal. Exactly. Exactly. And things like, you know, I've bypassed the firewall to the mainframe. Oh, it's a joke. It really is. But if that's all you know about programming, then it can be a very intimidating place to come to. So a large part of what I try to do at the beginning is help people understand that it's rather like fun problem solving.
You know, if you enjoy Sudoku, for example, you might enjoy programming. It's also about being expressive. You know, we talk about having beautiful code, especially in the Python community, the Zen of Python and things. And so there are lots more ways than just the Hollywood hacker stereotype to get into programming.
You can be a different sort of programmer. That's okay. Absolutely. And I think that's a really important thing. And it sounds like from your microbit stuff that actually that was one of the big takeaways. I thought that was really interesting. And we'll get to that in a moment. But did you actually teach Python in school or when you were a teacher, what were you teaching?
Okay. So I did what many musicians who are out of work do, and that is they go and teach music. Okay. I went through in the UK, you have to go through additional training to be allowed to be. I'm sure it's the same in the US because you need to prove that, you know, you're both competent and not a danger to children for a start.
So we have a thing called a PGCE, Postgraduate Statistical Education, which makes you a qualified teacher. And when you have done a year's worth of teaching and been assessed as being good, so basically you've got two years. You've got the training itself and then what's called the NQT years, a newly qualified teacher year.
When you've gone through that training and they're a useful teacher, then you can become a proper teacher in the UK. So I went through all of that training. And my first job was as a secondary head of a music department. So I was teaching at what I guess in the US you would call the upper years of junior high and senior high.
In the UK, we only have primary and secondary, and they change over when kids turn 11 years old. So I was teaching 11 to 18-year-old music. I enjoyed that an awful lot, although it's probably the most challenging job I've ever had to do. Because not only were the kids sometimes a challenge, because I was generally teaching it in inner city schools at the wrong end of town, if you see what I mean.
But, you know, there's all the marking and the bureaucracy and all the other stuff that goes with teaching. So I've done a lot of classroom teaching. I've done adult education in terms of music as well. And I've also done some sort of music therapy, I guess you would call it. I was working with little kids, so five, six, seven-year-olds in primary school, helping them to learn how to compose at their level.
I mean, you know, they weren't churning out Mozart or something like that. But it's something fun for them to do. So in terms of music education, I did a lot of that all the way through my 20s, really. And then the switch came over when my children arrived. This portion of Talk Python To Me was brought to you by Datadog.
Get insights into your Python applications and infrastructures with Datadog's fully integrated platform. Debug and optimize your code by tracing requests across web servers, databases, and services in your environment. Then correlate and pivot between distributed request traces, metrics, and logs to troubleshoot issues without switching tools or contexts.
Okay. Say it different. Ah, okay. So here's – this is a really interesting thing. Whenever I've been on the receiving end of programming education, or I've been on coding courses or sent on a course by an employer, it's always been very traditional chalk and talk type stuff. Somebody stands at the front.
They have their deck of slides. And the very worst are basically PowerPoint karaoke. And some of the good ones are I'm going to talk a bit. You might be able to ask questions. Then we'll do a practical session and rinse and repeat. Now, in music education, we've been doing music education for 500 years in the kind of Western classical tradition.
And that's enough time for there to be a reformation and a counter-reformation and a revolution. And then, you know, some guy called Suzuki in Japan says, this is all wrong. We've got to do it this way. But we've got so many schools of thought about how to do music education that have been around for literally hundreds of years.
One of my textbooks when I was at music college was 300 years old. I had to write counterpoint. So we still, these techniques have been established. We're still using, we've been programming, what, 50 years? Yeah. Let alone, we're only just starting to think about, well, how do we teach programming?
So what I've been doing very recently, and it's been a rich vein of creativity for me in terms of my practice as an educator, is I think to myself, well, first of all, I thought to myself, what if we taught music like we teach programming? That was such a terrible thought, but I quickly switched the question around.
I said, well, what happens if we teach programming using some of the techniques that we use for music education? Now, there are some similarities because music, you're reading and manipulating symbols all the time. You're also practicing a skill that takes a long time to actually develop enough so that you actually sound any good.
And the same with programming. That's similar, yeah, similar to programming, right? Like, you might get Hello World working, but if you can, you know, put together a well-tuned web app, that's a very different, that's a long way down the path, right? Exactly. And so, hey, do you know the how to draw an owl means?
So it's how to draw an owl. First, start with two circles, and then the second box is draw the rest of the down owl. And that's how programming education is. You've got huge numbers of resources that are draw two circles. And then you have Stack Overflow and all the places where you and I as professional developers might go to learn about a new API or try and fix the bug.
And that's a professional level, and there's nothing in between. Whereas what the music world has managed to do over this sort of 500 years is bridge that gap. And so, like I said, this is a rich theme of inspiration for me to think, well, what techniques can we transplant from the world of music into programming education?
But we'll probably come on to that later on, actually, when we talk about code grades, because that's very much to do with that. Yeah, that's a very interesting concept. You're right that it's so new. I mean, 50 years is really not that long, right? So compared to the history of music or mathematics or philosophy or whatever.
Yeah, we're at the cuneiform play tablet stage. You know, I'd love to see what a program is. We're etching in stone. Yeah, exactly. I mean, but can you imagine from that, we have Shakespeare, you know, but it's a long term thing. And it's easy for us to forget how short a time we've been doing this.
We've not had the equivalent of a revolution in programming where they've just thrown away everything. Or do you know what I mean? It's just we're doing it long enough. For sure. So one of the things I think can make programming hard is it's relatively abstract. Yeah. I say relative because compared to, say, like a math proof, like programming is super concrete.
So I guess that brings us to the BBC micro bit. You want to tell us about that? Yeah. So I mentioned the BBC micro when I was a kid. And it holds. That was a computer, right? That was a big beige box that bleeped at you. And it cost like, well, the equivalent of thousands of pounds in today's money.
And that holds a special place in lots of British geeks' hearts. And the BBC could see that with the change in the computing curriculum in the UK, with things like Raspberry Pi and computing at school and all the other things that were going on in the UK, that this is an opportunity for them to make another contribution.
But they wanted to make a contribution that was relevant for today. And so the micro bit being a small Internet of Things type device with some, which has a couple of buttons. It has a five by five LED display. It's got a little radio. It's got an accelerometer and a compass like a mobile phone and GPIO pins so you can plug things into it as well.
So they came up with this crazy idea that if we made a device that was cheap enough, instead of giving one to every school, we could give one to every 11 and 12 year old in the UK, which is about a million kids, really. Towards the end of 2015, the BBC announced that they were going to be doing some sort of computing project, computing and education.
And it mentioned Python in the blurb that they sent out. And they were looking like, what is this? Yeah, they're looking for partners. Now, I'm a PSS fellow. And at that time, because I've been doing a lot of work in Python and education in the education track in Python UK, lots of people got in touch with me and said, what's this Python thing?
Have you anything to do with this? And I wasn't. But I knew somebody at the BBC who was. So tapping some back channels, as it were, he wouldn't reveal to me what was going on. But he said, you should totally get involved. And so with the blessing of the PSS board, I applied for the Python Software Foundation to be a partner in this project.
And fools, they said yes. So this is how the Python community, especially in the UK, got involved. And initially, what we were tasked to do was provide Python learning resources, which, for me, I was thinking, well, I know plenty of teachers who teach Python. I know plenty of Python people who also teach.
This is going to be a jolly weekend sometime where we can all sit down. We'll knock this out by next week. It's all good. Yeah, yeah, exactly. This is classic how hard can it be type thought that it's dangerous. And so the BBC were set up for us to do this. And we were all involved with the meetings so that we could see as an educational partner what was coming.
And I was like, well, you realize that we're all volunteers for a start. Python is a volunteer-led community. And so they said, well, could you try it? I said, well, let me have a look. And their idea was for us to build a version of Python on top of a Microsoft technology called PXT, which Microsoft were still building at the time.
And essentially, the way it would work was we would emit a JSON-based abstract syntax tree that we would post somewhere. This would get compiled. And then a hex file would be returned back to the user. And they would drop that onto their micro bit and see their code run. And I remember a weekend, there was about five of us looked at this code and decided that we didn't have the time.
Oh, wow. Small world. Yeah, exactly. Damien was living in the UK, in Cambridge at the time. And so I had a little bit of a kerfuffle with the BBC where I basically said, look, you should use MicroPython. And they were like, no, we want to use the Microsoft stuff. And I said, well, no, MicroPython will let you do this stuff.
And eventually they let Damien sign the NDA that was needed. And Johnny posted the development board through Damien's letterbox. And a week later, Damien had it running. He had a REPL. And you could make LEDs blink. And it would detect button presses. And at that moment, I have to admit, I did a kind of little happy dance because I knew.
The second B is for broadcasting, right? Like, why are they trying to make these social contributions? It's good that they are. Yeah. But where does that fit in? Oh, man, you're going to love this. It's going to be all very Game of Thrones. It's because we have a queen. And she issues royal charters.
And the royal charter for the British Broadcasting Corporation, which comes up every seven or eight year, part of the charter, it says that the BBC is supposed to inform, educate, and entertain. And this fits in educate. Right. Okay. So, however, the BBC has to be very careful. And they have been on the receiving end of various legal challenges where if the BBC turn up and say, if we're going to do educational resources, computing, then everybody who...
Every private company in the UK who does computing resources is going to be... Yeah. Yeah. You're undercutting us, all right? Yeah. You're killing our business, right? Yeah. Yeah. So this is why the BBC acted as the umbrella organization. And it was the partners, actually, who delivered the microbit itself.
But people who are listening, if they're a teacher or if they're a student or somehow interacting with, you know, even a university, school district, whatever, you can go get these. Right? I could go to newegg.com or somewhere like that and buy them for, you know, 25 pounds, 20 pounds, something like that.
Yeah. Yeah, exactly. So, I don't know. Visit somewhere like Adafruit and they'll sell you a kit. You can also get them in classroom bundles as well. So, if you teach, you can get a group of 30 or you could just buy hundreds of them all at once. And the microbit website has a browser-based Python editor.
It also has a kind of a blocks-based thing, which is what Microsoft PXT turned into. And so, they make it very easy for kids to sit down. You plug the thing via a USB cable into your laptop or school computer. You use the browser-based editor. You get what's called a hex file. You drag that onto the device.
She was quite young. First or second grade. Yeah. Something like this. And almost every kid in first or second grade was able to just completely build something meaningful for them within an hour in that little environment, which I thought was amazing. So, what she probably used was something called Scratch?
Yes. I think it was maybe it was on the Grok learning platform. I think the hour of code thing. So, it may have been Scratch. I think it was Scratch-like, but I don't think it was actually Scratch. I don't remember what it's called. Yeah. So, I know the folks at Grok and they use the same block-based library that Scratch uses.
But, yeah. So, you might be asking yourself, well, where do I, how do I get a block-based editor for Python on a microbit? Well, here's a cute story. There's a 13-year-old kid in the north of England, in a place called Preston, which is just north of Manchester, called Josh. And he has created a coding environment for kids because he's a kid and the stuff that he was being given at school wasn't meeting his expectations.
Yeah. Yeah. So, and this is the other thing. Josh is a great presenter as well. So, it was a kind of a vindication of the efforts of investment that's happening in the U.K. that even only this few number of years after we started concentrating on getting computing properly on the curriculum, you've got kids stepping up and autonomously building solutions for the next generation of kids who are following them.
This is pretty good. I mean, he's following exactly in the tradition as so many people who became programmers are like, the stuff around me is crummy. I know I can make it better. I'm just going to improve the world. Give me a week. I'll be back. Right? Yeah. And then, oh, look, I've made something better than we had before.
So, on the micro bit website, there's some nice research findings summarized and whatnot. And one of the major impacts was that this is cross-curricular. And that means coding is not just contained into the computing class. You don't go to computer class, do computing, and then go back to pen and pencil or whatever, right?
Have you heard that Python is not good for concurrent programming problems? Whoever told you that is living in the past because it's prime time for Python's asynchronous features. With the widespread adoption of async methods and the async and await keywords, Python's ecosystem has a ton of new and exciting frameworks based on async and await.
And there are discounts for teams as well. This is not just a UK thing, right? The BBC started it. A lot of the folks there, like you mentioned yourself and Damian George and so on. But this is now a global thing. Like I was reading about it being used in Arkansas, for example, with a bunch of 900 schools or something cool like this.
This is millions of kids. So this is a great sample size, not three or something. Yeah. And it said 90% of the students felt that micro bits showed them that anyone can code. This is not like the genius hacker like we talked about, right? Yeah, exactly. Some other one that really resonated deeply with me is that 70% more girls said they would choose computing, computer science as a potential subject after using this.
And as the father of three daughters, like that is really awesome. Yeah. So there's some other ones as well. A bunch of the teachers enjoyed it and so on. But those two definitely resonated with me. Yeah. If nothing else, if the technology is a dead end, the device disappears without trace because funky new thing comes out next year.
If nothing else, just those two things that you've mentioned, that coding is for everybody and especially for girls for whom I guess since the 1980s, programming especially has been stereotyped as a boy thing, then stereotypes stop you from doing stuff. And if this can counteract that stereotype, then it's a good thing.
But I guess because the micro bit makes it so incredibly easy to make something funky and it's something you can hold in your hand. And that might be, I'm thinking of a friend of mine, David Whale, who did a project with a little girl, one of his neighbors, I believe. And the micro bit would do dance instructions.
You're not just sitting there consuming a YouTube video. You're making a dance machine that you can share with your friends when they come around. And they can go, oh, that's cool. Let's invent a new move and have a new icon or something like that. You know, so it's giving the young people or anybody else for that matter who who's coming into programming the mechanism for just taking control as soon as possible of programming rather than having to.
OK, today we're going to learn about loops and then tomorrow we're going to learn about functions. And then maybe in about three weeks time, you'll be able to do something that's vaguely useful because technology is hard. This is within five minutes. You can, you know, it's literally a line of Python to make it stroll.
Hello, my name is Nicholas on the on the on the display. You know, it's play a tune. It's got a speech synthesizer built into micro Python, which is hilarious because, of course, as soon as kids realize there's a speech synthesizer and speech. Say, but then a string. Obviously, the teacher uses a polite example.
All of a sudden, it's like, you've seen what Susanna's done. No, listen, listen, listen, listen. What's that? She's talking. How do you do that? She's going to do this thing. And then so she's told her it's like pebbles with the water. You know, they sort of echo out. And then the kids, because another kid's done the school thing, but they all want to do it.
Well, you pass another argument in, which is the pitch of the voice. Well, what's an argument? And what actually are we doing? Well, we're calling a function here. Yeah. And so you see between the brackets, you've got a string, which is what you're going to say. And then the next one is a number, which tells you what the pitch is going to be.
So that's two arguments. So they now have the notion of what an argument is, because that's the important, essential piece of information that's going to let them get the microbit to sing some goofy song. What you're touching on here is one of these fundamental things that we've been doing wrong teaching programming for the last 50 years.
And by that, I mean, what we do is we say, OK, well, what do they need to know how to write a whole program? Well, they need to know functions. They need to know loops and they need to know variables. We want to teach variables, loops, functions, classes. And then eventually, like three weeks later, like you say, they're going to be able to do a thing.
And I think things should be taught from the outside in like an onion. Right. You see how amazing it is on the outside. You peel back the onion. You learn one part of why it works. And that just connects so much better. Yeah. But this chimes so much with music education, because, of course, you get handed your violin.
Now, can you imagine that? My wife is a string teacher, so she's a fifth day in, day out. And she's amazing at it as well. And watching how she works is another thing that inspires me, because her early access violin stuff that she does sounds like hell. Because it's like 36-year-old, all armed with a violin.
Now, that's not going to sound nice. Like you're killing a goose or something, right? Yeah. Yeah. It's like strangling cats for a very long time. But what Mary does is introduces gradually and in an outside-in sort of a way, various violin playing techniques. And so she might be playing something really funky on her cello, a kind of a 12-bar blues walking bass, which the kids really like.
And she says, well, if you go, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee. It'll fit with what I'm doing. And so they all go, blah, blah, blah, blah, blah, blah, blah, blah. Yeah. You know, but it kind of sounds okay. And they can, and what they're focusing on is the fact that Mary's doing, she has a beat on with a drum machine.
She's playing a 12-bar blues bass line. And they feel they're part of it. And so in their eyes, they're making performance. And it gives them the momentum, just as we were just talking about with kids learning how to code. And so starting from, do I see a need for learning this? I have a reason for wanting to learn this thing.
I want to build this thing. And they just know, I'm just going to plow through the technical steps until I get to that thing. But a lot of people just have a general interest. And then it's harder to plow through when you don't have a target. Yeah. Yeah. And so providing a little gizmo or a project or something like that that allows somebody to go, well, yeah, I really do want to have a cat watering flap or something.
The stupid syntax of a loop or something. Yeah. Because that's their steps. Their staircase towards their goal. Yeah. Yeah. Exactly. Exactly. Exactly. Cool. So you're speaking of projects. Actually, on the microbit.org site, there's a whole bunch of ideas or projects. Maybe I'll throw some out and we can just comment on them.
Really? Okay. You got to tell us about that one. Yeah. Okay. So at Python UK, there was an education track that I used to be involved in. And we had a kid's day where kids would turn up. And the way the kid's day would work is there would be like lessons in the morning where kids would try different projects.
And in the afternoon, it was like, you are now let loose. Think of the thing you found most interesting in the morning and go do more of that. And at five o'clock, we're going to present to the whole of the conference just before lightning talk, the stuff that we've been doing. And so two of my kids and one of their buddies came up with my daughter had actually been teaching herself Morse code.
And so the A button was a dot and the B button was a dash. And there's a radio on the microbit. And so she said to the audience, she was, I don't know, 15 at the time. She said, so give me a message saying, like, hello world. So she went, yeah. Okay. Well, that's obviously now I don't know Morse code.
Blah, blah, blah. Deep, dee, dee, dee. Deep, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee, dee. And you could see the sort of hall going, how does she know Morse code?
But that was kind of her thing. Yeah, cool. It was just transmitting the dots and the dashes. And then that buddy held up his mic a bit and it scrolled across hello world. Nice. It's such a fun thing to do. Fun thing to do. Yeah, that's another really cool one. One that was interesting was live data logging with Python and Mew, the editor, which drew like graphs and stuff.
Yeah. of the, like whatever's receiving. So you could do cool, like, hey, I want to graph the weather throughout the summer or, you know, how tall my plant is or anything you can hook some kind of measure to, right? My dog activity or something. Yeah, exactly. How many times did my frog jump if I can stick a sensor to my frog?
Yeah. It's kind of like a Tamagotchi from, I don't know, the mid-90s. You remember that? Yes. Oh, my gosh. I got a 10 to my Tamagotchi. No, no, you don't have to. It's really not necessary. And then one that I would like to, was not on there, but I would love to do with my daughter is I want to get her into model rockets.
You know, you put the little disposable engine, they go up like 500 feet and then they shoot off. Yeah, exactly. Etsy, exactly. It would be so cool to put one of these in there and do like, well, this rocket went, you know, this fast, this high, whatever. And it'd be fun. Yeah. So the accelerometer, that is gravity, obviously.
And then you'll see freefall as well, which would be a big spike on another, you know, axis as well. Right. That's awesome. And then you probably can do a little calculus to, you know, actually figure out altitude and top speed and things like that. Obviously, my, you know, 10 year old daughter is not going to do the calculus, but she could be part of the project.
And I go, well, you feed that number here and it tells you how fast it's going or something. Right. Yeah. The important thing, though, is that you might be using Python for doing this on a micro bit. But if you talk to some of the folks at NASA, they use Python. Yeah. So there's this, you know, obviously they don't use Python for space bound payload, although there's a story in there.
Ask me about that in a second. They do use Python for all sorts of other things. So there is this sense of continuity from me as a 10 year old girl through to some person that my dad knows at PyCon, who is at the Space Museum and using Jupyter notebooks to analyze this thing. And you're like, well, hell, man, I'm just like a space scientist, you know, rocket.
That it can be used by these kids and then it can scale up to be used at that level for, you know, Nobel Prize, like multiple Nobel Prizes have been awarded for work done with Python now. Yeah. Yeah, exactly. I'm still on the same page as you with that. The Evan Upton, who founded Raspberry Pi, you know, the reason it was called Raspberry Pi is because they wanted the Pi to be P-Y.
Or you could write YouTube. Exactly. Yeah. Exactly. Or Instagram or whatever. Yeah. Yeah, exactly. But the skills that you are learning as an 8-year-old in primary school, you know, ultimately would be useful in the industry 10, 15 years later when you're out there. Right. Imagine telling engineers that for the first 12 years they're going to study, you know, this type of calculation and math and numbers.
And then, well, those numbers don't work anymore. You have a new set of numbers. Yeah. And new way of doing arithmetic and math. Yeah. And you're like, why am I doing this, right? Like, why would I switch? So that's a really great point. And there's something that Alan Kay, who's the, for people who don't know, the creator of Small Talk, and he was also part of the Xerox PARC team that came up with the original Windows, Windows, I can imagine, pointer type stuff that Steve Jobs saw.
It might be a simplified thing, but it's still the real thing at their level of development. And I think there's a danger with programming because people make ABC very basic programming environments that aren't the real thing. And so, like you said, kids get six months in, they invest all this time, and then they get on to their next academic year.
And the teacher who they had last year goes, so that stuff that we did with Scratch, that was all fun. You know, the cat was great, but now we're going to learn Python. And all that knowledge about how Scratch works is just gone. Yeah. And so this is the advantage Python has. You can start with kids who are very young because Python is such a beautifully simple and easy to learn language.
And a lot of the credit for that has to go to Guido because, you know, in the late 90s, you know, he was, I can't remember what he called the project, but he had funding for an educational project, Python for everybody or programming is for everyone. And things like idle came out of that and the turtle module and stuff like that.
1991? 1989 or something like that. Yeah, yeah, yeah. 1999, you know, so the legend says, you know, Guido was like, you know, oh, man, can't be that hard. You know, I'm going to do ABC, but a bit better. It's a white space based language. I want it to be easy to learn because ABC was a teaching language for students learning, coming to programming for the first time.
And so the fact that Python has all these attributes and this sort of Venn diagram of great stuff for teaching people, it's firmly in the middle. And the fact that it's so popular and widely used in the industry means that there is this continuity for learners. And that is a real great strength that we have.
I hadn't even heard of it. Tell everyone about your O'Reilly books. Okay. So I've written four books for O'Reilly, but two of them are now sort of lost in the midst of time because technology moves on and things. But a couple of years ago, if you go to PyCon, O'Reilly has little reports that they hand out to people for free.
And I did one of those about Python Education. It's about 30 or 40 pages long. It's essentially like a little manifesto about Python in education and why you'd want to use it, where you should go to learn more about it and things like that. And also for programmers who might be interested in learning how they might help support educators, colleagues who are teachers and things like that.
And that was an awful lot of fun to write because whilst I'm a Python programmer, I'm not an embedded expert, as it were, until I met Damien, of course. Yeah. His enthusiasm is sort of infectious. And you get these devices and you suddenly realize how remarkable the achievement Damien has managed to do is.
Or you're using very low-level protocols to make a buzzer sound or to draw a picture on a very simple screen. And so it reminds me an awful lot of the programming that I did as a kid when the 8-bit machines were, you know, the memory address. You could poke into that and turn the pixel the right color.
Whereas with MicroPython, you know, you're saying, you know, switch the voltage on this GPIO pin and the LED works. And then if you switch the voltage on and off, you know, so you're using something called pulse width modulation where you're switching the LED on and off for only half the time, but very, very quickly.
So it dims to 50% and then dims to 25% and you can make it glow and throb and all the, you know, I'm geeking out here. But it sounds fun. It's really good fun. It really is good fun. Just to feel that you're that close to the hardware. Yeah, that's wonderful. All right. So we only have a few minutes left.
Yeah, yeah, yeah. And I have a whole bunch of stuff that I want to talk to you about. We don't have time to cover it, but I do want to let you just quickly, briefly touch on two things. One, the Mu code editor, which is a sort of an IDE. Maybe that's a bit of a strong word, but like a code editor for beginners.
So the browser-based editor is the thing that I wrote along with a whole bunch of other stuff. And as any good software developer would do, they test it with their target audience. And so I traveled to the UK working with teachers and programmers and observing them using early versions of this browser-based editor.
And so I kind of got a list of requirements that teachers and developers really wanted. And Sunday afternoon it was raining. I remember thinking, "How hard can it be to use PyCute or something like that to do it? Yeah, yeah. It was simple as that as that." And so that happened and people enjoyed it.
It has a Jupyter Notebook built in as its REPL, an IPython type thing. It works with Adafruit's amazing line of circuit Python-based boards. There's a PyGame0 mode, so it makes it very easy to write games, but it's aimed at beginners. Nice. It's been rather wonderful over the last few months to see the community sort of coalesce around this editor.
Or whatever code is in English. The user interface itself, the menus and whatnot are, yeah? Yeah, exactly. And so we'd love an editor that was simple enough that there weren't that many menus, but also that it was in French. Well, I think there's about 150 strings to translate to get you into a different language.
And that has its own site, doesn't it? Yes, that's right. So Code Grades is an experiment. I want to see if this works, really. In the UK and outside in the world, I'm not sure in the US, but you'll see what I mean. We have these things called Music Grades. If you remember back to the how to draw an owl, you get draw two circles and then draw the rest of the owl.
Well, music grades are the steps in between that take you from the very simplest to the most complicated. And in music, this is you prepare a little concert. You go along and play this to an examiner. They give you helpful feedback and say, yes, you have played the piece to the level that's required for grade four, trumpet or grade seven flute or something.
And the higher up the grades you get, the more difficult it becomes. And so my idea is to apply that to programming. So at the moment this week, we started grade one Python with a class of 15. And in eight weeks time, they are going to sit down with a friend of mine called Tim, who's a Python core developer, but is also an enthusiast about Python education.
And they are going to present a project that they have built. So if it matches, if it meets certain requirements for grade one Python, they get to pass. And then they can do grade two Python, which will have slightly more difficult or involved requirements up to grade eight Python, where, you know, we want to see code.
We want to see documentation on read the docs. We want to see a setup dot py that works with PyPI. You know, all these things that we might expect as standard for a Python project. These steps will get you to that. And so code grades is this experiment to see if it works. And we'll find out in, well, hopefully eight weeks when these folks take their grade one.
And if that works, then, well, I need to make a decision and see what I do with the idea. It might be a great way of funding people who contribute to open source software, because, of course, we need people to examine these beginner graders. And these people need to be experts. So if you can pay examiners to do this, then that's a source of income for some of the people that I'm thinking of off the top of my head who would rather be working on their open source code than having to get a job, you know, writing, just pounding out code for.
Right. To optimize interest rates for stock trades or some weird thing, right? Some weird angle there. Yeah, yeah, exactly. So we'll see what happens. It's early days, very early days. But so far, the feedback that I've had from coders who might act as code mentors who would be examiners has been good.
Yeah, exactly. And the first class on Tuesday evening this week, at the end, this has never happened to me before. I'm really quite proud of it. They gave me a round of applause when I said that's it. Oh, wow. And what I had tried to do was use techniques from music education. So it wasn't a case of today we're going to do loops.
Next week is going to be function. We were working on projects and letting the requirements of learning what a loop or a function is fall out of interacting with these projects. And so these folks were really, you know, they'd never programmed before, but they managed to get a kind of a pink alien to scroll across their screen using Pygame Zero and, you know, like 10 lines of Python.
And I set them a challenge, which was, well, can you change the way the alien moves? Or can you change the sound effect that happens when you click him or something like that? And so they've got an existing solution, the onion analogy that you used, and they're peeling back the layers and changing it and discovering the things that they need to know through that.
So that's what CodeGrowth is about, to be confirmed as to whether it works or not. But I'll certainly let you know if it does. Yeah, it sounds really interesting. I'll definitely link to it in the show notes so people can check it out. Cool. All right. I think we should probably leave it here for this topic, but it's been great to talk about, Nicholas.
Now, before I let you go, two quick questions for you. Okay. If you're going to write some Python code, what editor do you use? I use VI for historical reasons. Yeah, awesome. Right on. And then a notable PyPI package, not necessarily the most popular, but one you've come across, people should know about whatever.
And it works. And I know from talking with Corey that HTTP is a real gnarly type protocol to have to work with. Yeah. Oh, yeah. It's been misapplied so many times by so many web servers that you have no idea what's going to come down the line at you. And yet the code that he's written using Hyper, the project that sort of sits underneath the request that does the actual HTTP stuff, is incredible, really.
And it's a great way of, again, focusing on the user where the user is the programmer. I just want to get this web page. Okay. Or this JSON at this endpoint. It just works. I love that. And the documentation is great. And the community around it is good, too. Yeah. It's definitely one of the special ones out there.
Yeah. So I see your requests and I respond with a responder. Have you heard of this? Responder? No. No. So Kenneth Wright just came out with a brand new web framework called Responder. You know, the opposite end of requests. It literally came out on October 8th. So it's going to be interesting to see his take on the micro framework, like Flask-esque, but not Flask.
So, it's kind of incumbent on us to make sure that we help foster the community of tomorrow. And the way you do that is through education. The other motivation is this. If you really want to become an expert at something, teach it. Because you have to introspect them. And you have to think, why do I do it like this?
And I need to be able to explain it in a simple enough way that I demonstrate my own clarity of thought about this thing. And that is not only a great skill for you to have to help your colleagues. You know, you need to explain this API that you've created. But it's also good for you because you have to sit back and think about what you're doing.
So, teaching and educating might not necessarily be the first things that come to mind when people think of career progression or helping their company out. But in the long term, they are totally at the core of what you should be doing. So, then my speech. It's a great speech and I definitely agree with it.
Our guest on this episode was Nicholas Tolerwey. And it's been brought to you by Datadog and Talk Python Training. Datadog gives you visibility into the whole system running your code. Visit talkpython.fm/datadog and see what you've been missing. Don't even throw in a free t-shirt for doing the tutorial.
Be sure to subscribe to the show. Open your favorite podcatcher and search for Python. We should be right at the top. You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm. This is your host, Michael Kennedy. Thanks so much for listening.
