Python Bytes - #226 Teaching Python podcast on the podcast!
Episode Date: March 25, 2021Topics covered in this episode: DataClass vs NamedTuple vs Object: A Battle of Performance in Python Can My Water Cooled Raspberry Pi Cluster Beat My MacBook? There is an app for that! New packagin...g security funding & NYU * Extra x8, hear all about it* Using Development Containers with VS Code for Students Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/226
Transcript
Discussion (0)
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.
And I'm Brian Ocken.
And I'm Kelly Schuster-Paredes.
And I'm Sean Tiber.
Kelly and Sean, welcome.
It's great to have you both here.
Super, super excited to have some teachers in the house.
Super excited to be here.
Yeah, so if people don't know, Kelly and Sean are hosts of Teaching Python. Is that right? For the podcast? That's right. Right. So Kelly is the
teacher that codes and I am, thanks to our new merchandise, the coder that teaches. So
that's fantastic. Yeah. So you guys both run together, co-host 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?
The main audience, well, has grown.
It originally was designed just for teachers.
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.
And we kind of bounce off each other's ideas. I am a love lifer teacher and Sean is a geek.
Together you have the superpower. Fantastic. Yes, absolutely.
So 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.
You know, 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.
So Kelly and I just started recording it.
We one day started pressing record on it, publishing the podcast. And I think we're a couple hundred thousand downloads later,
still going strong. Yeah, that's fantastic. You know, I, one of my passions is that I think people
really, we don't need a million more CS students. What we need is a million people who have
programming fluency and are passionate about something else and can combine those two things.
So yeah. I get a lot out of the podcast
just as somebody that I don't,
I'm not a teacher,
but I teach people.
So there's a lot of stuff around that too.
So I like the podcast.
Thank you.
Thanks.
Do you like data classes?
I really like data classes a lot.
Yeah.
And it's kind of why I'm covering this.
So there's an article called
by a person, Jack Song, who wrote Data Classes vs. Name Tuple vs. Object, a battle of performance.
And I was interested in this because I kind of thought that the data class, I really like data classes, but I thought I heard from somewhere that they were slower than other stuff.
I used to use named tuples a lot, but I really like the data class abstraction and the features that it has.
And I was slightly concerned.
I mean, not very, very much because 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.
But so this article, he does a test example
or and times it for using access.
Was he, let me read this.
He does the size and speed of creating, reading
and executing functions with objects
named tuples and data classes and the result is kind of they're they're really comparable uh
like there is differences but they're really close so i think i think for me the outcome of this is
um is that they're let me see if i can grab this table that it it's about a wash they're all kind
of uh similar so whatever works for your
code i say go with it um but i'd like to hear from other people i'd like to i'd like to know if
if there's other studies out there that compare these um and either uh validate the same thing or
find some different result i'd love to hear from people 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 and then add those up. 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.
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 that communicates is highly valuable. Yeah, I was
going to ask Kelly and Sean, like, do you even talk about types, data types? And how do you
cover that with the younger generation? 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. 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. We do try to, you know, using type hints here and there. And I find
that sometimes with teaching, it's helpful because they have that visual reference, like, oh, if I'm
designing a function, or I'm making a method in 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 going to look like.
I was actually looking at this article from a whole I do this, you know, 360 kind of look.
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. And I was telling Sean, I was like, do you know that
Vimbo was coded in Python? And I do this to him all the time. So this whole fintech data classes kind of push
for the kids. And then I started searching real Python, as I always do. And they have a great
article about how they use data classes with the cards playing cards. So it's something that we
don't really do the data classes part. But I do talk about a lot of data types.
Yeah, that's pretty neat that you all actually do cover i mean you're going to run into problems if you try to
concatenate an integer with a string it's going to crash and so you kind of got to say look
numbers and numbers can go together strings and strings can go together you don't have to go too
deep in the theory though oh my six skaters sixth graders can regurgitate it they they can't stop
one of the things i love about data classes is
uh the that you can specify the default values for all the fields and you can do that with
named tuples but it's weird it's a it's a weird add-on that you have to do yeah i've always found
named tuples to be a little bit confusing to explain to other people like once you get it
you know it but then you're trying to teach it to someone else like okay it has this weird construct
that doesn't yeah doesn't follow a lot of the other stuff. But I do like the data classes because it
seems to follow along with a string of really nice language features like with F strings
and data classes where whether you want to use them or not, they're well optimized and
efficient compared to other options. F strings can be faster in a lot of cases than previous
formatting. Looks like data classes are continuing that trend
in a really nice way.
Yeah, cool.
All right, this next one I want to cover,
but before I show on the screen,
I want to ask you two, the guests,
do you do stuff with any like micro things
like Raspberry Pi or any of the Adafruit stuff?
No?
Sean!
Kelly likes to throw them at me.
It's not a ninja star.
It's one of those express boards.
Sean loves them.
Yeah, we have a ton of them in the classroom.
Kelly has a love-hate, mostly hate relationship with hardware.
But we have a lot of hardware that we use for coding and Python and making things happen.
Nice.
All right.
So let me put this one here on the screen.
And let me take apart the title because there's a lot going on here. So this person, I, I, I'm not sure the
name of the person actually runs this blog, but it's the DIY life about like little micro things.
And Oh no, it's by Michael Clements right there. And the title is can my water cooled raspberry
pie cluster be my Mac book. So this guy built a water cool. He has a water cooled raspberry pie cluster beat 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.
And he said, well, this is pretty amazing. 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 they're, this is a crazy looking device
here. As long as we get rid of all that?
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.
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 maybe you got kids, you want to learn stuff
on it or whatever and how to go.
So there's a lot of interesting things. And I guess one of the first takeaways is just,
wait, there's Raspberry Pi clusters and they're water-cooled? What is this? This is crazy.
Does this surprise you? No. So I had seen this before. I think I've actually seen one of these
in person and people have been building cases for these. It'll hold eight, 12, 16 of these stacked up. And I always thought of it as a way to inexpensively learn about parallelizing clusters of machines,
right?
You can buy or build a cluster for a few hundred bucks instead of thousands of dollars.
So they're great for learning.
But I never thought anybody would try to water cool it and make a performance rig out of
it.
Exactly. Exactly.
Exactly.
It's really wild.
It's really wild.
So the other thing that I think is an interesting takeaway that I'm not going to cover because
there's just too many little details and they rip by really fast in this presentation that
I'm linking to, but there's all these tools for running Python code distributed across
just multiple nodes of things that run Python.
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. And I think it applies beyond the pies. It's just anything you can SSH to
more or less. So that's pretty interesting. So for some numbers, is there some numbers in here?
I know he's got some graphs, but I don't know. They put the numbers. I think the numbers are
just in the video. Oh, wait, here we go.
So I'll just read them off this, give you some real quick numbers.
So he has this like wimpy Core i5 HP laptop.
So what are we going to compute in the number?
Find all the primes up to a number, 10,000, 100,000, 200,000.
So for the HP, it's like one and a half seconds, 74 seconds, and then almost five minutes, 267 seconds.
So let me grab my MacBook Air, older one, not the M1, and says, OK, 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 because it doesn't have the right cooling, the longer it takes, the more it slows down. And then he says, let me run it on one node on 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. So it's pretty fast, right? I mean, compared to these old slower
computers, that's kind of chugging along. Yeah, these new Raspberry Pi 4s that are out,
the latest version,
I mean, they're really fast and really powerful.
Like people are using them to transcode,
you know, video streams for Plex servers
and Plex devices and things like that.
You can run your whole house on it with home automation.
Like there's a lot of power
and it's still just like 35 bucks.
Yeah, that's crazy.
People are running, using like ad blocking DNS things for their local networks, all sorts
of interesting things.
So, well, I couldn't resist running this on my two things that I have to see what I would
get.
So I have an M1 Mac mini, which is quite fast.
Those M1 chips are really crazy.
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, and it doesn't make a sound or get warm,
which is crazy. That's single threaded. And then I ran it multi threaded and got it down to 26
seconds, which was pretty interesting. 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 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 want to just show you all because this is kind of crazy.
I have an Alienware sim racing setup that I have.
And it actually just blew it.
So it did 200,000 in 10 seconds.
But there's a price, one that is expensive.
I mean, that's like a straight price.
But there's also a price in sound.
Like I actually recorded it because it was so loud.
Let me just play it back.
Here it is just sitting there nice and quiet.
Oh, it's starting to make some noise.
I'll just keep talking normal so you can compare.
But it's really kicking in right now.
I'll move over close to it in a minute. how about that that thing is screaming like you could barely talk over it if you're in the same
room but 10 seconds it is pretty fast i think i have a robot vacuum that's quieter than that
when it's running i think you need to crack that open and water cool it.
You know, actually, this is the highest performance one you could buy from Dell from Alienware.
That's not water cooled.
And I'm like, I don't really want to have to maintain my computer.
So I'm not getting a water cooled one.
I don't want to take it in for oil change or whatever.
No, thanks. In the original discussion in the video,
there is a, it's a,
it's single threaded for all the computers and then parallel on the,
on the, the mini or the, not the minis, the pies.
The pies. Yeah.
Yeah. But, but then in the comments, some people said, well,
what about that?
And so there's, there's an update with all the data with it parallel too.
And it's still really fast on the parallel.
And I think it's interesting to have the speed comparison.
But I think one of the things that's important that Sean points out is you get like two or three of these and you can start to explore parallel computing and distributed computing with under $100.
So that's...
Please don't give him any more ideas.
We have things all over the classroom.
I don't need any more like spy things.
Wait, Kelly, is there something you can water cool maybe?
Like set up a water cooling thing?
No, but I am going to get the water gun
and start squirting him over if he brings it over.
But like a comparison though would be like
trying to get what six Mac
minis together. And that's, that's expensive, right? Yeah. That's a lot. Right. And a lot of
classrooms might have some of these laying around from other projects that you've done or a class
set. And if you wanted to have a student do 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 be a good
learning experience. So what is it with that is he's overclocking it is that the reason why
it needs to be cool okay yeah yeah you can you can push them pretty hard and they they heat up
it'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, really far. Exactly.
I will point out, in the video, they
linked to a multithreaded thing, a script.
And I ran the multithreaded script.
And it gave me the same times.
And it only seemed to be using one CPU.
It ran a bunch of stuff.
But then it all put all the work onto one of the cores.
So in the show notes, I wrote my own version
that's truly multithreaded.
And it's up there.
So also Sam
Morley out of the chat, out of the live stream says, pie hole is great. Yeah, I've been thinking
about setting one of these up. It sounds fun. All right, Kelly, I think you're up next with this
one, right? Yeah. So it kind of segues well, you have the Raspberry Pi. That's something easy for
a lot of students to get into. It's cost-worthy and stuff. I'm going to throw this out there.
It's the app for that.
This is Programs.
And I'm sure everyone has heard of this website.
It's a platform.
It's got 50 million people on it.
But what's really cool for me is that I'm always looking for something to do on the
go.
And I download this program and it's on iOS now, which is great.
It launched in iOS last year. 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. It's beautiful. I don't know if you've ever gone to the website of 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. 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 was trying to find out how many kids were actually
trying to learn online last year. And they estimated about 826 million learners. And like
out of all those learners, 50% of those people did not have a household computer. So these guys
who are out in Nepal have brought Python where you can code and learn and program within this tiny little app. And it's just easy to go
and learn in bite-sized chunks. So I had to throw it out there for you guys.
Yeah, that's really neat. What have you all done for remote stuff? How much has been remote and
how much has been in person? So we went back to school in August and it's hybrid, half and half.
And our kids are lucky because they all have computers and most of them have pretty stable Wi-Fi.
But I know a lot of the other public school systems, they've had trouble.
Kids have had to go to like other people's houses.
They've had to borrow some computers.
They try to deploy.
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. So it's been hard for a lot of learners and just to be able to keep up learning on a phone, because almost everyone has a phone. Yeah.
Yeah, that and Google Docs and Zoom and you can kind of piece it together to be able to do multiple things there. Yeah, that's great. It's a good recommendation. Does it cost any money? So that's the great part. So there is a free version
because there are some really good apps out there
that are paid.
So there's a free version
and they do have the advertising,
but the advertising is after that chunk of information.
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.
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.
It goes all the way up to decorators.
So I thought it was pretty cool.
Yeah, this is really neat.
It seems like a nice little environment.
It's got syntax highlighting and all that.
Yeah, it's fun.
Yeah, no, it's a great recommendation.
Brian, what's your next one here?
What is my next one?
Oh, this is kind of neat.
The New York University, is that right?
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.
This is kind of exciting.
This is a lot of money.
Yeah, this is a really big deal.
Yeah, this is awesome.
So I actually had to look some stuff up.
So there is some interesting information there
as to why New York University. So there is some interesting information there as to like why
New York University. So there's been some researches that have been working on it for a
while. So there's a couple of other things I had to look up. So specifically, well, let's just say
specifically what they're doing. What this money is going towards, it's to further assess and
improve PIP's dependency resolver. And then following the work done in 2020, and also make the ResolveLib more usable by other tools in the packaging ecology.
And then in the PyPI to user pipeline, we've been talking about security problems some on the show and read about others.
They're going to try to integrate the Tuft support for signed
packages through PyPI clients, and they're targeting Conda, Pip, and Bandersnatch. So
there's a lot there I had to look up. One, the ResolveLib. So that is a third part. It is a
separate package, but it is related to Pip because it's vendored into pip. 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.
And so there's improvement needed there.
Never heard of Bandersnatch before, or if I have, I've forgotten.
It's a PyPI mirror client.
And I think it is needing some support, so that's good.
And then TUF. What the heck is TUF?
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 even against attackers that compromise the repository or signing keys. 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? And it's
more than just signing or pinning your requirements to version numbers. We want to make sure that the
sources are there. 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. Yeah, I totally agree. I mean, we start
to teach our students about, you know, installing packages and how you can use other people's code.
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.
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.
It's really valuable to have that level of trust in the system. Yeah. Yeah. I think it's, this is amazing. 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-fi side of things. So it's been more focused on, you know, NumPy,
Andaz, Conda, and the fact that this is just on pip
and the native IPA stuff is pretty interesting, I think.
Also, that's a lot of money.
Yeah.
I mean, I think once you pair this
with some of the other investments that we're seeing
with Google investing with a PSF at a high level,
everyone is recognizing this as something
that we need to go work on and make sure it's right.'s right yeah yeah so how much do you two talk about external libraries with the
kids um 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.
And I was like, is it PyPy, PyPal?
And he's like, no, not that, Kelly.
I'm like, okay, never mind.
Yeah, we do a lot with external libraries and packages because that's really the strength of
Python as an ecosystem and other languages is that it's not just 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. So we'll go through things like Matplotlib. 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. So they love learning about all these
little packages that they can install and start working with. They like the ones that do the
crazy stuff, like hide their passwords. 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.
Yeah. What, PyJokes package?
Yes. Oh, the PyJokes is good.
But I think that there's, I mean, Sean brought up the question of how do I package my own
code to share it? And there's like tons of different levels of that that are good to,
I guess, cover probably relatively early.
You don't have to push it to PyPI to be able to make a package and email it to
somebody or something.
Yeah. Yeah. Hey, before we jump onto my next item,
I just want to pull out a quick little fan shout out for Kelly and Sean.
Robert says big fan of your podcast.
I'm regularly bringing some of your thoughts and suggestions to our science staff here at the Science Center.
Very cool.
Very cool.
Thank you.
All right.
So, Brian, I've been known to do an extra, extra, extra, hear all about it type of thing.
Yeah.
Because I just got too much.
Well, this one goes beyond that because this is eight extras all fit into one.
I'm like, all right, this can't go at the bottom.
This is just too much.
So I'm going to go to try to share this.
Everyone say they're seeing a blank screen.
That's not so good.
Let me see if I can remove it and add it back real quick.
And then we'll carry on.
We'll just have to just roll with it.
All right.
But extra number one, we are on Audible, Brian.
And we are on Amazon Music.
Yay! Yeah, this is brand new. I have no idea if anybody's listened to it or anything over here. But there they are. Extra number one, we are on Audible, Brian, and we are on Amazon Music. Yay.
Yeah, this is brand new.
I have no idea if anybody's listened to it or anything over here, but there they are.
And also, I know Teaching Python is at least on one of these.
I'm not sure if it's on both.
Yeah, we're on both of those.
In fact, my five-year-old sometimes at bedtime, he has a little Amazon Echo Dot in his room.
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 set off about 100 million, 10,000 Alexis. Anyway, so that's really
cool that it's on there um they reached out
to us and invited us to be part of it i'm like yeah that'd be great uh they don't like re-encode
or re-host or anything our stuff they just share it which is great also last time i covered no
sebastian ramirez covered sorcery 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 but there are certain recommendations I didn't like and they drove me
crazy and I couldn't turn them off. Well, apparently since September, you can turn them
off, they've told me. So a couple of listeners as well, let's see, a couple of listeners sent
out a message and said, oh, you can do that. And then also the folks over at Sorcery said,
hey, you know what? That's actually a thing thing a lot of complaints and so on 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 the recommendations and yeah
there's a bunch of stuff it's really nice now okay well i definitely get to check it out if you're
if you're saying yeah it's good yeah it's pretty neat now so there's like a commit for the python
bytes website that's you know like 47 files changed or something like that.
I had to go through a whole bunch.
Anyway, that's all good.
So I can recommend that fully now.
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 towards it uh is all you got to do and then
you can self-certify yourself and he's got a link to go find out how to become a psf member if you
would like wow nice yeah uh a little follow-up by brandon brainer um using sorcerer i noticed
pyjama seemed to slow down a lot anyone else noticed that uh you know i can't speak to that on mine i haven't noticed any difference but you know it's
my m1 version and so it seems all right uh but you could be on my powerful computer i don't see it
i thought i was running on the pie or whatever yeah if i was running where i definitely wouldn't
see it but i would hear it it works on my machine it's fine all right more follow-up i mean this is just going on um here uh
beanie the new odm the async odm object document mapper for talking to mongodb asynchronously i
said hey it should have indexes um they agreed it should have indexes so they added a whole
mechanism to add indexes to mongodb through that which is pretty awesome wow power the power the
power the power I recommend it.
I was silently
hoping that it was going to be a package for
baby Beanie Babies that can float across.
Maybe we should get Anthony Shaw
to do something like that.
Maybe a little animated
emojis in the terminal for the kids.
That'd be fun. Perfect.
The power of suggestion on Python Bytes.
Now, next week, we'll be able to cover
the new Beanie Babies module in Beanie.
Exactly, Piff install Beanie Babies.
They're collectible.
And you can even get non-fungible tokens for certain ones.
Okay, so the next one is Projector.
So we talked about remote code execution,
connecting VS Code through like a remote interpreter
or Python.
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.
So you could, it'd be a good,
if you have like an environment,
like an iPad or something where you couldn't,
you know, install PyCharm,
but now you've got all of full on PyCharm
for across the web.
So I'll link to that.
Another follow up, Brian.
We talked about using SQLite as a single file format.
So instead of making up your own file format,
just put stuff in SQLite.
It's just a file.
It has easy ways to talk to it.
Audacity of all things,
the audio editing software
has been completely rewritten for version 3.
And guess what?
It has a single file format that's SQLite.
That's cool, right?
That is cool.
I used to use it, I see.
All right.
The last time we also talked about NeoModel, which is a way to build Python classes that do graph databases.
Super fun.
Trace and Daniel said, hey, I came up with this really cool example where you can do things like explore.
Let's see if I 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 Castaway, 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 kind of things. I'm surprised they didn't use Kevin Bacon as the example.
I know. It would have crashed Michael's M1.
My teaching side of me really loves that little graphic organizer.
I know, I do too. I thought I really, yeah, it's really great, isn't it? All right. And the very
last one, El 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, you know,
things are remote really.
It could be anywhere at this point, probably.
So if you want to be part of a conference
and speak, go do that.
I'm going to nudge Kelly for this one
because she actually speaks Spanish,
has taught in Peru.
So I think she'd be a natural fit.
Well, the good thing about it, everything in Python is in English, so we're good, right?
I suspect a lot of those talks are actually in English as well.
I did it to Nacharla at the PyCon a couple years ago.
Oh, yeah.
Okay, cool.
That's the Spanish language track.
Yeah, that's very cool.
That's very cool.
All right.
There's a lot of follow-up, a lot of comments here in in the chat um really quick before we move on brandon
says m1 power uh robert says a couple of uh i sent anthony a few tweets to get this going but
he's so far he's not made the beating baby thing dean's excited about i'm sorry there were so many
things i don't know which one uh robert asked if I've tried the projector. No, I haven't. But
apparently our studios had this as well, which is pretty cool. And Sam Morley says, I still want the
Walrus Operator sticker that Emily Morehouse made for PyCon a couple of years ago. Yeah, that's
cool. I have no idea how to get it though. And then Dean is excited about the web UI for PyCharm.
All good stuff. All right,
John, I think you got the final item right here, right? Yeah. Yeah. This is an article I found
because we're starting a new quarter in our classroom. So we teach middle school students,
sixth, seventh, and eighth graders that are 11 to 13 years old. 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. We all have
the right version of Python. Okay, now what editor are we going to use? Do we have all the same
editor version? Now we start to get into dependencies and requirements. And no matter
what you're teaching, just those first few classes all seem to be filled with just setting things up,
right? And that's not fun for anyone. They excited to get started and by the time you get to like i'm not excited anymore
right and then and then someone by the end like you know 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? 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.
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. And it's pretty neat. 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. And in VS Code, you can deploy right from a Docker repo or a GitHub repo. 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.
I think the only other requirement
is they have to have Docker desktop
installed on their computer.
So 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 student's local machine? Yeah. 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. Yeah. 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. And they're even using it for
individual assignments. So once you've got them set up, I'm like, hey, here's your next assignment.
Here's the container to use. And it gives them everything ready to get started.
Yeah, that's really neat. 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. You could have
the Docker container come pre-configured with every package. 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 going to work right out of the box, which is cool.
I also like the idea.
Go ahead, Kelly.
I was going to make a joke again.
That would have saved me because I got lost in my virtual environment a couple of years
ago and I haven't been able to find my way out of the end.
So I'm just saying.
Sorry, go ahead, Sean.
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?
So if we, you know, 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.
You know, if they want to just press the button and go with a container, they can do that.
I think Dean in the comments is saying, you know, we could just package the whole students whole computer inside a docker container that
might work too it'll be containers all the way down yeah yeah yeah but there's definitely a lot
of really cool stuff here and i'm i'm definitely interested in trying this out because not just
python you could do this with a whole ton of different things like if you wanted to have a
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. 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. 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. Just being able to say,
Sean, give me that package. Let me click on it, open it up and ready to go. 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.
I agree it is. Yeah. And Robert definitely likes it. Great find.
Yeah. Nothing else for me on that one. I just, I love it.
You can replace those first two days with getting everybody on the correct version of docker
that's right that's right we just swapped one thing for another
exactly exactly all right well that's it for our
six items Brian anything you want to share anything extras
no I'm just taking away
absolutely I blew it out earlier.
So we're all good on that.
Um, let's see, uh, Kelly, you want to give a shout out to the, uh, the training summit?
Oh yeah.
You know, 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? 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. 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 happened to be in a similar general area.
That was such a weird happenstance that's not going to happen right now.
But the flip side is people can come from all over and attend these conferences no matter
what now.
You don't have to actually go there.
Yeah, it's great.
Sean and I were in Monterey like two weeks ago.
Mexico.
Nice.
Virtually.
It was the same temperature where I was sitting.
Nice. All right. it was the same temperature where I was sitting.
Nice.
All right.
And then some other ones.
Are these yours, Sean?
Yeah.
So this one I thought was pretty cool.
We use Replit a lot in the classroom.
So it's online coding environments that you can spin up and start coding in and share. And they have really cool features like multiplayer mode where people can be pair programming together
in a shared space.
But one of the things that they did,
speaking of Python packaging,
is they had their own package cache
that they created for Replit.
So for a lot of the common third-party libraries
that they are using in a lot of Reples,
they'll cache it now
and they're getting like a 40% speed improvement
on spinning up a new Replit instance when they need it.
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.
So they don't have that same sort of load on the caching servers from PyPI.
Yeah, that's great.
Well done to them for doing that 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.
It's a lot.
So put less strain on that system.
Yeah, I thought that one was really good.
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,
has 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. ESPHome is a little side project that lets you take tiny
little microcontrollers that cost five or 10 bucks and make your own DIY Internet of Things devices.
So this is really a kind of a cool way. 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.
So I made a pool heater controller
for my swimming pool here in Florida
using an ESP home microcontroller.
So they have all these great examples.
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.
And Nabucasa, the company that has all these core developers, just bought it and is bringing
it under the Home Assistant umbrella.
Oh, that's cool.
Home Assistant will just get better.
Home Assistant is in Python as well, which is neat.
Yeah, they're running 3.9, I think, on it.
They're really keeping up with the latest versions of everything.
So this last I want to show, I can only show you half a screen.
Oh, wait, no, it goes up now.
They were angry at me because 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've got to do some web scraping.
Right.
So it helps to know a Python programmer.
And this was on NBC News.
So I thought it was 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.
And they go into the ethics of that.
Like, is it OK 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.
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.
How interesting.
Yeah, this is a pretty good use of it.
You know, when I went to college,
we didn't really have the internet.
I guess when I first started,
it came on like two or three years later,
we had, I mean, the internet, but not the web. And we had to register by phone. So you would
call and it would be busy and he would call back and be busy and you have to do it for four or five
hours. And we just took our modems and we just war dialed the registration number one, one semester.
We had really bad classes, early morning on a Monday or whatever. And then we decided,
we're breaking out the modem. We're just going to go dial, hang up, dial, hang up, dial,
hang up until it answers. We had the perfect schedule, my brother and I that, so this is
like the modern equivalent of that. Yeah. Yeah. And they were, nobody was breaking any rules or
anything other than the web scraping part. 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 going to automate that. Yeah. It's, it's a perfect example of automation that,
that helps. Yeah. Very cool. 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. I think, I think us humans are fully capable of taking down the vaccine appointment
web servers on our own. Hitting the refresh button. Yeah.
All right.
Fantastic.
Well, Brian, I think that's it for all of our items.
Do we have a joke?
You think?
I think we might have a joke.
Yeah.
I like this joke.
Yeah.
Let's see.
Is this, this is, oh no, this is not it.
Let me, let me, I got to copy the, is this going to work?
I don't think.
No, I got to, I got to do a quick screenshot to pick it up from the screen share.
Sorry.
It's not logged on that computer.
Okay. So here comes the joke. And this one I've put out there because I thought it was a good
one for teachers. And it talks about basic math, really. Right. So this is a, let me put it back
on my screen. This one is about counting just one to 10. And a famous person in computers, Bill Gates.
And I think there's like a, hey, I'm coming to visit the school.
I work in computers.
I'll help you learn how to count.
It says, hi, my name is Bill Gate.
And today I'll teach you
how to count to 10.
1, 2, 3, 95, 98, NT, 2000, XP, Vista, 7, 8, 10.
What do you guys think?
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.
I think that might be the only Windows I've never had.
You are lucky.
I keep thinking about this silly joke of my seven-year-old.
What happened to nine?
Because seven, eight, nine?
Yes.
Oh, it fits in there perfectly, right?
Oh, yeah.
And the reason that there's not a Windows 9 is even weirder.
I wish it was the joke.
But because there was a 95 and a 98,
people were doing substring matches to see if it was Windows 95.
If the string Windows 9 appears in the version number,
well, it must be 95 or 98. And so the Windows 9 would have the version number, well, it must be 95 or 98.
And so the Windows 9 would have the same problem.
I read that it was because rumor had it that Japanese and Japan, they skipped it because
it was like it meaned a bad thing or something.
Oh, it's like 13.
Yeah, unlucky number.
And I guess Microsoft in Japan had a lot going on.
Interesting.
You know, I've stayed on the 14th floor before
where it goes 12, 14.
I'm like, no, this is the end of the floor.
I know it.
You're not fooling anyone.
You're not fooling anyone.
I'm okay.
Nothing happened on the trip,
but I'm on the 13th floor.
I know it.
Yeah, very interesting trip that one.
But save it for some beers
and we can all get together at an actual conference again.
Yeah, we're looking forward to it. Absolutely. Yeah. Well, Sean and Kelly, thank you both for being on the we can all get together at an actual conference again. Yeah. We're looking forward to it.
Absolutely.
Yeah.
Well,
Sean and Kelly,
thank you both for being on the show.
It's been great to have you here.
Oh,
thanks for having us.
We,
we miss seeing you guys.
Yeah.
Yeah.
This is a lot of fun.
Yeah,
for sure.
Brian,
good to see you as always,
man.
Good to see you.
Yep.
Bye everyone.
Bye.
Bye.
Thank you for listening to Python bites.
Follow the show on Twitter via at Python bites.
That's Python bites as in B Y T E S and get the full show on Twitter via at Python Bytes. That's Python Bytes as in B-Y-T-E-S.
And get the full show notes at PythonBytes.fm. If you have a news item you want featured,
just visit PythonBytes.fm and send it our way. We're always on the lookout for sharing something
cool. On behalf of myself and Brian Auchin, this is Michael Kennedy. Thank you for listening and
sharing this podcast with your friends and colleagues.