Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #226: Teaching Python podcast on the podcast!

Return to episode page view on github
Recorded on Thursday, Mar 25, 2021.

00:00 Hello and welcome to Python Bytes where we deliver Python news and headlines directly to your earbuds. This is episode 226 recorded March 24th 2021. I'm Michael Kennedy.

00:10 And I'm Brian Okken.

00:11 And I'm Kelly Schuster-Paredes.

00:13 And I'm Sean Tyber.

00:14 Kelly and Sean, welcome. It's great to have you both here. Super excited to have some teachers in the house.

00:20 Super excited to be here.

00:22 Yeah, so people will know Kelly and Sean are hosts of Teaching Python. Is that right? For the podcast?

00:28 That's correct.

00:29 Right. So Kelly is the teacher that codes and I am, thanks to our new merchandise, the coder that teaches. So That's fantastic.

00:37 Yeah. So you guys both run together cohost a great podcast. And what's the general focus? Like if I was in the general teaching space and I wanted to learn how to bring like Python and technology into my classroom. That's the main audience. What would you say?

00:53 The main audience has grown.

00:55 It originally was designed just for teachers.

00:57 And I think we thought that they would be K-12 or maybe college teachers, but it has developed into teachers in the developer world and businesses.

01:07 And we kind of bounce off each other's ideas.

01:10 I am a love-lifer teacher, and Sean is a geek.

01:15 [laughter]

01:17 Together you have the superpower. Fantastic.

01:19 Yes. Absolutely.

01:21 >> We've been learning a lot from each other over the last couple of years and having great conversations about what it means to be teaching code and why it's important and why it matters.

01:29 This is such a huge part of everyone's lives now, and the earlier that we can start with students and helping them learn about coding, it really helps them in so many other areas of their lives.

01:40 Kelly and I just started recording it.

01:42 We one day started pressing record on it, publishing the podcast, and I think we're a couple of 100,000 downloads later, still going strong.

01:50 - Yeah, that's fantastic.

01:51 One of my passions is that I think people really, we don't need a million more CS students.

01:57 What we need is a million people who have programming fluency and are passionate about something else and can combine those two things.

02:03 So yeah, spot on.

02:04 - I get a lot out of the podcast just as somebody that I don't, I'm not a teacher, but I teach people.

02:09 So there's a lot of stuff around that too.

02:12 So I like the podcast.

02:13 - Thank you. - Absolutely.

02:14 - Thanks.

02:15 - Do you like data classes?

02:16 - I really like data classes a lot, yeah.

02:20 And it's kind of why I'm covering this.

02:22 So there's an article called, called by a person, Jack Song, who wrote "Data Classes vs. Name Tuple vs. Object, a Battle of Performance." And it's, you know, it's a, I was interested in this because I kind of thought that, that the data, I was, I really liked data classes, but I thought I heard from somewhere that like, they were slower than other stuff.

02:47 I had used, basically, I used to use named tuples a lot, but I really liked the data class abstraction and the features that it has.

02:56 And I was slightly concerned.

02:58 I mean, not very, very much 'cause they work fast enough for me, but I am interested in whether or not I am intentionally putting something in the code that I might have to refactor later.

03:09 But so this article, he does a test example and times it for using--

03:19 let me read this.

03:20 He does the size and speed of creating, reading, and executing functions with objects named tuples and data classes.

03:27 And the result is kind of--

03:29 they're really comparable.

03:32 There is differences, but they're really close.

03:34 So I think, for me, the outcome of this is that they're--

03:39 let me see if I can grab this table--

03:41 that it's about a wash.

03:42 They're all kind of similar.

03:44 So whatever works for your code, I say go with it.

03:48 But I'd like to hear from other people.

03:49 I'd like to know if there's other studies out there that compare these and either validate the same thing or find some different result.

03:58 I'd love to hear from people.

04:00 - Yeah, a lot of these are measured in microseconds and that's kind of beyond human comprehension unless you do a whole bunch of them.

04:08 - Yeah.

04:09 - And then add those up.

04:10 So for me, I think one of the real valuable things is, you know, like the data classes, they can specify types, like this thing is an integer, and that thing is a date time, and that's a string, and that's an optional string.

04:20 And I think that communicates a whole lot, and then sort of follow on, like you can easily extend that to things like Pydantic for validation and conversion, and you know, unless they're really far off, I think that this extra information it communicates is highly valuable.

04:34 Yeah, I was gonna ask Kelly and Sean, like, do you even talk about types, data types, and how do you cover that with the younger generation?

04:42 - I was actually just teaching that about an hour ago to students, we'd cover that in the very first week about how objects have types and what you can do with different types of information.

04:52 And it's a really basic thing that I think they need to know from the beginning because later on it just gets really confusing if you don't have at least this concept of typing.

05:02 We do try using type hints here and there.

05:06 And I find that sometimes with teaching, it's helpful because they have that visual reference.

05:10 Like, oh, if I'm designing a function or I'm making a method as part of a class, I can hint at what the types are and the students can see that as we're coding together and it makes it much clearer for them what the arguments are going to be or what the return values are gonna look like.

05:24 - I was actually looking at this article from a whole, I do this 360 kind of look.

05:29 I was reading this article and I was like, oh my gosh, I love this because now I have an entryway into telling the kids about the e-finance.

05:37 And I was telling Sean, I was like, do you know that Vimbo was coded in Python?

05:41 And I do this all the time.

05:43 So this whole FinTech data classes kind of push for the kids.

05:48 And then I started searching real Python, as I always do.

05:52 And they have a great article about how they use data classes with the cards, playing cards.

05:58 So it's something that we don't really do the data classes part, but I do talk about a lot of data types.

06:03 I thought it was a cool article.

06:04 - Yeah, that's pretty neat that you all actually do cover.

06:06 I mean, you're gonna run into problems if you try to concatenate an integer with a string.

