WEBVTT

00:00:00.001 --> 00:00:04.680
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to

00:00:04.680 --> 00:00:11.700
your earbuds. This is episode 117, recorded February 12th, 2019. I'm Michael Kennedy.

00:00:11.700 --> 00:00:12.520
And I'm Brian Okken.

00:00:12.520 --> 00:00:13.240
Hey, Brian. How you doing?

00:00:13.240 --> 00:00:13.880
I'm great.

00:00:13.880 --> 00:00:18.080
Excellent. Great to hear. Great to hear. You haven't been flooded out in this torrential

00:00:18.080 --> 00:00:19.260
rain that we're having around here?

00:00:19.260 --> 00:00:21.720
Nope. And I survived snowpocalypse.

00:00:21.720 --> 00:00:24.040
Yes. So did I. My rain jacket got me through.

00:00:24.040 --> 00:00:25.240
Yeah.

00:00:25.240 --> 00:00:29.380
Wouldn't do that. This episode is brought to you by Datadog. Check them out at

00:00:29.380 --> 00:00:35.060
pythonbytes.fm/Datadog. All sorts of cool monitoring stuff. Tell you about more later.

00:00:35.060 --> 00:00:39.880
Brian, the first thing you have queued up here is super exciting to me. Hit me.

00:00:39.880 --> 00:00:46.080
Okay. Well, in 117 episodes, this is the first time we collided and both picked the same article.

00:00:46.080 --> 00:00:48.020
Because it's good, because it matters.

00:00:48.020 --> 00:00:52.120
Okay. So here is Goodbye Virtual Environments.

00:00:52.120 --> 00:00:52.760
What?

00:00:52.760 --> 00:00:56.320
Well, I don't know about that.

00:00:56.320 --> 00:00:59.000
Is this just like pseudo pip install into like root?

00:00:59.000 --> 00:01:01.840
Is this what they're just like, forget it. It's too much. We're out of here.

00:01:01.840 --> 00:01:05.500
Well, so we have a lot of solutions to this.

00:01:05.500 --> 00:01:07.460
So this is an article by Chad Smith.

00:01:07.460 --> 00:01:16.360
And apparently this is referencing pep582, which is a local packages directory PEP improvement.

00:01:16.360 --> 00:01:18.400
Okay. So here's the premise.

00:01:18.400 --> 00:01:22.080
Virtual environments are awesome, but they have some problems.

00:01:22.080 --> 00:01:37.620
They, the learning curve bit. So when you're trying to teach people how to use Python, you want them to have a safe environment. So you start them off with virtual environments and you have to like teach them about all this gunk and they don't even see any code yet.

00:01:37.880 --> 00:01:38.940
So there's that problem.

00:01:38.940 --> 00:01:52.800
Right. And if you close like your terminal, yeah, it'll come back. And you're like, oh man, I forgot to reactivate it. Like, why won't this run? I mean, you know, once you get into it, it's fine. But like, as a new person, you're like, why did this work before? And now it doesn't? Super frustrating. Right?

00:01:52.800 --> 00:02:07.040
So that the proposal is if you have a directory sitting around in your local, say called Dunder pypackages. So it's two underscores on each end pypackages as a directory. It's just sitting there. It doesn't have to have anything in it.

00:02:07.640 --> 00:02:22.040
The idea is if you pip install while you're there, it, instead of installing it in the site packages or anywhere else, it'll just install it in this local package directory. And you don't even really have to care what it looks like in there, but it's there.

00:02:22.760 --> 00:02:35.780
And then, so there's a couple changes. It's got a pip has to change, but also Python has to change because Python has to include looking for a pypackages directory locally to see if something's there.

00:02:35.780 --> 00:02:44.100
Some of the neat things about this is that it's not where you're calling it from. It's not your current directory when you're calling a module or something.

00:02:44.100 --> 00:02:49.020
So let's say somebody is just somebody that's writing a Python script and it has some dependencies.

00:02:49.260 --> 00:03:06.740
They could have a pypackages directory right next to their script. And then as long as their script is in their search path, Python will pick, run that. And then, then if that module has some imports, it'll try the local packages first. So that's kind of cool. I think that's it.

00:03:06.740 --> 00:03:17.800
Yeah, I think this is fantastic. And if I could take all my votes for what I'd like to see added to Python, certainly more than one would go towards this. So I think this is great.

00:03:17.920 --> 00:03:31.580
It's basically like what Node does with Node modules and other things. There's a convention that if there's this folder in the root of your project and you run code, it will try to use the modules or packages in our case from that location.

00:03:31.880 --> 00:03:49.320
There's no more activating. There's no more deactivating. None of that. You pip install. If it sees dunder pypackages, it installs it there. You Python run. And if it sees pypackages next to your file or in the working directory, it uses that from there as if it were a virtual environment.

00:03:49.320 --> 00:04:11.560
You don't have to keep activating it and deactivate it and make sure it's the right one. And it already follows a convention that so many people already do. Either create a VENV or .ENV folder at the root of your project. So many people do that. Editors like PyCharm and VS Code automatically detect and activate them. But this would just solve that problem. Flat. I love it.

00:04:11.560 --> 00:04:13.400
Well, solves most of the problem.

00:04:13.400 --> 00:04:17.080
I love it. What will problems then solve? Where do you see the challenges remain?

00:04:17.080 --> 00:04:46.120
So this article also, it's kind of cool that it has like this little trial thing. You can install a Python loc package to try it out. So I tried it out. And one of the things that's missing is your entry points. So like, let's say I'm installing a command line, some utility that has a command line interface. Where do those go? They actually go in this pypackages directory also, but they're not obvious where they are.

00:04:46.120 --> 00:04:54.880
It's not difficult to find them. There's a bin directory in there. In order to be able to use them, you'd still have to modify your environment, like your bash environment or something.

