WEBVTT

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

00:00:05.480 --> 00:00:10.020
This is episode 241, recorded July 7, 2021.

00:00:10.020 --> 00:00:11.620
And I'm Brian Okken.

00:00:11.620 --> 00:00:12.640
Hey, I'm Michael Kennedy.

00:00:12.640 --> 00:00:14.880
And I'm new here. I'm Jay.

00:00:14.880 --> 00:00:17.360
Hi, Jay. Thanks for coming.

00:00:17.360 --> 00:00:20.380
So tell us a little bit about who you are.

00:00:20.380 --> 00:00:22.300
Yeah, so I'm Jay Miller.

00:00:22.300 --> 00:00:28.020
I'm a developer advocate for Elastic, a company that does search using Elasticsearch

00:00:28.020 --> 00:00:30.580
and many other fine tools that we create.

00:00:30.580 --> 00:00:38.220
And I spend a lot of time working on podcasts, shooting video, helping other podcasters,

00:00:38.220 --> 00:00:44.880
which we'll talk about later, and yelling at Michael and Brian as they're podcasting and they can't hear me.

00:00:44.880 --> 00:00:46.760
So, yeah, that's what I do.

00:00:46.760 --> 00:00:49.400
I would totally love to hear one of those.

00:00:49.400 --> 00:00:52.960
Just like record yourself yelling at our podcast at the same time.

00:00:52.960 --> 00:00:53.780
That'd be great.

00:00:53.780 --> 00:00:55.720
So welcome. Thanks.

00:00:56.340 --> 00:00:58.060
You're kicking us off today, Michael.

00:00:58.060 --> 00:00:59.400
So where are we starting?

00:00:59.400 --> 00:01:02.000
Well, we're going to start with some automation here.

00:01:02.000 --> 00:01:07.320
And I previously had covered that if you go over to GitHub, I'm not logged in.

00:01:07.320 --> 00:01:08.220
I guess it's not going to work.

00:01:08.220 --> 00:01:11.340
But if you go to GitHub and you forked a repo.

00:01:11.540 --> 00:01:20.880
So, for example, if you forked CPython, if you forked FastAPI, you know, whatever project it is you forked, all of those things are under pretty active development.

00:01:20.880 --> 00:01:27.800
And very quickly, your fork will get out of sync with what's called the upstream, the thing that it was forked from.

00:01:27.800 --> 00:01:31.900
And GitHub recently added this ability, which we talked about.

00:01:31.900 --> 00:01:36.800
To go to a repo and press a button, it says your fork is behind.

00:01:36.980 --> 00:01:38.340
Would you like to catch it up?

00:01:38.340 --> 00:01:40.680
And you can click a button and boom, it'll catch it up.

00:01:40.680 --> 00:01:42.000
So, well, that's neat.

00:01:42.000 --> 00:01:47.480
But wouldn't it be nicer if you didn't have to do that, if it just did that on its own?

00:01:47.480 --> 00:01:52.020
Like sometimes you fork something and you're actively making a bunch of changes to it.

00:01:52.020 --> 00:01:54.460
And there might be merge conflicts and all sorts of stuff.

00:01:54.460 --> 00:01:58.240
But a lot of times, I would bet the majority of the time, people say, that's neat.

00:01:58.240 --> 00:02:04.860
I want to save that for myself just so I'm sure I've got it and I can do whatever I want no matter what happens to it, right?

00:02:04.860 --> 00:02:06.420
Maybe we depend on Flask.

00:02:06.420 --> 00:02:08.160
And who knows what could happen with Flask?

00:02:08.160 --> 00:02:08.980
Probably nothing.

00:02:08.980 --> 00:02:11.120
But let's just fork it just in case, right?

00:02:11.120 --> 00:02:13.200
And you just want that to stay in sync.

00:02:13.200 --> 00:02:17.600
So here is an article or walkthrough by Yash Walia.

00:02:17.600 --> 00:02:25.960
It says, three easy steps to auto-sync your forked repo with the upstream, the origin thing that it came from.

00:02:25.960 --> 00:02:30.540
Now, of course, you could go to a command line and run a bunch of steps to do this.

00:02:30.540 --> 00:02:32.620
But what this does is it uses GitHub Actions.

00:02:32.960 --> 00:02:35.560
So you come down here and you can go to GitHub Actions.

00:02:35.560 --> 00:02:44.800
And basically, when you're choosing a GitHub Action, there's like this marketplace or this catalog of pre-built actions that you can choose from as templates or whatever.

00:02:44.800 --> 00:02:49.660
And then it opens up a text file that you basically type in the bits that you need changed.

00:02:49.660 --> 00:02:58.660
So you go to the GitHub Actions and there's one called Fork Sync with Upstream Action from the Actions Marketplace.

00:02:59.120 --> 00:03:04.380
And you can see it says on the schedule once every day at 7 a.m.

00:03:04.380 --> 00:03:09.480
What we're going to do is we're going to run on Ubuntu, I'm guessing Docker image.

00:03:09.480 --> 00:03:13.500
It's going to check out your project.

00:03:13.500 --> 00:03:16.720
And then it's going to pull the upstream changes.

00:03:16.720 --> 00:03:18.120
It's going to add the upstream origin.

00:03:18.120 --> 00:03:23.760
It's going to line up the branches, do the checkout, and then just merge that in and push it back.

00:03:23.760 --> 00:03:25.500
So pretty straightforward to do.

00:03:25.500 --> 00:03:34.860
I ran this on some projects and, you know, one of the recent changes at GitHub and Moves is to get away from like master branch terminology.

00:03:34.860 --> 00:03:36.040
And now it's all called main.

00:03:36.040 --> 00:03:41.160
But I had some that when I forked it previously and it was master and it became main.

00:03:41.160 --> 00:03:46.700
I had some challenges trying to like I think I just chose poor examples to try to work from.

00:03:46.700 --> 00:03:48.720
So I didn't quite get this working perfectly.

00:03:49.040 --> 00:03:52.920
But people with more GitHub Action experience than I have, I'm sure they can make it work.

00:03:52.920 --> 00:03:56.020
So this seems like a really cool way to just say, yes, I want to fork something.

00:03:56.020 --> 00:03:58.900
And please just stay up to date.

00:03:58.900 --> 00:04:03.380
This is definitely neat for something where you're actively working on it a lot.

00:04:03.380 --> 00:04:13.380
I think if you're just trying to train something out and forking it for a little like play yard thing, I definitely wouldn't turn this on.

00:04:13.380 --> 00:04:18.820
But like with a team where you're all working on the same code, you definitely want something like this.

00:04:18.820 --> 00:04:21.520
Oh, I hadn't really thought about it from the team perspective.

00:04:21.520 --> 00:04:27.760
Right. Because a lot of the Git flow with teams thing is fork it, make changes and do a PR.

00:04:27.760 --> 00:04:33.120
I mean, also, sometimes people just create feature branches and do a PR within the repo.

00:04:33.120 --> 00:04:38.840
But if your mode is to create your own PR, your own repo and then do the PRs back to the main repo.

00:04:38.840 --> 00:04:39.300
Yeah.

00:04:39.300 --> 00:04:40.800
I can see that this being really helpful.

00:04:40.800 --> 00:04:49.700
Yeah. We use a method in GitLab where it's on the we have to the main repo has to has to know where all the forks are.

00:04:49.700 --> 00:04:53.700
But it does a push every time there's an update to protected branches.

00:04:53.700 --> 00:04:55.580
I see. That's cool.

00:04:55.580 --> 00:05:07.760
I was thinking about using something like this for some of the projects that I do where there are folks that will take data sets and they're just stored as CSV files and they're sitting in repos.

00:05:07.760 --> 00:05:23.700
And I'm like, well, if I have access to this data and I want to do some project with Elon or another tool that I use, then I have to then go and just manually download their CSV file and update it every time I'm about to present on that data set.

00:05:23.700 --> 00:05:36.520
Whereas if I just say, hey, I can fork their code and then build my project off of their repo and then set this up so that anytime they update that one area, it's it's just always up to date for me.

00:05:36.520 --> 00:05:37.580
I don't have to think about it.

00:05:37.580 --> 00:05:39.540
I don't have to go in and go, oh, hey, was there an update?

00:05:39.540 --> 00:05:41.760
It's just like constantly running in the background.

00:05:41.760 --> 00:05:47.120
And I know you mentioned, Mike, at the beginning, like GitHub is working to make a lot of this easier.