06:10 it's gonna crash and so you kind of gotta say, look, numbers and numbers can go together, strings and strings can go together.

06:16 You don't have to go too deep in that theory though.

06:18 - Oh, my sixth graders can regurgitate it.

06:21 They can't stop.

06:22 (laughing)

06:23 - Fantastic.

06:23 - One of the things I love about data classes is that you can specify the default values for all the fields and you can do that with named tuples but it's weird.

06:33 It's a weird add-on that you have to do.

06:35 - Yeah, I've always found named tuples to be a little bit confusing to explain to other people.

06:39 Like once you get it, you know it, then you're trying to teach it to someone else.

06:41 You're like, okay, it has this weird construct that doesn't follow a lot of the other stuff.

06:46 But I do like the data classes 'cause it seems to follow along with a string of really nice language features, like with fstrings and data classes where whether you want to use them or not, they're well optimized and efficient compared to other options.

06:59 Fstrings can be faster in a lot of cases than previous formatting.

07:03 Looks like data classes are continuing that trend in a really nice way.

07:06 - Yeah, cool.

07:07 All right, this next one I wanna cover, Before I show on the screen, I want to ask you two, I guess, do you do stuff with any like micro things like raspberry pie or any of the fruit stuff?

07:18 No?

07:19 - Sean.

07:20 - Kelly likes to throw them at me.

07:21 (laughing)

07:22 - It's not a ninja star, it's one of those express boards.

07:27 - Yeah.

07:28 - Sean loves them.

07:30 - Yeah, we have a ton of them in the classroom.

07:31 Kelly has a love, hate, mostly hate relationship with hardware, but we have a lot of hardware that we use for coding in Python and making things happen.

07:40 - Nice, all right, so let me put this one here on the screen and let me take apart the title 'cause there's a lot going on here.

07:46 So this person, I'm not sure the name of the person who actually runs this blog, but it's the DIY Life about like little micro things.

07:54 And oh no, it's by Michael Clements right there.

07:57 And the title is, "Can my water-cooled Raspberry Pi cluster be my MacBook?" So this guy built a water cooled, he has a water cooled raspberry pie little pieces and then got a cluster of eight of them all running together.

08:12 And he said, well, this is pretty amazing.

08:15 Let me see if I can get this video to like sort of move up so y'all can see in the section here where, where this is a crazy looking device here.

08:24 As long as we get rid of all that.

08:26 It's like what it sounds like a cluster of eight raspberry pies all working together and they're literally water cooled so they don't overheat.

08:34 And the question was, well, let's like throw some Python math at it and see if there's like a good thing for say, like data science, or you know, maybe you got kids you want to learn stuff on it or whatever, and you know, how'd it go?

08:45 So there's a lot of interesting things.

08:47 And I guess, you know, one of the first takeaways is just wait, there's Raspberry Pi clusters and they're water cooled?

08:53 What is this?

08:53 This is crazy.

08:54 Does this surprise you?

08:55 - No, so I had seen this before.

08:57 I think I've actually seen one of these in person and they have, people have been building cases for these.

09:01 to hold eight, 12, 16 of these stacked up.

09:04 And I always thought of it as a way to inexpensively learn about parallelizing clusters of machines, right?

09:11 Like you can buy or build a cluster for a few hundred bucks instead of thousands of dollars.

09:17 So they're great for learning, but I never thought anybody would try to like water cool it and make a performance rig out of it.

09:23 - Exactly, exactly.

09:26 It's really wild, it's really wild.

09:27 So the other thing that I think is an interesting takeaway that I'm not gonna cover 'cause there's just too many little details and they rip by really fast in this presentation that I'm linking to.

09:36 But there's all these tools for running Python code distributed across just multiple nodes of things that run Python.

09:43 So the way they set it up over SSH to make them communicate and do message sharing so they can parallelize the computation is pretty neat.

09:50 And I think it applies beyond the pies.

09:52 It's just anything you can SSH to more or less.

09:55 So that's pretty interesting.

09:57 So for some numbers, is there some numbers in here?

09:59 I know he's got some graphs, but I don't know.

10:02 They put the numbers.

10:03 I think the numbers are just in the video.

10:04 Oh, wait, here we go.

10:06 So I'll just read them off this, give you some real quick numbers.

10:08 So he has this like wimpy Core i5 HP laptop.

10:13 So what are we gonna compute in the number, find all the primes up to a number, 10,000, 100,000, 200,000.

10:20 So for the HP, it's like one and a half seconds, 74 seconds, and then almost five minutes, 267 seconds.

10:28 So let me grab my MacBook Air, older one, not the M1, and says, okay, that thing's a lot quicker, actually, surprisingly, so 0.8 seconds and 83 seconds, actually, that's a little slower, and then as it gets longer, I think 'cause it doesn't have the right cooling, the longer it takes, the more it slows down.

10:42 And then he says, let me run it on one node in the cluster, which is 1.5 seconds, which is actually faster than the HP, but not quite as fast as the MacBook Air, and then runs it on the grid and gets it down to, instead of 355 seconds to 85 seconds for 200,000 of them.

10:58 So it's pretty fast, right?

11:00 I mean, compared to these old slower computers, that's kind of chugging along.

11:04 - Yeah, these new Raspberry Pi 4s that are out, the latest version, I mean, they're really fast and really powerful.

11:10 Like people are using them to transcode video streams for Plex servers and Plex devices and things like that.

11:17 You can run your whole house on it with home automation.

11:20 Like there's a lot of power and it's still just like 35 bucks.

11:24 - Yeah, that's crazy.

11:24 People are running using like ad blocking DNS things for their local networks, all sorts of interesting things.

11:30 So, well, I couldn't resist running this on my two things that I have, see what I would get.

11:34 So I have an M1 Mac mini, which is quite fast.

11:39 Those M1 chips are really crazy.