00:04:54.880 --> 00:05:03.480
I see. So like, for example, Pyramid has a p-serve web server that comes when you install it, and it's just in the Python path.

00:05:03.480 --> 00:05:03.700
Yeah.

00:05:03.700 --> 00:05:08.220
So you'd have to do some kind of mechanism to make that be active.

00:05:08.220 --> 00:05:13.000
Yeah. Or like pytest or Talks or so many things have little extra things that go with them.

00:05:13.000 --> 00:05:19.920
Yeah. I mean, I guess you could usually do Python dash M of that thing, but that's pretty clumsy compared to like just typing pytest.

00:05:19.920 --> 00:05:20.300
Yeah.

00:05:20.300 --> 00:05:21.420
Okay. Yeah. Gotcha.

00:05:21.420 --> 00:05:37.020
I'm all for this. I want it to happen, but I don't think virtual environments are going to go away unless we have, maybe they'll just be, you can have some extra thing in your path or something in your bash environment or whatever that says, hey, also look here.

00:05:37.020 --> 00:05:49.960
Yeah. Well, what I would like to see, I mean, maybe like this Dunder PyPackages is a virtual environment that you just don't have to activate, but you could, if you want to run these types of utilities that you're talking about.

00:05:49.960 --> 00:05:51.040
Yeah. Okay.

00:05:51.040 --> 00:05:52.660
That would be a pretty good compromise, I think.

00:05:52.660 --> 00:05:54.900
Anyway, good thing. Doesn't solve everything.

00:05:54.900 --> 00:06:04.160
But I think it's a super step forward because it doesn't impose some opinionated behavior and workflow and other tooling to replace.

00:06:04.400 --> 00:06:17.660
It's like, it just now works. I run Python. It works using the packages that I meant for it to use. I run pip. It installs them into the proper place generally that I meant them to do and so on. So I like it.

00:06:17.660 --> 00:06:27.840
And the getting new people up to speed on stuff quicker, getting, being able to isolate installs application development. There's so many benefits here that it, yeah, it's great.

00:06:28.340 --> 00:06:34.980
Yeah. Love it. So yeah, definitely vote for that over some of the other options. Super cool. So Brian, I got some bad news today.

00:06:34.980 --> 00:06:35.640
You do?

00:06:35.640 --> 00:06:44.500
Well, you know, my life's pretty good given that I'm calling this bad news, but I learned about this thing called Google Lighthouse. Have you heard of this? I'd never heard of this.

00:06:44.500 --> 00:06:44.740
No.

00:06:44.740 --> 00:06:54.940
So Google Lighthouse is a thing that will analyze your websites basically for how well they're going to rank it based on a whole bunch of factors.

00:06:54.940 --> 00:07:01.340
And people have heard of SEO. So you've got like, of course, you should have your title on your head and your H1s and all this stuff that you need.

00:07:01.600 --> 00:07:20.440
But this is more about the behavior of your web application. So is it responsive? Are your images, do they fit on like phone screens? Does it return data at the right amount of time? Are you serving like old style images that are too large and you could reencode them in small, like a huge bunch of these types of things?

00:07:20.440 --> 00:07:34.520
Are you bundling and minifying your CSS and JavaScript? So I sent my site through there, which I consider to be blazing fast, because if you go to like talkpython.fm or some of the other ones or pythonbytes.fm, although I've been cranking on talkpython first before I break Python bytes.

00:07:34.520 --> 00:07:43.100
If you go to the homepage, it renders like out to the network in 15 milliseconds. And I'm like, well, that's pretty much as good as it's going to get, right?

00:07:43.100 --> 00:07:47.480
Maybe I could shave two milliseconds off it, but who cares, right? It's so fast.

00:07:48.280 --> 00:07:56.060
But when you look at all the CSS and all the JavaScript and the way it renders and the images and everything, it turns out that that's, that could be better.

00:07:56.060 --> 00:08:01.900
And I knew that it could be better, but I didn't realize how much Google was sort of punishing my site for it.

00:08:01.900 --> 00:08:06.780
So I went looking and I found this cool Python project called Web Assets.

00:08:06.780 --> 00:08:09.900
I'd never heard of it. Yeah. And I found it on Python, awesome Python.

00:08:09.900 --> 00:08:17.420
So I went there and said, well, what can I find for like minifying JavaScript and bundling CSS, like five CSS files into one and whatnot.

00:08:18.120 --> 00:08:25.220
So this is a Python package you install. You basically created an environment that registers your settings.

00:08:25.220 --> 00:08:34.500
Like here's the static folders. If you're going to generate files, like if you're going to take five CSS files, minifying them and like mush them into one giant file that can be gzipped.

00:08:34.500 --> 00:08:37.880
Right. If you do that, where do you save it? All those kinds of things.

00:08:38.080 --> 00:08:45.100
What transformations you want to apply to it, like bundling and minification or whatever you configure that you give it a list of files.

00:08:45.100 --> 00:08:53.200
And then it will just bust out like a new one onto disk. And you can just start serving that instead of all like you just take away the five CSS links and you put in the one.

00:08:53.200 --> 00:08:53.520
Okay.

00:08:53.520 --> 00:08:58.140
It also has built in Flask, Django and Pyramid support. So it integrates in there.

00:08:58.240 --> 00:09:02.480
But to me, it looks like a whole bunch of stuff that's getting in the way of your web app working.

00:09:02.480 --> 00:09:08.200
Whereas like you can just ask it to save a file that gets served out of Nginx and doesn't touch your Python code.

00:09:08.200 --> 00:09:13.040
That seems nicer. So that's what I'm doing. I don't want to integrate it into my app.

00:09:13.080 --> 00:09:16.340
But if you wanted to go that path, you certainly could. It's a really cool little thing.