00:05:47.120 --> 00:05:58.860
I mean, I feel like kind of their mission now that they control like 90 percent of the Git surface out there on the Internet is to just make lives easier for the people that are using their products.

00:05:58.860 --> 00:06:07.900
So I think that, you know, stuff like this, stuff like having just a simple notification that says, hey, this, you know, your upstream branches, you know, ahead of you.

00:06:07.900 --> 00:06:10.560
Click here and we'll we'll get everything merged in.

00:06:10.560 --> 00:06:17.820
And the less GitHub commands I have to try to put in to remember that I am going to mess up 100 percent of the time, the better.

00:06:17.820 --> 00:06:20.940
Yeah, it's so close to having this built in, right?

00:06:20.940 --> 00:06:23.800
You've got the button that says right now, sync this.

00:06:23.900 --> 00:06:31.500
If it just had a checkbox or something and just keep doing that, if you when you see these changes, you know, like basically install this automatically for me.

00:06:31.500 --> 00:06:32.260
That'd be fantastic.

00:06:32.260 --> 00:06:33.820
Maybe when you fork it, right?

00:06:33.820 --> 00:06:35.880
I want to fork it and I want it to stay up to date.

00:06:35.880 --> 00:06:39.020
I guess probably the hesitation is certain things.

00:06:39.020 --> 00:06:40.780
It requires certain behaviors.

00:06:40.780 --> 00:06:48.100
For example, you shouldn't be making direct changes to the branch that you're syncing with because you might end up with merge conflicts.

00:06:48.100 --> 00:06:49.700
You have to work on a separate branch.

00:06:49.700 --> 00:06:52.700
And I don't know, it probably gets complicated, but I would love to see this more automatic.

00:06:52.700 --> 00:06:53.720
Yeah, it's cool.

00:06:53.800 --> 00:06:56.220
I'm trying to remember what the next topic was.

00:06:56.220 --> 00:06:57.460
My memory is not that good.

00:06:57.460 --> 00:06:59.200
What do you you know, don't you?

00:06:59.200 --> 00:07:00.200
Yeah.

00:07:00.200 --> 00:07:01.360
Memory usage.

00:07:01.360 --> 00:07:04.520
So you actually have a talk about this, don't you, about memory?

00:07:04.520 --> 00:07:05.480
I do.

00:07:05.480 --> 00:07:07.100
I've spoken about it before, for sure.

00:07:07.100 --> 00:07:07.720
Yeah.

00:07:07.720 --> 00:07:11.160
But so this is a cool article by Itamar.

00:07:11.160 --> 00:07:12.460
I think his name is Itamar.

00:07:12.460 --> 00:07:12.920
Is that right?

00:07:12.920 --> 00:07:13.380
Yeah.

00:07:13.380 --> 00:07:16.760
Anyway, it's a nice, easy to follow discussion.

00:07:16.760 --> 00:07:28.120
But there's a cool example he goes through where it's just, it's kind of a neat one liner to allocate three gigs of memory.

00:07:28.120 --> 00:07:30.760
I didn't, you know, it's kind of a neat thing with NumPy.

00:07:31.100 --> 00:07:41.640
I'm just allocating a byte array or three, like a 1024 by 1024 by 1024 by three matrix.

00:07:41.640 --> 00:07:44.100
So some clever math there.

00:07:44.100 --> 00:07:45.180
You get three gigs.

00:07:45.660 --> 00:07:47.080
But it actually works.

00:07:47.080 --> 00:07:55.380
And then he goes through and uses psutil to read the memory and figure out how much is there.

00:07:55.380 --> 00:08:01.420
So I had to, I actually, I paused at this point when I was reading the article to go and find out what all this stuff does.

00:08:01.420 --> 00:08:10.240
So it's the, when allocating the, like a ones array, you can, NumPy has a way to just pre-allocate a bunch of ones, which is neat.

00:08:10.960 --> 00:08:15.020
And you give it a shape of what, what the vector shape is that you, you want it in.

00:08:15.020 --> 00:08:21.440
But then also this process stuff, I, it said RSS and I'm used to RSS being really simple syndication.

00:08:21.440 --> 00:08:25.360
So no, RSS is, what is it?

00:08:25.360 --> 00:08:32.960
Resident set size, which is essentially translates to the, to the resident memory, which is essentially how much RAM you're using.

00:08:32.960 --> 00:08:34.980
So anyway, how much RAM are you using?

00:08:34.980 --> 00:08:37.320
And, and we're using three gigs, a little bit more.

00:08:37.880 --> 00:08:45.620
And then, and then he does something that I was like surprised by, goes out and just opens a couple of browsers and windows.

00:08:45.620 --> 00:08:47.340
And then it goes back and checks again.

00:08:47.340 --> 00:08:48.960
And suddenly it's down.

00:08:48.960 --> 00:08:50.040
It's like way down.

00:08:50.040 --> 00:08:53.120
And I tried this and I can get it to go really far down.

00:08:53.120 --> 00:09:02.260
And that's because your computer is, is managing memory and taking some stuff out of RAM and putting it on disk and saving it till later.

00:09:02.260 --> 00:09:09.000
So there's, this is kind of a, it's using the memory, but it's not currently actively loaded as, as RAM.

00:09:09.000 --> 00:09:09.520
Yeah.

00:09:09.520 --> 00:09:09.860
Gotcha.

00:09:09.860 --> 00:09:10.360
Uh-huh.

00:09:10.360 --> 00:09:10.700
Okay.

00:09:10.700 --> 00:09:21.800
So, goes through, he, basically, this is a little bit of a tutorial on how memory works with your computer and what the difference between allocated memory is and peak allocated memory and resident memory.

00:09:21.900 --> 00:09:26.460
And the allocated and peak allocated is like the max that's allocated at the time.

00:09:26.460 --> 00:09:33.000
And, it's kind of too much to go into in this conversation, but, it's a really interesting discussion.

00:09:33.000 --> 00:09:37.120
And he also talks about how to measure these using what the PSU till for one.

00:09:37.120 --> 00:09:42.340
And then also, for the peak allocated memory, he used a profiler called fill.

00:09:42.740 --> 00:09:47.380
so it was, I thought I learned a lot in just a few minutes reading this.

00:09:47.380 --> 00:09:47.660
So.

00:09:47.660 --> 00:09:48.080
Yeah.

00:09:48.080 --> 00:09:48.560
Very nice.

00:09:48.560 --> 00:09:49.120
Yeah.

00:09:49.120 --> 00:09:54.720
NMR is doing all sorts of cool stuff, stuff with, memory analysis and profilers and whatnot.

00:09:54.720 --> 00:10:00.980
there's a surprise in here of if, if you fill it with ones, you actually get three gigs.

00:10:00.980 --> 00:10:04.400
But if you do the same thing with zeros, you get like nothing.

00:10:04.820 --> 00:10:08.600
So, Python and NumPy figure, it's just zeros.

00:10:08.600 --> 00:10:14.320
We'll just, we'll just remember that there are zeros and until you actually do something with it, we won't allocate it.

00:10:14.320 --> 00:10:16.420
Oh, it's like a lazy allocation or something.

00:10:16.420 --> 00:10:17.060
Yeah.

00:10:17.060 --> 00:10:17.380
Yeah.

00:10:17.380 --> 00:10:18.040
Yeah.

00:10:18.040 --> 00:10:18.520
Interesting.

00:10:18.520 --> 00:10:19.040
Yeah.

00:10:19.040 --> 00:10:26.000
So what I was going to say is another thing that's tricky is like, this is using psutil.process.memory to analyze it.

00:10:26.000 --> 00:10:33.960
It's just what, how much memory is the process using, which is not always the right way to think about how much memory you're sort of demanding.

00:10:34.440 --> 00:10:42.540
Because the allocation in Python, you know, you allocate in blocks, big blocks of memory, and then the blocks are managed in pools.

00:10:42.540 --> 00:10:44.200
And then the pools are managed in arenas.

00:10:44.200 --> 00:10:51.660
And there's a lot of pre-allocation and then reuse, but you end up with like over-allocation and then eventually filling those up with things.

00:10:51.660 --> 00:10:58.540
And so it gets pretty interesting about actually understanding precisely how much memory and what's using it.

00:10:58.540 --> 00:11:02.900
It's not quite as straightforward as just how much process memory is being used.

00:11:03.240 --> 00:11:05.200
But that's still a decent proxy, right?