11:41 And so instead of having 355 seconds on the MacBook Air or 85 seconds on the eight core water-cooled cluster, mine's 91 seconds on my Mac mini.

11:51 and it doesn't make a sound or get warm, which is crazy.

11:54 That's single threaded, and then I ran it multi-threaded and got it down to 26 seconds, which was pretty interesting.

12:01 Yeah, and if you look at the actual, this is the CPU load over time, and it turns out the way the algorithm they're using to break it down is the longer ones are much longer, and so the early ones finish, it's not an even distribution, so actually there's some room for improvements or whatever there, but the other one, I wanna just show you all, 'cause this is kind of crazy, I have an Alienware sim racing setup that I have, and it actually just blew it.

12:26 So it did 200,000 in 10 seconds.

12:29 But there's a price, one that it's expensive.

12:32 I mean, that's like a straight price, but there's also a price and sound.

12:34 Like I actually recorded it 'cause it was so loud.

12:37 Let me just play it back.

12:38 Here it is just sitting there nice and quiet.

12:42 Oh, it's starting to make some noise.

12:47 (engine roaring)

12:50 I'll just keep talking normal so you can compare.

12:54 But it's really kicking in right now.

12:58 I'll move over close to it in a minute.

13:00 How about that?

13:14 That thing is screaming.

13:15 Like you could barely talk over it if you're in the same room, but 10 seconds, it is pretty fast.

13:20 I think I have a robot vacuum that's quieter than that when it's running.

13:24 - I think you need to crack that open and water cool it.

13:27 - You know, actually this is the highest performance one you could buy from Dell, from Alienware, that's not water cooled.

13:34 I'm like, I don't really want to have to maintain my computer so I'm not getting a water cooled one.

13:38 I don't want to like take it in for its oil change or whatever you got to do.

13:42 No thanks.

13:43 - In the original discussion in the video, There is a-- it's single threaded for all the computers and then parallel on the--

13:52 the mini-- or the--

13:53 not the minis, the pies.

13:55 >>Luke: The pies, yeah.

13:55 >>Tom: Yeah.

13:57 But then in the comments, some people said, well, what about that?

14:00 And so there's an update with all the data with the parallel, too.

14:04 And it's still really fast on the parallel.

14:06 And I think it's interesting to have the speed comparison.

14:10 But I think one of the things that's important that Sean points out is you get like two or three these and you can start to explore parallel computing and distributed computing with under $100.

14:23 So, that's don't give, please don't give him any more ideas. We have things all over the classroom. I don't need any more like I think, Kelly, there's something you can water cool, maybe like set up a water thing. No, but I am going to get the water gun and start squirting him over. If he keeps, if he brings it over, but like a comparison that would be like trying to get What six mac minis together and that's that's expensive right so i'm right in a lot of classrooms might have some of these laying around from other projects that you've done or a class said and if you wanted to.

14:56 Have a student is an individual project with it you just start putting it together and you can make it work it doesn't have to be water cooled in order to get a learning experience so what is it with that is he's overclocking it is that the reason why it needs to be cool.

15:10 - Yeah, yeah, you can push them pretty hard and they heat up.

15:13 There's just a small chip on it and most of them will, you'll see people put fans and things like that on it, but the water cooling is the next level of I'm trying to push a pie really far.

15:23 - I will point out in the video, they link to a multi-threaded thing, a script, and I ran the multi-threaded script and it gave me the same times and it only seemed to be using one CPU.

15:35 It ran a bunch of stuff, but then it all put all the work onto one of the cores.

15:39 So in the show notes, I wrote my own version that's truly multi-threaded and it's up there.

15:44 So also Sam Morley out of the chat, out of the live stream says, "Pi-hole is great." Yeah, I've been thinking about setting one of these up.

15:50 It sounds fun.

15:51 All right, Kelly, I think you're up next with this one, right?

15:54 - Yeah, so it kind of segues well.

15:55 You have the Raspberry Pi, that's something easy for a lot of students to get into.

16:00 It's cost-worthy and stuff.

16:02 I'm gonna throw this out there.

16:04 It's the app for that.

16:05 This is Programs.

16:06 And I'm sure everyone has heard of this website.

16:09 It's a platform, it's got 50 million people on it.

16:13 But what's really cool for me is that I'm always looking for something to do on the go.

16:18 And I download this program as, and it's on iOS now, which is great.

16:24 It launched in iOS last year.

16:26 And the thing that I love about this over all the other apps out there is it's got a really great IDE interactive shell.

16:32 It's beautiful.

16:33 I don't know if you've ever gone to the website program is, or program is, I don't know how you pronounce it. And it's very clean. So you'll see the same sort of website design on their app.

16:44 Everything's interactive, they have challenges and programs. But putting that aside, the whole reason why I put this out there is we just had so many kids online from COVID-19. And the digital divide and the kids not being able to access, I went and I looked in UNESCO, and I I was trying to find out how many kids were actually trying to learn online last year, and they estimated about 826 million learners.

17:11 And out of all those learners, 50% of those people did not have a household computer.

17:16 So these guys who are out in Nepal have brought Python where you can code and learn and program within this tiny little app.

17:26 And it's just easy to go and learn in bite-sized chunks.

17:29 So had to throw it out there for you guys.

17:32 - Yeah, that's really neat.

17:33 What have you all done for remote stuff?

17:36 How much has been remote and how much has been in person?

17:39 - So we went back to school in August and it's hybrid, half and half.

17:44 And our kids are lucky 'cause they all have computers and most of them have pretty stable WiFi.

17:50 But I know a lot of the other public school systems, they've had trouble.

17:53 Kids have had to go to other people's houses.

17:57 They've had to borrow some computers.

17:59 They try to deploy.

18:00 I know England deployed, one of my former schools deployed all these laptops out to all, a lot of their free schools or their public schools.

18:08 So it's been hard for a lot of learners and just to be able to keep up learning on a phone 'cause almost everyone has a phone.

