WEBVTT

00:00:00.260 --> 00:00:04.920
Hello, and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:00:04.920 --> 00:00:09.340
This is episode 98, recorded October 4th, 2018. I'm Michael Kennedy.

00:00:09.340 --> 00:00:10.160
And I'm Brian Okken.

00:00:10.160 --> 00:00:11.120
Hey, Brian. How are you doing?

00:00:11.120 --> 00:00:12.160
I'm doing great.

00:00:12.160 --> 00:00:16.500
Excellent, excellent. Happy to be back with you for another week's worth of news.

00:00:16.500 --> 00:00:18.380
Yeah, it's good to talk to you every week.

00:00:18.380 --> 00:00:22.920
Absolutely. So I also want to say thank you to DigitalOcean for making this possible.

00:00:22.920 --> 00:00:27.000
They're one of the biggest supporters of the show. So thank you to DigitalOcean.

00:00:27.000 --> 00:00:31.240
Check them out at pythonbytes.fm/DigitalOcean. Get $100 credit for new users.

00:00:31.240 --> 00:00:33.620
More about that later. They have some really cool stuff.

00:00:33.620 --> 00:00:36.840
I was just listening to It's All About the Pendiums.

00:00:36.840 --> 00:00:39.340
Do you remember that song from Weird Al Yankovic?

00:00:39.340 --> 00:00:40.100
No.

00:00:40.100 --> 00:00:41.220
Oh, my gosh.

00:00:41.220 --> 00:00:41.840
Must be missed that.

00:00:41.840 --> 00:00:42.220
We might have to put it on the show.

00:00:42.220 --> 00:00:46.860
Oh, it's like this funny, you know, Weird Al Yankovic type song.

00:00:46.860 --> 00:00:48.560
It just popped up for some reason.

00:00:48.560 --> 00:00:50.940
And from the 90s.

00:00:50.940 --> 00:00:53.780
And it's all about like tough rappers.

00:00:54.400 --> 00:00:56.880
And these rappers who are like, but they're like programmers.

00:00:56.880 --> 00:00:58.880
So they're like insulting each other, right?

00:00:58.880 --> 00:01:00.680
Like how slow their computer is.

00:01:00.680 --> 00:01:06.920
And one of the insults is my flat screen monitor is 40 inches wide.

00:01:06.920 --> 00:01:09.100
And yours says Etch-A-Sketch on the side.

00:01:09.100 --> 00:01:13.860
That's funny.

00:01:13.860 --> 00:01:15.320
That's awesome, right?

00:01:15.320 --> 00:01:19.500
So here we are, 20 years past then or whatever.

00:01:19.500 --> 00:01:21.600
And we're still talking about Etch-A-Sketch.

00:01:21.600 --> 00:01:22.420
Yeah, definitely.

00:01:22.420 --> 00:01:23.760
So, okay.

00:01:23.760 --> 00:01:25.400
So this article is about Etch-A-Sketch.

00:01:25.400 --> 00:01:28.460
And it's called Make Etch-A-Sketch Art with Python.

00:01:28.460 --> 00:01:29.980
And it's fabulous.

00:01:29.980 --> 00:01:31.300
So background.

00:01:31.300 --> 00:01:34.320
It showed up in Toy Story with like the...

00:01:34.320 --> 00:01:38.720
And it's shown up other places of like really, really fast Etch-A-Sketch drawings happening.

00:01:38.960 --> 00:01:43.220
And I'm sure a lot of people, other people have figured this out too or tried to think,

00:01:43.220 --> 00:01:50.920
man, if I could have, I could hook up some motors to those, the knobs and somehow get my computer to do all of this for me.

00:01:50.920 --> 00:01:51.980
That would be cool.

00:01:51.980 --> 00:01:53.140
So that's what this is.

00:01:53.140 --> 00:02:01.300
It's this great article about how this person put together some motors, a Raspberry Pi and some software.

00:02:01.580 --> 00:02:08.880
And a little bit of woodworking to get to keep everything all in one place and got it to draw pictures.

00:02:08.880 --> 00:02:13.880
It's so cool because it's one of those, it seems like a fun project you could do with your kids or something.

00:02:13.880 --> 00:02:19.460
And also it discusses some things like how do you get a picture into line format?

00:02:19.460 --> 00:02:23.060
And he uses something called canny edge detection.

00:02:23.320 --> 00:02:29.560
And then if you've got a line drawing and pixels, how do you translate that into like motor control?

00:02:29.560 --> 00:02:31.900
And you have to have a path.

00:02:31.900 --> 00:02:33.960
So he uses a library called networks.

00:02:33.960 --> 00:02:39.120
It's a Python library to do path, coming up with nice paths.

00:02:39.120 --> 00:02:40.940
And then he has some results there.

00:02:40.940 --> 00:02:44.880
He shows some pictures where the starting picture and then the end result of drawing.

00:02:44.880 --> 00:02:46.180
And it's just fun.

00:02:46.180 --> 00:02:51.920
You know, what I like about this is it's got this cool IoT aspect with the Raspberry Pis and the motors.

00:02:51.920 --> 00:02:54.640
And it's not just a software project.

00:02:54.640 --> 00:02:59.200
It seems like it'd be something really fun for people to explore if they're getting into programming.

00:02:59.200 --> 00:03:01.780
And then it also has like a really advanced thing.

00:03:01.780 --> 00:03:06.960
Like you could do a really cool like booth or something where you put up an Etch-a-Sketch.

00:03:06.960 --> 00:03:11.140
And when anybody walks up, it could do like face detection and like draw them.

00:03:11.140 --> 00:03:16.740
Like you could do all sorts of fun stuff with like the, you know, PyTorch, machine learning and all kinds of fun stuff.

00:03:16.740 --> 00:03:19.420
So yeah, this is a great one for people looking for cool projects.

00:03:19.420 --> 00:03:19.660
Yeah.

00:03:19.660 --> 00:03:24.460
If you could get that booth thing set up so that we have it ready for PyCon, that would be great.

00:03:24.460 --> 00:03:24.820
Yeah.

00:03:24.820 --> 00:03:25.640
I'm working on it.

00:03:25.640 --> 00:03:26.160
We're almost there.