00:09:16.340 --> 00:09:18.800
Oh, neat. So talk Python is faster now.

00:09:18.800 --> 00:09:25.300
It is much faster. It now has a like a best score or whatever on Google's lighthouse, basically.

00:09:25.300 --> 00:09:31.380
Which will help it rank higher in Google search results, which is also pretty awesome.

00:09:31.380 --> 00:09:31.800
Yeah.

00:09:31.800 --> 00:09:38.920
So yeah, there's a bunch of cool. And so anybody doing anything with the web, they should look at their website in Google Lighthouse, which I have a link to.

00:09:38.920 --> 00:09:45.900
And then one way to address some portion of that around your static files anyway, has to do with web assets.

00:09:45.900 --> 00:09:47.240
So that's a pretty cool thing.

00:09:47.240 --> 00:09:47.740
Awesome.

00:09:47.740 --> 00:09:49.280
Yeah. And it's all Python goodness.

00:09:49.280 --> 00:09:49.660
Yeah.

00:09:49.660 --> 00:09:53.360
And the next item, have we spoken about packaging? I think we might have touched on it once.

00:09:53.360 --> 00:09:54.380
Yes.

00:09:54.380 --> 00:09:56.920
This week? Have we spoken about it this week?

00:09:56.920 --> 00:10:01.520
No, yeah. Let's do it. Sort of. We kind of have in a sense, but let's go. What's next?

00:10:01.520 --> 00:10:07.820
Okay. So we've got actually a three-part series of articles by, I think his name is Bernat Gabor.

00:10:08.340 --> 00:10:13.860
And he is one of the maintainers for talks and virtual environment and a bunch of other stuff.

00:10:13.860 --> 00:10:21.820
He's with the Python Packaging Authority, and he's right in the thick of all of this changes in packaging and everything.

00:10:21.820 --> 00:10:24.920
He wrote kind of a three-part series.

00:10:24.920 --> 00:10:33.680
The first part is the state of Python packaging, which is just kind of a nice overview of what are we trying to do and what is the issue and all that stuff.

00:10:33.680 --> 00:10:40.260
We've got a bunch of like a directory full of a source directory, and you want to share it with other people.

00:10:40.260 --> 00:10:42.200
And how does that all happen?

00:10:42.200 --> 00:10:46.460
And how did it happen in the past using setup tools and all that?

00:10:46.460 --> 00:10:48.320
And where are we at now?

00:10:48.660 --> 00:10:58.320
And then some of the problems, he talked about some of the problems with, I guess it's kind of hard to hand wave this, but it isn't just source files that you just copy from one computer to another.

00:10:58.320 --> 00:11:02.860
Sometimes there's C parts to it that need compiled for different machines.

00:11:02.860 --> 00:11:06.640
Even Fortran in the data science world, you've got to compile like crazy stuff, right?

00:11:06.760 --> 00:11:12.180
Yeah, and so there's that part of it, and that's included in all of this packaging mess.

00:11:12.180 --> 00:11:23.660
And then on the other side, when you're trying to install it, if you just grab the source distribution, then you have to compile it on your side, but you have to make sure that all the compilers are available and all that stuff.

00:11:23.660 --> 00:11:30.720
And it's kind of a mystery black box with a lot of scary guts inside because it's a scary problem.

00:11:30.720 --> 00:11:31.780
It's a hard problem.

00:11:31.780 --> 00:11:41.700
Now, moving towards things like wheels are pre-compiled, so you build everything before you push it up, and then clients just can just sort of download it and unpack it.

00:11:41.700 --> 00:11:49.220
But in order for this all to work right, there's a lot of moving parts, and it's all being done by people in there volunteering their time.

00:11:49.220 --> 00:11:52.200
And that's why I love this set of articles.

00:11:52.200 --> 00:12:02.540
It's from the inside, talking about some of the hard problems, why they did what they did, some of the breaks that happened, and why they happened, and moving forward.

00:12:02.540 --> 00:12:05.200
And I want to read one article.

00:12:05.200 --> 00:12:07.520
It's actually the conclusion, one bit of it.

00:12:07.520 --> 00:12:09.380
It's the conclusion to the third article.

00:12:09.380 --> 00:12:10.480
It says,

00:12:10.480 --> 00:12:12.080
Packaging is hard.

00:12:12.080 --> 00:12:20.920
Improving a packaging system without any breakage where users can write and run arbitrary code during the packaging in your free time is probably impossible.

00:12:20.920 --> 00:12:22.600
Yeah, that sounds about right.

00:12:22.600 --> 00:12:23.700
Yeah.

00:12:23.700 --> 00:12:31.340
They said, granted, as we go through this change, some packages might break, and we might disallow some practices that worked up until now.

00:12:31.980 --> 00:12:36.660
But we, the packaging authority maintainers, do not do it in bad faith.

00:12:36.660 --> 00:12:45.240
So when errors do pop up, please do fill in a detailed error report with what went wrong, how you tried to use it, and what is your use case.

00:12:45.320 --> 00:12:47.940
And I guess I have to speak from experience.

00:12:47.940 --> 00:13:00.500
It's when we just, when I started trying to, even when the, some of the same involved people were, were working on some of the transition to the new pip server, IPI.

00:13:00.900 --> 00:13:05.440
It's a similar sort of situation, I think, is when, when we change the way we do things.

00:13:05.440 --> 00:13:09.800
Some people get upset and just expect it to all just work for free.

00:13:09.800 --> 00:13:12.620
But please keep your head and read this article.

00:13:12.620 --> 00:13:14.760
It's a great series of articles on where we are.

00:13:14.760 --> 00:13:16.360
And I'm, it's going to be hard.

00:13:16.360 --> 00:13:17.140
Yeah.

00:13:17.240 --> 00:13:19.600
I'm not even going to try to summarize it, but it's good.