00:11:05.200 --> 00:11:08.620
I just want to know how I can subscribe to that RSS feed.

00:11:08.620 --> 00:11:11.000
I know.

00:11:11.000 --> 00:11:13.040
I had the same thought when I saw it.

00:11:13.040 --> 00:11:13.440
Well.

00:11:13.440 --> 00:11:14.140
All right.

00:11:14.140 --> 00:11:15.360
Jay, you got the next one.

00:11:15.360 --> 00:11:15.980
What do we got here?

00:11:15.980 --> 00:11:17.280
All right.

00:11:17.340 --> 00:11:22.720
So this originally came from a video that I saw trying to solve a problem that I had.

00:11:22.720 --> 00:11:28.560
And I had to do some deep searching to figure out whether or not we talked about it before, if y'all talked about it before.

00:11:28.560 --> 00:11:31.160
But we all know f-strings now.

00:11:31.160 --> 00:11:32.360
We love f-strings.

00:11:32.360 --> 00:11:33.520
f-strings are awesome.

00:11:33.520 --> 00:11:35.780
f-strings can do a lot.

00:11:36.780 --> 00:11:41.100
Sometimes folks don't realize how much f-strings can do.

00:11:41.100 --> 00:11:54.460
Like, for instance, did you know if you put an equal sign after a value, it will actually give you the variable that you've provided, equals, and then whatever the value is, which I think is awesome when it comes to logging and figuring out other information.

00:11:54.460 --> 00:12:04.040
But one thing I did not know is that you could use f-strings to format date time objects just right in the F string.

00:12:04.040 --> 00:12:11.340
So you don't have to do, you know, like, date time dot string F time or, you know, string F format or all that stuff.

00:12:11.340 --> 00:12:20.960
You can just do F string, the date time variable, and then the F string format code that you would use to format it normally.

00:12:20.960 --> 00:12:32.240
And that's over here in this, you know, if I just scroll down, you can see here where, in this example, they use just date time, date time now, and then now colon the format.

00:12:32.240 --> 00:12:45.720
And I saw that and my mind was blown because that means I now have to go back through a bunch of code and remove all of the string format, like parsing and just throw it directly into the date time field.

00:12:45.720 --> 00:12:47.080
I'm kidding.

00:12:47.420 --> 00:12:55.740
I'll also just throw out there sometimes you want to have that stuff separated so that it can be used elsewhere and you don't have to constantly rewrite it.

00:12:55.740 --> 00:13:00.020
But we now have another way to format our date times.

00:13:00.020 --> 00:13:07.440
But sadly, it still probably sucks with dealing with time zones because date times are hard.

00:13:07.440 --> 00:13:08.640
They are hard.

00:13:08.640 --> 00:13:15.120
I think it's totally non-obvious that you can have variable colon some format string and an F string.

00:13:15.240 --> 00:13:15.940
But it's really nice.

00:13:15.940 --> 00:13:19.600
The one that I use the most is colon comma for digit grouping.

00:13:19.600 --> 00:13:22.640
I'm like, here's, you know, two million such and such.

00:13:22.640 --> 00:13:26.580
And I wanted to do two comma, you know, three digits, comma, three digits.

00:13:26.580 --> 00:13:28.680
I knew that you could do something like that.

00:13:28.680 --> 00:13:30.560
I didn't know that that was how you did it.

00:13:30.560 --> 00:13:34.740
So thank you for adding that to my list of things you can do with f-strings.

00:13:35.420 --> 00:13:35.860
Yeah.

00:13:35.860 --> 00:13:47.160
And I know one that you've spoken about, Brian, is to do like the variable equals, which Jay alluded to, where it prints out the name of the variable equals the value of the variable.

00:13:47.160 --> 00:13:48.120
Do you use that often?

00:13:48.120 --> 00:13:53.320
I use it all the time because I'm a kind of a printf debugger kind of person.

00:13:53.320 --> 00:13:54.120
Yeah.

00:13:54.120 --> 00:13:54.560
Yeah.

00:13:54.560 --> 00:13:56.440
Let's see some comments from the live stream.

00:13:56.440 --> 00:13:56.940
Magnus.

00:13:56.940 --> 00:13:57.860
Hey, Magnus.

00:13:58.180 --> 00:13:59.060
F string is cool.

00:13:59.060 --> 00:14:04.200
I find selecting between repr and string and F string is really useful.

00:14:04.200 --> 00:14:04.960
It's very neat.

00:14:04.960 --> 00:14:06.000
Dean.

00:14:06.000 --> 00:14:06.400
Hey, Dean.

00:14:06.400 --> 00:14:09.800
How can I keep from, keep the formatting as a variable?

00:14:09.800 --> 00:14:10.920
That's a good question.

00:14:10.920 --> 00:14:12.280
Why don't you just assign it as a variable?

00:14:12.280 --> 00:14:15.500
Can you use it in the F string?

00:14:15.500 --> 00:14:17.220
Probably.

00:14:17.220 --> 00:14:19.300
Maybe you've got to call stir of the variable.

00:14:19.300 --> 00:14:20.120
I don't know.

00:14:20.520 --> 00:14:20.960
Oh, man.

00:14:20.960 --> 00:14:30.820
Well, that's where you start getting the bang art, like the exclamation point R to like just force it to do a repr on whatever you provided.

00:14:30.820 --> 00:14:36.040
Again, not saying that you should do it that way, but I mean, probably could.

00:14:36.040 --> 00:14:36.960
Yeah.

00:14:36.960 --> 00:14:37.480
Yeah.

00:14:37.480 --> 00:14:38.500
Definitely.

00:14:38.500 --> 00:14:41.460
And Sam out there in live streams says, how have I never heard of these?

00:14:41.460 --> 00:14:42.320
Yes, I know.

00:14:42.320 --> 00:14:43.220
It's amazing.

00:14:43.220 --> 00:14:43.780
Amazing.

00:14:43.780 --> 00:14:44.080
Amazing.

00:14:44.080 --> 00:14:44.480
All right.

00:14:44.480 --> 00:14:48.220
I want to throw in a quick thing I want to add to that really quick.

00:14:48.340 --> 00:14:49.060
f-strings.

00:14:49.060 --> 00:15:00.100
If you find yourself with a bunch of code that has been around for years, pre three, six, and you're like, ah, it's got who knows how many variations of formatting strings in it.

00:15:00.100 --> 00:15:02.060
And you just want them all to be f-strings.

00:15:02.060 --> 00:15:05.100
You can use Flint, F L Y N T.

00:15:05.100 --> 00:15:07.380
Run that against the top level of your directory.

00:15:07.380 --> 00:15:08.020
Boom.

00:15:08.020 --> 00:15:09.260
Everything's f-strings.

00:15:09.260 --> 00:15:10.240
It looks great.

00:15:10.240 --> 00:15:13.920
I did this on like a 20,000 lines of Python code project.

00:15:13.920 --> 00:15:14.860
It had one error.

00:15:14.860 --> 00:15:15.860
I submitted it to them.

00:15:15.860 --> 00:15:16.480
They fixed it.

00:15:16.480 --> 00:15:18.320
And yeah, it was really neat.

00:15:18.560 --> 00:15:19.240
That's cool.

00:15:19.240 --> 00:15:19.980
Cool.

00:15:19.980 --> 00:15:20.220
Cool.

00:15:20.220 --> 00:15:20.660
Indeed.

00:15:20.660 --> 00:15:21.460
All right.

00:15:21.460 --> 00:15:23.140
What's the next one here?

00:15:23.140 --> 00:15:24.540
I guess I got the next one.

00:15:24.540 --> 00:15:24.960
Don't I, Brian?

00:15:24.960 --> 00:15:25.500
Yeah.

00:15:25.500 --> 00:15:25.960
Cool.

00:15:25.960 --> 00:15:33.720
Well, this one, I went back a little bit back and forth on whether or not I actually wanted to feature this because it's a little bit recursive, I guess.

00:15:33.720 --> 00:15:35.800
So I did a talk for Manning.

00:15:35.800 --> 00:15:40.280
They had a developer productivity conference talk or a conference.

00:15:40.280 --> 00:15:41.240
Jay, were you part of that?

00:15:41.240 --> 00:15:42.660
I was not part.

00:15:42.660 --> 00:15:44.840
I am hearing about this for the first time.

00:15:44.840 --> 00:15:46.180
I feel like you should have been part of this.

00:15:46.360 --> 00:15:46.700
I know.