00:03:26.160 --> 00:03:32.640
So one of the things I really like from PyCon 2017 was the keynote by Instagram.

00:03:33.080 --> 00:03:41.560
How they almost magically migrated their entire code to upgrade Django, completely switch from Python 2 to Python 3.

00:03:41.560 --> 00:03:48.060
And they did all of that without branching continuously in production, which was awesome, right?

00:03:48.060 --> 00:03:48.420
Yeah.

00:03:48.420 --> 00:03:49.760
That was an incredible talk.

00:03:49.760 --> 00:03:50.020
Yeah.

00:03:50.020 --> 00:03:53.400
And so certainly that was one of the major users of Python.

00:03:53.780 --> 00:04:04.060
But if you look at desktop applications, it may be that Dropbox is actually one of the most popular and quite large desktop apps in Python that there is.

00:04:04.060 --> 00:04:05.720
I would venture to say that's true.

00:04:05.720 --> 00:04:06.020
Yeah.

00:04:06.020 --> 00:04:06.300
Yeah.

00:04:06.300 --> 00:04:12.420
So the Python, they have over a million lines of code in Python, a million lines of Python.

00:04:13.320 --> 00:04:18.160
And it's installed, I don't know, hundreds of thousands of desktops at least, right?

00:04:18.160 --> 00:04:24.600
So the big news is Python has had a really big gravitational pull around Dropbox.

00:04:24.600 --> 00:04:26.620
We've had some of the core developers working there.

00:04:26.620 --> 00:04:28.640
Obviously, Guido Van Rossum works there.

00:04:28.640 --> 00:04:29.760
That's a big deal.

00:04:29.760 --> 00:04:36.740
So the fact that they were on Python 2, it's kind of a weird juxtaposition of like these two worlds, right?

00:04:36.740 --> 00:04:37.400
Yeah.

00:04:37.400 --> 00:04:41.460
So what's really cool is they have now migrated to Python 3.

00:04:41.580 --> 00:05:00.600
And it's not just like they've rolled out a web app on Python 3 where they control the servers, but they have done some really incredible engineering to allow them to ship Python 3 into these more modern operating systems, enabling interesting things like kernel level, smart sync, and all sorts of crazy stuff that's happening.

00:05:00.600 --> 00:05:03.080
So that's what we got this week.

00:05:03.080 --> 00:05:03.660
That's awesome, huh?

00:05:03.660 --> 00:05:04.040
Yeah.

00:05:04.040 --> 00:05:05.480
That's really exciting, actually.

00:05:05.480 --> 00:05:06.220
It is exciting.

00:05:06.220 --> 00:05:15.520
And what's great about their write-up is it talks a whole lot about the challenges that they faced, why they wanted to switch, all of those kinds of things.

00:05:15.520 --> 00:05:19.540
So they said they've relied on Python 2 for many years, most recently 2.7.

00:05:20.020 --> 00:05:24.160
And they actually began this transformation from 2 to 3 in 2015.

00:05:24.160 --> 00:05:31.980
But if you go through and read that article, you'll see like a lot of creation of technology had to be done in order to make this switch.

00:05:31.980 --> 00:05:36.920
So in their previous version, their Python 2 world, they were using freezers.

00:05:36.920 --> 00:05:42.460
So like Py2App, Py2Exe, I think it was BB Freeze for Linux.

00:05:42.460 --> 00:05:47.880
And they were also exploring PyInstaller, but they ended up not using PyInstaller for some reason.

00:05:47.880 --> 00:05:50.240
But they were using those types of things to package up Python.

00:05:50.240 --> 00:05:50.920
Yeah.

00:05:51.040 --> 00:05:55.200
And now what they're doing is they actually had to build native apps.

00:05:55.200 --> 00:06:01.560
So, you know, using Visual Studio for Windows, Xcode for macOS to build like .app files.

00:06:01.560 --> 00:06:09.800
And what they're actually doing is they're hosting the Python runtime in their native apps to bootstrap up their apps in order to get the deployment story working better.

00:06:09.800 --> 00:06:12.360
That makes sense, but that doesn't sound easy.

00:06:12.360 --> 00:06:13.160
No, it doesn't.

00:06:13.620 --> 00:06:22.880
They actually built a way so that they could host either Python 2 or Python 3 and flip a flag so that they could actually do that concurrently, right?

00:06:22.880 --> 00:06:26.700
So they built the Python 2 version and they started shipping that out and got that working.

00:06:26.700 --> 00:06:33.880
And then they slowly, for different sets of users, started turning on the Python 3 version on the same type of code there.

00:06:33.880 --> 00:06:34.920
Wow, that's cool.

00:06:34.920 --> 00:06:36.460
But they talk about why they had to do it.

00:06:36.460 --> 00:06:41.140
So, for example, SmartSync, which I actually just bought from Dropbox recently, is pretty awesome.

00:06:41.260 --> 00:06:47.280
So I've got like almost a terabyte of stuff in Dropbox with all the core stuff and whatnot, the videos and so on.

00:06:47.280 --> 00:06:54.200
And SmartSync will like let you go to your Finder or your Explorer and show you all of your files.

00:06:54.200 --> 00:06:56.480
And some of them are in your hard drive and some of them are in the cloud.

00:06:56.480 --> 00:07:01.000
And you can just like double click them and they just open, you know, or open them some other way.

00:07:01.000 --> 00:07:05.940
And they like Dropbox hooks into that and says, oh, hold on, we got to download that.

00:07:05.940 --> 00:07:06.840
Now you can have it, right?

00:07:06.840 --> 00:07:09.680
So it's really great for like saving drive space and whatnot.

00:07:10.120 --> 00:07:11.360
But you can't do that.

00:07:11.360 --> 00:07:14.540
You can't install that kernel type of stuff with Python.

00:07:14.540 --> 00:07:16.520
So they needed their native apps anyway.

00:07:16.520 --> 00:07:16.920
Okay.

00:07:16.920 --> 00:07:19.580
They also talked about why they might switch to Python 3.

00:07:19.580 --> 00:07:23.340
They said there's two major features that we really care about.

00:07:23.340 --> 00:07:27.340
And there's some pains that we're trying to get away from.