00:13:19.600 --> 00:13:19.860
Yeah.

00:13:19.860 --> 00:13:21.200
It sounds like a great write-up.

00:13:21.200 --> 00:13:27.600
Did, you know, if they, he mentioned the PEP, the one you just mentioned there, what was it, 582?

00:13:27.600 --> 00:13:29.860
No, they didn't, he didn't reference that.

00:13:29.860 --> 00:13:37.520
But there's, of course, reference to 517 and 518 that dealt with the pyproject.toml and stuff like that.

00:13:37.520 --> 00:13:37.760
Yeah.

00:13:37.760 --> 00:13:38.160
Cool.

00:13:38.160 --> 00:13:39.160
All right.

00:13:39.160 --> 00:13:44.560
Well, you know what all this means to me, the way I perceive it is, like, people are trying to solve this problem.

00:13:44.560 --> 00:13:45.660
They know it is a problem.

00:13:45.920 --> 00:13:51.940
And I think if we get it dealt with as a community, I think it'll be a massive, massive benefit.

00:13:51.940 --> 00:13:57.760
I mean, I was just talking to someone the other day at a conference here in town, and he was like, oh, well, Go is so awesome.

00:13:57.760 --> 00:14:00.200
I'm like, okay, tell me why Go, like, sell me on it.

00:14:00.200 --> 00:14:01.260
Why is Go so awesome?

00:14:01.260 --> 00:14:06.920
He's like, I press a button, I compile it, I get a single binary I can give to anyone, and they can run it as long as they're on that platform.

00:14:06.920 --> 00:14:08.840
I'm like, yeah, that's a benefit.

00:14:08.840 --> 00:14:13.280
That would be nice, wouldn't it, if there was a, like, Python space build option.

00:14:13.280 --> 00:14:14.700
So, very, very cool.

00:14:14.700 --> 00:14:17.740
But there's a lot of stuff coming and a lot of work being done on it.

00:14:17.740 --> 00:14:20.280
Like, we talked about PyOxidizer recently as well.

00:14:20.280 --> 00:14:21.240
Yeah.

00:14:21.240 --> 00:14:21.540
Quite cool.

00:14:21.540 --> 00:14:22.080
Yeah.

00:14:22.080 --> 00:14:26.540
One more thing before we move on, one of the things he brought up is Flit.

00:14:26.540 --> 00:14:29.400
Flit uses the new Toml style.

00:14:29.920 --> 00:14:35.520
The implementation of Flit is built on top of distutils and all that stuff also.

00:14:35.520 --> 00:14:40.320
And that's one of the things moving forward is some of these newer packaging tools.

00:14:40.320 --> 00:14:50.520
If Python embraces some of the stuff and some of the changes, we'll be able to kind of simplify the maintenance of a lot of these extra things.

00:14:50.880 --> 00:14:54.900
Right, because they do a lot of work to piece it together and paper over the challenges, right?

00:14:54.900 --> 00:15:01.860
And if the underlying bits changed, it got easier, well, maybe it just, they just, you know, use the easier foundation, right?

00:15:01.860 --> 00:15:02.060
Yep.

00:15:02.060 --> 00:15:02.420
Nice.

00:15:02.780 --> 00:15:03.040
All right.

00:15:03.040 --> 00:15:05.380
Let me tell you about Datadog before we get to the next one.

00:15:05.380 --> 00:15:08.320
So Datadog has been a longtime sponsor of the show.

00:15:08.320 --> 00:15:09.800
Super thanks.

00:15:09.800 --> 00:15:10.660
Big thanks to them.

00:15:10.660 --> 00:15:15.580
And they're a cloud monitoring platform built by engineers for engineers.

00:15:15.860 --> 00:15:21.620
They're tracing client auto instruments, popular frameworks like Django, Flask, Tornado, and so on.

00:15:21.620 --> 00:15:30.200
So you can quickly visualize the flow of data across your application architecture, not just how's my Django app doing, but how is all my infrastructure and moving parts doing?

00:15:30.200 --> 00:15:38.560
They also integrate with over 250 technologies like Hadoop and Redis, allowing you to pivot seamlessly between distributed request traces, metrics, and logs.

00:15:38.560 --> 00:15:44.340
So check them out and get a free trial as well as a cool Datadog t-shirt over at pythonbytes.fm.

00:15:44.640 --> 00:15:46.200
Datadog really helps support the show.

00:15:46.200 --> 00:15:46.480
Cool.

00:15:46.480 --> 00:15:46.740
Yeah.

00:15:46.740 --> 00:15:50.040
Brian, I picked this one to be custom picked for you.

00:15:50.040 --> 00:15:53.180
Like you should, this was the one you could have chosen, but I got it today.

00:15:53.180 --> 00:15:53.940
I beat you to it.

00:15:53.940 --> 00:15:54.220
Okay.

00:15:54.220 --> 00:15:54.580
All right.

00:15:54.580 --> 00:15:58.320
So this one is a cheat sheet for mocking in Python.

00:15:58.320 --> 00:16:08.600
So mocking, not the insult, but the ability to change the behavior of some deep internal parts of your application without rewriting them.

00:16:08.600 --> 00:16:11.400
Super powerful testing feature, right?

00:16:11.420 --> 00:16:21.920
If I want to test how my data access layer works, but I don't want it to actually touch the database, or I want to test how my credit card system works, but I don't really want it to talk to the, to Stripe or whatever.

00:16:21.920 --> 00:16:29.060
I can mock out different parts of that and basically inject behavior into my app, right?

00:16:29.180 --> 00:16:29.420
Yes.

00:16:29.420 --> 00:16:30.040
Yep.

00:16:30.040 --> 00:16:32.740
So mocks are built into Python, right?

00:16:32.740 --> 00:16:33.720
That's great.

00:16:33.720 --> 00:16:36.420
You can just import mock and start doing stuff with it.