00:15:46.700 --> 00:15:48.800
How did you not get in here with your podcast and all?

00:15:48.800 --> 00:15:52.500
So the conference was interesting.

00:15:52.500 --> 00:15:54.100
There were some really neat talks.

00:15:54.100 --> 00:15:58.840
There were some other talks that I'm not really sure abided by the theme of the conference.

00:15:58.840 --> 00:16:00.300
They were just like, well, here's a random tech talk.

00:16:00.300 --> 00:16:00.860
I was like, oh, okay.

00:16:00.860 --> 00:16:02.100
Well, but that's not productivity.

00:16:02.260 --> 00:16:04.320
Anyway, I tried to abide by the theme.

00:16:04.320 --> 00:16:12.080
So I came up with a talk called 10 tips and tools you can adopt in 15 minutes or less to level up your developer productivity.

00:16:12.080 --> 00:16:17.900
So really what I want to do is just give a quick shout out to like the 10 tips and people can go if they're really interested.

00:16:17.900 --> 00:16:22.080
So they can seek around the video and go find that or email me and I'll send you the slides.

00:16:22.080 --> 00:16:24.940
So one of them is to use a proper shell.

00:16:24.940 --> 00:16:34.740
Like I find every now and then I run into people and they're just running, you know, the whatever comes out of terminal in macOS or they're just using cmd.exe on Windows.

00:16:34.840 --> 00:16:36.860
And it's like, how can you go day to day?

00:16:36.860 --> 00:16:39.660
Like there's so much possibility there, right?

00:16:39.660 --> 00:16:43.140
So, you know, consider things like OhMyZShell or OhMyPosh.

00:16:43.140 --> 00:16:48.880
I just installed OhMyPosh on the Windows terminal with the new PowerShell on Windows.

00:16:48.880 --> 00:16:51.500
And that thing is so much nicer than what you had before.

00:16:51.500 --> 00:16:52.360
That's cool.

00:16:52.360 --> 00:16:55.620
So get a proper terminal with some of those options.

00:16:55.620 --> 00:17:04.500
Use, if you're doing anything on the web, use secure.py, which just adds all the OWASP secure headers that you're supposed to do.

00:17:04.640 --> 00:17:08.360
Like don't allow your site to be embedded in an iframe and cross-site scripting and stuff.

00:17:08.360 --> 00:17:11.500
Automatically it supports like 10 different Python web frameworks.

00:17:11.500 --> 00:17:18.420
And if you're on some other technology, there's things like inWebSec, which does the same thing for ASP.NET, or I'm sure you can Google another one.

00:17:18.420 --> 00:17:24.560
Tip number three, pick a nice GUI for your Git work.

00:17:24.560 --> 00:17:33.340
Sometimes it's fine to do stuff on the command shell or on the CLI, but it's really nice to have visual views of like branching and whatnot.

00:17:33.500 --> 00:17:36.400
So think of like source tree or even PyCharm and VS Code.

00:17:36.400 --> 00:17:37.600
Sync your GitHub forks.

00:17:37.600 --> 00:17:38.540
Just talking about that.

00:17:38.540 --> 00:17:39.600
So keeping that going.

00:17:39.600 --> 00:17:43.260
Use a proper log framework like Loguru or even Sentry.

00:17:43.260 --> 00:17:44.660
Use Let's Encrypt.

00:17:44.660 --> 00:17:51.580
Number seven, you can go and just get your site map and request every URL at that destination.

00:17:52.100 --> 00:17:53.140
And your site map.

00:17:53.140 --> 00:17:56.480
And that's a way to just like make sure your site's not going to die.

00:17:56.480 --> 00:17:58.060
So you could put that as an integration test.

00:17:58.060 --> 00:18:03.220
Use PageSpeed Insights to make sure your SEO is good and your site's responding well.

00:18:03.220 --> 00:18:05.320
Use Homebrew or Chocolaty on Windows.

00:18:05.480 --> 00:18:09.880
And then the very last one is set up Dependabot or even some of the stuff that we talked about, Brian.

00:18:09.880 --> 00:18:14.180
Start using pip compile with a .in file.

00:18:14.180 --> 00:18:19.000
And you can tell it to upgrade the requirements whenever you run some CLI command.

00:18:19.000 --> 00:18:24.780
And it'll regenerate your requirements.txt based on all the dependencies.

00:18:24.780 --> 00:18:34.080
And it gives you a really nice organization like this subdependency is here because of these three things you've installed in your main requirements.in and so on.

00:18:34.080 --> 00:18:34.480
Yeah.

00:18:34.480 --> 00:18:39.700
There's 10 quick tips that people can go play with and they can check out that short video if they're interested.

00:18:39.700 --> 00:18:45.340
I mean, I know 11 quick tips wouldn't have been, you know, an amazing brand.

00:18:45.340 --> 00:18:49.740
But I feel like virtual environments, like not brought up at all.

00:18:49.740 --> 00:18:50.320
That was.

00:18:50.320 --> 00:18:51.740
Yeah, that's true.

00:18:51.740 --> 00:18:52.400
That's a good point.

00:18:52.400 --> 00:18:54.980
Yeah, I mean, you should have been in the conference, I'm pretty sure.

00:18:54.980 --> 00:18:56.040
Oh, man.

00:18:56.040 --> 00:18:56.360
Yeah.

00:18:56.360 --> 00:18:57.540
Only had I known about it.

00:18:57.540 --> 00:19:00.880
Do some people not use virtual environments?

00:19:00.880 --> 00:19:03.880
Dean also has an 11.

00:19:03.880 --> 00:19:04.700
They're maybe 12 now.

00:19:04.700 --> 00:19:05.920
Close that Facebook tab.

00:19:05.920 --> 00:19:06.840
Yeah.

00:19:06.840 --> 00:19:09.740
I'm surprised at how many people don't use virtual environments still.

00:19:09.740 --> 00:19:15.820
Or even I don't want to say something like using like Pipim or Poetry or anything like that.

00:19:15.820 --> 00:19:18.780
Mostly just because I don't have a lot of experience with them.

00:19:18.780 --> 00:19:20.280
But what is it?

00:19:20.280 --> 00:19:24.740
Virtual environment wrapper or even Pyenv.

00:19:24.740 --> 00:19:25.480
Yeah.

00:19:25.480 --> 00:19:30.060
Just really great tools to make sure that everyone's operating on the same Python version.

00:19:30.060 --> 00:19:38.020
And that, you know, if you need to run Python 3.5 on one thing because, you know, your code isn't set up for it yet.

00:19:38.100 --> 00:19:40.060
And then you want to run 3.9 on something else.

00:19:40.060 --> 00:19:47.320
Having tools like that, that once you learn them, they're so phenomenal and just so easy to use.

00:19:47.320 --> 00:19:47.760
Yeah.

00:19:47.760 --> 00:19:53.520
I wonder if the overlap of the people that have a Facebook tab up are the same people that don't use virtual environments.

00:19:53.520 --> 00:19:55.080
Probably.

00:19:55.080 --> 00:19:56.480
Probably.

00:19:57.600 --> 00:19:58.380
Notifications as well.

00:19:58.380 --> 00:19:59.280
Turn off notifications.

00:19:59.280 --> 00:20:04.440
Like, don't let Outlook or other things like that, like send you, like, don't let your email send you messages.

00:20:04.440 --> 00:20:05.700
They're like pot toast, right?

00:20:05.700 --> 00:20:07.200
Turn on do not disturb.

00:20:07.200 --> 00:20:07.780
Yeah.

00:20:07.780 --> 00:20:18.740
Oh, before we move on, Dean mentions in the chat for the F-string thing, you can put, you can put layers of curly braces in there.

00:20:18.740 --> 00:20:20.360
What? Like F-string within F-string?

00:20:20.360 --> 00:20:21.000
No way.

00:20:21.000 --> 00:20:21.460
Yeah.

00:20:22.540 --> 00:20:24.620
I feel like we're reaching a dangerous point.

00:20:24.620 --> 00:20:25.880
No, that's awesome.

00:20:25.880 --> 00:20:26.900
That's so cool.

00:20:26.900 --> 00:20:27.820
Love it.

00:20:27.820 --> 00:20:30.800
So for people who are listening, I'm not seeing this.

00:20:30.800 --> 00:20:31.340
Yeah, yeah.

00:20:31.340 --> 00:20:36.960
So for people listening, you would normally have an F-string, you say F, quote, you know, curly bracket variable, close curly.

