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