00:16:36.740 --> 00:16:40.540
However, there's a lot of different ways in which you can do that.

00:16:40.540 --> 00:16:43.400
And there's also a lot of features.

00:16:43.400 --> 00:16:50.340
You could use mocks the way I describe them there, which I think is sort of making your test decoupled from your dependencies.

00:16:50.340 --> 00:16:57.880
But you can also say, I would like to kind of look inside the behavior and make sure certain parts of my app are using functions that I want.

00:16:57.880 --> 00:17:05.340
Like, for example, I could say, I'm going to call the login function or the access, let's say, admin part of my app.

00:17:05.340 --> 00:17:09.720
And I'm going to make sure that it's checking is admin on the user, right?

00:17:09.760 --> 00:17:16.480
Like, if it doesn't, if it talks to the admin section and it doesn't say, you know, test whether or not I have the permissions, something's badly wrong.

00:17:16.480 --> 00:17:20.520
So you can even verify that things were called with like in a start called once and so on.

00:17:20.520 --> 00:17:28.320
So this is a nice write-up that takes you through all the different things you can do with mock and like quickly gives you examples for those various things.

00:17:28.320 --> 00:17:34.060
Like how to use a mock as a decorator, how to use it as a context manager and on and on and on.

00:17:34.060 --> 00:17:34.520
Great.

00:17:34.520 --> 00:17:34.840
Yeah.

00:17:34.840 --> 00:17:35.460
Nice.

00:17:35.460 --> 00:17:35.720
Yeah.

00:17:36.080 --> 00:17:45.540
So all those folks out there who are testing or want to start testing, or even if you don't test because testing is too hard, you're like, well, all this stuff happens when I call this function.

00:17:45.540 --> 00:17:46.580
How am I supposed to test it?

00:17:46.580 --> 00:17:47.620
Mock.

00:17:47.620 --> 00:17:48.240
Here you go.

00:17:48.240 --> 00:17:49.380
Yeah.

00:17:49.380 --> 00:18:04.240
One of the things that's nice about having it not just completely tied with testing, although that's definitely where it's used a lot, is we can, like some applications that have like a, I don't know, a debug mode or some other mode that they're operating in.

00:18:04.400 --> 00:18:11.800
You can even build it into your application to, you know, flip a bit or something and it turns some of the system off.

00:18:11.800 --> 00:18:16.040
So, and you can use mock for that if you don't want to build it other ways.

00:18:16.040 --> 00:18:17.060
Yeah, I guess you could, right?

00:18:17.060 --> 00:18:21.500
You could just, you could fire off the mock if you want the logging to do nothing, right?

00:18:21.500 --> 00:18:25.580
I'm going to create a mock that replaces this file behavior or whatever, right?

00:18:25.580 --> 00:18:37.360
Yeah, or if you wanted to like switch out for diagnosing software issues or debugging, you can switch out your database interface with some other database entry or something or whatever.

00:18:37.360 --> 00:18:38.020
Yeah.

00:18:38.020 --> 00:18:41.980
But I don't know if very many people do use it for that, but you could definitely.

00:18:41.980 --> 00:18:42.520
Yeah.

00:18:42.520 --> 00:18:42.760
Yeah.

00:18:42.760 --> 00:18:43.120
Very cool.

00:18:43.120 --> 00:18:43.620
All right.

00:18:43.620 --> 00:18:43.900
Yeah.

00:18:43.900 --> 00:18:44.960
Mocking is super powerful.

00:18:44.960 --> 00:18:46.020
What do you got next?

00:18:46.180 --> 00:18:49.380
I have just an article about conference speaking.

00:18:49.380 --> 00:18:53.340
So, Saron, and I'm not going to try to pronounce her last name.

00:18:53.340 --> 00:18:54.440
Do you know how to pronounce it?

00:18:54.440 --> 00:18:55.060
Yit Barak.

00:18:55.060 --> 00:18:55.560
Sure.

00:18:55.560 --> 00:18:56.820
I'm going to go with Yit Barak.

00:18:56.960 --> 00:18:57.180
Okay.

00:18:57.180 --> 00:19:00.980
I know her from the Coder Newbie or Code Newbie or something.

00:19:00.980 --> 00:19:06.500
She does a podcast and she's been doing quite a bit in software to try to get more people involved with software.

00:19:06.500 --> 00:19:08.860
And she's been doing a great job.

00:19:08.860 --> 00:19:15.960
But one of the things that she wrote recently was just talking about if you're giving a technical talk, just improving it.

00:19:15.960 --> 00:19:22.900
And I love this because it's just a zero in on one little bit to try to make presentations better.

00:19:22.900 --> 00:19:26.780
The article is called Transitions, the Easiest Way to Improve Your Tech Talk.

00:19:27.440 --> 00:19:29.120
Improving how you speak.

00:19:29.120 --> 00:19:32.700
Public speaking is part of one of the things I work on personally.

00:19:32.700 --> 00:19:40.320
So, I'm going to, before we get started, I'm going to grab a quote that I got read recently from Jeff Atwood from Coding Horror.

00:19:40.320 --> 00:19:47.640
He said, the people who can write and communicate effectively are all too often the only people who get heard.

00:19:47.640 --> 00:19:49.860
They get to set the terms of the debate.

00:19:49.860 --> 00:19:53.320
And I think that definitely applies to public speaking as well.

00:19:53.320 --> 00:19:56.140
So, that's one of the reasons why I picked this up.

00:19:56.540 --> 00:20:06.580
But one of the things that, so, Saron mentioned is the typical way people will default to presenting something is they get, they put their stuff that they want to talk about on slides.

00:20:06.580 --> 00:20:09.780
And then they talk about whatever's on the first slide.