00:07:27.340 --> 00:07:30.700
The exciting features were they're really interested in type annotations.

00:07:30.700 --> 00:07:34.000
Remember, mypy is coming out of Dropbox.

00:07:34.000 --> 00:07:35.500
Gito Van Rassam is working on that.

00:07:35.560 --> 00:07:42.760
And mypyC that takes type annotated Python code and compiles it to C extensions also is coming from Dropbox.

00:07:42.760 --> 00:07:45.600
So they're really doing a lot with these type annotations, which is interesting.

00:07:45.600 --> 00:07:47.800
And they're also really interested in async and await.

00:07:47.800 --> 00:07:50.020
Apparently that helps a lot for what they're doing.

00:07:50.020 --> 00:07:51.200
Yeah.

00:07:51.200 --> 00:07:52.840
Asynchronous copying of files.

00:07:52.840 --> 00:07:53.380
You'd think.

00:07:53.500 --> 00:07:56.700
You would think a lot of IO happens on the network and on the drive.

00:07:56.700 --> 00:07:57.100
Definitely.

00:07:57.100 --> 00:07:58.300
So that was the positive.

00:07:58.300 --> 00:08:04.200
The other problem is they said that a lot of the tool chains they're using is really old and crusty.

00:08:04.200 --> 00:08:13.060
Like, for example, they had to have a separate fork of CPython so they could compile it with a modern C compiler, like Visual Studio 2013.

00:08:13.060 --> 00:08:16.720
So there's something super old and not supported on Windows.

00:08:16.880 --> 00:08:18.660
And they're like, this is just not cool.

00:08:18.660 --> 00:08:23.600
Like, why are we maintaining our own fork of the CPython just so we can compile it?

00:08:23.600 --> 00:08:24.060
Yeah.

00:08:24.060 --> 00:08:27.580
Anyway, there's a lot of weird stuff they had to get away from with Python too, right?

00:08:27.580 --> 00:08:28.620
And that's not getting better.

00:08:28.620 --> 00:08:30.040
Yeah.

00:08:30.120 --> 00:08:32.400
So they talked about all this stuff, a lot of details.

00:08:32.400 --> 00:08:35.200
And they also said, we're planning a bunch of future posts.

00:08:35.200 --> 00:08:42.300
So we're going to talk about how they report crashes on Windows and macOS and how they use that to debug both native and Python code.

00:08:42.300 --> 00:08:43.880
That's one of their posts coming.

00:08:43.880 --> 00:08:44.760
That's cool.

00:08:44.760 --> 00:08:45.580
Yeah.

00:08:45.580 --> 00:08:50.140
How they maintain a hybrid Python 2 and 3 syntax and what tools help them do that.

00:08:50.140 --> 00:08:51.000
Another post.

00:08:51.000 --> 00:08:57.100
And then it's sort of a war stories, the very best bugs and stories from their Python 3 migration.

00:08:57.100 --> 00:09:01.860
So I think we have three topics picked for the next couple of Python bytes.

00:09:01.860 --> 00:09:02.360
Yeah.

00:09:02.360 --> 00:09:03.800
If they come out in time.

00:09:03.800 --> 00:09:04.120
Yeah.

00:09:04.120 --> 00:09:04.380
Sure.

00:09:04.380 --> 00:09:04.740
Yeah.

00:09:04.740 --> 00:09:05.460
For sure.

00:09:05.460 --> 00:09:08.540
Well, maybe they'll even do a presentation about this at PyCon.

00:09:08.540 --> 00:09:08.880
Yeah.

00:09:08.880 --> 00:09:09.520
Let's hope.

00:09:09.520 --> 00:09:09.960
Let's hope.

00:09:09.960 --> 00:09:11.000
Are you speaking of PyCon?

00:09:11.000 --> 00:09:11.840
Are you going to submit something?

00:09:11.840 --> 00:09:12.640
I probably am.

00:09:12.640 --> 00:09:12.960
Yeah.

00:09:12.960 --> 00:09:13.400
Yeah.

00:09:13.400 --> 00:09:15.100
I haven't yet, but there's time.

00:09:15.100 --> 00:09:15.380
Sorry.

00:09:15.380 --> 00:09:17.980
I'm going to submit something and I'll just put your name on it.

00:09:17.980 --> 00:09:18.540
That'll help.

00:09:18.540 --> 00:09:20.160
Yeah.

00:09:20.160 --> 00:09:24.480
If anybody else wants to do that too, just submit something and put my name on it and I'll just, you

00:09:24.480 --> 00:09:25.820
know, I'll wing it once I get there.

00:09:26.500 --> 00:09:27.980
Well, ours might be a joint one.

00:09:27.980 --> 00:09:29.420
Oh, that makes more sense.

00:09:29.420 --> 00:09:29.660
Yeah.

00:09:29.660 --> 00:09:30.780
Right.

00:09:30.780 --> 00:09:33.140
But where would we get the resources?

00:09:33.140 --> 00:09:35.180
You lined it up for me.

00:09:35.180 --> 00:09:35.520
Thanks.

00:09:35.520 --> 00:09:43.000
So I wanted to talk about some resources for PyCon and it's not just, these are targeted at PyCon,

00:09:43.000 --> 00:09:46.740
but it really is really any conference, technical conference, I think.

00:09:46.740 --> 00:09:50.200
And a lot of the regional Python conferences have similar things.

00:09:50.680 --> 00:09:52.380
So we're putting a bunch of links in the show notes.

00:09:52.380 --> 00:09:54.460
We've got, they have a nice speaker page.

00:09:54.460 --> 00:09:58.100
That's a kind of a top levels, what it's like to speak there and stuff.

00:09:58.100 --> 00:10:03.960
Actually last year being my first time talking at PyCon, I think that I would encourage really

00:10:03.960 --> 00:10:07.340
anybody to try it because it's a fun experience.

00:10:07.600 --> 00:10:09.200
So take a look at the speaking page.

00:10:09.200 --> 00:10:11.020
And then there's a proposal tips.

00:10:11.160 --> 00:10:15.600
So the first thing you got to do is you submit a proposal and that can be nerve wracking,

00:10:15.600 --> 00:10:17.000
but it really shouldn't be.