18:14 Yeah, so.

18:15 - Yeah, that and Google Docs and Zoom and you can kind of piece it together to be able to do multiple things there.

18:20 Yeah, that's great.

18:21 It's a good recommendation.

18:21 Does it cost any money?

18:23 - So that's the great part.

18:24 So there is a free version 'cause there are some really good apps out there that are paid.

18:29 So there's a free version and they do have the advertising, but the advertising is after that chunk of information.

18:35 So you get this great chunk, you know, you're learning about functions, and then there's a quick advert and you can X out.

18:42 But if you don't want any of the adverts you pay for, I think it's like 24, 29 a month, but super, super, super.

18:48 It goes all the way up to decorators.

18:50 So I thought it was pretty cool.

18:52 - Yeah, this is really neat.

18:54 It seems like a nice little environment.

18:56 It's got syntax highlighting and all that.

18:57 - Yeah, it's fun.

18:59 - Yeah, no, that's a great recommendation.

19:01 Brian, what's your next one here?

19:03 - Oh, what is my next one?

19:05 Oh, this is kind of neat.

19:07 The New York University, is that right?

19:11 Yeah, so there's an announcement that NYU has secured funding in the order of $800,000 over two years to go towards packaging and the packaging improvement and what else, integrating for pip and downloads and all that sort of stuff, improving the resolver.

19:33 This is kind of exciting.

19:33 This is a lot of money.

19:35 - Yeah, this is a really big deal.

19:36 Yeah, this is awesome.

19:37 - So I actually had to look some stuff up.

19:42 So there is some interesting information there as to like why New York University.

19:47 So there's been some researchers that have been working on it for a while.

19:51 So there's a couple of the things I had to look up.

19:53 So the specifically, Well, let's just say specifically what they're doing.

20:00 What this money is going towards, it's to further assess and improve PIP's dependency resolver.

20:05 And then following the work done in 2020, and also make the Resolve lib more usable by other tools in the packaging ecology.

20:13 And then in the PyPI to user pipeline, we've been talking about security problems, some on the show and read about others.

20:23 They're going to try to integrate the TUF support for signed packages through PyPI clients, and they're targeting conda, pip, and bandersnatch.

20:32 So there's a lot there I had to look up.

20:34 One, the resolvelib.

20:35 So that is a third part, it is a separate package, but it is related to pip because it's vendored into pip.

20:43 So resolvelib is vendored into pip, and I think they'd like it to be something that's usable by other tool chains as well.

20:51 And so there's improvement needed there.

20:54 Never heard of Andersnatch before, or if I have, I've forgotten.

20:57 It's a PyPI mirror client.

21:00 So, and I think it is needing some support.

21:03 So that's good.

21:04 And then TUF, what the heck is TUF?

21:06 So TUF is the update framework, and it supposedly helps, according to the website, helps developers maintain the security of software update systems, providing protection against, even against attackers that compromise the repository or signing keys.

21:23 So this notion of we're building up our company even based on a collection of open source packages, that needs to be like solid, right?

21:33 And it's more than just signing or pinning your requirements diversion numbers.

21:39 We wanna make sure that the sources are there.

21:41 And I'm sure there's a lot of details in there that I don't understand fully, but this is a good thing that we work on this more.

21:48 - Yeah, I totally agree.

21:49 I mean, we start to teach our students about installing packages and how you can use other people's code.

21:55 And what I'm really hopeful for here with this is that if we can protect this kind of critical infrastructure of Python packaging, and at the same time, keep it really simple for people who are entering into Python and learning about this, as well as other aspects of the community.

22:12 We still want it to be as simple as pip install this or add it to the requirements file, but to have that level of trust that what I'm installing is not going to break my code or my machine or put other people at risk.

22:22 it's really valuable to have that level of trust in the system.

22:26 Yeah.

22:26 I think it's, this is amazing.

22:28 You know, the biggest surprise for me is that so much of this national science foundation type of stuff really has to do with, the around the whole sci-pi side of things.

22:39 So it's been more focused on, you know, NumPy, Pandas, Conda, and the fact that this is just on hip and the, the native IPA stuff is pretty interesting.

22:49 I think it's also, there's a lot of money.

22:51 Yeah.

22:52 I mean, I think once you pair this with some of the other investments that we're seeing with like, you know, Google investing in, you know, with a PSF at a high level, you know, everyone is recognizing this as something that we need to go go work on and make sure it's right.

23:06 Yeah, yeah. So how much do you to talk about external libraries with the kids?

23:11 We talk about it a lot. I think it's definitely we started off in the with the sixth grade obviously importing turtle and stuff and I always like to say to them like this is where the smart guys coded everything but You know, I was corrected a long time ago and just said some really good coders coded this I think Everyone can be smart at one time actually, we had a kid come in today and ask how he could package his little program and sean was looking for that. I was like, is it pypypypal? And he's like, no, not that Kelly. I'm like, okay, never mind.

23:43 Yeah, we do a lot with external libraries and packages because that's, you know, really the strength of Python as an ecosystem and other languages is that it's not just, you know, using the code that you can come up with out of your own head, but being able to leverage the amazing tools that other people have built and shared in the world as well.

24:03 So we'll go through things like matplotlib. We'll do, one of my students found the Y-Finance package and was able to get historical Yahoo Finance data out of it and was having a lot of fun with it.

24:13 So they love learning about all these little packages that they can install and start working with.

24:18 - They like the ones that do like the crazy stuff, like hide their passwords.

24:22 - I bet, I can imagine that, you know, it's part of the magic is instead of saying you have to do all this work, you just install this, you run these two lines and then there's something that's really cool.

24:31 - Yeah, what, Pie Jokes package?

24:33 - Yes, ah, the Pie Jokes is good.

24:36 But I think that there's, I mean, Sean brought up the question of how do I package my own code to share it?

