#184: Teaching Python with BBC micro:bit Transcript
00:00 How can we make learning Python and teaching Python more real for students, especially younger
00:04 students? The BBC in the UK had a great idea. Make it more physically real with actual devices.
00:10 That's where Nicholas Tolerwey got involved. He helped bring the BBC, Microbit, and Python to
00:16 millions of kids in the UK. Join me to hear a story on this, episode 184 of Talk Python to Me,
00:22 recorded October 12, 2018.
00:25 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the
00:43 ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter
00:47 where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm
00:52 and follow the show on Twitter via at Talk Python. Nicholas, welcome to Talk Python.
00:57 Thank you. Good to be here.
00:58 Yeah, it's great to have you here. We've been trying for a long time. And finally, after,
01:02 you know, summer vacations and all sorts of traveling, we've managed to get together here on the show.
01:08 Yeah, it's going to be good. I'm looking forward to this.
01:10 Yeah, so am I. It's going to be a lot of fun. Now, we're going to talk about teaching and education
01:14 and IoT and Python and all sorts of cool stuff you've been involved in. But before we get into
01:19 that, let's start with your story. How do you get into programming in Python?
01:22 So a long time ago, perhaps not in a galaxy far, far away. When I was a child, I grew up in the 80s.
01:29 And every school in the UK was given an 8-bit computer for the BBC Micro. And my dad was a
01:35 head teacher, a school principal. And one school holiday, he brought this machine home to try and
01:43 figure out how am I going to use this in school. And it took about half an hour for my brother and I to
01:48 grasp it from his hands and take over and do the, you know, print, you are an idiot, go to line 20 type stuff.
01:55 Yeah, yeah. My brother is an idiot or, you know, some other insult you can inflict on your siblings.
02:01 Yeah, it's funny enough, Andrew, my brother, he's also a programmer. It can't have been that bad.
02:06 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.
02:21 And then a teacher. And then when my own children arrived, I decided I wanted a career change from teaching and remembered back to my days enjoying programming these 8-bit machines.
02:32 So I took a year out, did a master's in computing, and that got me my first job as a software developer.
02:39 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.
02:53 And you're like, hey, maybe we'll just teach them all C-sharp. No, maybe not.
02:57 No, exactly. Oh, man. These are very, very clever people, these quants.
03:01 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.
03:16 And I ended up going to the very first PyCon UK in 2007 at that time.
03:23 And I was welcomed by a rather jolly gentleman called John Pinner, who sadly passed away now.
03:29 But he, I guess he was like the founding force of nature for Python in the UK when it comes to getting the community together.
03:36 And it was such a wonderful place to be.
03:40 And so after about another year, I decided, well, .NET's fun and everything, but Python's even more funner.
03:48 I'm going to do Python.
03:49 Totally agree with that statement.
03:49 Yeah, exactly.
03:51 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.
04:03 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.
04:12 And the rest, as they say, is history.
04:14 I started again at the bottom of the program, a stack as a junior Python developer.
04:20 And since then, I've been working mainly in Python as my full-time freelance job.
04:26 Yeah, that's a great success story.
04:28 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.
04:40 And I said, but I kind of like Python more.
04:42 Yeah.
04:43 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?
04:50 And, you know, not just in my knowledge, but in my maybe career position and things like that.
04:57 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.
05:04 I kind of don't want to wreck this, but I know over there is a better peak if I could get to it.
05:09 Yeah.
05:09 I got to go through the valley.
05:10 Was that scary or is it okay?
05:12 It was okay.
05:13 And here's why.
05:13 Because I was expecting until I was about 22 that I was going to be a classical musician.
05:19 And in terms of jobs, that's probably the least secure job you could possibly ever have.
05:25 But anything else sounds better.
05:27 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.
05:42 Anything else feels good.
05:43 And I knew that, well, what's the worst that can happen?
05:47 I tried Python for a few months and it doesn't work out.
05:51 I can become another C-sharp developer doing more bank-related boring stuff.
05:57 Yeah.
05:58 Yeah.
05:58 That's a super attitude just to say, like, okay, what is the worst failure position?
06:03 The failure position is I'm where I am.
06:05 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?
06:11 Yeah.
06:11 So, excellent.
06:12 Yeah.
06:13 I'm happy to chat with that about it.
06:15 That's really cool.
06:16 But the point is that we're in a very privileged position as software developers.
06:21 Yes.
06:21 The skills that we have are relatively rare and people are prepared to pay us plenty of money to do this sort of thing.
06:29 So it's definitely a developer's market.
06:32 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.
06:43 Because, like you said, the landing position is always, well, I did that for six months.
06:48 I'll just go back to doing, you know, I'll phone up my old boss to see if he still wants me.
06:52 You know, that sort of thing.
06:53 Chances are they do, right?
06:54 Chances are they do.
06:55 Exactly.
06:56 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.
07:06 Right?
07:07 Like that would be a very different thing to quit upon, right?
07:09 Yeah, exactly.
07:10 So it's got to keep it in context.
07:12 But yeah, awesome.
07:12 I guess one more question before we get to the main topic is, you know, what do you do?
07:17 You said you do consulting now.
07:18 What do you do day to day just to give people a concept of where you're coming from?
07:21 Okay.
07:21 So I guess I feel old for maybe over a decade now.
07:25 I've been a freelance Python programmer.
07:28 I'm starting out as a sort of a junior freelancer and now I tend to work in senior type position.
07:34 I will do a, what I call a gig for a few months for a client.
07:39 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.
07:45 Some of the educational stuff was as a result of that sort of working practice.
07:50 So I'm a jobbing freelance Python programmer.
07:54 I give training.
07:56 So next week I'm giving corporate training to a client in London for a couple of weeks.
08:01 I'm also working with another client on the West Coast of the U.S.
08:04 Working remotely on some Python project that they have.
08:07 So what I like about this job is that I have flexibility because I'm my own boss.
08:12 So I don't have to ask permission if I want to go to Python, for example.
08:15 I can just go.
08:16 Yeah, just go.
08:19 So I'm going to enjoy this.
08:22 But I also get to work with a real diversity of industry as well.
08:28 Everybody needs programmers.
08:29 So it's rather interesting to be inside of a TV station or a newspaper or a major retailer in the UK or the government or the National Health Service or the European Union or a scrappy startup.
08:41 It's good, fun work.
08:43 But there's always something new.
08:45 Yeah.
08:45 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?
08:53 But as a person, as a consultant or as a trainer, I had a lot of similar experiences doing in-person training.
08:58 Yeah.
08:59 You, every week or every month, there's a different experience.
09:02 And it really gives you, I think, a broader view of the software industry.
09:06 Oh, I totally agree with you there.
09:08 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.
09:14 Yeah.
09:15 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?
09:21 I'll just ask Bob.
09:22 He knows.
09:23 You've established your network in that company, whereas this sort of stuff, you don't know who Bob is.
09:29 And you're kind of treading water a little bit.
09:32 But at the same time, that's kind of exciting.
09:34 And I like that.
09:35 Yeah.
09:35 And with the life of a musician, at least I've got a job.
09:38 Exactly.
09:40 That's awesome.
09:41 That's what I thought in the back of my mind.
09:42 I'm like, I could be starving as a musician here.
09:45 I'm working.
09:46 This is good.
09:46 No, it sounds like you're doing awesome stuff.
09:49 All right.
09:49 So let's talk first a little bit about teaching Python just in general.
09:53 Yeah.
09:54 And then more focused on the IoT side of stuff that you've worked on.
09:59 Yeah.
09:59 So it sounds like with your training experience, you've done a little bit of teaching, certainly, at least on the small school.
10:07 And you said you were a teacher before, so you've actually done a whole lot of it, right?
10:10 Yeah.
10:11 Yeah.
10:11 So what are some of the keys for people to get interested in programming, to become confident, things like that?
10:19 Yeah.
10:19 So in terms of do people want to learn to program?
10:23 I think the answer is hell yeah.
10:25 Of course they do.
10:26 People who are not programmers see what programmers do.
10:30 They see also the stuff that we were just talking about.
10:32 But it's a highly desired skill set for people.
10:36 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.
10:50 And that was just word of mouth is me tweeting.
10:52 So getting people motivated to learn to program is not a problem.
10:56 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.
11:09 You need to be a particular sort of, how can I put it, loner type mentality.
11:15 You know, like the loner genius, the kid who could totally just nail the homework, but was kind of awkward.
11:20 So just stayed behind the computer.
11:21 That view is not necessarily.
11:23 Someone like that.
11:24 Yeah.
11:25 And you and I, and I guess listeners of the podcast will know that that is completely not the case.
11:30 But if you're not part of the programming world, it's hard to see that.
11:34 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.
11:46 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.
12:02 Typically in green, on a green terminal.
12:06 Exactly.
12:06 Exactly.
12:07 And things like, you know, I've bypassed the firewall to the mainframe.
12:11 Oh, it's a joke.
12:13 It really is.
12:14 But if that's all you know about programming, then it can be a very intimidating place to come to.
12:19 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.
12:29 You know, if you enjoy Sudoku, for example, you might enjoy programming.
12:32 It's also about being expressive.
12:34 You know, we talk about having beautiful code, especially in the Python community, the Zen of Python and things.
12:40 And so there are lots more ways than just the Hollywood hacker stereotype to get into programming.
12:47 You can be a different sort of programmer.
12:48 That's okay.
12:49 Absolutely.
12:50 And I think that's a really important thing.
12:52 And it sounds like from your microbit stuff that actually that was one of the big takeaways.
12:58 I thought that was really interesting.
12:59 And we'll get to that in a moment.
13:00 But did you actually teach Python in school or when you were a teacher, what were you teaching?
13:05 Okay.
13:06 So I did what many musicians who are out of work do, and that is they go and teach music.
13:13 Okay.
13:14 I went through in the UK, you have to go through additional training to be allowed to be.
13:19 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.
13:26 So we have a thing called a PGCE, Postgraduate Statistical Education, which makes you a qualified teacher.
13:32 And when you have done a year's worth of teaching and been assessed as being good, so basically you've got two years.
13:41 You've got the training itself and then what's called the NQT years, a newly qualified teacher year.
13:46 When you've gone through that training and they're a useful teacher, then you can become a proper teacher in the UK.
13:52 So I went through all of that training.
13:53 And my first job was as a secondary head of a music department.
13:59 So I was teaching at what I guess in the US you would call the upper years of junior high and senior high.
14:06 In the UK, we only have primary and secondary, and they change over when kids turn 11 years old.
14:12 So I was teaching 11 to 18-year-old music.
14:14 I enjoyed that an awful lot, although it's probably the most challenging job I've ever had to do.
14:19 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.
14:28 But, you know, there's all the marking and the bureaucracy and all the other stuff that goes with teaching.
14:34 So I've done a lot of classroom teaching.
14:36 I've done adult education in terms of music as well.
14:39 And I've also done some sort of music therapy, I guess you would call it.
14:43 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.
14:51 I mean, you know, they weren't churning out Mozart or something like that.
14:55 But it's something fun for them to do.
14:57 So in terms of music education, I did a lot of that all the way through my 20s, really.
15:02 And then the switch came over when my children arrived.
15:05 This portion of Talk Python to Me was brought to you by Datadog.
15:11 Get insights into your Python applications and infrastructures with Datadog's fully integrated platform.
15:17 Debug and optimize your code by tracing requests across web servers, databases, and services in your environment.
15:23 Then correlate and pivot between distributed request traces, metrics, and logs to troubleshoot issues without switching tools or contexts.
15:32 Get started today with a 14-day trial, and Datadog will send you a free T-shirt.
15:36 Visit talkpython.fm/Datadog for more details.
15:42 What's the similarities and difference from, like, sort of traditional teaching to, say, teaching a programming class like this eight-week one you talked about?
15:51 Okay.
15:51 Say it different.
15:52 Ah, okay.
15:54 So here's – this is a really interesting thing.
15:55 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,
16:04 it's always been very traditional chalk and talk type stuff.
16:08 Somebody stands at the front.
16:10 They have their deck of slides.
16:13 And the very worst are basically PowerPoint karaoke.
16:17 And some of the good ones are I'm going to talk a bit.
16:20 You might be able to ask questions.
16:21 Then we'll do a practical session and rinse and repeat.
16:25 Now, in music education, we've been doing music education for 500 years in the kind of Western classical tradition.
16:31 And that's enough time for there to be a reformation and a counter-reformation and a revolution.
16:39 And then, you know, some guy called Suzuki in Japan says, this is all wrong.
16:43 We've got to do it this way.
16:44 But we've got so many schools of thought about how to do music education that have been around for literally hundreds of years.
16:52 One of my textbooks when I was at music college was 300 years old.
16:55 I had to write counterpoint.
16:57 So we still, these techniques have been established.
17:01 We're still using, we've been programming, what, 50 years?
17:04 Yeah.
17:05 Let alone, we're only just starting to think about, well, how do we teach programming?
17:09 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?
17:25 That was such a terrible thought, but I quickly switched the question around.
17:31 I said, well, what happens if we teach programming using some of the techniques that we use for music education?
17:37 Now, there are some similarities because music, you're reading and manipulating symbols all the time.
17:43 You're also practicing a skill that takes a long time to actually develop enough so that you actually sound any good.
17:51 And the same with programming.
17:53 That's similar, yeah, similar to programming, right?
17:55 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?
18:05 Exactly.
18:06 And so, hey, do you know the how to draw an owl means?
18:11 So it's how to draw an owl.
18:14 First, start with two circles, and then the second box is draw the rest of the down owl.
18:18 And that's how programming education is.
18:21 You've got huge numbers of resources that are draw two circles.
18:25 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.
18:32 And that's a professional level, and there's nothing in between.
18:35 Whereas what the music world has managed to do over this sort of 500 years is bridge that gap.
18:40 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?
18:50 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.
18:56 Yeah, that's a very interesting concept.
18:58 You're right that it's so new.
19:01 I mean, 50 years is really not that long, right?
19:04 So compared to the history of music or mathematics or philosophy or whatever.
19:09 Yeah, we're at the cuneiform play tablet stage.
19:12 You know, I'd love to see what a program is.
19:15 We're etching in stone.
19:16 Yeah, exactly.
19:18 I mean, but can you imagine from that, we have Shakespeare, you know, but it's a long term thing.
19:24 And it's easy for us to forget how short a time we've been doing this.
19:27 We've not had the equivalent of a revolution in programming where they've just thrown away everything.
19:33 Or do you know what I mean?
19:35 It's just we're doing it long enough.
19:37 For sure.
19:37 So one of the things I think can make programming hard is it's relatively abstract.
19:44 Yeah.
19:45 I say relative because compared to, say, like a math proof, like programming is super concrete.
19:50 But compared to, you know, other disciplines, it can be pretty abstract.
19:56 And I feel like having some kind of hardware to visualize or interact with as part of that programming for at least a certain group of people, I'm thinking especially for younger kids, is super helpful for them.
20:09 So I guess that brings us to the BBC micro bit.
20:13 You want to tell us about that?
20:15 Yeah.
20:15 So I mentioned the BBC micro when I was a kid.
20:18 And it holds.
20:20 That was a computer, right?
20:21 That was a big beige box that bleeped at you.
20:25 And it cost like, well, the equivalent of thousands of pounds in today's money.
20:29 And that holds a special place in lots of British geeks' hearts.
20:33 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.
20:49 But they wanted to make a contribution that was relevant for today.
20:53 And so the micro bit being a small Internet of Things type device with some, which has a couple of buttons.
21:01 It has a five by five LED display.
21:03 It's got a little radio.
21:04 It's got an accelerometer and a compass like a mobile phone and GPIO pins so you can plug things into it as well.
21:11 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.
21:26 Towards the end of 2015, the BBC announced that they were going to be doing some sort of computing project, computing and education.
21:36 And it mentioned Python in the blurb that they sent out.
21:39 And they were looking like, what is this?
21:41 Yeah, they're looking for partners.
21:44 Now, I'm a PSS fellow.
21:46 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?
21:57 Have you anything to do with this?
21:59 And I wasn't.
22:00 But I knew somebody at the BBC who was.
22:02 So tapping some back channels, as it were, he wouldn't reveal to me what was going on.
22:08 But he said, you should totally get involved.
22:10 And so with the blessing of the PSS board, I applied for the Python Software Foundation to be a partner in this project.
22:22 And fools, they said yes.
22:24 So this is how the Python community, especially in the UK, got involved.
22:32 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.
22:44 I know plenty of Python people who also teach.
22:47 This is going to be a jolly weekend sometime where we can all sit down.
22:52 We'll knock this out by next week.
22:53 It's all good.
22:53 Yeah, yeah, exactly.
22:54 This is classic how hard can it be type thought that it's dangerous.
22:59 And so the BBC were set up for us to do this.
23:02 And we were all involved with the meetings so that we could see as an educational partner what was coming.
23:09 And then in the May of 2016, I was called into a meeting at the BBC.
23:16 And they said the organization that was going to provide Python on the micro bit has dropped out.
23:22 We must have Python on the micro bit.
23:25 And we want you to do it.
23:28 This has gone up a level of difficulty.
23:29 Yeah, yeah.
23:30 And I was like, well, you realize that we're all volunteers for a start.
23:33 Python is a volunteer-led community.
23:35 And so they said, well, could you try it?
23:39 I said, well, let me have a look.
23:40 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.
23:52 And essentially, the way it would work was we would emit a JSON-based abstract syntax tree that we would post somewhere.
24:02 This would get compiled.
24:04 And then a hex file would be returned back to the user.
24:07 And they would drop that onto their micro bit and see their code run.
24:12 And I remember a weekend, there was about five of us looked at this code and decided that we didn't have the time.
24:20 We didn't have the expertise because it was all written in TypeScript.
24:23 And Microsoft, it was still a moving target because Microsoft was still building this.
24:28 However, by a stroke of luck, that very same week, I met a gentleman called Johnny from ARM.
24:36 That's how he introduced himself.
24:37 And he was the person who was leading the development of the hardware of the device.
24:42 And I was explaining to him what I've just told you.
24:45 And he was like, what?
24:46 Why don't you just use MicroPython?
24:49 And I said, oh, you know about MicroPython?
24:51 He said, yes, I live next door to Damien George.
24:54 Oh, wow.
24:54 Small world.
24:56 Yeah, exactly.
24:57 Damien was living in the UK, in Cambridge at the time.
25:01 And so I had a little bit of a kerfuffle with the BBC where I basically said, look, you should use MicroPython.
25:08 And they were like, no, we want to use the Microsoft stuff.
25:10 And I said, well, no, MicroPython will let you do this stuff.
25:13 And eventually they let Damien sign the NDA that was needed.
25:17 And Johnny posted the development board through Damien's letterbox.
25:21 And a week later, Damien had it running.
25:24 He had a REPL.
25:26 And you could make LEDs blink.
25:28 And it would detect button presses.
25:30 And at that moment, I have to admit, I did a kind of little happy dance because I knew.
25:34 This is going to work.
25:36 This is going to work.
25:37 We had Hello World.
25:38 So the rest is just polishing.
25:40 Well, the rest.
25:42 You know, we've done the first 90%.
25:43 Damien had done the first 90%.
25:45 We just had the next 90%.
25:47 Get done.
25:49 That's really amazing.
25:50 So this was a project by the BBC.
25:53 Yeah.
25:53 Why does the BBC...
25:55 The second B is for broadcasting, right?
25:58 Like, why are they trying to make these social contributions?
26:00 It's good that they are.
26:01 Yeah.
26:02 But where does that fit in?
26:04 Oh, man, you're going to love this.
26:06 It's going to be all very Game of Thrones.
26:07 It's because we have a queen.
26:08 And she issues royal charters.
26:10 And the royal charter for the British Broadcasting Corporation, which comes up every seven or eight
26:16 year, part of the charter, it says that the BBC is supposed to inform, educate, and entertain.
26:23 And this fits in educate.
26:27 Right.
26:27 Okay.
26:28 So, however, the BBC has to be very careful.
26:31 And they have been on the receiving end of various legal challenges where if the BBC turn up and say,
26:38 if we're going to do educational resources, computing, then everybody who...
26:43 Every private company in the UK who does computing resources is going to be...
26:48 Yeah.
26:48 Yeah.
26:48 You're undercutting us, all right?
26:50 Yeah.
26:50 You're killing our business, right?
26:52 Yeah.
26:52 Yeah.
26:52 So this is why the BBC acted as the umbrella organization.
26:57 And it was the partners, actually, who delivered the microbit itself.
27:01 So this is why it was Johnny from Arm and not Johnny from the BBC.
27:06 I see.
27:06 Why Microsoft were doing their PXD stuff and why they asked us to do microbit and Damien did that work.
27:13 And I did a whole bunch of other work as well with Damien to do his microbit.
27:17 So...
27:17 Yeah.
27:18 That's cool.
27:18 Yeah.
27:18 It's kings and queens and royal charters.
27:20 And if we dig deep enough, it's by the grace of God, her majesty, that sort of stuff.
27:24 Yeah.
27:25 Yeah.
27:25 Wonderful.
27:25 So...
27:26 Okay.
27:28 So this thing was handed out to millions of kids in the UK.
27:32 And there's actually some really cool research that came from it.
27:35 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.
27:45 Right?
27:46 I could go to newegg.com or somewhere like that and buy them for, you know, 25 pounds, 20 pounds, something like that.
27:54 Yeah.
27:54 Yeah, exactly.
27:56 So, I don't know.
27:56 Visit somewhere like Adafruit and they'll sell you a kit.
28:00 You can also get them in classroom bundles as well.
28:03 So, if you teach, you can get a group of 30 or you could just buy hundreds of them all at once.
28:08 And the microbit website has a browser-based Python editor.
28:13 It also has a kind of a blocks-based thing, which is what Microsoft PXT turned into.
28:19 And so, they make it very easy for kids to sit down.
28:22 You plug the thing via a USB cable into your laptop or school computer.
28:28 You use the browser-based editor.
28:31 You get what's called a hex file.
28:33 You drag that onto the device.
28:36 It flashes the device, what we call when we sort of put the software on the device, and then it runs.
28:41 It's very simple.
28:42 Yeah, that's cool.
28:43 And some of the programming can even be, like you said, like that blocky type stuff.
28:47 You don't have to be able to type or barely read, right?
28:50 I need to say, okay, move.
28:51 I'm going to put a 10 here and then like loop and then say put a 3 in the little loop block.
28:56 And I think that's great.
28:57 So, that makes it super accessible.
28:58 I did an hour of code project at my daughter's school.
29:01 Yeah.
29:01 And she was in, gosh, I'm trying to remember what grade.
29:04 She was quite young.
29:05 First or second grade.
29:07 Yeah.
29:08 Something like this.
29:09 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.
29:20 So, what she probably used was something called Scratch?
29:23 Yes.
29:23 I think it was maybe it was on the Grok learning platform.
29:28 I think the hour of code thing.
29:29 So, it may have been Scratch.
29:32 I think it was Scratch-like, but I don't think it was actually Scratch.
29:34 I don't remember what it's called.
29:35 Yeah.
29:36 So, I know the folks at Grok and they use the same block-based library that Scratch uses.
29:42 So, drag and drop blocks is just a JavaScript library.
29:45 But they emit Python code.
29:47 And then that Python code is running, I think, in the browser in Grok's case.
29:53 So, you have Brython or something.
29:55 Yeah.
29:55 Yeah.
29:55 Yeah.
29:55 Yeah.
29:55 Yeah.
29:56 Exactly.
29:56 And you have your little turtle or something like that.
29:59 But, yeah.
30:00 So, you might be asking yourself, well, where do I, how do I get a block-based editor for Python on a microbit?
30:08 Well, here's a cute story.
30:10 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.
30:19 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.
30:29 And he figured it out himself.
30:31 And so, he's taken this JavaScript library and it emits Python and he's done all this work.
30:38 And so, he created this project called EduBlocks.
30:40 Yeah.
30:40 He presented at the PyCon U.S. Education Summit, which is, I think, the day before regular PyCon.
30:47 Yeah.
30:48 Yeah.
30:48 Yeah.
30:49 So, and this is the other thing.
30:51 Josh is a great presenter as well.
30:52 So, it was a kind of a vindication of the efforts of investment that's happening in the U.K.
31:00 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.
31:13 This is pretty good.
31:14 I mean, he's following exactly in the tradition as so many people who became programmers are like, the stuff around me is crummy.
31:22 I know I can make it better.
31:24 I'm just going to improve the world.
31:25 Give me a week.
31:27 I'll be back.
31:27 Right?
31:28 Yeah.
31:28 And then, oh, look, I've made something better than we had before.
31:30 Right?
31:31 Like, so many people actually become more skilled so that they can just fix these types of problems.
31:35 Right?
31:35 Exactly.
31:36 Exactly.
31:36 And Josh has the wind in his sails.
31:39 And it's wonderful to see this community that he's building as well around EduBlocks sort of flourish and grow.
31:46 So, whenever I see Josh, I just smile both inside and outside because it's just so wonderful to see this young person really flourish.
31:56 He's a credit to himself and his family.
31:57 He really supports him.
31:58 Yeah.
31:58 But I go and visit schools sometimes or, you know, coding events in the UK for kids.
32:05 And inevitably, there's an EduBlocks happening somewhere or other.
32:08 And I smile and think, oh, if Josh could see these kids having such good fun with the code that you've written.
32:13 Yeah.
32:14 That's awesome.
32:16 So, kind of in the same vein, you know, let's talk a little bit about the impact.
32:20 So, on the micro bit website, there's some nice research findings summarized and whatnot.
32:27 And one of the major impacts was that this is cross-curricular.
32:33 And that means coding is not just contained into the computing class.
32:37 You don't go to computer class, do computing, and then go back to pen and pencil or whatever, right?
32:41 I feel very strongly about this, actually.
32:44 I think most of coding and most of programming skills are to amplify other things.
32:50 My biology research is better.
32:51 My music is better.
32:53 My whatever is better because of this, right?
32:55 And this is kind of related to that, huh?
32:56 Yeah.
32:56 This, I, oh, man.
32:58 If we were in the same room, I'd be giving you a big hug and high five.
33:01 I can't agree more with you there.
33:04 I totally see where you are there with that.
33:06 Couldn't agree more.
33:07 That's awesome.
33:07 So, yeah, it seemed like this helped there.
33:09 This portion of Talk Python to Me is brought to you by us.
33:15 Have you heard that Python is not good for concurrent programming problems?
33:19 Whoever told you that is living in the past because it's prime time for Python's asynchronous features.
33:24 With the widespread adoption of async methods and the async and await keywords,
33:29 Python's ecosystem has a ton of new and exciting frameworks based on async and await.
33:35 That's why we created a course for anyone who wants to learn all of Python's async capabilities,
33:39 async techniques and examples in Python.
33:42 Just visit talkpython.fm/async and watch the intro video to see if this course is for you.
33:48 It's only $49 and you own it forever.
33:50 No subscriptions.
33:51 And there are discounts for teams as well.
33:54 This is not just a UK thing, right?
33:58 The BBC started it.
33:59 A lot of the folks there, like you mentioned yourself and Damian George and so on.
34:04 But this is now a global thing.
34:06 Like I was reading about it being used in Arkansas, for example, with a bunch of 900 schools or something cool like this.
34:13 Yeah.
34:14 And Canada as well.
34:15 Yeah.
34:15 If you remember back to PyCon, Kamisha gave her outstanding keynote.
34:21 She's using micro bits in her Detroit library to get these kids into programming.
34:27 And it's such a wonderful thing to see.
34:30 You just don't know where these things lead, really.
34:32 Yeah, yeah.
34:32 When they take off, they take off, I guess.
34:34 Yeah.
34:35 So let me maybe summarize some of the research findings really quick.
34:39 Just highlight them and then you could comment on them.
34:41 So there was some follow-up research and there's actually a research paper on this,
34:45 at least within the UK, around them.
34:47 This is millions of kids.
34:49 So this is a great sample size, not three or something.
34:51 Yeah.
34:52 And it said 90% of the students felt that micro bits showed them that anyone can code.
34:57 This is not like the genius hacker like we talked about, right?
35:00 Yeah, exactly.
35:01 Some other one that really resonated deeply with me is that 70% more girls said they would
35:06 choose computing, computer science as a potential subject after using this.
35:11 And as the father of three daughters, like that is really awesome.
35:16 Yeah.
35:16 So there's some other ones as well.
35:18 A bunch of the teachers enjoyed it and so on.
35:20 But those two definitely resonated with me.
35:22 Yeah.
35:22 If nothing else, if the technology is a dead end, the device disappears without trace because
35:29 funky new thing comes out next year.
35:31 If nothing else, just those two things that you've mentioned, that coding is for everybody
35:36 and especially for girls for whom I guess since the 1980s, programming especially has been
35:43 stereotyped as a boy thing, then stereotypes stop you from doing stuff.
35:49 And if this can counteract that stereotype, then it's a good thing.
35:54 But I guess because the micro bit makes it so incredibly easy to make something funky and it's
36:00 something you can hold in your hand.
36:01 And that might be, I'm thinking of a friend of mine, David Whale, who did a project with a
36:08 little girl, one of his neighbors, I believe.
36:11 And the micro bit would do dance instructions.
36:14 It would flash an image on the screen and you had to be on a YMCA or big fish, little fish or, you know, Macarena or something like that.
36:22 But it would show you what the moves were you had to do.
36:25 The important thing is that the micro bit gives you ownership over your digital world.
36:31 You're not just sitting there consuming a YouTube video.
36:34 You're making a dance machine that you can share with your friends when they come around.
36:38 And they can go, oh, that's cool.
36:39 Let's invent a new move and have a new icon or something like that.
36:43 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.
36:59 OK, today we're going to learn about loops and then tomorrow we're going to learn about functions.
37:04 And then maybe in about three weeks time, you'll be able to do something that's vaguely useful because technology is hard.
37:10 This is within five minutes.
37:12 You can, you know, it's literally a line of Python to make it stroll.
37:16 Hello, my name is Nicholas on the on the on the display.
37:20 You know, it's play a tune.
37:22 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.
37:31 Say, but then a string.
37:33 Obviously, the teacher uses a polite example.
37:35 But within seconds, you know, the kids are being rude to each other by the medium of squeaky dialect voice.
37:40 But they like it.
37:42 And of course, the first kid I saw this a couple of days ago when I was visiting the school.
37:46 The first kid who figures out that thing, it's like a gold rush.
37:49 All of a sudden, it's like, you've seen what Susanna's done.
37:53 No, listen, listen, listen, listen.
37:54 What's that?
37:56 She's talking.
37:57 How do you do that?
37:59 She's going to do this thing.
38:00 And then so she's told her it's like pebbles with the water.
38:03 You know, they sort of echo out.
38:06 And then the kids, because another kid's done the school thing, but they all want to do it.
38:10 And it's just capturing moments of those enthusiasm, of that enthusiasm and building on that.
38:17 So you go, well, do you know how the speech synthesizer really works?
38:20 Or what else could you do with the speech synthesizer?
38:22 You could make it think.
38:23 You know, OK, so how do you do that?
38:25 Well, you pass another argument in, which is the pitch of the voice.
38:28 Well, what's an argument?
38:29 And what actually are we doing?
38:30 Well, we're calling a function here.
38:32 Yeah.
38:32 And so you see between the brackets, you've got a string, which is what you're going to say.
38:36 And then the next one is a number, which tells you what the pitch is going to be.
38:39 So that's two arguments.
38:41 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.
38:50 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.
38:58 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?
39:04 Well, they need to know functions.
39:05 They need to know loops and they need to know variables.
39:07 We want to teach variables, loops, functions, classes.
39:09 And then eventually, like three weeks later, like you say, they're going to be able to do a thing.
39:14 And I think things should be taught from the outside in like an onion.
39:18 Right.
39:18 You see how amazing it is on the outside.
39:20 You peel back the onion.
39:20 You learn one part of why it works.
39:22 And that just connects so much better.
39:24 Yeah.
39:25 But this chimes so much with music education, because, of course, you get handed your violin.
39:31 Now, can you imagine that?
39:32 My wife is a string teacher, so she's a fifth day in, day out.
39:35 And she's amazing at it as well.
39:37 And watching how she works is another thing that inspires me, because her early access violin stuff that she does sounds like hell.
39:47 Because it's like 36-year-old, all armed with a violin.
39:51 Now, that's not going to sound nice.
39:54 Like you're killing a goose or something, right?
39:57 Yeah.
39:57 Yeah.
39:58 It's like strangling cats for a very long time.
40:02 But what Mary does is introduces gradually and in an outside-in sort of a way, various violin playing techniques.
40:11 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.
40:18 And she says, well, if you go, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee, gee.
40:24 It'll fit with what I'm doing.
40:26 And so they all go, blah, blah, blah, blah, blah, blah, blah, blah.
40:29 Yeah.
40:29 You know, but it kind of sounds okay.
40:31 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.
40:36 She's playing a 12-bar blues bass line.
40:38 And they feel they're part of it.
40:39 And so in their eyes, they're making performance.
40:41 And it gives them the momentum, just as we were just talking about with kids learning how to code.
40:48 And so starting from, do I see a need for learning this?
40:52 I have a reason for wanting to learn this thing.
40:56 Is perhaps the primary way that music teachers especially, but perhaps people who teach code, should go about inspiring those beginners for whom, you know, they're not, how can I put it, already inclined for programming.
41:11 You see what I mean?
41:12 Some people have a crystal clear laser focus.
41:15 I want to build this thing.
41:16 And they just know, I'm just going to plow through the technical steps until I get to that thing.
41:20 But a lot of people just have a general interest.
41:22 And then it's harder to plow through when you don't have a target.
41:26 Yeah.
41:26 Yeah.
41:27 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.
41:38 I don't know.
41:39 I'm making this up.
41:40 Yeah.
41:40 I know exactly what you mean.
41:42 Yeah.
41:42 Yeah.
41:43 There's a switch.
41:44 It detects the thing.
41:45 The thing works and the cat is wet.
41:47 That's an awesome thing.
41:49 I'm certainly going to build that.
41:50 And in that moment, that's when you've got them.
41:54 Now they're willing to learn.
41:56 The stupid syntax of a loop or something.
41:59 Yeah.
41:59 Because that's their steps.
42:02 Their staircase towards their goal.
42:04 Yeah.
42:04 Yeah.
42:04 Exactly.
42:05 Exactly.
42:05 Exactly.
42:06 Cool.
42:06 So you're speaking of projects.
42:07 Actually, on the microbit.org site, there's a whole bunch of ideas or projects.
42:12 Maybe I'll throw some out and we can just comment on them.
42:14 So one was a combination lock.
42:17 Yeah.
42:17 Yeah.
42:18 What was the idea of that?
42:19 Do you remember?
42:21 Just so you know, I wasn't involved in many of these projects.
42:25 All right.
42:26 Well, let me just throw them out there so people have an idea of what people.
42:30 So you can go to microbit.org slash ideas.
42:32 Yeah.
42:33 And they've got many, many projects.
42:35 I just grabbed a few.
42:35 I thought were interesting.
42:36 So you can build a digital combination lock with your microbit.
42:39 A Morse code phone if you have two microbits.
42:42 Yeah.
42:43 Okay.
42:43 So I can tell you about that because it was my kids who did that.
42:45 Really?
42:45 Okay.
42:46 You got to tell us about that one.
42:47 Yeah.
42:47 Okay.
42:47 So at Python UK, there was an education track that I used to be involved in.
42:53 And we had a kid's day where kids would turn up.
42:56 And the way the kid's day would work is there would be like lessons in the morning where kids
43:00 would try different projects.
43:01 And in the afternoon, it was like, you are now let loose.
43:04 Think of the thing you found most interesting in the morning and go do more of that.
43:08 And at five o'clock, we're going to present to the whole of the conference just before
43:13 lightning talk, the stuff that we've been doing.
43:15 And so two of my kids and one of their buddies came up with my daughter had actually been teaching
43:23 herself Morse code.
43:24 And so the A button was a dot and the B button was a dash.
43:28 And there's a radio on the microbit.
43:30 And so she said to the audience, she was, I don't know, 15 at the time.
43:34 She said, so give me a message saying, like, hello world.
43:38 So she went, yeah.
43:38 Okay.
43:39 Well, that's obviously now I don't know Morse code.
43:41 Blah, blah, blah.
43:42 Deep, dee, dee, dee.
43:42 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.
43:45 And you could see the sort of hall going, how does she know Morse code?
43:48 But that was kind of her thing.
43:50 Yeah, cool.
43:51 It was just transmitting the dots and the dashes.
43:54 And then that buddy held up his mic a bit and it scrolled across hello world.
43:58 Nice.
43:58 It's such a fun thing to do.
44:01 Fun thing to do.
44:01 Yeah, that's another really cool one.
44:03 One that was interesting was live data logging with Python and Mew, the editor, which drew like graphs and stuff.
44:10 Yeah.
44:10 of the, like whatever's receiving.
44:12 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?
44:21 My dog activity or something.
44:23 Yeah, exactly.
44:24 How many times did my frog jump if I can stick a sensor to my frog?
44:28 Yeah.
44:28 So you can control a little traffic light to the micro bit.
44:31 Yeah.
44:31 One that was cool that talks about this blocky type of programming was the hour code has a build a micro bit virtual pet.
44:39 Yeah.
44:39 Which is pretty cool.
44:41 And you can drag and drop the little boxes on there and stuff.
44:44 Yeah.
44:44 It's kind of like a Tamagotchi from, I don't know, the mid-90s.
44:47 You remember that?
44:48 Yes.
44:48 Oh, my gosh.
44:49 I got a 10 to my Tamagotchi.
44:51 No, no, you don't have to.
44:53 It's really not necessary.
44:54 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.
45:01 You know, you put the little disposable engine, they go up like 500 feet and then they shoot off.
45:06 Yeah, exactly.
45:07 Etsy, exactly.
45:08 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.
45:14 And it'd be fun.
45:15 Yeah.
45:15 So the accelerometer, that is gravity, obviously.
45:18 Yeah.
45:19 And so what you should see if you're logging, you know, take a reading every whatever, millisecond, microseconds, whatever, and take the reading, store it on the local file system, get the log back, stick it to a graphing program.
45:33 And you'll see takeoff.
45:34 It will be this big spike.
45:36 And then you'll see freefall as well, which would be a big spike on another, you know, axis as well.
45:41 Right.
45:41 That's awesome.
45:42 And then you probably can do a little calculus to, you know, actually figure out altitude and top speed and things like that.
45:48 Obviously, my, you know, 10 year old daughter is not going to do the calculus, but she could be part of the project.
45:53 And I go, well, you feed that number here and it tells you how fast it's going or something.
45:57 Right.
45:58 Yeah.
45:58 The important thing, though, is that you might be using Python for doing this on a micro bit.
46:03 But if you talk to some of the folks at NASA, they use Python.
46:08 Yeah.
46:08 So there's this, you know, obviously they don't use Python for space bound payload, although there's a story in there.
46:14 Ask me about that in a second.
46:15 They do use Python for all sorts of other things.
46:18 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.
46:32 And you're like, well, hell, man, I'm just like a space scientist, you know, rocket.
46:35 Yeah, that's so awesome.
46:36 Right.
46:37 Like the person I met at JPL or SpaceX or whatever is like, they actually write the same code as I do, not just I'm simulating programming and they do it for real.
46:45 Right.
46:46 That's actually what's one of the things that's super awesome about Python, isn't it?
46:50 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.
47:01 Yeah.
47:02 Yeah, exactly.
47:03 I'm still on the same page as you with that.
47:06 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.
47:15 And it was originally going to sort of run Python.
47:18 Oh, wow.
47:18 Okay.
47:19 Yeah.
47:19 I didn't know that.
47:20 Yeah.
47:20 But he told me that the reason they chose Python was because of this continuity.
47:26 You could start with print hello world.
47:28 And it was as simple as, you know, 8-bit basic back in the day.
47:32 Or you could write YouTube.
47:36 Exactly.
47:36 Yeah.
47:36 Exactly.
47:37 Or Instagram or whatever.
47:38 Yeah.
47:39 Yeah, exactly.
47:39 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.
47:49 Right.
47:49 Imagine telling engineers that for the first 12 years they're going to study, you know, this type of calculation and math and numbers.
47:59 And then, well, those numbers don't work anymore.
48:00 You have a new set of numbers.
48:02 Yeah.
48:02 And new way of doing arithmetic and math.
48:05 Yeah.
48:05 And you're like, why am I doing this, right?
48:07 Like, why would I switch?
48:09 So that's a really great point.
48:10 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.
48:26 And he's sort of, you know, one of these elders of the internet type people that you hear.
48:30 But he has a great quote where he talks about the thing that you need to do is let kids do the real thing.
48:38 And they do this in sports and they do this in music.
48:40 Kids are always doing the real thing.
48:43 It might be a simplified thing, but it's still the real thing at their level of development.
48:47 And I think there's a danger with programming because people make ABC very basic programming environments that aren't the real thing.
48:57 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.
49:03 And the teacher who they had last year goes, so that stuff that we did with Scratch, that was all fun.
49:07 You know, the cat was great, but now we're going to learn Python.
49:10 And all that knowledge about how Scratch works is just gone.
49:15 Yeah.
49:16 And so this is the advantage Python has.
49:19 You can start with kids who are very young because Python is such a beautifully simple and easy to learn language.
49:26 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.
49:40 And things like idle came out of that and the turtle module and stuff like that.
49:45 But also the fact that Python is based in part on ABC, the kind of goofy language that he was originally working on that made him think, just like we were talking, oh, man, just give me a week and I'll have an improved version of this.
49:58 Which is kind of what happened over Christmas in...
50:00 1991?
50:01 1989 or something like that.
50:03 Yeah, yeah, yeah.
50:03 1999, you know, so the legend says, you know, Guido was like, you know, oh, man, can't be that hard.
50:10 You know, I'm going to do ABC, but a bit better.
50:12 It's a white space based language.
50:14 I want it to be easy to learn because ABC was a teaching language for students learning, coming to programming for the first time.
50:21 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.
50:30 And the fact that it's so popular and widely used in the industry means that there is this continuity for learners.
50:36 And that is a real great strength that we have.
50:39 Yeah, I think it's a real positive.
50:41 So one thing I did want to give you a chance to talk about, because it's really related to this whole conversation, are your two books.
50:49 And to be honest, I, you know, one of them, the first one, Python Education, sounds super interesting to me.
50:55 I hadn't even heard of it.
50:56 Tell everyone about your O'Reilly books.
50:58 Okay.
50:58 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.
51:07 But a couple of years ago, if you go to PyCon, O'Reilly has little reports that they hand out to people for free.
51:13 And I did one of those about Python Education.
51:16 It's about 30 or 40 pages long.
51:19 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.
51:27 And also for programmers who might be interested in learning how they might help support educators, colleagues who are teachers and things like that.
51:36 So I did that book.
51:38 And it's free to download from the O'Reilly website.
51:40 So if you just Google Python in education, then it's a free download.
51:44 It takes, I don't know, half an hour to read.
51:47 And the other one, which I wrote most recently, published about a year ago, is programming with MicroPython.
51:53 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.
52:04 Yeah.
52:05 His enthusiasm is sort of infectious.
52:06 And you get these devices and you suddenly realize how remarkable the achievement Damien has managed to do is.
52:14 You know, he shrunk Python 3 right the way down to, you know, something that could work in 16K of RAM.
52:22 Right, on a $5 chip.
52:23 Yeah, yeah, exactly.
52:24 Exactly.
52:25 And the fact that it's also fun to work with various different protocols, hardware-level protocols.
52:32 And what are you doing with bit flipping?
52:33 Or you're using very low-level protocols to make a buzzer sound or to draw a picture on a very simple screen.
52:41 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.
52:49 You could poke into that and turn the pixel the right color.
52:53 Do you know what I mean?
52:53 Right, right, right.
52:54 There was no protected memory.
52:56 You just get it.
52:56 Yeah, exactly.
52:57 You know, we are so far away in terms of layers of abstraction when we're working in Python normally that you don't even get to think about what the computer really is doing.
53:10 Whereas with MicroPython, you know, you're saying, you know, switch the voltage on on this GPIO pin and the LED works.
53:18 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.
53:28 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.
53:37 But it sounds fun.
53:39 It's really good fun.
53:40 It really is good fun.
53:41 Just to feel that you're that close to the hardware.
53:44 Yeah, that's wonderful.
53:45 All right.
53:45 So we only have a few minutes left.
53:47 Yeah, yeah, yeah.
53:47 And I have a whole bunch of stuff that I want to talk to you about.
53:49 We don't have time to cover it, but I do want to let you just quickly, briefly touch on two things.
53:54 One, the Mu code editor, which is a sort of an IDE.
53:59 Maybe that's a bit of a strong word, but like a code editor for beginners.
54:02 Yeah.
54:03 Do you want to tell people quickly what that is and how it's related here?
54:05 Yeah.
54:06 So third time this has been mentioned, you know, how hard can it be?
54:09 Give me a week.
54:09 I'll come back with something better.
54:11 So I did pretty much all the tooling for Python for the BBC micro:bit.
54:15 So the browser-based editor is the thing that I wrote along with a whole bunch of other stuff.
54:21 And as any good software developer would do, they test it with their target audience.
54:26 And so I traveled to the UK working with teachers and programmers and observing them using early versions of this browser-based editor.
54:34 And it didn't really work.
54:35 And whilst they appreciated the fact that it was on a browser and it was easy, it was also a pain in the backside because it was on a browser and browsers had limited sort of connectivity with the device.
54:45 And you couldn't bring up the Python REPL on the board and things.
54:48 And so I kind of got a list of requirements that teachers and developers really wanted.
54:53 And Sunday afternoon it was raining.
54:54 I remember thinking, "How hard can it be to use PyCute or something like that to do it?
54:59 Yeah, yeah.
55:00 It was simple as that as that." And so that happened and people enjoyed it.
55:05 And then the Raspberry Pi Foundation very graciously said, "Well, if we give you some money to support your work, could you take some time to turn it from a micro bit-only editor to being a generic Python editor?"
55:16 So I did that.
55:17 And it now has a simple debugger, graphical debugger.
55:20 It has a Jupyter Notebook built in as its REPL, an IPython type thing.
55:25 It works with Adafruit's amazing line of circuit Python-based boards.
55:29 There's a PyGame0 mode, so it makes it very easy to write games, but it's aimed at beginners.
55:34 Nice.
55:35 It's been rather wonderful over the last few months to see the community sort of coalesce around this editor.
55:41 Educators realize that there's this thing that they can use.
55:43 It's free to download.
55:44 We've got lots of people providing translations.
55:47 So, for example, I met some French teachers who said, "The fact that Python has keywords in English isn't a problem.
55:55 The problem is that idle is in English." Or whatever code is in English.
55:59 The user interface itself, the menus and whatnot are, yeah?
56:02 Yeah, exactly.
56:03 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.
56:08 Well, I think there's about 150 strings to translate to get you into a different language.
56:14 And so I said, "Somebody did it over the weekend." And hey, presto, "Le NU" is born.
56:20 "Le NU" is for Germany, and "El NU" for Spain, and so on.
56:26 You know, I heard today from a friend in France that they'd run a Girls Can Code course, and they were all using NU in French, and it was nice and easy.
56:34 And so NU is, I guess, the outcome of a whole bunch of people getting enthusiastic about building an editor for beginner programmers.
56:44 Because if you ask a programmer, "What do you think should be in an editor?"
56:47 You will get a programmer's editor rather than a beginner's editor.
56:50 Yeah.
56:50 And so one of the important aspects of how we made NU is that we put the beginner as the focus.
56:56 Now, the interesting side effect of that is that we tend to get bug reports.
57:00 And in fact, I can see in my alert, somebody saying, "I think we should have this feature in our chat channel."
57:07 That's not going to happen because if you know enough about programming to ask for a feature to do with NU, then you are beyond NU.
57:13 You should go use Atom or Visual Studio Code or whatever it is.
57:17 Yeah.
57:18 You have graduated beyond NU.
57:20 So NU is just the stage where you're toddling.
57:23 Yeah.
57:24 It's the springboard into the real editor, right?
57:26 Yeah.
57:27 Yeah.
57:27 Interesting.
57:28 Okay.
57:28 That's a super cool story.
57:30 The other thing that you had mentioned previously was Code Grades.
57:34 Yeah.
57:35 As an analogy to musical past or even like Taekwondo or something like that, right?
57:42 Yeah.
57:43 Tell us about that.
57:44 And that has its own site, doesn't it?
57:45 Yes, that's right.
57:46 So Code Grades is an experiment.
57:48 I want to see if this works, really.
57:50 In the UK and outside in the world, I'm not sure in the US, but you'll see what I mean.
57:55 We have these things called Music Grades.
57:57 If you remember back to the how to draw an owl, you get draw two circles and then draw the rest of the owl.
58:02 Well, music grades are the steps in between that take you from the very simplest to the most complicated.
58:09 And in music, this is you prepare a little concert.
58:14 You go along and play this to an examiner.
58:16 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.
58:27 And the higher up the grades you get, the more difficult it becomes.
58:30 And so my idea is to apply that to programming.
58:33 So at the moment this week, we started grade one Python with a class of 15.
58:39 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.
58:49 And they are going to present a project that they have built.
58:52 So if it matches, if it meets certain requirements for grade one Python, they get to pass.
58:58 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.
59:09 We want to see documentation on read the docs.
59:11 We want to see a setup dot py that works with PyPI.
59:14 You know, all these things that we might expect as standard for a Python project.
59:19 These steps will get you to that.
59:22 And so code grades is this experiment to see if it works.
59:26 And we'll find out in, well, hopefully eight weeks when these folks take their grade one.
59:30 And if that works, then, well, I need to make a decision and see what I do with the idea.
59:35 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.
59:43 And these people need to be experts.
59:45 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.
01:00:01 Right.
01:00:02 To optimize interest rates for stock trades or some weird thing, right?
01:00:07 Some weird angle there.
01:00:08 Yeah, yeah, exactly.
01:00:10 So we'll see what happens.
01:00:11 It's early days, very early days.
01:00:13 But so far, the feedback that I've had from coders who might act as code mentors who would be examiners has been good.
01:00:22 The feedback from teachers has been really great.
01:00:25 I was at a teacher's meeting a couple of weeks ago where I introduced the concepts and they were like, well, where do I download the curriculum?
01:00:30 You know, how do I enter my students for this?
01:00:34 Well, you know, hold on.
01:00:36 Hang on.
01:00:36 We're not here yet.
01:00:38 Yeah, exactly.
01:00:40 And the first class on Tuesday evening this week, at the end, this has never happened to me before.
01:00:45 I'm really quite proud of it.
01:00:46 They gave me a round of applause when I said that's it.
01:00:49 Oh, wow.
01:00:49 And what I had tried to do was use techniques from music education.
01:00:54 So it wasn't a case of today we're going to do loops.
01:00:57 Next week is going to be function.
01:00:59 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.
01:01:08 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.
01:01:19 And I set them a challenge, which was, well, can you change the way the alien moves?
01:01:25 Or can you change the sound effect that happens when you click him or something like that?
01:01:28 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.
01:01:38 So that's what CodeGrowth is about, to be confirmed as to whether it works or not.
01:01:42 But I'll certainly let you know if it does.
01:01:44 Yeah, it sounds really interesting.
01:01:46 I'll definitely link to it in the show notes so people can check it out.
01:01:49 Cool.
01:01:50 All right.
01:01:51 I think we should probably leave it here for this topic, but it's been great to talk about, Nicholas.
01:01:54 Now, before I let you go, two quick questions for you.
01:01:57 Okay.
01:01:58 If you're going to write some Python code, what editor do you use?
01:02:00 I use VI for historical reasons.
01:02:03 Yeah, awesome.
01:02:04 Right on.
01:02:06 And then a notable PyPI package, not necessarily the most popular, but one you've come across, people should know about whatever.
01:02:13 That's hard.
01:02:16 That's really hard.
01:02:18 I'll tell you what.
01:02:19 It's a popular package and it's requests.
01:02:21 Okay.
01:02:21 And the reason I'm saying that is because I know some of the core maintainers, I'm thinking of Corey here, and they do amazing work on a module that has an API that is just so beautifully simple.
01:02:34 And it works.
01:02:35 And I know from talking with Corey that HTTP is a real gnarly type protocol to have to work with.
01:02:43 Yeah.
01:02:44 Oh, yeah.
01:02:44 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.
01:02:50 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.
01:03:00 And it's a great way of, again, focusing on the user where the user is the programmer.
01:03:05 I just want to get this web page.
01:03:07 Okay.
01:03:08 Or this JSON at this endpoint.
01:03:10 It just works.
01:03:11 I love that.
01:03:11 And the documentation is great.
01:03:13 And the community around it is good, too.
01:03:15 Yeah.
01:03:16 It's definitely one of the special ones out there.
01:03:18 Yeah.
01:03:18 So I see your requests and I respond with a responder.
01:03:21 Have you heard of this?
01:03:22 Responder?
01:03:23 No.
01:03:23 No.
01:03:24 So Kenneth Wright just came out with a brand new web framework called Responder.
01:03:30 You know, the opposite end of requests.
01:03:32 It literally came out on October 8th.
01:03:34 So it's going to be interesting to see his take on the micro framework, like Flask-esque, but not Flask.
01:03:41 So this is good because, and I'll tell you, so one of the things that I'm thinking of including in Mew, the next version of Mew, is a way for beginners to very quickly write a web application.
01:03:52 Right, right.
01:03:53 Like the easiest path forward on the web app, yeah?
01:03:55 Yeah, exactly.
01:03:56 Exactly.
01:03:56 Because Mew has this notion of modes.
01:04:00 And if there's a website mode, and I was thinking of maybe using something like Bottle, you create a function for your endpoints.
01:04:07 There's a directory with your template.
01:04:09 Go do some stuff.
01:04:11 But if Responder is there, I hadn't heard that.
01:04:15 Oh, man.
01:04:15 It's only a few days old.
01:04:16 So, yeah, you have to check it out.
01:04:18 I don't know.
01:04:18 I'm going to definitely, you know what I'm going to do?
01:04:20 I'm going to check this out.
01:04:22 Python-Responder.org.
01:04:25 So, yeah, pretty cool.
01:04:26 Okay, cool.
01:04:27 Oh, thanks for letting me know about that.
01:04:29 Right on.
01:04:31 All right.
01:04:32 So, people have heard about the BBC Microbit, all this education stuff.
01:04:36 You've heard about Code Grades.
01:04:37 Final call to action.
01:04:39 What should they do to get involved or to make this part of their world?
01:04:42 Okay.
01:04:43 So, if you need any motivation about should I be doing this, just think of it this way.
01:04:49 You're talking with your future colleagues here.
01:04:52 And how your future colleagues turn out depends on who turns up to do the education with them,
01:04:58 who turns up to teach them, who turns up to show them the way to code.
01:05:05 And I don't know about you.
01:05:06 I'd like to be going to Python in 20 years' time.
01:05:08 So, it's kind of incumbent on us to make sure that we help foster the community of tomorrow.
01:05:15 And the way you do that is through education.
01:05:18 The other motivation is this.
01:05:19 If you really want to become an expert at something, teach it.
01:05:23 Because you have to introspect them.
01:05:25 And you have to think, why do I do it like this?
01:05:29 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.
01:05:37 And that is not only a great skill for you to have to help your colleagues.
01:05:43 You know, you need to explain this API that you've created.
01:05:45 But it's also good for you because you have to sit back and think about what you're doing.
01:05:50 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.
01:05:59 But in the long term, they are totally at the core of what you should be doing.
01:06:04 So, then my speech.
01:06:07 It's a great speech and I definitely agree with it.
01:06:10 So, it's awesome.
01:06:11 Thanks for saying it.
01:06:13 All right, Nicholas.
01:06:14 Thank you for being on the show.
01:06:15 It's been great to have this chat and share ideas with you.
01:06:17 Yeah.
01:06:18 Thank you very much.
01:06:18 It's been great to be here.
01:06:19 You bet.
01:06:19 Bye.
01:06:20 Bye-bye.
01:06:20 This has been another episode of Talk Python to Me.
01:06:24 Our guest on this episode was Nicholas Tolerwey.
01:06:27 And it's been brought to you by Datadog and Talk Python Training.
01:06:30 Datadog gives you visibility into the whole system running your code.
01:06:34 Visit talkpython.fm/datadog and see what you've been missing.
01:06:39 Don't even throw in a free t-shirt for doing the tutorial.
01:06:41 Want to level up your Python?
01:06:42 If you're just getting started, try my Python jumpstart by building 10 apps or our brand new 100 days of code in Python.
01:06:49 And if you're interested in more than one course, be sure to check out the Everything Bundle.
01:06:53 It's like a subscription that never expires.
01:06:56 Be sure to subscribe to the show.
01:06:58 Open your favorite podcatcher and search for Python.
01:07:00 We should be right at the top.
01:07:01 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.
01:07:10 This is your host, Michael Kennedy.
01:07:12 Thanks so much for listening.
01:07:14 I really appreciate it.
01:07:15 Now get out there and write some Python code.
01:07:17 Thank you.
01:07:17 Thank you.
01:07:36 Thank you.