00:10:17.000 --> 00:10:19.840
So there's a few resources I'd like to poke people to.

00:10:19.840 --> 00:10:26.180
There's a talk proposal resource page on the PyCon 2019 site.

00:10:26.380 --> 00:10:31.200
And in there, there's also some links to some external articles and stuff.

00:10:31.200 --> 00:10:37.800
And then including some people who have shared past proposals, whether, and even failed ones

00:10:37.800 --> 00:10:38.960
and why they think they failed.

00:10:38.960 --> 00:10:43.860
And then Marietta, I don't know her last name, but she's the core developer.

00:10:43.860 --> 00:10:49.480
And she recently published her set of proposals, the ones that have been accepted.

00:10:49.480 --> 00:10:51.120
And I really like them.

00:10:51.120 --> 00:10:52.660
Actually, I took, look, look through those.

00:10:52.740 --> 00:10:57.680
And some of these are really nice, clean examples and make me think that maybe it doesn't have

00:10:57.680 --> 00:10:59.240
to be as complicated as I thought it was.

00:10:59.240 --> 00:11:00.760
So there's those.

00:11:00.760 --> 00:11:01.380
It's nice.

00:11:01.380 --> 00:11:02.540
Yeah, that's really helpful.

00:11:02.540 --> 00:11:06.180
And, you know, like you said, this is helpful to however you want to get started.

00:11:06.180 --> 00:11:09.060
And you don't have to get started at the top level PyCon.

00:11:09.060 --> 00:11:10.580
You could always do something local.

00:11:10.580 --> 00:11:11.360
Yeah.

00:11:11.360 --> 00:11:17.040
And then one of the things I wanted to bring up also is before attending PyCon, I didn't

00:11:17.040 --> 00:11:18.560
know what poster session was.

00:11:18.560 --> 00:11:21.300
I'd seen it a lot, but I didn't really know what it was.

00:11:21.300 --> 00:11:22.620
Or I'd seen it mentioned.

00:11:22.620 --> 00:11:26.000
And a poster session is, don't dismiss this.

00:11:26.000 --> 00:11:27.280
This is a pretty cool thing.

00:11:27.280 --> 00:11:29.760
The PyBytes guys did a poster.

00:11:29.760 --> 00:11:37.040
And what happens is the, in the expo area where all the, like where we were and a lot of the

00:11:37.040 --> 00:11:40.100
companies are, that's really cool, but it isn't on Sunday.

00:11:40.100 --> 00:11:42.120
Those people get out of there.

00:11:42.200 --> 00:11:47.080
And on Sunday, that area is, there's, you know, there's a job fair thing going on, but

00:11:47.080 --> 00:11:52.020
there's also these poster sessions where people have these little tight, these areas and they

00:11:52.020 --> 00:11:57.440
get a few feet of backspace and they get their poster put up and a little table for them.

00:11:57.440 --> 00:12:01.460
And so the people that are there to talk about it, if you have like a project or something

00:12:01.460 --> 00:12:06.080
you want to talk about, that's a good, a good way to get your feet wet and not, you don't

00:12:06.080 --> 00:12:09.900
actually have to present a talk, but you can talk with people about whatever you're passionate

00:12:09.900 --> 00:12:10.220
about.

00:12:10.220 --> 00:12:10.440
Yeah.

00:12:10.440 --> 00:12:12.920
And you can meet some pretty interesting people that way as well.

00:12:12.920 --> 00:12:19.160
And you also give a link, a shout out to Jason Wadier's blog post.

00:12:19.160 --> 00:12:23.360
You don't need to be a pro at Python to crack the code of PyCon, which is great.

00:12:23.460 --> 00:12:29.020
And that's a really good article about how somebody new to Python went to PyCon and still

00:12:29.020 --> 00:12:32.400
got a lot out of it, even though they weren't an expert.

00:12:32.400 --> 00:12:37.220
One of the things he mentions is that the expo hall, everybody there is trying to sell you

00:12:37.220 --> 00:12:37.500
something.

00:12:37.500 --> 00:12:42.500
I just wanted to say that we're not, we hang out there and we just want to talk with people

00:12:42.500 --> 00:12:44.620
and be there so that people can come up and say, Hey.

00:12:44.620 --> 00:12:46.140
Yeah, that's right.

00:12:46.140 --> 00:12:47.760
It's a great place for us to meet people.

00:12:47.760 --> 00:12:48.220
Yeah.

00:12:48.220 --> 00:12:50.680
We typically lose our voice by the end of the second day.

00:12:50.680 --> 00:12:51.240
Yeah.

00:12:51.240 --> 00:12:52.360
It was a ton of fun.

00:12:52.360 --> 00:12:52.820
Yeah.

00:12:52.900 --> 00:12:53.680
It's great.

00:12:53.680 --> 00:12:54.300
Yeah.

00:12:54.300 --> 00:13:01.180
So one of the reasons that we get to go there is because of people support our show and sponsor

00:13:01.180 --> 00:13:01.640
our show, right?

00:13:01.640 --> 00:13:02.400
Like DigitalOcean.

00:13:02.400 --> 00:13:07.000
And I just want to call out a cool feature that I saw them recently talking about.

00:13:07.000 --> 00:13:10.100
And I think people might find actually super useful.

00:13:10.100 --> 00:13:15.320
So when you create, normally you create a virtual machine or some form of infrastructure as a service

00:13:15.320 --> 00:13:18.060
in the cloud, you get like a little dropdown, like, well, what do you want?

00:13:18.060 --> 00:13:18.400
Ubuntu?

00:13:18.400 --> 00:13:22.800
You want, you maybe have it pre-configured for this type of service.

00:13:22.840 --> 00:13:22.900
Sure.

00:13:22.900 --> 00:13:27.680
But with DigitalOcean, they have this thing called bring your custom image to DigitalOcean.

00:13:27.680 --> 00:13:33.940
So you can spin up a virtual machine and get it exactly the way you like it to run perfectly

00:13:33.940 --> 00:13:36.620
set up on your system with your company.

00:13:36.620 --> 00:13:40.640
And then you can just upload that and say, now when I create a new thing on DigitalOcean,

00:13:40.640 --> 00:13:41.520
use that.