00:20:09.780 --> 00:20:15.780
And then when they get to the, and then they pause, click to the next slide, and then talk about the new topic.

00:20:16.260 --> 00:20:19.920
This is where the focus is of this article is to try to work on those transitions.

00:20:19.920 --> 00:20:23.220
And it's a simple thing.

00:20:23.220 --> 00:20:24.860
I think it would take practice.

00:20:24.860 --> 00:20:26.660
It's definitely something I'm going to practice.

00:20:26.860 --> 00:20:31.140
But as an example, she talks about transitioning from one slide to another.

00:20:31.140 --> 00:20:36.240
Instead of pausing, you can have a sentence transition as well.

00:20:36.240 --> 00:20:43.560
So, you can, for instance, say, and that's why documentation is important, as we see on this slide.

00:20:44.100 --> 00:20:49.500
And span that sentence over transitioning from one slide to another.

00:20:49.500 --> 00:20:56.440
And you can even time your clicking from one slide to the next and how you transition a sentence from one to the next.

00:20:56.440 --> 00:20:57.920
This totally makes sense.

00:20:58.140 --> 00:21:03.160
And we've been doing it in writing all the time, transition sentences in paragraphs.

00:21:03.160 --> 00:21:06.520
And we get, we've been dinged on it throughout school.

00:21:06.520 --> 00:21:09.140
But somehow we forget to do it while talking.

00:21:09.140 --> 00:21:12.760
So, I just wanted to bring this up and highlight this article.

00:21:12.760 --> 00:21:13.800
I think this is great.

00:21:13.800 --> 00:21:15.700
It's such a good recommendation.

00:21:15.700 --> 00:21:27.360
And when I first started doing in-person training, you know, standing in front of, you know, 20 people giving technical training is highly nerve-wracking, especially when you're new to it.

00:21:28.020 --> 00:21:37.440
And it's easy to get derailed or try to, like, you kind of fall back to reading your slides, which is, like, really not very engaging for anybody.

00:21:37.440 --> 00:21:45.820
So, the thing that I found was super helpful is if I could have one sentence that's engaging, like, this is how I'm going to start this slide.

00:21:45.820 --> 00:21:49.540
Everything is just downhill and, like, smooth from there.

00:21:49.540 --> 00:21:51.820
And this really seems to kind of capture that same idea.

00:21:51.820 --> 00:21:57.020
Like, every part of your presentation, if you can start it well and you feel good, like, yeah, this is going great.

00:21:57.180 --> 00:22:00.500
Like, you just, you have that natural momentum that just keeps going.

00:22:00.500 --> 00:22:05.660
But if you start it clumsily, it distracts you and it just goes downhill in the wrong way, right?

00:22:05.660 --> 00:22:08.740
So, this is actually a huge benefit, I think.

00:22:08.740 --> 00:22:09.680
But it's so easy.

00:22:09.680 --> 00:22:14.400
Like, can you have one sentence for each major concept in your presentation?

00:22:14.400 --> 00:22:15.280
Like, it might be 10.

00:22:15.280 --> 00:22:16.680
Like, how hard is that, right?

00:22:16.680 --> 00:22:17.980
It's not that hard.

00:22:17.980 --> 00:22:18.900
But it's super valuable.

00:22:19.100 --> 00:22:19.280
Yeah.

00:22:19.280 --> 00:22:19.360
Yeah.

00:22:19.360 --> 00:22:27.560
And then, also, I think when I've been presenting before, I will take advantage of the end of the slide to take a little micro break.

00:22:28.000 --> 00:22:29.720
And it's nice for me.

00:22:29.720 --> 00:22:36.560
But it's kind of annoying for the viewer to sit there and watch nothing as the person transitions from one slide to another.

00:22:36.560 --> 00:22:45.760
But now there's, she brings up that there's definitely times where you really are transitioning ideas that it's perfectly fine to take that little break.

00:22:45.820 --> 00:22:49.980
It gives everybody a rest a little bit and you're moving on to a new topic.

00:22:49.980 --> 00:22:52.680
That's a great time to not talk while transitioning.

00:22:52.680 --> 00:22:52.980
Yeah.

00:22:52.980 --> 00:22:54.220
Silence is important, too.

00:22:54.220 --> 00:22:54.920
Right?

00:22:54.920 --> 00:22:55.180
Yeah.

00:22:55.180 --> 00:22:59.720
Like, people too often think, I have to be absolutely continuously making noise.

00:22:59.720 --> 00:23:00.460
Right?

00:23:00.460 --> 00:23:06.440
But, like, a few seconds of silence as a point sinks in or you are transitioning ideas, it's also really valuable.

00:23:06.440 --> 00:23:06.740
Yeah.

00:23:06.740 --> 00:23:07.280
Anyway.

00:23:07.280 --> 00:23:08.060
So, cool.

00:23:08.060 --> 00:23:08.280
Cool.

00:23:08.280 --> 00:23:08.740
Great pick.

00:23:09.100 --> 00:23:15.860
So, it's so cool that PEP582 is presented as an idea, but there's this problem.

00:23:15.860 --> 00:23:22.600
Like, since Guido has stepped down, there really hasn't been any way to even address these PEPs, right?

00:23:22.600 --> 00:23:26.360
Because how the decision-making happens, it's just been on hold, right?

00:23:26.360 --> 00:23:26.680
Yeah.

00:23:26.680 --> 00:23:30.520
So, maybe that PyPackages thing is just going to be in limbo forever?

00:23:30.520 --> 00:23:31.960
No.

00:23:31.960 --> 00:23:34.280
Finally, we have good news.

00:23:34.760 --> 00:23:40.120
The final governance model for Python was chosen to be the steering council model.

00:23:40.120 --> 00:23:48.140
And the people who populate that council, the first steering counselors, I don't know if you call them that, but I'm calling them that.