00:20:36.960 --> 00:20:44.720
And with the format as a colon, so Dean is saying that if you put as the format string curly variable that contains the format curly,

00:20:44.720 --> 00:20:47.040
so like curlies within curlies, that'll do it.

00:20:47.040 --> 00:20:47.520
That's awesome.

00:20:47.520 --> 00:20:47.820
Thanks.

00:20:47.820 --> 00:20:51.340
I had no idea and I have no idea how you found that out, but that's good.

00:20:51.640 --> 00:20:53.140
Yo, dog, I heard you like curly braces.

00:20:53.140 --> 00:20:55.080
I love them.

00:20:55.080 --> 00:20:56.260
Very cool.

00:20:56.260 --> 00:20:56.760
Very cool.

00:20:56.760 --> 00:20:57.540
All right.

00:20:57.540 --> 00:20:58.380
Let's see.

00:20:58.380 --> 00:20:59.480
Oh, I'm next.

00:20:59.480 --> 00:21:00.000
Cool.

00:21:00.000 --> 00:21:08.560
I want to cover a cool article from Vitor called How to Start a Production Ready Django Project.

00:21:09.120 --> 00:21:15.560
And this is sort of just a fun project article because it's focused on Django, definitely.

00:21:15.560 --> 00:21:23.340
But I think this is a lot of this advice is just a good idea for any web app or I guess it's mostly web app stuff.

00:21:23.340 --> 00:21:28.780
But anyway, it's worth a look even if you're using some other framework.

00:21:28.780 --> 00:21:34.640
He starts out just said at the beginning when you get started project, just start it out right.

00:21:34.640 --> 00:21:43.720
So one of the things that I thought was neat was making sure that you set up a local environment, a test environment, and a production environment.

00:21:44.520 --> 00:21:54.020
And the easiest and most important is the local environment so that new developers can get up really quickly and just start, clone, and go.

00:21:54.380 --> 00:21:58.520
And I think that's really important to make sure that that's working well and easy.

00:21:58.520 --> 00:22:04.340
And then almost as important, and I would say maybe more important, but is a test environment.

00:22:04.340 --> 00:22:18.780
So if you're swapping out like a different database or something for your test, making sure that that's configured and set up so that the developers, when they're contributing, can easily run the tests before they submit code to you.

00:22:18.780 --> 00:22:20.720
So that's really important.

00:22:20.720 --> 00:22:28.920
And then the production environment and the setup for that, that is an interesting argument that that can be more complicated.

00:22:28.920 --> 00:22:33.640
That can be a different thing because most of the people involved in the project aren't really going to run that.

00:22:33.640 --> 00:22:35.660
It's just a handful of experienced developers.

00:22:35.660 --> 00:22:36.560
I think that's cool.

00:22:36.560 --> 00:22:45.600
So after setting up the environment sort of stuff, it covers making sure that you have Git or some other version control set up and use virtual environments.

00:22:45.600 --> 00:22:46.360
There you go, Jay.

00:22:46.360 --> 00:22:49.640
Make sure that you're doing virtual environments.

00:22:50.160 --> 00:22:55.560
But then there's a section on requirements.txt files that I think is amazing.

00:22:55.560 --> 00:23:04.840
Maybe everybody knew this already, but it hadn't occurred to me, is to have a directory instead of just a file and have several of them.

00:23:04.840 --> 00:23:11.320
And the example has a base one, a test one, a local one, and a production one, and they can include each other.

00:23:11.320 --> 00:23:12.940
So all of them include the base.

00:23:13.460 --> 00:23:15.660
And local also includes text.

00:23:15.660 --> 00:23:20.180
So whatever environment is, you can just install one of these, and it's the right one.

00:23:20.180 --> 00:23:24.020
And all the project stuff is all in the base.

00:23:24.020 --> 00:23:25.480
So everybody uses that.

00:23:25.480 --> 00:23:27.580
It's a pretty cool idea.

00:23:27.580 --> 00:23:28.380
I've never done that.

00:23:28.380 --> 00:23:29.420
Have you done that?

00:23:29.420 --> 00:23:31.860
Either of you used that sort of a model before?

00:23:31.860 --> 00:23:32.500
Yeah.

00:23:32.500 --> 00:23:33.040
No.

00:23:33.040 --> 00:23:34.340
I'm terrible.

00:23:34.520 --> 00:23:38.820
I just put everything in environment variables, and then I never have to change my code.

00:23:38.820 --> 00:23:42.860
I just have to change my environment variables depending on what area of system I'm in.

00:23:43.380 --> 00:23:43.500
Yeah.

00:23:43.500 --> 00:23:50.700
So that discussion was around the requirements, but there's also a similar discussion around the settings.

00:23:50.700 --> 00:24:01.880
So the settings set up to make sure that you've got where the database is, where your server is, and all that stuff, and have those set up for and switched for local test and production.

00:24:01.880 --> 00:24:07.920
And just getting all of that stuff set up ahead of time right at the beginning of the project.

00:24:07.920 --> 00:24:18.520
And included a couple of things I was surprised to see was making sure that you've got a consistent set of linting and styling tools like Black or Flake 8 or iSort.

00:24:18.520 --> 00:24:21.460
And then also editor configurations.

00:24:21.460 --> 00:24:28.740
It might make the whole team more productive if you just go ahead and store your editor configurations in the project.

00:24:28.740 --> 00:24:30.740
I never considered doing that.

00:24:30.740 --> 00:24:34.120
Yeah, one thing that's really cool is for PyCharm.

00:24:34.120 --> 00:24:35.580
I don't know how VS Code works.

00:24:35.580 --> 00:24:37.180
There's maybe something for it as well.

00:24:37.180 --> 00:24:44.160
But in PyCharm, you can go and customize the code cleanup and formatting and rules of what it inspects and how it'll fix them.

00:24:44.160 --> 00:24:50.920
And then instead of saying, save that in my user profile, you can say, save this in the PyCharm project.

00:24:50.920 --> 00:24:59.740
So if other people on the team open it up, it won't show squigglies if your convention is different than Pep 8 or if you format it, it won't jump around and stuff.

00:24:59.740 --> 00:25:00.360
That's cool.

00:25:00.360 --> 00:25:05.040
And then, of course, there's some Django-specific stuff like application structure and stuff.

00:25:05.040 --> 00:25:09.280
But I think, like I said, even if you're not using Django, this is a good set of things to look through.

00:25:09.280 --> 00:25:09.760
Yeah.

00:25:09.760 --> 00:25:10.340
Yeah, cool.

00:25:10.340 --> 00:25:15.560
I guess I do the thing with the requirements, have like a dev version that's based on the production version and whatnot.

00:25:15.560 --> 00:25:18.120
But with settings, I hadn't really thought about that.

00:25:18.120 --> 00:25:18.520
That's cool.

00:25:19.200 --> 00:25:19.440
Indeed.

00:25:19.440 --> 00:25:20.560
Indeed, indeed.

00:25:20.560 --> 00:25:21.660
Let's see.

00:25:21.660 --> 00:25:22.540
Jay, you got the next one?

00:25:22.540 --> 00:25:23.340
I do.

00:25:23.740 --> 00:25:31.780
And just as I always try to bring some type of productivity app, tip or trick, this time it's a Mac app.

00:25:31.780 --> 00:25:34.320
Sorry, folks in Windows land.

00:25:34.320 --> 00:25:35.800
It's Mac only.

00:25:36.120 --> 00:25:41.620
But I'm sure you could do something similar with like AutoHotKey or one of the similar tools.

00:25:41.800 --> 00:25:46.260
But I'm talking about a program that a friend of mine, Brett Turfstrom, made called Bunch.

00:25:46.260 --> 00:25:51.500
It is interesting in how simple yet complex it can get.

00:25:51.900 --> 00:26:01.340
So those that don't know, I work on, I help Mike out from time to time, more specifically with the Talk Python newsletter.

00:26:01.340 --> 00:26:08.600
And this is literally the Bunch that I run every time I start working on the newsletter.

00:26:08.600 --> 00:26:16.960
So the thing about Bunch that's really cool is one, it uses FrontMatter to set up a bunch of different settings within the program.

00:26:16.960 --> 00:26:18.060
So that's what you see at the top.

00:26:18.060 --> 00:26:19.340
But now here's the title of the thing.

00:26:19.340 --> 00:26:21.600
I want it to run sequentially, not parallel.

00:26:21.600 --> 00:26:26.360
Well, and then if I want to open an app, I just type the name of the app.