00:13:41.520 --> 00:13:42.160
Oh, wow.

00:13:42.160 --> 00:13:42.520
Isn't that cool?

00:13:42.520 --> 00:13:42.820
Yeah.

00:13:42.820 --> 00:13:46.920
So all you got to do is make the image, upload it, and then you can just log in and say, you

00:13:46.920 --> 00:13:49.920
know, I'd like to choose from my custom image and hit start and off it goes.

00:13:49.920 --> 00:13:51.320
So that's, that's pretty cool.

00:13:51.440 --> 00:13:54.340
There are a few simple restrictions on what has to be installed.

00:13:54.340 --> 00:13:58.160
So like they can manage the virtual machine from the outside, but you know, it doesn't

00:13:58.160 --> 00:13:59.240
seem very restrictive to me.

00:13:59.240 --> 00:14:01.120
Anyway, it looks like a great thing.

00:14:01.120 --> 00:14:03.760
You can check it out on their blog, but if you want to get started and get the credit,

00:14:03.760 --> 00:14:05.880
Python by set of M slash DigitalOcean.

00:14:05.880 --> 00:14:06.500
Nice.

00:14:06.500 --> 00:14:06.820
Yep.

00:14:07.040 --> 00:14:09.640
This may be a little bit repetitive, but Brian, have we talked about GUIs?

00:14:09.640 --> 00:14:11.820
Yeah.

00:14:11.820 --> 00:14:13.160
Yeah, we have.

00:14:13.160 --> 00:14:18.280
Actually, this one I want to share with you because I think it's actually super awesome.

00:14:18.280 --> 00:14:24.140
I think we started this whole path long ago when I said, I really just would like, what

00:14:24.140 --> 00:14:24.600
did I call it?

00:14:24.600 --> 00:14:25.500
Like proton.

00:14:25.500 --> 00:14:26.260
I called it proton.

00:14:26.260 --> 00:14:29.080
I said, I want electron JS for Python.

00:14:29.080 --> 00:14:31.240
I said, we should call it proton as well because of the P.

00:14:32.240 --> 00:14:38.720
Someone has come up with a great way to use electron, which is electron JS.

00:14:38.720 --> 00:14:44.960
It's like a Chrome and node type thing that stuff like GitHub's Atom editor, Visual Studio

00:14:44.960 --> 00:14:47.160
Code, Slack, all those things are built upon.

00:14:47.160 --> 00:14:49.680
Those are nice looking systems, right?

00:14:49.680 --> 00:14:53.000
You write HTML, you can use cool JavaScript stuff on the front end.

00:14:53.000 --> 00:14:56.160
And then, but on the back end, you got to do node and JavaScript.

00:14:56.160 --> 00:14:56.820
Yeah.

00:14:56.820 --> 00:14:57.780
I don't want to do that.

00:14:57.780 --> 00:14:58.960
Well, there's things you miss out on.

00:14:58.960 --> 00:15:01.920
Like what if you want to do something with machine learning?

00:15:02.200 --> 00:15:06.160
Like JavaScript doesn't have good machine learning tools to run locally, but if you had Python,

00:15:06.160 --> 00:15:08.940
you could use like GPU accelerated local stuff.

00:15:08.940 --> 00:15:09.560
That would be awesome.

00:15:09.560 --> 00:15:15.080
So it's not called proton, but I will point you at something called electron Python.

00:15:15.080 --> 00:15:15.860
Okay.

00:15:15.860 --> 00:15:18.120
It's basically the same thing without the name.

00:15:18.120 --> 00:15:21.580
So what it is, is it's someone has taken electron.

00:15:21.580 --> 00:15:24.780
Well, it's not even a new project in that sense.

00:15:24.780 --> 00:15:27.340
It's more of a way of using two different projects.

00:15:27.340 --> 00:15:30.580
So take electron JS and take Python.

00:15:30.900 --> 00:15:39.580
And on Python, there's a thing called zero RPC, which is like a raw sockets communication layer instead of HTTP.

00:15:39.580 --> 00:15:40.660
Okay.

00:15:40.660 --> 00:15:44.940
So this really simple local communication layer, use that as a server.

00:15:44.940 --> 00:15:50.320
And then use electron to just show your app with your JavaScript and HTML.

00:15:50.320 --> 00:15:58.760
And instead of talking through electron to node, you talk through electron, just more directly over to your Python code.

00:15:58.760 --> 00:15:59.840
So it's awesome.

00:15:59.840 --> 00:16:04.420
You get like exactly the same thing that you're building, say, Visual Studio Code with.

00:16:04.540 --> 00:16:08.100
You could do that, but have Python as the implementation on the backend.

00:16:08.100 --> 00:16:10.640
And if you need to pip install anything, you do it.

00:16:10.640 --> 00:16:12.500
It gives you like native access.

00:16:12.500 --> 00:16:17.280
So native menus, notifications, automatically update your app, all that kind of stuff.

00:16:17.280 --> 00:16:17.840
It's pretty awesome.

00:16:17.840 --> 00:16:18.520
That is cool.

00:16:18.520 --> 00:16:19.300
Yeah.

00:16:19.300 --> 00:16:19.780
That's really cool.

00:16:19.780 --> 00:16:19.940
Right.

00:16:19.940 --> 00:16:24.220
The question becomes though, still like, how do I get that to somebody?

00:16:24.220 --> 00:16:25.000
Right.

00:16:25.080 --> 00:16:25.260
Great.

00:16:25.260 --> 00:16:38.060
So I have this, this, Reeb Goldbergian contraption that I've created of like, Chrome, a JavaScript node and this Python code, which then also depends upon Python, everything you pip installed, right?

00:16:38.060 --> 00:16:39.420
Like deployment can be a challenge.

00:16:39.420 --> 00:16:50.360
So one of our listeners, Andy Boca sent us a really nice message and wrote a super informative blog post of building a deployable Python electron app.

00:16:50.360 --> 00:16:59.420
Takes you through all the steps of how he packaged up Python, his dependencies, how he created it for macOS and windows, all sorts of stuff.

00:16:59.420 --> 00:17:00.160
Yeah.

00:17:00.160 --> 00:17:01.320
That's fun.