00:23:48.140 --> 00:23:50.360
The first steering counselors have been elected.

00:23:50.360 --> 00:23:56.960
And so, our new technical leaders are Barry Warsaw, Brett Cannon, Carol Willing, Guido Van Rossum, and Nick Coghlan.

00:23:56.960 --> 00:23:58.380
All great folks.

00:23:58.380 --> 00:24:00.700
And congratulations to them.

00:24:00.760 --> 00:24:03.560
And this is news sent to me from Joe Carey.

00:24:03.560 --> 00:24:04.840
So, thanks, Joe, for sending that in.

00:24:04.840 --> 00:24:05.700
Yeah, that's awesome.

00:24:05.700 --> 00:24:06.780
Good thing.

00:24:06.780 --> 00:24:07.660
Very good pick.

00:24:07.660 --> 00:24:13.360
So, of course, there's tons of great people that would have been fine, but these are good sets.

00:24:13.360 --> 00:24:14.940
Yeah, I think it's a great set as well.

00:24:14.940 --> 00:24:20.260
I think one of the things that's really cool here is we have Guido Van Rossum is not gone.

00:24:20.260 --> 00:24:21.980
He didn't just go like, you know what?

00:24:22.600 --> 00:24:24.520
I'm going to go do Go or whatever, right?

00:24:24.520 --> 00:24:27.200
He's still on the steering council.

00:24:27.200 --> 00:24:28.680
He's still part of Python.

00:24:28.680 --> 00:24:36.680
He just doesn't have to bear the brunt of all the friction of moving it forward on himself alone, right?

00:24:36.680 --> 00:24:38.700
So, he's still part of this, which I think is great.

00:24:38.700 --> 00:24:38.920
Yeah.

00:24:38.920 --> 00:24:40.400
Also, happy to see Carol Willing on there.

00:24:40.400 --> 00:24:41.060
That's really good.

00:24:41.060 --> 00:24:42.620
So, very, very good news.

00:24:42.620 --> 00:24:43.360
All right.

00:24:43.400 --> 00:24:49.120
So, it looks like maybe stuff will start happening around Python, which is long overdue, actually.

00:24:49.120 --> 00:24:49.600
Yeah.

00:24:49.600 --> 00:24:53.780
They still have a lot to figure out, but we will report it when we hear more.

00:24:53.780 --> 00:24:58.920
There's a bunch of good things happening in the community, a bunch of good ideas being proposed, like this PEP we talked about at the opening.

00:24:58.920 --> 00:25:05.740
And until this stuff gets finalized, it just literally cannot be addressed or any action can be taken.

00:25:05.740 --> 00:25:07.600
So, it's really good to see this taking place.

00:25:07.600 --> 00:25:07.860
Yeah.

00:25:07.860 --> 00:25:08.120
All right.

00:25:08.120 --> 00:25:11.060
Well, Brian, that's it for our six main items.

00:25:11.060 --> 00:25:12.180
What else you got for us?

00:25:12.640 --> 00:25:14.220
Well, I got interviewed recently.

00:25:14.220 --> 00:25:18.140
So, I got interviewed for the IT Energizer podcast.

00:25:18.140 --> 00:25:18.340
Right.

00:25:18.340 --> 00:25:19.120
With Phil Burgess.

00:25:19.120 --> 00:25:19.480
Yeah.

00:25:19.480 --> 00:25:19.880
Yeah.

00:25:19.880 --> 00:25:20.780
And you've been on there, too.

00:25:20.780 --> 00:25:25.860
So, we're going to drop a link to both of our interviews in the show notes, but mine's better.

00:25:25.860 --> 00:25:26.580
So, listen to mine.

00:25:26.580 --> 00:25:28.480
No, they're both good.

00:25:28.480 --> 00:25:28.680
That's great.

00:25:28.680 --> 00:25:29.760
I hadn't listened to yours yet.

00:25:29.760 --> 00:25:32.860
I knew you had been interviewed, but it hadn't been out yet.

00:25:32.860 --> 00:25:34.280
So, I'm looking forward to listening.

00:25:34.280 --> 00:25:34.600
Yeah.

00:25:34.600 --> 00:25:36.340
And then also, I'm sorry.

00:25:36.340 --> 00:25:41.880
I can't remember who sent this to us, but somebody mentioned to us that PyCon Latin America

00:25:41.880 --> 00:25:46.640
is coming up in Puerto Vallarta, Mexico on August 29th.

00:25:46.640 --> 00:25:50.520
And the call for proposals is open until May 31st.

00:25:50.520 --> 00:25:51.280
That sounds super.

00:25:51.280 --> 00:25:54.400
It'd be great to go down there and spend some time where it's warm.

00:25:54.400 --> 00:25:56.120
And it's in the summer, right?

00:25:56.120 --> 00:25:58.100
A lot of people have maybe a little more flexibility.

00:25:58.100 --> 00:25:58.620
Yeah.

00:25:58.760 --> 00:26:00.720
So, call proposals.

00:26:00.720 --> 00:26:01.380
Get them out there.

00:26:01.380 --> 00:26:02.720
Get your talks in.

00:26:02.720 --> 00:26:03.300
Plus, it's in Puerto Vallarta.

00:26:03.300 --> 00:26:03.980
We should go.

00:26:03.980 --> 00:26:04.980
Exactly.

00:26:04.980 --> 00:26:08.040
We have to go do a live podcast recording because work.

00:26:08.040 --> 00:26:08.360
Yeah.

00:26:08.360 --> 00:26:11.880
But so, if somebody wants to sponsor us to go down there, that would be awesome.

00:26:11.880 --> 00:26:12.160
Yeah.

00:26:12.160 --> 00:26:12.680
That would be great.

00:26:12.680 --> 00:26:14.700
So, there's something wrong with this episode.

00:26:14.700 --> 00:26:16.300
We haven't really fulfilled our duty.