00:26:26.360 --> 00:26:34.960
If I want to open Windows within that app, I just add a dash and provide the URLs or the file names for those files.

00:26:34.960 --> 00:26:36.020
If I want to run.

00:26:36.020 --> 00:26:40.300
So you've got like Safari and then it has three nested things that are URLs.

00:26:40.300 --> 00:26:43.860
So what it does is it opens Safari and then launches those three tabs.

00:26:43.860 --> 00:26:44.420
Yep.

00:26:44.420 --> 00:26:44.980
Perfect.

00:26:44.980 --> 00:26:48.600
And I actually don't even have to tell it to run Safari.

00:26:48.800 --> 00:26:52.560
I just kind of do here so people reading it can make sense of it.

00:26:52.560 --> 00:26:58.060
If I just put three URLs on there, it would just open up whatever the default browser is and then open those files.

00:26:58.060 --> 00:27:01.940
But by putting Safari in front, I tell it specifically open these in Safari.

00:27:02.160 --> 00:27:12.800
So if you work with Chrome or if you want to do something like testing on multiple browsers, you could put, you know, each browser and then dash whatever the URL is for that.

00:27:12.800 --> 00:27:24.480
But the thing I like about this is it also supports things like X callback URLs, which are kind of a URL structure for running commands in applications that support it.

00:27:24.800 --> 00:27:29.280
You can add system commands and commands to bunch itself like throwing a pause in.

00:27:29.280 --> 00:27:36.680
If I wanted to actually go in and type like at the end, whenever I finish the newsletter, I open up messages.

00:27:36.680 --> 00:27:43.400
I hit command F, which is that at sign and F pause for a second because sometimes my Mac is slow.

00:27:43.480 --> 00:27:46.400
And then I type in Michael Kennedy and hit enter.

00:27:46.400 --> 00:27:49.580
And you can even do some conditional stuff.

00:27:49.580 --> 00:27:52.380
Like I have an Apple script that just checks the date.

00:27:52.380 --> 00:28:02.140
If it's in the date range that I need to to make sure that I send bills off properly, then it also will open up, you know, Stripe and let me do my processing thing.

00:28:02.300 --> 00:28:05.600
But it supports shell scripts, which means it supports Python.

00:28:05.600 --> 00:28:09.640
I actually do have a couple that I'm running.

00:28:09.640 --> 00:28:22.940
Well, I haven't ran in a while, but it just opens up and it kind of does similar to what we were talking about in the first topic of like just going in and making sure that projects are up to date because I will forget the commands or I will mess them up.

00:28:22.940 --> 00:28:25.480
And it's easier if I can just follow along with what it's doing.

00:28:25.480 --> 00:28:27.540
And there's a lot of different tools here.

00:28:27.540 --> 00:28:30.240
I don't have enough time to talk about all the things it can do.

00:28:30.860 --> 00:28:33.940
One of Michael's tips that he left off setting do not disturb.

00:28:33.940 --> 00:28:38.540
I could do that by just typing in parentheses D&D like that.

00:28:38.540 --> 00:28:42.080
And it'll set do not disturb whenever this runs.

00:28:42.080 --> 00:28:49.420
And you said something like this as a part of your Z, your profile shell setup.

00:28:49.420 --> 00:28:54.660
So when you log in, it like kicks off one of these to sort of configure your environment the way you like it.

00:28:54.660 --> 00:28:59.780
So that's for example, I like want to log in and I want the first hour to have no notification.

00:28:59.780 --> 00:29:04.600
So I can just focus when I got energy in the morning and then like turn off D&D later or something like that.

00:29:04.600 --> 00:29:08.840
So that's the cool thing with front matter is like you could just say start on.

00:29:08.840 --> 00:29:13.220
And if, you know, if I start my day at 7 a.m., I just put start on 7 a.m.

00:29:13.220 --> 00:29:20.280
And, you know, I would just create a second bunch that says, you know, start on whatever I wanted to end.

00:29:20.280 --> 00:29:22.400
And then it would turn it off like D&D off.

00:29:22.620 --> 00:29:24.920
I think you can actually even do like a close on.

00:29:24.920 --> 00:29:28.020
So I could even say like close on like 8 a.m.

00:29:28.020 --> 00:29:28.860
Like that.

00:29:28.860 --> 00:29:31.200
And I don't know about that last one.

00:29:31.200 --> 00:29:32.080
I have to test that.

00:29:32.080 --> 00:29:34.180
But there's start at.

00:29:34.180 --> 00:29:36.120
So you can have it run on certain days of the week.

00:29:36.280 --> 00:29:40.560
There is not a way natively to have it run on a certain day of the month.

00:29:40.560 --> 00:29:41.660
It doesn't have cron support.

00:29:41.660 --> 00:29:51.900
But there is a workaround that I've highlighted in another video, which speaking of, I talk about this on my YouTube channel, which is YouTube.com slash KJ Miller.

00:29:51.900 --> 00:29:53.920
My handle on everything that I do.

00:29:53.920 --> 00:29:54.600
That's cool.

00:29:54.600 --> 00:29:56.580
You got a nice YouTube video that walks through this, right?

00:29:56.580 --> 00:29:57.500
People can check that out.

00:29:57.500 --> 00:29:58.060
Yeah.

00:29:58.060 --> 00:30:01.720
And I break down everything that's happening in this particular bunch.

00:30:01.800 --> 00:30:06.760
Like even the Apple script, which is actually JavaScript, but it's fine.

00:30:06.760 --> 00:30:12.480
I would have expected D&D to like send out Dungeons and Dragons invites to random people.

00:30:12.480 --> 00:30:19.660
Well, funny enough, if you had a bunch called D&D, you could just do D&D.bunch like that and it would just run it.

00:30:19.660 --> 00:30:21.820
So that is doable.

00:30:21.820 --> 00:30:23.580
We can make that happen.

00:30:23.580 --> 00:30:24.060
Yeah.

00:30:24.060 --> 00:30:24.500
All right.

00:30:24.500 --> 00:30:27.400
Everybody gets a Mountain Dew, order a pizza, show up.

00:30:27.400 --> 00:30:28.680
How's this going to go?

00:30:28.680 --> 00:30:29.000
Exactly.

00:30:29.000 --> 00:30:31.260
By the way, Bunch is free.

00:30:31.260 --> 00:30:35.700
If you go to bunchapp.co, you can just install it and run it for free.

00:30:35.700 --> 00:30:38.800
Again, the developer, it's a solo developer, Brett Terpstra.

00:30:38.800 --> 00:30:41.620
He makes other mad science on the internet.

00:30:41.620 --> 00:30:45.600
And I believe he works for Oracle now just recently.

00:30:45.600 --> 00:30:47.280
So yeah.

00:30:47.280 --> 00:30:52.700
And then if you're an Alfred user, which I can't really, I don't have a good way of showing you what Alfred is.

00:30:52.700 --> 00:30:54.000
But if you know, you know.

00:30:54.000 --> 00:30:56.340
I am the maintainer.

00:30:56.340 --> 00:31:02.720
It's probably the command space for Mac or the PowerShell, like little pop-up search in Windows.

00:31:02.720 --> 00:31:03.020
Yeah.

00:31:03.020 --> 00:31:05.540
But like as a dedicated app that does more, right?

00:31:05.540 --> 00:31:06.260
Exactly.

00:31:06.260 --> 00:31:14.600
And I am the maintainer of the Bunch workflow, like the official unofficial Bunch workflow for Alfred.

00:31:14.860 --> 00:31:17.600
So if you ever need help with that, you know who to yell at.

00:31:17.600 --> 00:31:18.320
That'd be me.

00:31:18.320 --> 00:31:19.360
Fantastic.

00:31:19.360 --> 00:31:20.220
Oh, that's a cool one.

00:31:20.220 --> 00:31:21.380
A nice find there.

00:31:21.380 --> 00:31:21.860
Cool.

00:31:21.860 --> 00:31:22.520
All right, Brian.

00:31:22.520 --> 00:31:23.200
Is that it for us?

00:31:23.200 --> 00:31:24.360
Our main items?

00:31:24.360 --> 00:31:25.100
It's up.

00:31:25.100 --> 00:31:26.240
That's up for our main items.

00:31:26.240 --> 00:31:27.340
Do we have anything extra?

00:31:27.760 --> 00:31:30.920
I was thinking no, and then actually yes.

00:31:30.920 --> 00:31:33.540
So I just ran across this.