00:17:01.320 --> 00:17:02.780
Actually, that's pretty cool.

00:17:02.780 --> 00:17:06.260
But with the code available, so you can try this out and follow along.

00:17:06.260 --> 00:17:07.300
Yeah.

00:17:07.300 --> 00:17:08.860
It's got the code and all sorts of stuff.

00:17:08.860 --> 00:17:11.100
So it's a pretty good working example.

00:17:11.100 --> 00:17:13.780
If you would like to try to create this and use this.

00:17:13.780 --> 00:17:17.160
And if people do create an app with this, please, you know, put a comment on the show notes.

00:17:17.160 --> 00:17:18.940
We'd love to see it or shoot us a message somehow.

00:17:18.940 --> 00:17:19.020
Yeah.

00:17:19.020 --> 00:17:19.380
Yeah.

00:17:19.380 --> 00:17:23.280
There's a lot of projects I want to try to do with something like this.

00:17:23.280 --> 00:17:24.620
So yeah.

00:17:24.620 --> 00:17:24.980
Neat.

00:17:24.980 --> 00:17:25.240
Yeah.

00:17:25.240 --> 00:17:26.460
So I'll leave you with one final thing.

00:17:26.460 --> 00:17:26.780
Like right.

00:17:26.780 --> 00:17:31.920
He goes through this long process of here's how you run this script and then that script and then bundle this together.

00:17:31.920 --> 00:17:37.620
You know, use PyInstaller and then use npm package or something to like suck in the PyInstaller.

00:17:37.620 --> 00:17:39.140
And there's like a lot of stuff going on.

00:17:39.660 --> 00:17:49.360
So he ends the deployment post saying, and somebody please wrap Electron Python into an IDE so that in the future, all we have to do is click a build button like we could 20 years ago.

00:17:49.360 --> 00:17:52.060
Yeah.

00:17:52.060 --> 00:17:52.220
Yeah.

00:17:52.220 --> 00:17:52.540
Nice.

00:17:52.540 --> 00:17:52.980
Yeah.

00:17:52.980 --> 00:17:53.400
Yeah.

00:17:53.400 --> 00:17:53.500
Yeah.

00:17:53.500 --> 00:18:02.420
So I guess it's doable now, but it's still a question of, is this really easier than using like QT or something like that?

00:18:02.420 --> 00:18:02.920
No.

00:18:03.060 --> 00:18:18.620
Well, he talks a lot about that and he says, look, if your choice is to use QT or say WX Python or TK Enter and all of those, maybe with slight exception of QT, there's really like one or two people who are working on it part time.

00:18:18.620 --> 00:18:25.540
And when you use Electron using Chrome and all the JavaScript front end frameworks, you might want to select, right?

00:18:25.540 --> 00:18:26.200
Vue JS.

00:18:26.200 --> 00:18:32.140
And you have Google and all the web developers in the world basically pushing that UI platform forward.

00:18:32.140 --> 00:18:33.240
Okay.

00:18:33.240 --> 00:18:34.680
So, you know, there's that.

00:18:34.680 --> 00:18:40.100
So that's, I mean, that was the argument of the, of, of what the two guys who are building this.

00:18:40.100 --> 00:18:43.980
You can either take that as a good argument or not, but that's what they were saying.

00:18:43.980 --> 00:18:44.360
Yeah.

00:18:44.360 --> 00:18:49.040
And now that it's doable, it'll get easier as time goes on and people add to it.

00:18:49.040 --> 00:18:49.280
So.

00:18:49.280 --> 00:18:50.000
All right.

00:18:50.000 --> 00:18:51.860
Come on, PyCharm folks.

00:18:51.860 --> 00:18:52.840
Give us that build button.

00:18:52.840 --> 00:18:55.020
Give us the build button.

00:18:55.340 --> 00:18:56.380
Give us the build button.

00:18:56.380 --> 00:18:58.240
We don't want to know the internals.

00:18:58.240 --> 00:18:58.700
Come on.

00:18:58.700 --> 00:18:59.260
All right.

00:18:59.260 --> 00:19:02.800
So probably enough on that, but that's a, that's actually one of the more promising ones.

00:19:02.800 --> 00:19:05.360
And I'm still, I might give it the nickname Proton.

00:19:05.360 --> 00:19:06.660
I don't know.

00:19:06.660 --> 00:19:07.040
Yeah.

00:19:07.040 --> 00:19:09.600
We should just tell them you can use that if you want.

00:19:09.600 --> 00:19:10.400
Yep.

00:19:10.400 --> 00:19:11.040
They can have it.

00:19:11.040 --> 00:19:11.700
Awesome.

00:19:11.700 --> 00:19:12.060
All right.

00:19:12.060 --> 00:19:13.320
So what's our next one?

00:19:13.320 --> 00:19:15.580
I just wanted to give a shout out to Pluggy.

00:19:15.580 --> 00:19:18.960
If anybody doesn't know that I kind of am a fan of pytest.

00:19:18.960 --> 00:19:19.820
Really?

00:19:19.820 --> 00:19:20.660
Yeah.

00:19:20.660 --> 00:19:23.080
And part of pytest.

00:19:23.080 --> 00:19:26.580
So one of the things that pytest, pytest actually grew out of the Py project.

00:19:26.580 --> 00:19:28.320
Another offshoot is Pluggy.

00:19:28.320 --> 00:19:31.760
So there's a ton of pytest plugins that you can add on.

00:19:31.760 --> 00:19:33.400
And I use, I use quite a few of them.

00:19:33.400 --> 00:19:37.780
And the way these plugins work is, is through this plugin system.

00:19:37.980 --> 00:19:40.940
And it's a, it's a plugin management and hook system.

00:19:40.940 --> 00:19:42.500
There's often a problem.

00:19:42.500 --> 00:19:47.360
If you've got an application that has a lot of possible customizations for other people to do,

00:19:47.360 --> 00:19:53.960
but how, you know, you want to be able to provide plugin or hook capabilities, but you don't want to,

00:19:53.960 --> 00:19:55.980
you know, expose too much internals.

00:19:55.980 --> 00:20:04.840
And you also want to like isolate this API, this interface so that you know that you can do refactoring and rewriting stuff and you're not going to break plugins.