00:26:16.500 --> 00:26:19.980
I don't think we've even mentioned Anthony Shaw yet on this show, have we?

00:26:19.980 --> 00:26:24.280
I'm not sure how Anthony is part of this, but...

00:26:24.280 --> 00:26:25.220
He's so prolific.

00:26:25.220 --> 00:26:26.760
He seems to always have something we ground.

00:26:26.760 --> 00:26:26.940
Yeah.

00:26:26.940 --> 00:26:27.960
Okay.

00:26:27.960 --> 00:26:29.820
So, we've got our joke section.

00:26:29.820 --> 00:26:33.900
And you put a list on our database of show ideas.

00:26:33.900 --> 00:26:35.900
Is this list coming from Anthony?

00:26:35.900 --> 00:26:37.660
But it's not his list, is it?

00:26:37.660 --> 00:26:38.400
Or did he just tell you about it?

00:26:38.400 --> 00:26:42.960
No, he just said, hey, Michael, you should check out, or hey, Python Bytes, you should

00:26:42.960 --> 00:26:44.200
check out these jokes.

00:26:44.200 --> 00:26:45.520
So, they're not his jokes.

00:26:45.520 --> 00:26:47.800
They're just transferred to us via him.

00:26:47.800 --> 00:26:48.120
Okay.

00:26:48.120 --> 00:26:49.640
I couldn't pick one, so I've got a few.

00:26:49.640 --> 00:26:49.880
All right.

00:26:49.880 --> 00:26:50.120
Hit me.

00:26:50.120 --> 00:26:50.420
Okay.

00:26:50.420 --> 00:26:53.880
What's the second movie about a database engineer called?

00:26:53.880 --> 00:26:54.840
The Migration.

00:26:54.840 --> 00:26:56.680
Oh, that would be good.

00:26:56.680 --> 00:26:58.700
No, the sequel, of course.

00:26:58.700 --> 00:26:59.560
Of course.

00:26:59.560 --> 00:27:01.360
The SQL sequel.

00:27:01.360 --> 00:27:01.920
I love it.

00:27:01.920 --> 00:27:02.600
Perfect.

00:27:02.600 --> 00:27:03.140
All right.

00:27:03.140 --> 00:27:05.080
These are like programming dad jokes.

00:27:05.080 --> 00:27:05.540
I love them.

00:27:05.540 --> 00:27:06.060
What's the next one?

00:27:06.060 --> 00:27:06.240
Yeah.

00:27:06.240 --> 00:27:07.240
Programming dad jokes.

00:27:07.240 --> 00:27:07.720
Okay.

00:27:08.080 --> 00:27:09.660
This one is not false.

00:27:09.660 --> 00:27:11.980
It's funny because it's true.

00:27:11.980 --> 00:27:14.300
Okay.

00:27:14.300 --> 00:27:16.700
These are bad.

00:27:16.700 --> 00:27:20.420
And this last one, I actually laughed out loud at this.

00:27:20.420 --> 00:27:25.560
So, a programmer's spouse tells them, would you run to the store and pick up a loaf of bread?

00:27:25.560 --> 00:27:27.100
If they have eggs, get a dozen.

00:27:27.100 --> 00:27:29.820
The programmer comes home with 12 loaves of bread.

00:27:29.820 --> 00:27:31.620
That's right.

00:27:31.620 --> 00:27:32.720
They must have had eggs.

00:27:32.720 --> 00:27:35.280
All right.

00:27:35.280 --> 00:27:35.840
These are great.

00:27:35.840 --> 00:27:36.300
These are great.

00:27:36.300 --> 00:27:37.460
Thanks for putting these in here.

00:27:37.760 --> 00:27:38.560
So, awesome.

00:27:38.560 --> 00:27:39.120
Very cool.

00:27:39.120 --> 00:27:43.780
Just for everybody that's annoyed with these jokes, we keep getting feedback from people that they like them.

00:27:43.780 --> 00:27:44.960
So, they're going to stay in there.

00:27:44.960 --> 00:27:45.640
Yeah.

00:27:45.640 --> 00:27:46.600
People seem to love them.

00:27:46.600 --> 00:27:48.040
Even if they're bad.

00:27:48.040 --> 00:27:50.540
Thanks.

00:27:50.540 --> 00:27:51.520
These are funny.

00:27:51.520 --> 00:27:51.720
Yeah.

00:27:51.720 --> 00:27:52.820
Thanks for doing the episode.

00:27:52.820 --> 00:27:53.820
Talk to you next time.

00:27:53.820 --> 00:27:54.580
Talk to you next week.

00:27:54.580 --> 00:27:54.900
Bye.

00:27:54.900 --> 00:27:54.960
Bye.

00:27:54.960 --> 00:27:55.000
Bye.

00:27:55.000 --> 00:27:55.500
Bye.

00:27:55.500 --> 00:27:56.940
Thank you for listening to Python Bytes.

00:27:56.940 --> 00:27:59.460
Follow the show on Twitter via at Python Bytes.

00:27:59.460 --> 00:28:02.340
That's Python Bytes as in B-Y-T-E-S.

00:28:02.340 --> 00:28:05.760
And get the full show notes at pythonbytes.fm.

00:28:05.760 --> 00:28:07.560
If you have a news item you want featured,

00:28:07.560 --> 00:28:10.100
just visit pythonbytes.fm and send it our way.

00:28:10.100 --> 00:28:12.820
We're always on the lookout for sharing something cool.

00:28:12.820 --> 00:28:14.980
On behalf of myself and Brian Okken,

00:28:14.980 --> 00:28:16.200
this is Michael Kennedy.

00:28:16.200 --> 00:28:18.460
Thank you for listening and sharing this podcast

00:28:18.460 --> 00:28:19.740
with your friends and colleagues.