00:31:33.540 --> 00:31:35.780
We talked about GitHub Copilot.

00:31:35.780 --> 00:31:37.820
In fact, that was the title of last week.

00:31:37.820 --> 00:31:38.280
Yeah.

00:31:38.280 --> 00:31:41.560
It was like GitHub, your pilot speaking or something like that.

00:31:41.560 --> 00:31:49.260
And how both mind-blowing and like good and possibly kind of crazy, not necessarily good ways that the Copilot was.

00:31:49.260 --> 00:31:50.960
And it was pretty interesting, right?

00:31:50.960 --> 00:31:51.420
Yeah.

00:31:51.600 --> 00:31:57.140
So there's an article over on The Verge, and I had pointed out, like, what is the license?

00:31:57.140 --> 00:31:59.580
What is the transitive license here?

00:31:59.580 --> 00:32:09.220
What's the, if you have a GPL license and then you filter it through ML, is the transitive property applied to the GPL, basically was my question, right?

00:32:09.220 --> 00:32:18.720
And so there's an article over on The Verge that says, GitHub's automatic coding tool, aka GitHub Copilot, rests on untested legal ground.

00:32:18.980 --> 00:32:30.180
So there's one section in here that says, despite GitHub's assertion, there's no direct legal precedent in the United States that upholds publicly available training data as fair use.

00:32:30.180 --> 00:32:33.520
So anyway, if people are interested in this, they can check it out.

00:32:33.520 --> 00:32:44.660
I think there's also a caveat there, too, of what GitHub is doing is on untested ground, and your usage of what GitHub is doing is also on untested ground.

00:32:45.640 --> 00:33:01.140
Not saying that you can or can't use this, but just know that even if GitHub, you know, wins a lawsuit saying that they're good, you may not want to be the person to have to test the lawsuit of whether or not you're going to be good.

00:33:01.140 --> 00:33:05.600
So, and again, I'm not a lawyer, so I don't even pretend to be one.

00:33:05.600 --> 00:33:06.180
Yeah.

00:33:06.180 --> 00:33:08.320
I think it's a cool project, though.

00:33:08.980 --> 00:33:09.160
Yeah.

00:33:09.160 --> 00:33:10.740
It is quite cool.

00:33:10.740 --> 00:33:11.420
It's quite cool.

00:33:11.420 --> 00:33:11.960
All right.

00:33:11.960 --> 00:33:14.320
Dean, I always appreciate the help in the comments.

00:33:14.320 --> 00:33:17.060
So time for some extra, extra, extra, extra, extra.

00:33:17.060 --> 00:33:19.640
This time, actually, no, I almost had no extras at all.

00:33:19.640 --> 00:33:20.440
I was feeling bad.

00:33:20.440 --> 00:33:21.580
But just the one.

00:33:21.580 --> 00:33:23.100
Yeah.

00:33:23.640 --> 00:33:24.000
Okay.

00:33:24.000 --> 00:33:25.960
So I wanted to share something exciting.

00:33:25.960 --> 00:33:26.320
So.

00:33:26.320 --> 00:33:27.700
Also, one more thing.

00:33:27.700 --> 00:33:29.820
I don't know if I clicked this or you clicked it.

00:33:29.820 --> 00:33:33.220
But Magnus says, I also saw that Copilot spouted API keys.

00:33:33.220 --> 00:33:36.580
So we've heard of Shugit and other Don't Put Secrets in here.

00:33:36.580 --> 00:33:38.200
But here's yet another interesting way.

00:33:38.200 --> 00:33:39.760
You want to connect to AWS?

00:33:39.760 --> 00:33:40.340
Here.

00:33:40.340 --> 00:33:41.380
Here's the API key.

00:33:41.380 --> 00:33:42.380
Here's the API key.

00:33:42.380 --> 00:33:44.000
That's awesome.

00:33:44.000 --> 00:33:45.080
Go ahead and try it.

00:33:45.080 --> 00:33:45.380
Why not?

00:33:45.380 --> 00:33:46.840
You don't know who's paying for that.

00:33:46.840 --> 00:33:48.140
It's free.

00:33:48.140 --> 00:33:48.880
It's free for you.

00:33:49.100 --> 00:33:49.380
Yeah.

00:33:49.380 --> 00:33:52.760
So I'm continuing to work on the pytest book.

00:33:52.760 --> 00:33:56.580
I just got the configuration chapter turned in.

00:33:56.580 --> 00:33:58.200
It's not available in the beta yet.

00:33:58.200 --> 00:34:00.120
But it will be within the next few days.

00:34:00.120 --> 00:34:01.900
So configuration stuff.

00:34:01.900 --> 00:34:02.780
It's all fun.

00:34:02.780 --> 00:34:05.560
And then I'm excited to get working.

00:34:05.560 --> 00:34:08.280
The next chapters, I'm going to start working on our talks and CI.

00:34:08.280 --> 00:34:09.960
And the search path and debugging.

00:34:09.960 --> 00:34:11.240
And those will be fun chapters.

00:34:11.240 --> 00:34:13.720
So I just wanted to share where I'm at there.

00:34:13.720 --> 00:34:14.340
Awesome.

00:34:14.340 --> 00:34:15.440
You're almost there.

00:34:15.440 --> 00:34:16.100
Yeah.

00:34:16.100 --> 00:34:18.440
And then I had an extra too.

00:34:18.680 --> 00:34:20.080
But it's so silly.

00:34:20.080 --> 00:34:21.060
But it's just fun.

00:34:21.060 --> 00:34:22.760
I have to stop sharing that.

00:34:22.760 --> 00:34:24.180
And I have to share another window now.

00:34:24.180 --> 00:34:24.620
Thanks.

00:34:24.620 --> 00:34:25.540
Thanks, Streamy.

00:34:25.540 --> 00:34:26.820
Thanks for that.

00:34:26.820 --> 00:34:28.820
But I found a new tool to play with.

00:34:28.820 --> 00:34:31.400
It's called Monodraw.

00:34:31.400 --> 00:34:35.480
Which is a very, very interesting tool.

00:34:35.480 --> 00:34:38.260
I don't know what most people would use it for.

00:34:38.260 --> 00:34:42.520
But I've been using it as an outline and planning tool.

00:34:42.520 --> 00:34:44.060
And I'm going to show you what I do with it.

00:34:44.060 --> 00:34:46.140
I'm going to add a text here.

00:34:46.300 --> 00:34:49.580
And it's going to say, I Python Bytes Crew.

00:34:49.580 --> 00:34:51.140
And I'm going to hit Done.

00:34:51.140 --> 00:34:55.180
So for people listening, this is like kind of drawing on graph paper.

00:34:55.180 --> 00:34:55.960
Yeah.

00:34:55.960 --> 00:34:56.700
Yeah.

00:34:56.700 --> 00:34:56.980
Okay.

00:34:56.980 --> 00:35:03.060
So what happens if I expand this out and I tell it I want it to be a banner?

00:35:04.060 --> 00:35:05.960
Oh, that's pretty fun.

00:35:05.960 --> 00:35:07.760
That was fun to be digital.

00:35:07.760 --> 00:35:10.760
It turned it into like ASCII art and stuff.

00:35:10.760 --> 00:35:11.060
Yeah.

00:35:11.060 --> 00:35:17.000
So this is a way to actually build like ASCII art outlines.

00:35:17.740 --> 00:35:19.520
And they have a bunch of different versions.

00:35:19.520 --> 00:35:23.440
And I mean, I've used this on a couple of projects.

00:35:23.440 --> 00:35:28.260
I'm trying to see if I have one that I can load up real quick for like a video that I've made.

00:35:28.260 --> 00:35:35.380
And when I say it doesn't make sense why this works for my brain, like it truly doesn't.

00:35:35.860 --> 00:35:40.820
But when it comes to, oh, did it, did it not move it to the, it didn't move it to the right window.

00:35:40.820 --> 00:35:41.440
Hold on.

00:35:41.440 --> 00:35:42.800
Thanks again, StreamYard.

00:35:42.800 --> 00:35:43.580
Okay.

00:35:43.580 --> 00:35:49.620
I want to use this for my next status report and just do the entire status report in ASCII art.

00:35:49.620 --> 00:35:50.220
Yes.

00:35:50.220 --> 00:35:51.840
So funny you mentioned that.

00:35:51.840 --> 00:35:52.680
Put it as a comment and check it in.

00:35:52.680 --> 00:35:59.640
Funny you mentioned that because when I do my video planning, I do it in this format.