00:20:05.480 --> 00:20:06.960
And plugins, an option.

00:20:06.960 --> 00:20:09.380
And it's, I think it's a really good, solid option.

00:20:09.380 --> 00:20:12.920
I have noticed that a few other projects have used this.

00:20:12.920 --> 00:20:17.560
The, I don't have a list of those, but it's a, I don't think we've covered it before.

00:20:17.560 --> 00:20:20.340
And if we have my apologies, but it's kind of neat.

00:20:20.340 --> 00:20:20.820
I don't think so.

00:20:21.080 --> 00:20:26.640
And my little side project of cards, a lot of people said, well, if we're doing like task management,

00:20:26.640 --> 00:20:28.520
there's going to be extra little things.

00:20:28.520 --> 00:20:30.460
People want maybe a different list of things.

00:20:30.460 --> 00:20:38.140
You maybe not an owner, but you maybe need priority and maybe time estimates should be in points versus hours or things like that.

00:20:38.140 --> 00:20:39.800
A plugin system might be good.

00:20:39.800 --> 00:20:45.300
So I'm actually thinking about trying to put pluggy into this little, little side project of mine.

00:20:45.300 --> 00:20:45.560
So.

00:20:45.560 --> 00:20:46.660
Oh yeah, that's really cool.

00:20:46.660 --> 00:20:47.340
Yeah.

00:20:47.340 --> 00:20:50.000
This is used by pytest, by Tox, by DevPy.

00:20:50.180 --> 00:20:52.540
So certainly it's getting some real world testing.

00:20:52.540 --> 00:20:53.220
That's great.

00:20:53.220 --> 00:21:01.220
It's, you know, I like these plugins as an idea of saying, I would like to let people change how this works without just letting them actually change the project.

00:21:01.220 --> 00:21:01.620
Yeah.

00:21:01.620 --> 00:21:01.960
Yeah.

00:21:01.960 --> 00:21:02.240
That's cool.

00:21:02.240 --> 00:21:03.500
All right.

00:21:03.500 --> 00:21:04.840
Are you ready for something scary?

00:21:04.840 --> 00:21:06.140
Like actually truly scary?

00:21:06.140 --> 00:21:09.900
No, but let's talk about it anyway.

00:21:09.900 --> 00:21:10.700
All right.

00:21:10.700 --> 00:21:12.980
This was said over by Eduardo or Jenna.

00:21:12.980 --> 00:21:14.800
This is on Bloomberg.

00:21:14.800 --> 00:21:17.840
So on, Bloomberg.com.

00:21:17.840 --> 00:21:19.920
So it gives it's Bloomberg business week.

00:21:20.000 --> 00:21:24.780
It's a pretty serious article and it's, it's pretty deep reporting for something that has happened.

00:21:24.780 --> 00:21:31.480
And it's called the big hack, how China used a tiny chip to infiltrate U S companies and other companies.

00:21:31.480 --> 00:21:37.820
But they're thinking they were aiming them actually at U S companies and defense contractors and stuff like that.

00:21:37.820 --> 00:21:38.760
Oh, creepy.

00:21:38.940 --> 00:21:39.700
So tell me more.

00:21:39.700 --> 00:21:40.020
All right.

00:21:40.020 --> 00:21:49.420
So first of all, when they say a tiny chip, I don't know, I don't know what you guys are visualizing, but if you hold up, say a U S.

00:21:50.420 --> 00:21:59.540
Penny or like a penny or like a euro cent and you look at the lettering on there, the chip was the size of one of the letters.

00:21:59.900 --> 00:22:04.300
Like, so where it says the year that penny was printed, it's like the size of like the two.

00:22:05.260 --> 00:22:10.280
And they, they decorated as like, a different type of component that goes onto the chip.

00:22:10.620 --> 00:22:13.240
So this is, it's really a long article.

00:22:13.240 --> 00:22:19.900
Like I said, quite deep reporting and says, this was an attack by Chinese spies that reached almost 30 U S companies.

00:22:19.900 --> 00:22:23.240
How they know that it was 30 and not 37 or something is actually really interesting.

00:22:23.620 --> 00:22:28.760
including Amazon and Apple by compromising America's technology supply chain.

00:22:28.760 --> 00:22:43.700
So what happened was they found out that there was some spies in the Chinese government that threatened the subcontractor of the subcontractor of a company that made motherboards for many data center servers.

00:22:43.700 --> 00:22:45.120
Yeah.

00:22:45.120 --> 00:22:47.280
And they said, well, you have a couple of choices.

00:22:47.280 --> 00:22:54.620
One, we can bribe you to install these little tiny chips, or we can threaten you with inspections of your factory.

00:22:54.620 --> 00:22:57.060
If you don't install these chips and keep it quiet.

00:22:57.060 --> 00:23:02.460
And pretty much they found out that some of these subcontractors were like, well, we want to keep our business.

00:23:02.460 --> 00:23:03.540
So chips go in.

00:23:03.540 --> 00:23:04.260
Jeez.

00:23:04.260 --> 00:23:04.820
Yeah.

00:23:04.820 --> 00:23:13.240
And so this all started when Amazon went to acquire actually a Portland based company called elemental technologies, which basically helped with like streaming and video compression.

00:23:13.240 --> 00:23:13.960
Yeah.

00:23:13.960 --> 00:23:19.620
And as part of the purchase process, I said, well, let's do some due diligence on you.

00:23:19.620 --> 00:23:24.160
And they actually sent off the server hardware that they were using off to some other company.

00:23:24.160 --> 00:23:25.520
I think it was in Canada or somewhere.

00:23:25.520 --> 00:23:29.760
And they said there was a nested on the servers, motherboards.

00:23:29.760 --> 00:23:33.280
The testers found a microchip, not much bigger than a grain of rice.

00:23:33.280 --> 00:23:36.020
That wasn't part of the original motherboards design.

00:23:36.020 --> 00:23:37.560
Like, I don't even know how they found that.

00:23:37.560 --> 00:23:37.800
Right.

00:23:37.800 --> 00:23:38.700
Like that's insane.

00:23:39.640 --> 00:23:50.440
And so then they found out that these motherboards were used by the Department of Defense and CIA drones and Navy warships and Apple and Amazon and all sorts of places.