24:40 and there's, there's like tons of different levels of that that are good to, I guess, cover probably relatively early.

24:47 You, you don't have to push it to PyPI to be able to make a package and email it to somebody or something.

24:52 Yeah.

24:52 Yeah.

24:53 Hey, before we jump onto my next item, I just want to pull out a quick little, fan shout out for Kelly and Sean.

24:59 Robert says big fan of your podcast.

25:02 I'm regularly bringing some of your thoughts and suggestions to our science staff here at the Science Center.

25:07 Very cool.

25:08 Very cool.

25:09 Thank you.

25:10 All right.

25:11 So Brian, I've been known to do an extra, extra, extra, hear all about it type of thing.

25:16 Yeah.

25:17 Because I just got too much.

25:18 Well, this one goes beyond that because this is eight extras all fit into one.

25:22 I'm like, all right, this can't go at the bottom.

25:24 This is just too much.

25:26 So I'm going to go to try to share this.

25:29 Everyone say they're seeing a blank screen.

25:31 That's not so good.

25:33 Let me see if I can remove it and add it back real quick.

25:36 And then we'll just have to just roll with it.

25:39 All right, but extra number one, we are on Audible, Brian, and we are on Amazon Music.

25:45 - Yay! - Yeah, this is brand new.

25:46 I have no idea if anybody's listened to it or anything over here, but there they are.

25:50 And also I know Teaching Python is at least on one of these.

25:53 I'm not sure if it's on both.

25:54 - Yeah, we're on both of those.

25:55 In fact, my five-year-old sometimes at bedtime, he has a little Amazon Echo Dot in his room.

26:00 So he'll be like Alexa play teaching Python podcast and it'll come up and start playing So it's probably on Alexa. Also if you ask for Python bytes, it'll start playing the latest episode. Yeah, I Can't say that in here. Otherwise, she starts talking so Exactly exactly. You just said off of that at 100 million 10,000 Alexis anyway, so that's really cool that it's on there. They reached out to us and invited us to be part of it I'm like, yeah, that'd be great.

26:28 They don't like re-encode or re-host or anything, our stuff, they just share it, which is great.

26:33 Also, last time I covered, no, Sebastian Ramirez covered Sorcery.

26:36 And I said, I love Sorcery as a place, thing to add into VS Code and PyCharm that will automatically recommend refactorings, like, oh, you should rewrite your code in this cleaner way.

26:45 But there are certain recommendations I didn't like, and they drove me crazy, and I couldn't turn them off.

26:49 Well, apparently since September, you can turn them off, they've told me.

26:52 - Nice.

26:53 - So a couple of listeners as well, let's see.

26:57 Yeah, a couple of listeners sent out a message and said, "Oh, you can do that." And then also the folks over at Sourcery said, "Hey, you know what?

27:03 That's actually a thing, a lot of complaints," and so on.

27:05 So Brian, I actually refactored and cleaned up all the Python bytes code, which is like 5,000 lines of Python, and refactored it almost with all of their recommendations.

27:13 And yeah, there's a bunch of stuff.

27:14 It's really nice now.

27:15 - Okay, well, I definitely get to check it out if you're saying that.

27:18 That's good.

27:19 - Yeah, it's pretty neat now.

27:20 So there's like a commit for the Python Bytes website that's like 47 files changed or something like that.

27:27 I had to go through a whole bunch.

27:28 Anyway, that's all good, so I can recommend that fully now.

27:31 Dustin Ingram, by way of Matthew Fikert, who's been a guest on the show here, does a bunch of LHC stuff and certain stuff, pointed out that, Dustin Ingram said, "I didn't know I could become a PSF member "until I realized that just contributing five hours a month towards it is all you got to do.

27:51 And then you can self-certify yourself.

27:53 And he's got a link to go find out how to become a PSF member if you'd like.

27:56 - Wow, nice.

27:57 - Yeah.

27:58 A little follow-up by Brandon Brainer, using source share, I noticed PyDram seemed to slow down a lot.

28:03 Anyone else notice that?

28:04 You know, I can't speak to that.

28:06 On mine, I haven't noticed any difference, but you know, it's my M1 version.

28:09 And so it seems all right.

28:11 But it could be--

28:12 - On my powerful computer, I don't see it.

28:14 (laughing)

28:15 Or I was running on the Pi or whatever.

28:17 If I was traveling, I definitely wouldn't see it, but I would hear it.

28:20 It works on my machine, it's fine.

28:22 (laughter)

28:24 More follow-up, I mean, this is just going on here.

28:27 Beanie, the new ODM, the async ODM, object document mapper for talking to MongoDB asynchronously, I said, "Hey, it should have indexes." They agreed. It should have indexes.

28:37 So they added a whole mechanism to add indexes to MongoDB through that, which is pretty awesome.

28:41 Wow, the power.

28:43 - Power, power, I recommend it.

28:46 - I was silently hoping that it was gonna be a package for like baby Beanie Babies that can float across.

28:52 Maybe we should get Anthony Shaw to like do something like that.

28:56 - That's right, like maybe a little animated emojis in the terminal for the kids, that'd be fun.

29:00 - Perfect, perfect.

29:01 - Well, you know the power of suggestion on Python bytes, like now next week we'll be able to cover the new Beanie Babies module in Beanie.

29:08 - Exactly, Pippin style Beanie Babies.

29:10 They're collectible and you can even get - Non fungible tokens for certain ones.

29:14 Okay, so the next one is a projector.

29:17 So we talked about remote code execution, connecting VS Code through like a remote interpreter or PyCharm.

29:24 Apparently there's this thing called projector at JetBrains that will allow you to install the entire UI of something like IntelliJ or PyCharm or something like that and then access it over your web browser but have the entire thing running somewhere else.

29:39 So you could, it'd be a good if you have like an environment like an iPad or something where you couldn't install PyCharm, but now you've got all full on PyCharm for across the web.

29:48 So I'll link to that.