00:35:59.640 --> 00:36:09.300
And it's great because you can, you know, you can move stuff around, you can draw arrows, you can highlight different sections and, you know, know how everything is going to look there.

00:36:09.300 --> 00:36:15.500
And when I, when I say like, I was able to, in a normal time, it would take for me to do a video.

00:36:15.500 --> 00:36:22.920
I like cut that time in half by just drawing an outline out, using the different ASCII art to, to make things work.

00:36:22.920 --> 00:36:25.400
I'm going to, I'm going to build like presentations with this.

00:36:25.400 --> 00:36:25.780
I don't know.

00:36:25.780 --> 00:36:29.080
I'm going to like give a conference talk using ASCII art one day.

00:36:29.080 --> 00:36:29.240
Cool.

00:36:29.240 --> 00:36:30.440
You could write a book like this.

00:36:30.440 --> 00:36:35.620
You can copy and paste, but you can also export it as a PDF.

00:36:35.620 --> 00:36:37.340
Let me see what options they have here.

00:36:37.340 --> 00:36:45.800
You can export as PDF, scalable vector graphics, or, I'm sorry, ping, text, or SVG.

00:36:45.800 --> 00:36:46.440
Those three.

00:36:46.440 --> 00:36:49.740
For some reason, I thought there was a PDF version in there, but there is not.

00:36:49.740 --> 00:36:50.140
Cool.

00:36:50.140 --> 00:36:54.400
Sean out there was asking if you could export the art.

00:36:54.400 --> 00:36:58.460
And hey, Sean, co-host of the Teaching Python podcast.

00:36:58.840 --> 00:37:02.200
And I guess the thing is, it is $5.

00:37:02.200 --> 00:37:06.460
And I have a link in the show notes for it as well.

00:37:06.460 --> 00:37:07.680
But really fun tool.

00:37:07.680 --> 00:37:11.980
I haven't figured out all of my use cases for it, but I know that creating outlines and stuff

00:37:11.980 --> 00:37:17.080
has definitely been a very interesting and effective way of using it.

00:37:17.080 --> 00:37:18.060
And it's called Monodraw.

00:37:18.060 --> 00:37:19.480
And again, it's a Mac-only app.

00:37:19.480 --> 00:37:20.500
I'm sorry, Windows folks.

00:37:20.500 --> 00:37:22.860
But I'm sure that there's something out there.

00:37:23.140 --> 00:37:24.080
And if not, build it.

00:37:24.080 --> 00:37:24.940
Yeah.

00:37:24.940 --> 00:37:28.800
Or get one of those weird macOS in the cloud as a service.

00:37:28.800 --> 00:37:30.060
That's true.

00:37:30.060 --> 00:37:33.840
That one was Mac-only to my knowledge.

00:37:33.840 --> 00:37:34.940
Yeah.

00:37:34.940 --> 00:37:35.420
Yeah.

00:37:35.420 --> 00:37:36.340
All right.

00:37:36.340 --> 00:37:37.200
I'm on a joke.

00:37:37.200 --> 00:37:38.100
Yeah.

00:37:38.100 --> 00:37:38.840
I think it's time for a joke.

00:37:38.840 --> 00:37:39.240
Okay.

00:37:39.240 --> 00:37:45.800
So imagine that we're here meeting for a startup and we're trying to figure out, we're going

00:37:45.800 --> 00:37:50.220
to create some new API here and we're having a bit of trouble.

00:37:50.220 --> 00:37:52.400
So let's see.

00:37:52.400 --> 00:37:54.520
So this is like a little bit of a comic strip.

00:37:54.520 --> 00:37:56.820
And I guess, Jay, you want to be the person at the computer?

00:37:56.820 --> 00:37:57.900
I'll be the bearded dude.

00:37:57.900 --> 00:37:59.740
And Brian, you can be the guy with the glasses.

00:37:59.740 --> 00:38:00.820
Other guy with glasses.

00:38:00.820 --> 00:38:01.400
All right.

00:38:02.320 --> 00:38:05.580
Dude, they're trying to think of what to name this API, right?

00:38:05.580 --> 00:38:06.520
Or this thing.

00:38:06.520 --> 00:38:07.840
So data?

00:38:07.840 --> 00:38:09.040
Nah, too generic.

00:38:09.040 --> 00:38:10.480
How about data DB?

00:38:10.480 --> 00:38:11.760
Unclear.

00:38:11.760 --> 00:38:14.980
Well, let's say list completed.

00:38:14.980 --> 00:38:16.480
Already used that.

00:38:16.480 --> 00:38:19.160
Array list data completed then?

00:38:19.160 --> 00:38:20.020
Nah.

00:38:20.020 --> 00:38:24.900
We must choose now or the client might cancel the project.

00:38:24.900 --> 00:38:31.020
Well, how about array list completed from form without duplicate?

00:38:31.760 --> 00:38:32.640
Nah, it's too long.

00:38:32.640 --> 00:38:38.700
And then the next panel has like a newspaper clipping that says unable to name variable,

00:38:38.700 --> 00:38:39.560
they go bust.

00:38:39.560 --> 00:38:40.580
Yeah, exactly.

00:38:40.580 --> 00:38:41.320
Go out of business.

00:38:41.320 --> 00:38:42.240
They couldn't choose naming.

00:38:42.240 --> 00:38:44.460
That is one of the hard problems of computer science, right?

00:38:44.460 --> 00:38:45.200
Is naming.

00:38:45.200 --> 00:38:45.920
Yeah.

00:38:45.920 --> 00:38:46.920
Yeah, definitely.

00:38:46.920 --> 00:38:52.860
I didn't see completed form or completed form without duplicates.

00:38:52.860 --> 00:38:55.000
Like that's what I see.

00:38:55.000 --> 00:39:01.260
It's almost like the array list, which I mean, if you're making good, good, like readable

00:39:01.260 --> 00:39:03.340
code, you would know that it's an array list.

00:39:03.340 --> 00:39:04.880
So I would say, yeah.

00:39:04.880 --> 00:39:06.080
You don't need this like type name.

00:39:06.080 --> 00:39:07.280
Do completed form without duplicate.

00:39:07.280 --> 00:39:07.920
Yeah.

00:39:07.920 --> 00:39:09.580
Well, you would have saved them.

00:39:09.580 --> 00:39:10.760
They'd still be in business.

00:39:10.760 --> 00:39:12.280
Or unique.

00:39:12.280 --> 00:39:12.820
Unique.

00:39:12.820 --> 00:39:14.600
Like completed unique.

00:39:15.600 --> 00:39:16.540
Just everybody.

00:39:16.540 --> 00:39:19.900
Just use foo, bar, and baz, and then nobody will complain.

00:39:19.900 --> 00:39:28.380
So do you remember those like those Microsoft-isms where they would like prefix types, variables

00:39:28.380 --> 00:39:29.540
with their type names?

00:39:29.540 --> 00:39:33.220
The Hungarian notation like SZ for string.

00:39:33.220 --> 00:39:34.700
What the heck was the Z there for?

00:39:34.700 --> 00:39:35.160
Size.

00:39:35.160 --> 00:39:36.340
SZ for size.

00:39:36.340 --> 00:39:36.600
Size.

00:39:36.600 --> 00:39:36.880
Size.

00:39:36.880 --> 00:39:37.080
Size.

00:39:37.080 --> 00:39:37.540
That's right.

00:39:37.540 --> 00:39:37.820
Yeah.

00:39:37.880 --> 00:39:38.800
Oh my gosh.

00:39:38.800 --> 00:39:39.480
That was dreadful.

00:39:39.480 --> 00:39:39.960
Terrible.

00:39:39.960 --> 00:39:40.480
Yeah.

00:39:40.480 --> 00:39:43.520
With like three characters left over for the actual variable name.

00:39:43.520 --> 00:39:45.000
Anyway.

00:39:45.000 --> 00:39:45.580
Cool.

00:39:45.580 --> 00:39:46.660
Well, this was fun.

00:39:46.660 --> 00:39:48.320
Thanks, Jay, for showing up today.

00:39:48.320 --> 00:39:49.840
And thanks, Michael, as always.

00:39:49.840 --> 00:39:50.400
Yeah.

00:39:50.400 --> 00:39:50.740
You bet.

00:39:50.740 --> 00:39:51.720
Bye, you guys.

00:39:51.720 --> 00:39:52.660
Thanks so much for listening.