00:23:50.440 --> 00:23:52.320
And they're like, whoa, what's going on here?

00:23:52.860 --> 00:23:56.320
So they did a bunch of like a spy on spy stuff.

00:23:56.320 --> 00:23:58.600
And they found out kind of like what I told you.

00:23:58.600 --> 00:24:10.560
And they realized that these chips were basically opening back doors in the network of all of these servers, which would then go download bigger bits of code would actually take them over and you could just log into them.

00:24:11.160 --> 00:24:14.100
But they were interacting with these other servers somewhere on the internet.

00:24:14.100 --> 00:24:19.160
So they hacked those servers and they figured out that 30 companies' machines were interacting with that server.

00:24:19.160 --> 00:24:20.720
And that's how the number is 30.

00:24:20.720 --> 00:24:21.200
Wow.

00:24:21.200 --> 00:24:21.700
Okay.

00:24:21.700 --> 00:24:25.660
Anyway, the whole supply side chain thing is pretty scary.

00:24:25.660 --> 00:24:28.380
But this is not technically a software topic.

00:24:28.380 --> 00:24:35.200
But, you know, I think it's something that we in the technology industry need to just be aware of because this is pretty crazy.

00:24:35.200 --> 00:24:35.780
Right.

00:24:35.780 --> 00:24:38.360
And there's no software that will tell you whether or not this is a problem.

00:24:38.360 --> 00:24:38.580
Right.

00:24:38.580 --> 00:24:40.420
Because this is at the chip level.

00:24:40.420 --> 00:24:40.800
Yeah.

00:24:40.800 --> 00:24:42.040
Geez.

00:24:42.040 --> 00:24:43.980
Anyway, there, let's leave it with that positive note.

00:24:43.980 --> 00:24:47.900
Have a nice day, everyone.

00:24:47.900 --> 00:24:49.600
Have a good day.

00:24:49.600 --> 00:25:00.180
Apparently, the 30 companies who had their servers interacting back with the hacker controller, command and control servers have been notified silently.

00:25:00.180 --> 00:25:00.640
Yeah.

00:25:00.640 --> 00:25:01.180
Yeah.

00:25:01.180 --> 00:25:04.580
But anyway, there's a bunch of inside reporting and stuff.

00:25:04.580 --> 00:25:05.500
It's quite interesting.

00:25:05.500 --> 00:25:06.200
So check that out.

00:25:06.200 --> 00:25:08.200
Well, that's it for our official items.

00:25:08.200 --> 00:25:09.340
Anything else you want to share, Brian?

00:25:09.460 --> 00:25:11.360
No, I just want to rave about your new course.

00:25:11.360 --> 00:25:12.320
Oh, thank you.

00:25:12.320 --> 00:25:14.900
So the new course is going really well.

00:25:14.900 --> 00:25:21.600
So I, you know, the async course that talks about asyncio, async and await, multiprocessing, all that stuff.

00:25:22.080 --> 00:25:23.080
It needed to exist.

00:25:23.080 --> 00:25:23.180
It needed to exist.

00:25:23.180 --> 00:25:24.260
And I'm so happy I built it.

00:25:24.260 --> 00:25:24.540
Yeah.

00:25:24.540 --> 00:25:35.620
So what I wanted to bring up is I know async is hot because of a lot of people thinking about the new async stuff that came into the more recent Python 3s.

00:25:36.040 --> 00:25:37.540
But it's not just that.

00:25:37.540 --> 00:25:45.020
So one of the things I like about the course is you do talk about the new asyncio and aiohttp.

00:25:45.020 --> 00:25:45.840
Yeah, those.

00:25:45.840 --> 00:25:48.180
But you also, it isn't just that.

00:25:48.180 --> 00:25:54.940
It's also things like if you are concerned about that, you're probably concerned about things like I just want to make stuff run faster.

00:25:55.680 --> 00:26:04.180
And so there's other options to like multi-threading and multi-processing and when and how to use different ones and kind of how to decide that.

00:26:04.180 --> 00:26:09.400
And then even if you want to make it faster, there's things like I think, do you cover Cython then?

00:26:09.400 --> 00:26:10.340
I do cover Cython.

00:26:10.340 --> 00:26:10.820
Yeah.

00:26:10.820 --> 00:26:14.860
So just it's not just the more recent things.

00:26:14.860 --> 00:26:17.480
It's a big full picture and it's not even that long.

00:26:17.480 --> 00:26:19.160
It's just like five hours or something.

00:26:19.160 --> 00:26:20.340
Yeah, it is.

00:26:20.400 --> 00:26:21.440
Yeah, thank you so much for that.

00:26:21.440 --> 00:26:22.760
That's really nice of you to say so.

00:26:22.760 --> 00:26:23.160
Good job.

00:26:23.160 --> 00:26:23.400
Yeah.

00:26:23.400 --> 00:26:24.100
Thank you very much.

00:26:24.100 --> 00:26:24.960
Happy to do it.

00:26:24.960 --> 00:26:25.840
All right.

00:26:25.840 --> 00:26:29.540
And happy to meet up with you and talk about the news as always.

00:26:29.540 --> 00:26:30.340
Yeah, thanks.

00:26:30.340 --> 00:26:31.200
Talk to you later.

00:26:31.200 --> 00:26:31.460
You bet.

00:26:31.460 --> 00:26:31.720
Bye.

00:26:31.720 --> 00:26:31.920
Bye.

00:26:31.920 --> 00:26:35.540
Thank you for listening to Python Bytes.

00:26:35.540 --> 00:26:38.120
Follow the show on Twitter via at Python Bytes.

00:26:38.120 --> 00:26:41.000
That's Python Bytes as in B-Y-T-E-S.

00:26:41.000 --> 00:26:44.440
And get the full show notes at pythonbytes.fm.

00:26:44.440 --> 00:26:48.760
If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

00:26:48.900 --> 00:26:51.480
We're always on the lookout for sharing something cool.

00:26:51.480 --> 00:26:54.860
On behalf of myself and Brian Okken, this is Michael Kennedy.

00:26:54.860 --> 00:26:58.480
Thank you for listening and sharing this podcast with your friends and colleagues.

