Transcript #369: The Readability Episode
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:05 This is episode 369.
00:07 69!
00:08 Recorded January 29th, 2024.
00:11 And I am Brian Okken.
00:12 Hey, I'm Michael Kennedy.
00:14 And this episode is sponsored by us.
00:17 So check out our courses at Talk Python Training and the Complete pytest Course.
00:22 And thanks to Patreon supporters and really everybody that just like spreads the love and shares our podcast with other people.
00:30 Thanks so much.
00:30 The first item is going to be Granian.
00:33 Oh, neat.
00:34 Yes, before we get into that, I just want to sort of set the stage.
00:37 You know, when you're running Python apps, web apps in production, there's usually something that talks to the web browsers.
00:43 And then there's the part that runs your Python code, right?
00:47 The part that talks to your web browser is Nginx, Apache, Caddy, one of these things that does SSL.
00:53 It has no knowledge of Python.
00:55 But then behind that step, we've got MicroWSGI.
00:59 We've got G-Unicorn and those types of things, right?
01:03 So that's where your Python code runs.
01:05 Usually it runs, it'll create multiple of them.
01:07 And both those two that I named, I'm big fans of.
01:11 MicroWSGI is awesome.
01:12 Super fast, low memory usage, but only does WSGI, does no async stuff.
01:19 And that's a huge drawback, right?
01:21 It doesn't do async.
01:22 It doesn't allow you to like properly scale async and await.
01:25 G-Unicorn, on the other hand, allows you to use UVicorn workers inside there, which is kind of like one more chain in that loop.
01:34 But when you deploy it that way, you can do async and await, which is awesome.
01:38 But there's this new-ish thing coming along called Granian from the Emmet framework, which is a new Python web framework.
01:47 But this is a Rust-based HTTP server for Python applications.
01:51 So a Rust version of MicroWSGI or G-Unicorn.
01:55 Yeah?
01:55 Oh, cool.
01:56 That's kind of cool.
01:57 It has 1.5,000 stars on GitHub.
02:01 It's been coming along for a while.
02:02 And it's created by a guy named Giovanni, I believe.
02:08 And Giovanni says, well, why build this thing?
02:12 A couple of reasons.
02:13 It's a correct HTTP implementation supporting version 1.2 and working on HTTP 3, which is awesome.
02:20 It avoids the G-Unicorn, U-Vicorn, HTTP tools' tendency composition when deploying in production.
02:28 So this natively supports async and await, like right in it, along with WSGI.
02:34 So whatever kind of app you've created, you can just run it right there in this thing without chaining stuff together.
02:41 And one of the things that's nice about it is it's not a ton faster, but it's way more stable.
02:46 There's less jitter in its performance profile, which I think is super cool.
02:50 I'll talk about that in a second.
02:51 But yeah, it has HTTP 1 and 2.
02:53 Excellent.
02:54 Supports HTTPS and WebSockets directly.
02:56 I'm not going to send HTTPS traffic to it.
02:59 I'm just using, for now, Nginx or whatever.
03:01 But it also supports RSGI, which is a Rust server gateway interface, I guess.
03:06 You know, like ASGI and WSGI.
03:08 So it does all the Python things, plus it has a Rust direct version, if that was the way you went down it.
03:14 And it's super easy to run.
03:16 But from the performance perspective, if you look, it'll compare it down here to, let's see, against Uveacorn.
03:24 And Hypercorn is another one I should have mentioned.
03:27 That's like a parallel to Uveacorn plus Unicorn.
03:31 But that one, I think, handles it all directly from Philip Jones, which is great.
03:34 But if you look at, so let's just say, like, the ASGI get.
03:38 It says it'll do, numbers please, 1.3 million requests at, okay, that's just total, doesn't mean anything.
03:46 That could be over three weeks.
03:47 85,000, 86,000 requests per second.
03:50 Or maybe this one's a little bit better.
03:53 A different get for 94,000.
03:55 Compare that against the Uveacorn one, which is 19,000 versus 94,000.
04:02 Or the Hypercorn at 12,000 versus 94,000, which is great.
04:06 But if you look at the variation, like, response time on, let's say, Uveacorn is, on average, 8.7 milliseconds.
04:15 That's really good.
04:17 But the max is 320 milliseconds.
04:20 Whereas if you look at this one, it's 2.7, but the max is only 8.6, right?
04:26 So that variability or jitter, or I don't know how the heck you say it, is way more stable.
04:31 And you just kind of look across the board, like another example is 6 versus 70, and so on.
04:35 So I thought that was pretty cool.
04:36 So I switched.
04:37 If you come over here, Brian, to Python Bytes.
04:39 This is running on Granian right now over on my Docker cluster for the moment.
04:44 So I just thought I'd see how it goes.
04:46 And it's been going perfectly, from what I can tell.
04:48 So it's pretty easy to switch, then?
04:51 Yeah.
04:51 I mean, all you got to do is pip install Granian, and then change the start command, no matter
04:57 however you run it.
04:57 If you run it in the systemd on, like, a VM, you change the systemd exec command.
05:02 If you do it in Docker, you just change the entry point command.
05:05 For a micro-whisgi this, or gunicorn that, too.
05:08 It's basically just another startup command.
05:11 Yeah.
05:11 Okay.
05:11 Interesting.
05:12 Cool.
05:12 Indeed, indeed.
05:14 One thing I did want to add for people who are considering this.
05:18 I got to move this over.
05:19 Go.
05:20 One thing it doesn't.
05:21 You can set it up so it'll do logging, but it doesn't do, like, easy logging out of the
05:26 box.
05:26 So I actually was messing around, like, maybe I should just do my own logging.
05:30 Not for, hey, my app started up.
05:33 Hey, somebody click this button.
05:34 But just request response logging, which is pretty common.
05:37 So I actually ended up playing with it and using Log Guru to come up with a color-coded,
05:43 added some middleware that came up with color-coded request response logging that does all sorts
05:48 of cool stuff.
05:49 Like, see how some of the sizes in this log are red and some are white?
05:53 If it's, like, over 500K in the request size, then it colors it red.
05:58 Or if the response time is too slow, it'll color it, like, yellow.
06:01 Or if it gets really slow, it'll color it red.
06:03 Or it's a 400 or 500 code error.
06:06 It'll color that part of the request red.
06:10 So you can, like, look right away and see.
06:13 So I've decided doing your own Log Guru request response stuff is pretty excellent, actually.
06:18 So that's kind of a cool consequence of playing around with this as well.
06:22 Cool.
06:23 So is your use of Log Guru that a custom thing where you look at the response times and color
06:29 it differently or something?
06:30 Yeah, exactly.
06:31 Exactly.
06:31 Like, it'd be easy enough to just go print this format.
06:34 The code is this.
06:35 The URL is that.
06:36 But I said it would be a lot more useful if it was color-coded and meant stuff, right?
06:41 Like, if it's a 404, it should be a different color than if it's a 200.
06:45 Or if it's a redirect, it should be a different color.
06:47 If it's really, really slow, if you see these times, like, 10 milliseconds, 9 milliseconds,
06:52 8 milliseconds, 12 milliseconds, if that was a second, maybe that's a problem.
06:56 Color that a different color.
06:57 And I did that by installing middleware in the, this isn't Pyramid, but it could also be
07:02 whatever, right?
07:03 You do this in FastAPI or whatever.
07:05 It just says, begin the request, do something, pass it down to the framework, and then end
07:11 the request and just times it and logs it and colors it there.
07:13 Okay.
07:14 Neat.
07:15 Yep.
07:15 Indeed, indeed.
07:16 Well, I also want to talk about something new and old at the same time.
07:23 Nice.
07:24 pytest has been around for a while, but pytest 8 is brand new.
07:28 So pytest 8 just came out this weekend.
07:31 I'm super excited to start running with it.
07:33 Actually, I've already started running with it.
07:35 We're going to put in the show notes.
07:38 I put a highlighted blog post of just pytest 8 is here and links to the full changelog.
07:46 What they did was they spread out, if people are running seven, like old 7x pytest, which
07:54 that's what I was using before.
07:55 The changelog's a little, just takes a little bit to parse because they spread it along the
08:02 RC1, RC2, and the final 80 release.
08:06 The changes are all there.
08:07 So I pulled the highlights out.
08:10 So the thing I'm really excited, there's two things I'm really excited about.
08:13 One is when you had an exception, there would just be a red block of exception stuff.
08:20 And there's a whole bunch of cool differences.
08:24 So there's improved diffs when you fail an exception, especially if you do dash VV, so very verbose
08:32 or verbose verbose, however you want to think about that.
08:35 But you get a colored diff instead of the big chunk of red.
08:39 That's awesome.
08:40 Back to this color thing, right?
08:42 Yeah, it's also more colors.
08:43 Normal syntax highlighting, we're used to syntax highlighted code.
08:48 So error reports are now syntax highlighted.
08:52 And the different sections of the error report are separated better.
08:57 And then also, there's better support for standard library containers for diffing.
09:05 There was usually a pretty good tuple diff, for instance.
09:10 But if you had big lists, it was a little bit hard to read.
09:13 It's a little bit better now.
09:15 And then more comprehensive assert rewrites for other comparisons, not just equal, but things
09:21 like not equal, less than equal, other comparisons.
09:25 So that's really cool.
09:26 Help people debug their code.
09:29 That's super nice, because you want to be able to just say, are these two things the same
09:33 and not write code around?
09:34 How do you do that, right?
09:36 Yeah.
09:36 Yep.
09:37 And also, comparisons like less than or less than or equal, it's really nice for the pytest
09:43 to go out and really tell you why that check failed and highlight the part of your data
09:49 where it failed.
09:50 So really, really fun to see that.
09:53 There's the thing that the next thing I wanted to talk about for pytest 8 was probably pretty
10:00 obscure for people that are not using X fail.
10:02 So X fail is a way to say, I expect this test to fail.
10:07 And for a lot of people, why would you expect it to fail?
10:11 But for large organizations, it's pretty common to file a defect and you don't have control
10:18 over it.
10:19 So you can't just go fix it.
10:20 Somebody else is responsible for fixing it.
10:22 So that's how we use it.
10:24 And I mark a test as failing, as expected to fail, and give it a defect number.
10:30 And then when it, and that's not new, but if it passes, there's decisions on how to make
10:39 it X pass or what to deal with, do with if an X fail passes.
10:43 I've talked about that a bunch on the other podcast.
10:46 However, the change for pytest 8 is that with X fails, the traceback never showed up.
10:54 It didn't used to.
10:55 So the change is now, if you, there's a way to turn that on with a, with a dash R command,
11:01 you can turn on X fail tracebacks.
11:04 So that's really nice for CI test runs to be able to see what the failure was in CI and not
11:11 have to try to rerun it again.
11:12 So really cool.
11:13 Excited about that.
11:15 There's lots more things.
11:16 So check out the change log.
11:18 The reason why they bumped to eight, I think is because there was a bunch of, they changed
11:24 the way collection works.
11:25 And, and that chain, that behavior change of backwards compatibility made it so that it
11:31 made sense to bump the, the, the number.
11:33 I think that's the reason I'm not sure.
11:35 But also it's good to bump the number every once in a while so that we have a, that so that
11:41 you can deal with a deprecations.
11:42 You can get rid of the code that you were meaning to get rid of.
11:45 So I, I encourage people to run pytest 8 and check it out and turn on, you know, turn on
11:51 the full strict mode and everything so that, you know, if, if anything breaks, you can roll
11:57 back if you need to.
11:58 Awesome.
11:59 This is like Christmas for you, right?
12:01 Yeah.
12:01 Major.
12:02 Yeah.
12:02 A major version release.
12:04 Yeah.
12:05 And it also made me, when I was looking at this, made me realize that I think I need to
12:08 add more color to my blog.
12:09 It's just black and white and it's not very fun.
12:13 So I'm have to add more color.
12:14 Color is always fun.
12:16 I mean, that's the theme of this episode last week.
12:18 It was let's just ship announced open source projects.
12:21 We're releasing this is like color episode.
12:22 Color the color episode.
12:24 Yeah.
12:24 Or as midnight audience puts it out.
12:27 There is a readability episode.
12:28 Very good.
12:30 Indeed.
12:30 Well, let's harken back to a couple of things on my side here.
12:36 So I talked about this Docker work that I've been doing.
12:39 That also kind of led me to the Granian stuff and playing with that as well.
12:43 I also forgot to give a quick shout out to the people like both Andy Shapiro and Bill Crook
12:48 pointed out, said, Hey, you should check out Granian.
12:50 So when I give them credit for sending that in, thank you.
12:53 But as I was doing all these Docker things, I was, you know, you know, when you're in a
12:58 unusual or an unfamiliar, uncomfortable space compared to what you normally do.
13:03 Like right now, my little browser in this episode has maybe nine tabs and that's like
13:08 kind of a lot.
13:09 But when I was doing the Docker stuff, I'd have a 30, 40, 50 tabs.
13:12 And then I would close 30 of them because I'd solve some problem that would work its way.
13:16 It would just tabs everywhere.
13:17 So it was just like exploring stuff all over the place, right?
13:19 Like, wow, I must not know what I'm doing right now.
13:22 And that's true.
13:23 But, you know, that's how you get to where you know what's going on.
13:27 Along that I'd be like, oh, people talk about, oh my gosh, totally giving up on doing
13:31 this.
13:31 I'm using OrbStack or Podman or if they support this OS.
13:35 I'm like, what are these things?
13:36 So I just want to go through a host of Docker goodies that I think people will enjoy.
13:41 Not exactly Python specific, but certainly relevant if you're doing Python in any form
13:46 of containers, right?
13:46 So the first one of three, there's actually more, Brian.
13:49 I'm not going to cover them all here.
13:51 I'm saving some for later because it's just, it'll be a little out of control at that point.
13:54 So OrbStack, if you use Docker and you use Docker on Mac or Windows, typically what you do is
14:00 you get Docker desktop, right?
14:02 So that gives you the Docker commands.
14:05 It allows you to run Docker locally.
14:06 I think it might use, maybe use VirtualBox or something on Mac.
14:11 And it uses probably Windows subsystem for Linux on Windows.
14:13 But you can run like Linux VM, Linux containers on top of some hidden thing of Linux, right?
14:19 Yeah.
14:20 So OrbStack is kind of that.
14:22 They say, say goodbye to slow and clunky containers and VMs.
14:25 It's a light and easy way to run Docker containers and Linux on one machine, right?
14:31 So basically gives you a nice UI around it.
14:35 It is 100% compatible with Docker.
14:38 So you could say Docker run, Docker exec, Docker compose up or whatever it is you say.
14:42 And instead of using the Docker engine, it'll use this OrbStack engine, which is pretty neat.
14:48 It also has its own CLI if you want to directly work with it.
14:53 But basically it's kind of a one open source and two more lightweight.
14:58 They've got a bunch of cool commands, but they show down here somewhere.
15:01 Speed, if you're going to open, it says open edX.
15:06 I guess that's probably the Docker compose setup for edX.
15:11 I'm going to provision a development environment for it.
15:15 It's pretty long still because I guess that's a beast of an app.
15:17 17 minutes on OrbStack, but 45 minutes on Docker desktop to build post-hog, whatever that is.
15:23 It's like a quarter or a third of the time.
15:26 It uses, if you're on a laptop, it uses like less than 25% of the battery.
15:31 It's like a quarter or whatever, right?
15:36 But pretty cool, right?
15:37 Yeah.
15:37 Yeah.
15:37 Yeah.
15:38 And oh, another thing, I think, I think, let me look.
15:41 Yes.
15:42 This is a big deal.
15:42 You and I were just talking about this before we pressed record.
15:44 It says you can run Linux machines without a fuss.
15:47 So one of the things I can do is I can go to like parallels and I can run Linux, Ubuntu or whatever on my Mac, my M2 mini, my M2 pro mini.
15:57 However, those words go together.
15:59 Whatever order makes the right sense there.
16:01 I can run them, but I can only run the ARM 64 versions because I only have an ARM 64 processor.
16:08 But this one allows you to run Intel machines on Apple Silicon with Rosetta, which allows you then to run Intel based Docker images and basically be closer to what your production environment is if you're using Apple Silicon.
16:23 So that's also a nice feature of this.
16:24 That's pretty cool.
16:25 Yeah.
16:26 It does cost money if you're a company, but it has a free version if you're just a person.
16:30 So not an endorsement, but I thought people might find this to be pretty useful.
16:35 It looks pretty cool.
16:35 Yeah.
16:36 Next one, Podman.
16:37 Podman is the best free and open source container tools.
16:41 So you can manage Docker containers, pods.
16:44 And that term, I believe, comes from Kubernetes, like the unit of execution in Kubernetes is called a pod.
16:50 And images with Podman.
16:52 So yeah, it lets you seamlessly work with containers and Kubernetes from your local environment.
16:57 So this is also really cool.
16:59 A lot of people are doing interesting stuff.
17:01 GitHub Action plugins.
17:03 It's got a Visual Studio Code plugin and different things.
17:07 And then the third one, actually 3.5 because it kind of is two, is this is pretty interesting.
17:13 So one of the things that kind of is inspiring once you get all the Docker stuff going is like, okay, well, if that open source big complicated thing and some technology,
17:21 I don't know how to run like PHP or whatever.
17:24 But if it has a Docker container or a Docker composed set of containers, I can run it.
17:29 All I got to do is just tell Docker to update it when there's a new one and just run it.
17:33 That's super easy to do, right?
17:35 So there's this like taking that to kind of the extreme is there's this thing called Casa OS.
17:40 Have you heard of this?
17:41 No.
17:41 I neither.
17:42 But it has 20,000 GitHub stars, which is pretty cool.
17:45 They call it your personal cloud operating system.
17:48 Community based open source software focused on delivering simple personal cloud experience around the Docker ecosystem.
17:55 So basically, if there's a thing that runs Docker, this is like an OS for running and a platform for running all that.
18:01 So it gives you a UI into this OS that they give you.
18:05 And it says, look, you can collect all your precious data.
18:08 It'll like tie together Google Drive, Dropbox, iCloud, OneDrive, et cetera, et cetera, hard drives and everything into just one drive view.
18:18 And then you can just access it and like map that drive over to your TV or your computer or whatever.
18:23 There's somewhere in here where they've got all these apps that you can go just grab and install supports.
18:30 A lot of them are unfamiliar to me because I haven't done this enough.
18:33 But like couch potato, duck DNS, photoprism, and they just plug into this thing.
18:38 So this is pretty interesting, right?
18:39 I think.
18:40 Yeah.
18:41 You think, right?
18:42 Yeah.
18:42 I don't know what I would do with it.
18:44 But, you know.
18:45 Yeah.
18:46 So one of the things that I think this is sort of coming out of is they have this thing called Zimma Cube,
18:51 which instead of running all your stuff on the Internet, this is like kind of like a really fancy NAS network attached storage.
18:59 But it also runs Docker and all these things.
19:02 So it says you can have up to 164 terabytes of SSD.
19:05 But then it also runs all of these things.
19:08 And this is on Kickstarter.
19:10 And it was already funded at around 1.1 million US, which is a lot apparently.
19:16 So this is kind of the intended destination for that.
19:20 But I think you can run it anywhere.
19:21 So pretty cool, right?
19:23 Yeah.
19:23 I mean, some people think over a million dollars is a lot.
19:26 I don't, you know, chump change.
19:29 But, you know.
19:29 Yeah.
19:30 So I don't think this thing is shipped yet.
19:33 I think it's in development still now that their Kickstarter ended.
19:37 But, yeah.
19:38 So there's a whole bunch of different fun things.
19:40 So Orb, OrbStack, Podman, Kasa, and Zimma Cube.
19:44 Okay.
19:45 So I have a question about the OrbStack.
19:47 That doesn't generate Docker images, though, does it?
19:51 I mean, I have to have OrbStack stuff on the server as well, right?
19:55 No.
19:55 It will manage.
19:57 It is a transparent API or CLI to the Docker CLI.
20:04 Oh, okay.
20:04 So if you just install this, then you can go to your command line and type Docker build, whatever.
20:11 And it'll download and do all the things.
20:13 But then when you ship it to production, you could have real Docker there.
20:16 Okay.
20:17 Okay.
20:17 Right?
20:17 Yeah, I didn't understand.
20:18 It's more like, it's more, I think it's mostly around kind of, yeah, it's mostly on the desktop side of things.
20:24 So it's like a simpler, lighter way to do desktop stuff.
20:28 Possibly you could run it on your own.
20:29 Like I said, it does have its own CLI for doing things its way.
20:33 But I think people will just use it as a Docker desktop alternative.
20:36 Yeah.
20:37 And it looks like it's the business and commercial use pricing is slightly cheaper than Docker desktop right now.
20:46 So there's a benefit there as well.
20:48 I didn't remember that Docker had gone commercial on that side as well.
20:52 So that makes them more comparable, right?
20:54 As opposed to, yeah, there's this other free thing.
20:56 It's not terrible though.
20:57 I mean, like I just, we just had to re-up our Docker at work and it's what we, I think I paid 300 bucks for five seats per year.
21:06 That's not bad.
21:07 Yeah, that's not bad.
21:08 Not when it's not your money, it's fine.
21:09 It's not my money.
21:10 It's easier to spend not your money.
21:13 Yeah.
21:13 So, yeah.
21:16 I love not your money spending.
21:18 But anyway, pretty cool.
21:20 I'll look forward to checking that out.
21:23 I actually think it'd be fun to have one of those Zima cubes.
21:25 I do too.
21:27 I would really consider it.
21:28 Wouldn't it be awesome to just have all those cool apps running plus, you know, 100 terabytes of storage?
21:33 Yeah.
21:34 So it's like the cloud, but it's at home.
21:35 So it's just-
21:36 Exactly.
21:36 It's topped in?
21:37 It's more like fog.
21:40 It's way lower down.
21:42 It doesn't-
21:43 It's fog.
21:43 It's personal.
21:45 Personal cloud is fog.
21:46 Personal fog.
21:48 That's nice.
21:49 Okay.
21:50 Cool.
21:50 Okay.
21:52 So that's some good news.
21:54 And the next step, I don't know if this is good news or bad news.
21:57 It depends on your perspective.
21:59 So I'd like to talk about GitHub Copilot and other assisted AI stuff.
22:07 So Visual Studio Magazine came out with this article called New GitHub Copilot Research Finds Downward Pressure on Code Quality.
22:18 So the question really was kind of, if I'm using coding with Copilot, if I'm using Copilot to help me write some stuff, is the Copilot kind of like having a junior developer?
22:35 Is it more intern or is it more senior dev?
22:38 Yeah.
22:39 Is it more intern or more senior dev?
22:40 And so the result was, or their question was, is it more senior dev or more akin to the just jointed work of a short-term contractor?
22:52 Which I thought that was appropriate because a contractor might be very skilled, but they don't really care about, they might not care about maintenance too much.
23:01 Yeah, exactly.
23:02 So-
23:03 Yeah, the technical debt is not a problem when you're done next week.
23:06 Yeah, and you don't have to, yeah, yeah.
23:08 One of the best ways to not deal with legacy code is shift, switch jobs.
23:13 Anyway, the answer is summarized of this white paper is summarized by, We find disconcerting trends for maintainability.
23:28 Code churn, which is the percentage of lines that are reverted or updated less than two weeks after being authored, is projected to double in 2024 as compared to 2021, pre-AI baseline.
23:40 We further find that the percentage of added code or, and copy pasted code is increasing in proportion to updated, deleted, and moved code.
23:51 In this regard, AI generated code resembles an iterant contributor prone to violating the dryness, the don't repeat yourself, of the repositories visited.
24:03 So this isn't that surprising to me, but it's interesting that there was a study done by GitClear.
24:08 And also interesting that it was, you know, printed in Visual Studio magazine.
24:13 But I don't know if this is, if the, I guess the magazine probably doesn't have any ties to Microsoft, but, or GitHub.
24:22 But anyway, interesting.
24:25 Indeed.
24:26 So, Bart out in the audience has a different analogy.
24:29 I'd like to adapt.
24:31 It's not junior or senior.
24:32 It's a parrot that recycles what it found on the web.
24:34 So I'm thinking more stack overflow, copy and paste action type of stuff here.
24:38 And Grant says, I read this too.
24:41 The research makes sense.
24:42 Sounds right.
24:43 But Copilot has benefits of senior devs like applying good patterns faster.
24:47 Yeah.
24:48 Which is pretty interesting.
24:50 There was some comment in the article that essentially stuff still got done faster.
24:56 It's, or at least got to something working faster.
25:00 It's just that people often go back and, you know, back later and modify and refactor the code.
25:06 And that's not necessarily bad, but, you know.
25:09 You get the sense that Copilot is very focused on what prompt did you give me?
25:15 I'm going to do that.
25:16 Rather than, I understand what your entire project is.
25:19 I've seen all 200 files.
25:21 I've thought that through.
25:22 Now, in that context, the answer to your question is X rather than Y.
25:26 Right?
25:26 I don't think it does that.
25:27 I think, I mean, I think it would be a very high level of like token usage that it would have to take into account.
25:34 I just don't.
25:34 I think it probably just goes like, all right, well, you asked me a sentence.
25:37 Here's the answer.
25:38 Python.
25:38 Yeah.
25:39 I actually want to play with it more.
25:41 I haven't really played with Copilot too much.
25:42 It's not something I can use at work, but on personal projects, I think it'd be fun to use it more.
25:48 But the, we're still, I mean, it seems like, you know, it seems like, like, ChatGPT is kind of old now and Copilot is like really old.
25:58 But really, we're really just starting to use these tools in development.
26:03 Like they said, pre-2021.
26:04 So it's still only a couple of years that we have under our belt working with these things.
26:10 And I think that, I think that the tools can get better.
26:13 And I, I, I'm looking forward to being able to, I, I both worry about the developers that are going to lose jobs and stuff because of this.
26:21 But, I also, I think that the tools will probably get better.
26:25 Like you said, if it can look at your entire project and say, Hey, in this context, this is the right call.
26:32 You're, you're repeating something.
26:34 You can, we can, we already, you already implemented that.
26:36 Let's call this function instead.
26:38 that would be great.
26:40 And also if, if we could have AI tools to, to help, maybe keep a style similar or the, just a general philosophy similar around a project.
26:49 I think there's room for that, once it gets there.
26:53 So yeah, I wouldn't be surprised to see that happen.
26:55 Yeah.
26:56 All right.
26:56 Extra, extra time.
26:57 Extra, extra.
26:58 Oh, yeah.
27:00 So my extras are, like, did you know that pytest 8 is out?
27:04 pip install dash you.
27:06 pip install dash you.
27:08 But I also, if, if, pytest is, is one of those things that you've always been thinking about doing, head on over to, courses.pythontest.com.
27:18 and you can learn it really fast, using a course or you can grab the book of course.
27:24 So yeah, excellent.
27:25 Yeah.
27:26 That's very exciting.
27:26 Do you have any extras?
27:27 I do have a couple of things.
27:29 I want to quick give a shout out to one.
27:32 This has been around for plenty long, although it's changed behind the scenes, not in a way, anyway, really necessarily notice.
27:38 But it has.
27:38 And that's just, I want to encourage people to join our newsletter.
27:41 If you go to Python by set FM, right below the hero image, there's a thing that says new letter.
27:45 If you go newsletter, you go over there.
27:47 It has become a friend of the show.
27:48 Put your information in there.
27:50 This is actually, a revamped as part of my work that I did with ListMonk, the private self-hosted email stuff moving away from MailChimp and others.
28:00 We talked about that last week, two weeks ago, some, some number of weeks ago.
28:04 And that means it doesn't go anywhere.
28:06 We don't share it with anyone.
28:07 But Brian and I are planning some fun stuff and trying to do more with newsletters and reaching out and connecting with you all.
28:14 So we would love for you to go to Python by set FM, click on newsletter and put your information in there.
28:19 We won't share it, but we'll try to make, make it worth your while.
28:22 But we also haven't emailed a lot on it yet in the past.
28:26 So, when we start using it, don't think that we like bought your, your name off some list.
28:32 It's a, that we're just starting to use it more.
28:34 Yes, absolutely.
28:35 It drives me crazy when people mark, they'll come sign up for your newsletter and then they'll mark it as spam, which means other people have a harder time getting it.
28:42 It's like you, you typed in your information into there and then you mark just, it doesn't unsubscribe.
28:47 Just please use the unsubscribe.
28:49 Just use the unsubscribe.
28:51 Yeah, I actually wrote a ton of software.
28:52 I have a whole separate Docker thing running that like monitors for people marking stuff as spam.
28:57 Cause there's ways that you can receive hooks about that information and automatically unsubscribe people.
29:02 If they do that, even if they don't unsubscribe, but you know, it's kind of a sense that damage is still done a little bit.
29:07 Email is a complete nightmare.
29:08 All right.
29:09 Let's get away from email.
29:10 Cause it makes me upset.
29:11 All right.
29:12 So by Dantic, I Dan X, awesome.
29:15 Sydney Runkle, who works, the Pydantic company, was on talk Python.
29:21 And then recently released a brand new version, version 2.6.0.
29:25 And Samuel Colvin said, this is probably the biggest, most important, important release since 2.0.
29:31 Well, if you scroll through the release notes for Pydantic 2.6, there is a lot going on here.
29:39 And even just the new contributors is massive, but apparently a ton of speed up some other things going on here that you can check it out.
29:47 So if you're using Pydantic, everything's excellent.
29:50 Just no more Python 3.7.
29:53 Cause we've already had the, the thanks and goodbye to Python 3.7.
29:57 We're onto 3.8 as the minimum reasonable Python these days.
30:00 Cool though, huh?
30:01 Yeah.
30:02 Very cool.
30:02 A lot of contributors.
30:03 There's a lot going on here.
30:05 It's a popular library.
30:07 Like if we go over here and we see like, okay, well how many things depend on it?
30:10 Where's the, the used by 318,000 projects?
30:15 It lists one, two, three, four, five.
30:17 It lists like six.
30:18 And it says plus, as in there's more, it says plus 317,946.
30:22 Like, that's not really, not really representative, but okay.
30:25 I understand the UI.
30:26 Anyway.
30:27 Yeah.
30:27 It's used by a lot of people.
30:28 Well, it's used by more projects than their stars.
30:32 So some people are using it and don't like it apparently.
30:34 Maybe.
30:34 Come on.
30:35 Start this up people.
30:36 The only reason you don't see a star for me is I'm not logged in.
30:38 All right.
30:39 And finally, I wrote a new essay called use custom search engines way more.
30:44 This is not DuckDuckGo versus Google versus Bing, but rather if you use a proper browser
30:50 like Vivaldi or Firefox or even Chrome, although anyway, you can go and set custom search
30:56 engines for all sorts of cool stuff.
30:58 Like one I set was PyPI, Brian.
31:00 So if I go to my, my address bar, I don't know if I've done it on my, my streaming one
31:04 here.
31:04 Let me see now only my proper one.
31:07 This is like a separate user account over here, but I could go and just type PyPI space
31:12 pytest and it will search using PyPI.org's search results directly for pytest or whatever
31:20 it is you type there.
31:21 I didn't know you could do this.
31:22 Isn't this awesome?
31:23 So if you want to search unsplash for, stock letters, you type U space and you type
31:29 the thing or S O space, you directly search on stack overflow.
31:33 So instead of searching for it, oh, I was looking in, looking for stack overflow.
31:37 So you scroll through till you find the result and you go, you know, just like, boom, just
31:40 like a super short or GH for GitHub to search only repositories, not users or whatever you want
31:46 to type in incredibly easy.
31:48 So that's my, my essay and my quick little.
31:50 So that's, that's not built in already.
31:52 You have to, well, it's supported, but you have to like configure it on your browser.
31:57 You have to type.
31:57 Yeah.
31:58 You have to type.
31:58 Basically, you go to Vivaldi search and then you find, just go enter a new search
32:04 engine or there's ways to do it in Firefox.
32:05 There's a way to do it in Chrome.
32:07 They're all different.
32:07 Okay.
32:07 But then you just figure out if you just search a site, like if you search stack overflow,
32:11 you'll see it's stack overflow.com slash search question mark Q equals some string.
32:16 And so you just put percent S there and say that's the search engine.
32:20 Okay.
32:20 I think I'll do a PB for Python bytes.
32:23 Oh, you know what?
32:25 I'm feeling, I'm feeling like we could totally do this.
32:28 I mean, the URL's right up there.
32:30 Yeah.
32:31 Q equals that.
32:32 Yeah.
32:32 Why not?
32:32 Yeah.
32:33 Skip one step.
32:33 Beautiful.
32:34 Anyway, that's my set of extras.
32:36 Very cool.
32:37 Thanks.
32:37 well, how about funny stuff?
32:40 This one's quick and short.
32:41 Okay.
32:41 It's a picture, but you don't need to know anything about the picture.
32:44 It's just a lawyer arguing a case.
32:46 Hey, Brian says, your honor.
32:48 My client didn't know they were pushing to the main branch.
32:52 That's funny.
32:54 Yeah.
32:54 That's it.
32:55 I didn't know I was pushing to the main branch.
32:57 This is my defense.
32:57 I'm sorry.
32:59 I took down the website during Black Friday.
33:01 I thought it was my, my fork.
33:03 That's funny.
33:05 Yeah.
33:06 How often have you like, I guess you don't do this too much, but, it's a three day
33:10 weekend.
33:10 I want to make sure that I have my stuff pushed to, to the central repo.
33:15 So push, but work at home, right?
33:17 You want to like, yeah.
33:18 And sync it back up or whatever.
33:19 Yeah.
33:20 But, but make sure you're on a branch.
33:22 So, okay.
33:24 We were talking about a junior versus senior a little bit on AI stuff.
33:28 So I wanted to share a little picture also of, this was, I saw this on, Mastodon,
33:35 junior versus senior developer, junior, it's a timeline thing.
33:40 so the junior developer working on project encompasses the entire time.
33:45 Senior developer finding the motivation to start takes up like 90%, 80% of the time, and
33:51 then actually doing it at the end.
33:53 and the total time is equal.
33:55 Yeah.
33:56 Yeah.
33:57 That's amazing.
33:58 I would have altered it to make the senior, like the total time is like a little bit
34:01 less.
34:02 It's just, yeah.
34:04 Yeah.
34:04 And the junior needs a little bit of finding the motivation, but just a tiny bit.
34:08 Yeah.
34:08 It's still, it's still a good one.
34:11 Yeah.
34:12 Cool.
34:13 Well, thanks again for oops, such a great episode.
34:17 Good to talk to you this week.
34:19 It's good to have everybody in the, the showing up for the live show.
34:22 Thank you very much.
34:23 If you want to, what's that link again?
34:26 If you, if people want to go watch the live show, I would have altered it to make the senior,
34:28 live show.
34:28 they can buy them by set of him slash live.
34:31 Yeah.
34:31 All right.
34:32 Cool.
34:33 plus if you just go to pythonbytes.fm, it's right at the top there.
34:37 Yeah.
34:37 So thanks a lot.
34:39 We make it easy.
34:39 We make it easy for people.
34:40 Yeah.
34:41 All right.
34:42 See you next week.