29:49 Another follow up, Brian, we talked about using SQL light as a single file format.

29:55 So instead of making up your own file format, just put stuff in SQL light.

29:57 It's just a file.

29:58 It has easy ways to talk to it.

30:00 Audacity of all things.

30:01 The audio editing software has been completely rewritten for version three.

30:05 And guess what?

30:06 It has a single file format.

30:07 That's SQL light.

30:08 That's cool.

30:09 Right?

30:10 That is, that is cool.

30:11 - At least use it, see?

30:13 - All right, the last time we also talked about NeoModel, which is a way to build Python classes that do graph databases, super fun.

30:20 Tracyn Daniel said, "Hey, I came up with this "truly cool example where you can do things like explore," let's see if I can get over here, "we can explore things like, here's a person like Tom Hanks, "what movies did they act in, what were they directed by?" And then you could just traverse these relationships and explore, like follow the chain of like, well, Tom Hanks acted in Cast Away, which was directed by Robert so-and-so and then who else starred in there and like a really interesting way to like explore those kinds of things.

30:46 - I'm surprised they didn't use Kevin Bacon as the example.

30:48 - I know.

30:49 - It would have crashed Michael's M1.

30:51 (laughing)

30:53 - Oh, sorry.

30:56 My teaching side of me really loves that little graphic organizer.

30:59 - I know, I do too.

31:00 I thought I really, yeah, it's really great, isn't it?

31:03 All right, and the very last one, L Sergio Sanchez just wanted us to give a shout out that a call for proposals for PyCon Latin America just went live, so people are in Latin America, or I guess things are remote, really, it could be anywhere at this point, probably.

31:17 So if you wanna be part of a conference and speak, go do that.

31:20 - I'm gonna nudge Kelly for this one, 'cause she actually speaks Spanish, has taught in Peru.

31:24 So I think she'd be a natural fit.

31:27 - Well, the good thing about it, everything in Python's in English, so we're good, right?

31:31 (laughing)

31:33 - I suspect a lot of those talks are actually in English as well.

31:36 - I did it to Nacharla at the PyCon a couple of years ago.

31:39 - Oh yeah, okay, cool.

31:40 That's the Spanish language track.

31:41 Yeah, that's very cool.

31:42 That's very cool.

31:43 All right, there's a lot of follow-up, a lot of comments here in the chat.

31:49 Really quick before we move on, Brandon says, "M1 power." (all laughing)

31:55 Robert says, "I sent Anthony a few tweets to get this going, "but so far he's not made the Beanie Baby thing.

32:02 "Dean's excited about it." I'm sorry, there were so many things that I don't know which one.

32:05 Robert asked if I've tried the projector.

32:08 No, I haven't.

32:08 But apparently, RStudio has had this as well, which is pretty cool.

32:12 And Sam Morley says, "I still want the walrus operator sticker "that Emily Morehouse made for PyCon a couple years ago." Yeah, that's cool.

32:19 I have no idea how to get it though.

32:20 And then Dean is excited about the web UI for PyCharm.

32:24 All good stuff.

32:25 All right, John, I think you got the final item right here, right?

32:27 - Yeah, yeah, this is an article I found because we're starting a new quarter in our classroom.

32:32 So we teach middle school students, sixth, seventh, and eighth graders that are 11 to 13 years old.

32:38 And one of the things that I've found from other teachers and instructors, regardless of age level, is those first few classes of a new course are usually filled with the same thing, which is everyone downloading Python.

32:49 We all have the right version of Python.

32:51 Okay, now what editor are we going to use?

32:53 Do we have all the same editor version?

32:55 Now we start to get into dependencies and requirements.

32:57 And no matter what you're teaching, just those first few classes all seem to be filled with just setting things up, right?

33:04 - And that's not fun for anyone.

33:05 They're excited to get started.

33:06 And by the time you get to it, they're like, "I'm not excited anymore." I hate the terminal.

33:10 - And then someone by the end, like two weeks in, is like, "Well, why isn't this working?" It's, "Oh, because two weeks ago when we set this up, "you got version 1.04 and we needed 1.07, "and that's why it's not working." It's just a pain to manage all this stuff, right?

33:23 So I didn't think about using them this way, but there's a whole guide from Bridget Murtaugh from VS Code about making development containers for education.

33:33 So you can dockerize a development environment and distribute that to students so that each student can just open up a Docker container with all of the right versions, all the right requirements, everything pre-installed, right down to environment variables and starter source code for them to work with.

33:50 And it's pretty neat.

33:52 You need VS Code and Docker Desktop to do it the way that they're talking about, but I think you could probably generalize it to a bunch of other things.

33:59 And in VS Code, you can deploy right from a Docker repo or a GitHub repo.

34:04 So you give it a repo URL, it'll pull down the Docker file, create the Docker container, and spin it up for the student, and they can start coding right there in VS Code using everything already set up and ready to go.

34:17 I think the only other requirement is they have to have Docker Desktop installed on their computer.

34:20 So, you know, the one thing that I thought about, like maybe there's a way to tinker with this, is could we spin up a Docker container on a remote host, and then even remove the requirement for Docker Desktop on the students local machine.

34:33 - You might be able to install something like just the Docker command line tools without full on Docker desktop, which might be something you could do, just copy them over or something, I'm not entirely sure.

34:43 - Yeah, but there's so many cool things that you could do here and you know, since you can actually run VS Code in a Docker container, you could potentially get to a full Docker package that has VS Code, the Python environment that you want and all the source code ready to go.

34:58 And they're even using it for individual assignments.

35:01 So once you've got them set up, tell them like, hey, here's your next assignment, here's the container to use, and it gives them everything ready to get started.

35:08 - Yeah, that's really neat.

35:09 And you both talked about having these cool packages around that, you know, it's really great to just import this thing and do the amazing thing.

35:16 You could have the Docker container come pre-configured with every package.

