1 00:00:00,000 --> 00:00:03,000 [Music] 2 00:00:03,000 --> 00:00:07,000 Welcome to the Circuit Python Show. I'm your host, Paul Cutler. 3 00:00:07,000 --> 00:00:15,000 This episode I'm joined by Martin Tam. Martin wrote the first Code Club moon hack projects in Scratch and Python, used by over 10,000 kids in Australia. 4 00:00:15,000 --> 00:00:24,000 He also blogs on maker topics, runs a maker store, works in IT security, and contributes to various open source projects and community conferences. 5 00:00:24,000 --> 00:00:28,320 Martin's latest book, "Microbit Projects with Python and Single-Board Computers Building 6 00:00:28,320 --> 00:00:33,840 Steam Projects with Code Club and Kids Maker Groups" was published this past April. 7 00:00:33,840 --> 00:00:36,840 Martin, welcome to the show. 8 00:00:36,840 --> 00:00:37,840 Thanks. 9 00:00:37,840 --> 00:00:39,480 Great to be here. 10 00:00:39,480 --> 00:00:42,120 How did you first get started with computers and electronics? 11 00:00:42,120 --> 00:00:48,520 I used to do a paper round when I was in grade six, which would probably be maybe 11 or 12 12 00:00:48,520 --> 00:00:49,520 or something. 13 00:00:49,520 --> 00:00:52,880 My parents really, they initially wanted me to do it. 14 00:00:52,880 --> 00:00:55,800 And then they realised that that cost them too much 15 00:00:55,800 --> 00:00:57,640 to repair my bike and everything. 16 00:00:57,640 --> 00:01:01,400 So eventually they got a computer and I quit my paper 17 00:01:01,400 --> 00:01:05,000 and I come home and play with this computer. 18 00:01:05,000 --> 00:01:07,720 It's the usual thing, get sick of playing games. 19 00:01:07,720 --> 00:01:09,480 And, you know, we used to have to type in 20 00:01:09,480 --> 00:01:11,560 all our games as well. 21 00:01:11,560 --> 00:01:14,600 I noticed that, yeah, there was BASIC 22 00:01:14,600 --> 00:01:16,840 and then there was assembly language. 23 00:01:16,840 --> 00:01:18,620 I also went straight to assembly language 24 00:01:18,620 --> 00:01:21,260 and started looking at how things worked. 25 00:01:21,260 --> 00:01:24,540 I looked at, "How does this work? 26 00:01:24,540 --> 00:01:26,780 It's such this code here." 27 00:01:26,780 --> 00:01:31,340 Then I went through and one thing led to another. 28 00:01:31,340 --> 00:01:33,320 I'm like, "A system call, 29 00:01:33,320 --> 00:01:34,580 print something on the screen." 30 00:01:34,580 --> 00:01:35,740 I'm like, "Okay." 31 00:01:35,740 --> 00:01:37,720 Then I was like, "That worked. 32 00:01:37,720 --> 00:01:41,360 So wait, what does that do on the big covers?" 33 00:01:41,360 --> 00:01:43,700 I looked in the system call and I just saw, 34 00:01:43,700 --> 00:01:48,320 it just copies a byte from one location to another. 35 00:01:48,320 --> 00:01:54,960 So what if I copy something to 1024 in memory and it appeared on the screen? 36 00:01:54,960 --> 00:01:57,760 And so, oh, well, that's another shortcut. 37 00:01:57,760 --> 00:02:03,760 And then after that, it was, oh, you can do interrupt driven programming and you can make 38 00:02:03,760 --> 00:02:09,680 all these things happen really quickly unless you just really load it up, which I did and the whole 39 00:02:09,680 --> 00:02:13,920 computer started to slow down. But yeah, it was pretty exciting. And that's sort of how I got 40 00:02:13,920 --> 00:02:20,260 started and fast forward to yeah when I got into security and strangely all 41 00:02:20,260 --> 00:02:23,880 these useless things became really useful for you know reverse engineering 42 00:02:23,880 --> 00:02:25,480 malware and things like that. 43 00:02:25,480 --> 00:02:27,980 Your new book Microbit Projects with Python and 44 00:02:27,980 --> 00:02:32,120 Single-Boarder Computers was released this past April. Tell me a little about the book. 45 00:02:32,120 --> 00:02:36,040 Yeah, Aaron from Apress hit me up and said oh because I've been 46 00:02:36,040 --> 00:02:43,220 writing some tutorials on a blog and he said oh yeah who does these and that'd be me. 47 00:02:43,220 --> 00:02:46,760 Yeah, we had a brainstorming session and it just worked. 48 00:02:46,760 --> 00:02:53,000 It was probably in the middle of the pandemic where everyone had crazy hair and was getting 49 00:02:53,000 --> 00:02:58,640 up at silly times of the day and working from home a bit more than they normally do. 50 00:02:58,640 --> 00:03:06,760 It just came together and pretty much I did several years of Code Club. 51 00:03:06,760 --> 00:03:11,720 So there's Code Club World, Code Club Australia, Code Club UK. 52 00:03:11,720 --> 00:03:14,560 At my son's school, I volunteered. 53 00:03:14,560 --> 00:03:19,960 Well, I actually asked how they registered for Code Club and I asked how it was delivered. 54 00:03:19,960 --> 00:03:23,800 And that seems to mean I want to volunteer. 55 00:03:23,800 --> 00:03:25,520 So I ended up volunteering for that. 56 00:03:25,520 --> 00:03:30,560 Yeah, the teacher who'd been there from the start says, "It's several years now. 57 00:03:30,560 --> 00:03:33,160 This is quite an epic thing." 58 00:03:33,160 --> 00:03:38,120 All these things that we learnt from making lots of mistakes 59 00:03:38,120 --> 00:03:40,160 and getting really frustrated 60 00:03:40,160 --> 00:03:44,080 and having lots of false starts turned out 61 00:03:44,080 --> 00:03:46,720 they would be really good to put into a book. 62 00:03:46,720 --> 00:03:49,280 And that's essentially it in a nutshell. 63 00:03:49,280 --> 00:03:51,720 That was, this is what we did. 64 00:03:51,720 --> 00:03:53,920 This is, yeah, I'm not a teacher. 65 00:03:53,920 --> 00:03:57,880 I do have a certificate in course development and training 66 00:03:57,880 --> 00:04:02,560 and I do train people in secure development, 67 00:04:02,560 --> 00:04:06,800 But other than that, I hadn't really taught kids. 68 00:04:06,800 --> 00:04:09,440 - For those who might not know, what is a code club? 69 00:04:09,440 --> 00:04:12,020 - So it's an extracurricular activity, 70 00:04:12,020 --> 00:04:16,520 the way of getting kids coding outside of school. 71 00:04:16,520 --> 00:04:20,280 Some code clubs run in conjunction with the school, 72 00:04:20,280 --> 00:04:21,840 which is what ours was, 73 00:04:21,840 --> 00:04:24,840 and others are at the local library. 74 00:04:24,840 --> 00:04:29,080 Coding over here in Australia is in the curriculum, 75 00:04:29,080 --> 00:04:31,240 but it wasn't so much. 76 00:04:31,240 --> 00:04:38,240 And I really liked the idea because I sort of feel like coding and those kinds of other skills, 77 00:04:38,240 --> 00:04:46,240 they seem to be more empowering when there's something that's yours rather than something that's thrust upon you. 78 00:04:46,240 --> 00:04:57,240 And so, yeah, so Code Club is essentially a bunch of volunteers, a group of kids sitting down and going through a bit of a curriculum. 79 00:04:57,240 --> 00:05:00,240 And we just sort of pushed it harder and harder. 80 00:05:00,240 --> 00:05:07,160 It ended up venturing into things like electronics, 3D printing, that sort of thing. 81 00:05:07,160 --> 00:05:08,360 Who is the book intended for? 82 00:05:08,360 --> 00:05:12,440 Is it more for the kids or more for the folks running the code club? 83 00:05:12,440 --> 00:05:21,680 So the book is really for anyone who's keen to run a code club or make a group for kids. 84 00:05:21,680 --> 00:05:23,800 So that could be kids. 85 00:05:23,800 --> 00:05:27,120 There's quite a few teenage kids who do that. 86 00:05:27,120 --> 00:05:31,200 but also parent volunteers who are really keen. 87 00:05:31,200 --> 00:05:34,320 There's also a lot of teachers that are quite keen, 88 00:05:34,320 --> 00:05:36,400 which is really, really good to see. 89 00:05:36,400 --> 00:05:41,400 There's a big difference between when a teacher embraces it 90 00:05:41,400 --> 00:05:44,360 and does this sort of tinkering for fun 91 00:05:44,360 --> 00:05:46,640 rather than just part of their job. 92 00:05:46,640 --> 00:05:49,320 It's a hard message to get across. 93 00:05:49,320 --> 00:05:52,480 And you get that look where, 94 00:05:53,360 --> 00:05:56,500 are you some kind of weirdo who likes this stuff? 95 00:05:56,500 --> 00:06:00,340 And it's always a little bit disappointing when I get that, 96 00:06:00,340 --> 00:06:02,420 but then you get the teachers 97 00:06:02,420 --> 00:06:04,180 and they get really excited about things 98 00:06:04,180 --> 00:06:07,540 and that's where you're, oh, this is really good. 99 00:06:07,540 --> 00:06:10,340 - Kids learn in different ways and at different speeds. 100 00:06:10,340 --> 00:06:11,860 How do you keep the kids interested 101 00:06:11,860 --> 00:06:13,980 and not get discouraged? 102 00:06:13,980 --> 00:06:18,980 - I guess a lot of it is reading what the kids are into. 103 00:06:18,980 --> 00:06:22,540 At the start, we were just really happy 104 00:06:22,540 --> 00:06:27,700 get through one session. It's strange because you know not much should have 105 00:06:27,700 --> 00:06:32,860 changed since we started to now but when we started we had a lot of kids that had 106 00:06:32,860 --> 00:06:38,640 grown up with tablets and iPads and phones and we would say something like 107 00:06:38,640 --> 00:06:42,880 you know I'll go to the drop-down menu and they would just look at us blankly 108 00:06:42,880 --> 00:06:49,220 and I'm like oh that's interesting or they wouldn't know how to use a mouse 109 00:06:49,220 --> 00:06:54,220 or they would touch the screen and be like, "Don't touch the screen!" 110 00:06:54,220 --> 00:07:00,220 And yeah, so there are a few challenges with that, but we started to read what 111 00:07:00,220 --> 00:07:05,780 different kids from into. So for example, if you get a kid who sits down and puts 112 00:07:05,780 --> 00:07:12,500 his fingers on, you know, WASD and holds the mouse, then this kid plays games. 113 00:07:12,500 --> 00:07:18,500 So you can kind of hook into that. Other times you might just see different 114 00:07:18,500 --> 00:07:22,900 things that the kids like about things and you can talk to them about that. 115 00:07:22,900 --> 00:07:29,220 And the other thing is just I guess telling them what we're thinking. So we would sit down 116 00:07:29,220 --> 00:07:33,620 and verbalise and that's something that I talk about in the book is verbalising what you're 117 00:07:33,620 --> 00:07:40,740 thinking, your thought process. And then we get the kids who've coded before. So yeah, 118 00:07:40,740 --> 00:07:47,460 they're pretty easy. I guess that there were limits though with that. We did try and just 119 00:07:47,460 --> 00:07:54,900 focus only on Python because you know if everyone's doing the same thing it's just so much easier but 120 00:07:54,900 --> 00:08:01,540 I feel like we had we had one hour a week if we showed them five or six different languages they 121 00:08:01,540 --> 00:08:07,140 just wouldn't get fluent in any of them and the whole idea was to empower kids and and give them 122 00:08:07,140 --> 00:08:13,220 something that they could whatever language it was stick on that language and get them at least 123 00:08:13,220 --> 00:08:21,700 fluent enough to be able to not just follow copy directions, to actually think of something that 124 00:08:21,700 --> 00:08:28,100 they want to do and be able to express themselves by creating this with code and communicate with it. 125 00:08:28,100 --> 00:08:34,980 We did see a few really good school projects that came out of it as well. So we would go along to 126 00:08:34,980 --> 00:08:40,340 some kind of open day or something like that and they'll be one of the Code Club kids and they've 127 00:08:40,340 --> 00:08:44,420 written something. So yeah, it was always really good to see that. 128 00:08:44,420 --> 00:08:49,140 So in addition to Python, the book talks about the microbit and micropython. 129 00:08:49,140 --> 00:08:53,140 Did the kids favor Python or the microbit projects one over the other, or 130 00:08:53,140 --> 00:08:58,100 does the curriculum take them through both? The co-club curriculum 131 00:08:58,100 --> 00:09:04,340 does have microbits, but more the sort of drag and drop type 132 00:09:04,340 --> 00:09:07,620 of thing. So they've got to like scratch more 133 00:09:07,620 --> 00:09:10,620 And so there's a whole curriculum of Scratch modules. 134 00:09:10,620 --> 00:09:15,620 I can't remember how many there are, but I think there's over 100 modules there, and they're all free. 135 00:09:15,620 --> 00:09:20,620 And it's free to sign up for a code club, which I think is a really, really good thing. 136 00:09:20,620 --> 00:09:28,620 I think the kids just with Python, they saw it as Python, and it was pretty universal. 137 00:09:28,620 --> 00:09:34,620 So I would talk a lot about, hey, why don't we do this project? 138 00:09:34,620 --> 00:09:36,620 Because you've learned about lists, you've learned about these. 139 00:09:36,620 --> 00:09:42,620 these and we try and put in a bit of terminology in there. I guess not to make it technical, 140 00:09:42,620 --> 00:09:48,940 but just to give them a way of, you know, if they talk to someone who has accomplished programming, 141 00:09:48,940 --> 00:09:54,540 they could communicate with them. And that collaboration is something that we talk about 142 00:09:54,540 --> 00:09:59,020 as well, like Co-Club, and I've also included a lot of that in the book as well. 143 00:09:59,020 --> 00:10:03,100 How did the kids collaborate rather than working on each project by themselves? 144 00:10:04,140 --> 00:10:10,300 I think it was just inevitable that they would start to collaborate because we'd end up with a 145 00:10:10,300 --> 00:10:17,500 bunch of kids who were a little bit ahead or had finished a bunch of projects and then we wanted 146 00:10:17,500 --> 00:10:22,700 everyone to complete projects because we did find that when people stopped when it got hard 147 00:10:22,700 --> 00:10:29,580 they wouldn't learn. I mean we all know what it's like when you start debugging things yourself and 148 00:10:29,580 --> 00:10:32,820 And then you realise you actually understand more from that, 149 00:10:32,820 --> 00:10:36,500 but it's quite easy to just stop there. So we, 150 00:10:36,500 --> 00:10:40,540 we really focus on completing the projects, not, 151 00:10:40,540 --> 00:10:42,180 not just for the sake of completing them, 152 00:10:42,180 --> 00:10:47,020 but to make sure that people broke through that gateway of 153 00:10:47,020 --> 00:10:51,260 understanding how to overcome the adversity of, you know, 154 00:10:51,260 --> 00:10:55,220 things aren't working as they should. How do I, how do I fix it? You know, 155 00:10:55,220 --> 00:10:58,500 how do I, how do I discover what went wrong? That sort of thing. 156 00:10:58,820 --> 00:11:02,400 And so then it just came into, I think we, 157 00:11:02,400 --> 00:11:06,920 the first project that we did as a group was called Devs and Testers. 158 00:11:06,920 --> 00:11:10,000 Essentially the kids just had a, 159 00:11:10,000 --> 00:11:12,920 they picked a project that one of them made. 160 00:11:12,920 --> 00:11:16,120 It was pretty generic little game. Some of them were devs, 161 00:11:16,120 --> 00:11:20,520 some of them were testers and I just had a Kanban thing on the, you know, 162 00:11:20,520 --> 00:11:23,800 with three columns were, uh, much like GitHub, 163 00:11:23,800 --> 00:11:26,640 a very simplified GitHub on the whiteboard. 164 00:11:27,140 --> 00:11:29,780 and they had post-it notes and say, 165 00:11:29,780 --> 00:11:33,060 "All right, this group of testers 166 00:11:33,060 --> 00:11:37,900 they need to find bugs or find things that can be improved." 167 00:11:37,900 --> 00:11:40,780 And then you put them on a post-it note 168 00:11:40,780 --> 00:11:44,660 and the devs team will look at it and work out, 169 00:11:44,660 --> 00:11:46,940 yeah, they'll prioritize which ones 170 00:11:46,940 --> 00:11:49,320 are worth fixing and adding. 171 00:11:49,320 --> 00:11:54,320 I thought we would have issues with collaboration 172 00:11:55,620 --> 00:11:59,400 because you can't, it's really hard to merge code 173 00:11:59,400 --> 00:12:01,800 on something like Scratch. 174 00:12:01,800 --> 00:12:04,220 - Kids like to surprise us. 175 00:12:04,220 --> 00:12:06,180 Do you have a favorite story from your time 176 00:12:06,180 --> 00:12:09,200 running a kids' club that may have surprised you? 177 00:12:09,200 --> 00:12:12,680 - We had this one guy, Jamie, and I wouldn't say he was, 178 00:12:12,680 --> 00:12:16,440 he came back as a volunteer as well later on. 179 00:12:16,440 --> 00:12:19,840 But when he was in Code Club, he would, 180 00:12:19,840 --> 00:12:22,600 and this was back in the Scratch days, 181 00:12:22,600 --> 00:12:25,240 But he was just so prolific. 182 00:12:25,240 --> 00:12:31,240 He would sit there and he would work out 183 00:12:31,240 --> 00:12:33,680 what he wanted to do, 184 00:12:33,680 --> 00:12:36,520 and he would just sit there and nut out. 185 00:12:36,520 --> 00:12:41,480 Like, he'd have all bits of code back in Scratch 186 00:12:41,480 --> 00:12:43,580 that would be a bunch of blocks 187 00:12:43,580 --> 00:12:46,560 just sitting somewhere orphaned. 188 00:12:46,560 --> 00:12:48,840 And he would have all those things so he could remember 189 00:12:48,840 --> 00:12:50,480 in case it didn't work. 190 00:12:50,480 --> 00:12:55,480 But one time I do remember he came back from holidays 191 00:12:55,480 --> 00:12:57,960 and he was messing around with the game. 192 00:12:57,960 --> 00:12:59,880 And I said, "Oh, is that your new game?" 193 00:12:59,880 --> 00:13:01,960 And I knew he made multi-level games. 194 00:13:01,960 --> 00:13:04,120 And I said, "How many levels have you got?" 195 00:13:04,120 --> 00:13:06,280 And he's gone, "13." 196 00:13:06,280 --> 00:13:08,480 And I'm like, "So you just, over a couple of weeks, 197 00:13:08,480 --> 00:13:11,240 you've just written a 13-level game." 198 00:13:11,240 --> 00:13:13,480 And they were just jumping blocks and things like that. 199 00:13:13,480 --> 00:13:15,440 It's the type of thing that you would see is, 200 00:13:15,440 --> 00:13:18,440 I don't know whether he ever went on to, you know, 201 00:13:18,440 --> 00:13:19,720 make a mobile game and that, 202 00:13:19,720 --> 00:13:24,840 that that would be the type of game that would just take off on on mobile and I think that was 203 00:13:24,840 --> 00:13:30,760 that was one of those times where that was just mind-blowing that you know someone did that and 204 00:13:30,760 --> 00:13:37,160 the other time was where I was on one of the school cabs that I used to go along to had one 205 00:13:37,160 --> 00:13:42,440 of the students sit next to me you know as my your bus buddy you had to have a bus buddy didn't say a 206 00:13:42,440 --> 00:13:47,800 word it is a different person didn't say a word it's interesting the people who like coding don't 207 00:13:47,800 --> 00:13:56,760 talk a lot they said "ah she loves Code Club" and I'm like "oh right okay" and as soon as I mentioned Code Club 208 00:13:56,760 --> 00:14:03,880 she just did not stop talking. She was super, she's like "I can't wait to get home and 209 00:14:03,880 --> 00:14:10,680 go and program things and scratch again and that" and so that was one of those things 210 00:14:10,680 --> 00:14:16,920 that we really wanted because those kids will probably still be doing that stuff even you know 211 00:14:16,920 --> 00:14:22,760 long after Code Club and that's, you know, it's become theirs. And I think that was one of the 212 00:14:22,760 --> 00:14:27,320 one of the things that makes Code Club make a difference because you're giving the kids, 213 00:14:27,320 --> 00:14:33,000 you're empowering them to be able to make their own things and to also teach themselves. 214 00:14:33,000 --> 00:14:38,360 So we're almost out of time. Last question I'd like to ask is you're about to start a new project. 215 00:14:38,360 --> 00:14:44,840 Which microcontroller do you reach for? So typically it's the most minimal board, 216 00:14:44,840 --> 00:14:51,000 micro control board that will do the job and is currently available in large enough 217 00:14:51,000 --> 00:14:56,440 quantities for their job which really really narrows it down these days. So you know sometimes 218 00:14:56,440 --> 00:15:07,640 that will be an ESP32 or you know an RP2040 is probably the most readily available boards. 219 00:15:07,640 --> 00:15:10,520 Well I'll make sure that I link to the book in the show notes. 220 00:15:10,520 --> 00:15:12,440 Martin thanks so much for being on the show. 221 00:15:12,440 --> 00:15:14,440 Thanks so much. It's been great. 222 00:15:14,440 --> 00:15:17,440 Thank you for listening to the Circuit Python Show. 223 00:15:17,440 --> 00:15:24,440 You can buy Martin's book, "Microbit Projects with Python and Single-Board Computers, Building Steam Projects with Code Club and Kids Maker Groups," 224 00:15:24,440 --> 00:15:29,440 directly from A-Press or from Barnes & Noble or Amazon with links in the show notes. 225 00:15:29,440 --> 00:15:33,440 For show notes and transcripts, visit circuitpythonshow.com. 226 00:15:33,440 --> 00:15:35,440 Until next episode, stay positive. 227 00:15:35,440 --> 00:15:40,600 [MUSIC PLAYING]