35:20 So you don't even have to talk about virtual environments or pip or anything till the end when you're like, oh, and by the way, here's how you get this, but it's just gonna work right out of the box, which is cool.

35:29 - I also like the idea-- - That would--

35:30 Go ahead, go ahead, Kelly.

35:31 - I was just, I was gonna make a joke again.

35:32 That would have saved me 'cause I got lost in my virtual environment a couple years ago and I haven't been able to find my way out of the end.

35:39 So I'm just saying, sorry, go ahead, Scott.

35:41 - The other thing that I thought about too though is that there's definitely value in still giving the student the manual setup instructions, right?

35:49 So if we give them, here's the container version and then also if you wanted to set up your own local version here's how you would do it, that way students have a chance to differentiate.

35:59 if they want to just press the button and go with a container, they can do that.

36:02 I think Dean in the comments is saying, you know, we could just package the whole, students' whole computer inside a Docker container.

36:08 That might work too.

36:10 - Containers all the way down, yeah.

36:12 - Yeah, yeah.

36:13 But there's definitely a lot of really cool stuff here.

36:16 And I'm definitely interested in trying this out because it's not just Python.

36:20 You could do this with a whole ton of different things.

36:22 Like if you wanted to have a full stack course, you could have a container for the front end and a container for the back end and let them develop separately.

36:30 Yeah, you don't have to worry about how do you set up the database and just put this line in there and you'll have a database.

36:34 >>I mean, that's like, for me, I think that's like a huge win for a lot of people who are getting into code.

36:40 Just being able to say, Sean, give me that package, let me click on it, open it up and ready to go.

36:46 That would help a lot of people stay into, at least get hooked into coding, because messing with terminal, doing all the folders in the system, it's a brutal ride for newbies.

36:57 I agree it is. Yeah. And Robert definitely likes it. Great find.

37:00 yeah, nothing, nothing else for me on that one. I'm just, I love it.

37:04 You can replace those first two days with getting everybody on the correct version of Docker.

37:08 That's right. That's right. We've just swapped one thing for another.

37:10 Exactly. Exactly. All right. Well, that's it for our six items.

37:17 Brian, anything you want to share anything extras?

37:19 No, I'm just, yeah.

37:23 Cool. I absolutely over, I blew it out earlier. So we're all good on that.

37:26 Let's see, Kelly, you want to give a shout out to the training summit?

37:32 - Yeah, you know... - The educational summit, sorry.

37:34 - The educational summit. So yeah, this year they are doing both the educational summit and the training summit separately, which I thought was really cool. And a lot of the topics that they're looking for is how did we survive with this online virtual environment?

37:50 How did trainers do it? Not necessarily us in education, but how did the trainers survive with getting through the training and just they're looking to promote it, I guess. And the fact that you can attend both. I know when we went to PyCon, we had to choose between the educational summit and the training summit. So we weren't able to do both. And now you can attend everything. So it's pretty cool.

38:15 Yeah. It's a real bummer that these conferences aren't in person, right? Like the last time we got to hang out, Kelly and Sean, we had like breakfast in Florida. It was great because We just happen to be in a similar general area.

38:26 That was such a weird happenstance that's not gonna happen right now.

38:29 But the flip side is people can come from all over and attend these conferences no matter what now.

38:34 You don't have to actually go there.

38:35 - Yeah, it's great.

38:36 Sean and I were in Monterey like two weeks ago, Mexico.

38:40 - Nice.

38:41 - Virtually, it was the same temperature where I was sitting.

38:44 - Nice, all right.

38:46 And then some other ones, are these yours, Sean?

38:50 - Yeah, so this one I thought was pretty cool.

38:52 We use Repl.it a lot in the classroom.

38:54 So it's online coding environments that you can spin up and start coding and share.

39:00 And they have really cool features like multiplayer mode where people can be pair programming together in a shared space.

39:07 But one of the things that they did, speaking of Python packaging, is they had their own package cache that they created for Repl.it.

39:13 So for a lot of the common third-party libraries that they are using in a lot of repls, they will cache it now, and they're getting like a 40% speed improvement on spinning up a new replit instance when they need it.

39:27 And then, you know, also just they're not hitting the PyPI index all the time for all that data. It's right there local with them.

39:33 So they don't have that same sort of load on the caching servers from PyPI.

39:38 Yeah, that's great. Well done to them for doing that.

39:40 Because one, like, it makes it better for all their users, but the bandwidth cost, if it had to be paid, of PyPI is like $40,000 a month.

39:47 It's a lot. So put less strain on that system.

39:50 It's a good thing, yeah.

39:51 Yeah, I thought that one was really good.

39:52 The other one, and this is a project I'm a huge fan of, the Home Assistant project, which runs Python 3, and you can run it on a Raspberry Pi, is just the company that runs a lot of that, or has a lot of the core developers for that project, has acquired the ESPHome project.

40:09 ESPHome is a little side project that lets you take tiny little microcontrollers that cost 5 or 10 bucks, and make your own DIY Internet of Things devices.

40:19 This is really a cool way.

40:21 You configure it with a YAML file and you can push the YAML file over to that microcontroller and you can make your own little devices.

40:30 I made a pool heater controller for my swimming pool here in Florida using an ESP Home microcontroller.

40:38 They have all these great examples.

40:40 People have done things like NFC sensors, so you can tap tags and play music, Roomba components, washing machine phases, So you can tell when your washing machine's on and off, they have basically all this great stuff there.

40:53 And Nabu Casa, the company that has all these core developers, just bought it and is bringing it under the Home Assistant umbrella.

41:00 - Oh, that's cool.

41:01 Home Assistant will just get better.

41:02 And Home Assistant is in Python as well, which is neat.

41:04 - Yeah, they're running 3.9, I think, on it.

41:06 They're really keeping up with the latest versions of everything.

41:10 - So this last I don't wanna show, I can only show you half a screen.

41:12 Oh wait, no, it goes up now.

41:13 They were angry at me 'cause my ad blocker in Firefox, apparently, which is just bare Firefox, wouldn't let me show the whole page. Anyway, here we go. So get a vaccine appointment, you got to do some web scraping.

41:24 Right. So it helps to know Python programmer and this was on NBC News. So I thought it was kind of a kind of neat that it made it to this mainstream of an outlet. But they were saying that basically Python programmers have been web scraping to find vaccine appointments.

41:37 And they go into the ethics of that, like, is it okay to web scrape and basically get yourself to the front of the line. But a lot of folks have been making this information available via Twitter bots as well.

41:46 So if you're trying to wait and get a vaccine appointment, maybe you look and see if there's a Twitter account near you that's showing you what spaces are available.

41:55 - How interesting.

41:56 Yeah, this is a pretty good use of it.

41:57 You know, when I went to college, we didn't really have the internet.

42:01 I guess when I first started, came on like two or three years later, we had, I mean, the internet, but not the web.

42:06 And we had to register by phone.

42:08 So you would call and it would be busy and they would call back and we'd be busy.

42:12 And you have to do it for four or five hours.

42:14 And we just took our modems and we just war dialed the registration number once a month.

42:19 Like we had really bad classes, you know, early morning on a Monday or whatever.

42:22 And then we decided, we're breaking out the modem.

42:24 We're just going to go dial, hang up, dial, hang up, dial, hang up until it answers.

42:28 We had the perfect schedule, my brother and I.

42:31 So this is like the modern equivalent of that.

42:33 Yeah, and nobody was breaking any rules or anything other than the web scraping part.

42:38 It was all, you know, my 70-year-old grandmother needs to get a vaccine appointment instead of spending six hours hitting refresh on the webpage, I'm gonna automate that.

42:46 - Yeah, it's a perfect example of automation that helps.

42:50 Very cool.

42:50 I don't really see anything wrong with it until maybe you take down the server, but so many people are hitting it, but long as it doesn't do something like that.

42:57 - I think us humans are fully capable of taking down the vaccine appointment web servers on our own.

43:01 (both laughing)

43:03 - Hitting the refresh button.

43:05 All right, fantastic.

43:06 Well, Brian, I think that's it for all of our items.

43:09 Do we have a joke, you think?

43:10 I think we might have a joke.

43:11 - Yeah, I like this joke.

43:13 - Yeah, let's see, is this, this is, oh no, this is not it.

43:15 Let me, let me, I gotta copy the, is this gonna work?

43:18 I don't think, no, I gotta, I gotta do a quick screenshot to pick it up from the screen share.

43:22 Sorry, it's not logged on that computer.

43:24 Okay, so here comes the joke.

43:26 And this one I put out there 'cause I thought it was a good one for teachers.

43:30 And it talks about basic math, really, right?

43:32 So this is a, let me put it back on my screen.

43:35 This one is about counting, just one to 10.

43:38 And a famous person in computers, Bill Gates.

43:42 And I think this is like, hey, I'm coming to visit the school.

43:45 I work in computers.

43:46 I'll help you learn how to count.

43:47 It says, hi, my name is Bill Gates.

43:49 Today I'll teach you how to count to 10.

43:50 One, two, three, 95, 98, NT, 2000, XP, Vista, 7, 8, 10.

43:55 What do you guys think?

44:00 - I mean, I find it interesting that ME is not in this list, which just goes to prove that even 21 years later, there is nothing funny about Windows ME.

44:09 (laughing)

44:10 - I think that might be the only Windows I've never had.

44:13 - You are lucky.

44:14 - I keep thinking, I keep thinking about this silly joke of my seven year old, what happened to nine?

44:21 Because seven, eight, nine.

44:24 - Yes, oh, it fits in there perfectly, right?

44:26 (laughing)

44:28 And the reason that there's not a Windows nine is even weirder.

44:31 I wish it was the joke, but people, because there was a 95 and a 98, people were doing substring matches to see if it was Windows 95 or either like if the string Windows 9 appears in the version number, well, it must be 95 or 98.

44:45 And so the Windows 9 would have the same problem.

44:47 I read that it was because a rumor had it that Japanese and Japan, they skipped it because it was like a mean to bad thing or something.

44:56 Oh, it's like 13.

44:57 Yeah, unlucky number.

44:59 And I guess Microsoft and Japan had a lot going on.

45:03 - Interesting.

45:04 You know, I've stayed on the 14th floor before where it goes 12, 14.

45:08 I'm like, no, this is the end of the floor, I know it.

45:10 - You're not fooling anyone.

45:12 - You're not fooling anyone.

45:13 I'm okay, nothing happened on the trip, but I'm on the 13th floor, I know it.

45:17 Yeah, a very interesting trip that one.

45:20 But save it for some beers and we can all get together at an actual conference again.

45:24 - Yeah, we're looking forward to it.

45:25 - Absolutely.

45:26 - Yeah.

45:27 Well, Sean and Kelly, thank you both for being on the show.

45:28 It's been great to have you here.

45:29 - Oh, thanks for having us.

45:31 We miss seeing you guys.

45:32 Yeah, this is a lot of fun.

45:33 Yeah, for sure.

45:34 Brian, good to see you as always, man.

45:35 Good to see you.

45:36 Yep.

45:37 Bye, everyone.

45:38 Bye.

45:39 Bye.

45:40 Thank you for listening to Python Bytes.

45:41 Follow the show on Twitter via @PythonBytes.

45:43 That's Python Bytes as in B-Y-T-E-S.

45:46 And get the full show notes at PythonBytes.fm.

45:49 If you have a news item you want featured, just visit PythonBytes.fm and send it our way.

45:54 We're always on the lookout for sharing something cool.

45:56 On behalf of myself and Brian Aukin, this is Michael Kennedy.

45:59 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page