Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #314: What are you, a wise guy? Sort it out!

Return to episode page view on github
Recorded on Tuesday, Dec 13, 2022.

00:00 Hello and welcome to Python Bytes where we deliver Python news and headlines directly to your earbuds.

00:05 This is episode 314, recorded December 13th, 2022. I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And it's just us this time. Very nice to be together to share some fun Python news.

00:18 Yeah, we got some good stuff.

00:19 I think we do. Why don't you kick it off? Before you do actually real quick, I just want to say thank you to Microsoft for startups for sponsoring this show.

00:25 Tell you more about them later. Go.

00:27 >> Nice. Well, first up, we've got something from Will McGugan.

00:31 Surprise, surprise.

00:33 But he's got this cool project called Factory, F-A-Q-T-O-R-Y, Factory, cute joke.

00:41 But it's a tool to generate F-A-Q page, markdown page specifically for GitHub project or something.

00:51 I mean, you could use it for anything really.

00:53 But one of the fun things about it is it uses it itself. So you can, I mean, not it, there's an example there, but the questions are fun. So the idea is, is you've got a lot of questions maybe that come in about your project and you want to answer, you know, keep track of them. So what you do is you stick, you stick your questions in a question directory and then, and then they're, they're like just these little markdown snippets and let's look at the raw format.

01:24 It's just like this title.

01:26 There's a title block and that's the question, and then maybe some information you can cite things maybe.

01:34 It's really pretty easy.

01:37 I'm going to go actually to the read me again to talk about that.

01:41 >> You're not going to go to the FAQ?

01:43 >> Yeah, we could.

01:44 >> I'm just kidding.

01:46 >> I wanted to make sure that we talked about alt titles.

01:49 So you have a title for a question and then an alt title, maybe for different kinds of questions that are really the same question, and then an answer.

01:57 That's the simple form of what to do in these little markdown files, these little question files.

02:02 And then you just use do factory build.

02:05 And what it does is takes all those and creates a markdown page.

02:09 And then you can see what it looks like on the faq.md in this project.

02:16 But it's nice.

02:17 got frequently asked questions at the top.

02:19 It's got links to all the questions, and then you go down and you can see what the answer is.

02:25 >> Yeah, even like a table of contents with the hash, the hash inner page navigation within GitHub which is interesting, right?

02:33 >> Yeah, it is interesting and links to each question.

02:37 So if you want to email somebody a link to it, you can link to the question, which is nice.

02:43 There's some funny ones in there as examples.

02:46 Just correct me up. I got to bring them up.

02:47 Like, in fact, most frequently asked questions have never, and perhaps will never be asked.

02:53 And then a quote, 89% of statistics are made up on the spot.

02:58 [laughter]

03:00 These are pretty funny.

03:02 But it's kind of cool and that's not all.

03:05 So this would be enough, actually.

03:08 If it just generated this FAQ page, it might be worthwhile taking a look at.

03:13 But it also has templates.

03:15 It builds a template so that you can have a .FAQ.

03:19 In the .FAQ, there's templates and you can tweak these to have a different, it's a different look to them if you want.

03:26 You can add some more code.

03:27 >> Nice.

03:29 >> Then there's this suggestion, which we got to talk about these suggestions because it has a template for what to do on the suggestion.

03:37 Why this is important is it comes with this hook that you can put into GitHub Actions.

03:46 There's a built-in thing with actions, you can suggest something.

03:51 If you suggest a question, it tries to figure out what the question might be using some fuzzy matching or something, which is a neat idea.

04:02 Then there's an example right in there.

04:05 Let's see, GitHub Workflows.

04:08 You can look at the new issues and it's calling this factory.

04:12 If somebody files an issue that's really just a question, and it figures out that there's something it can answer with, it'll answer for you.

04:21 I don't have any projects that have that many issues, but I'm sure Will does.

04:27 Some people do have these huge projects.

04:29 Having a little thing that goes, "Hey, this question is already in the FAQ or something similar.

04:35 Just go look there or here's the answer maybe." That's pretty cool. I haven't tried this, but it looks like fun.

04:42 I think that's that's really excellent.

04:44 Even for my limited small number of small projects, I still get things like, have you considered this or why is it different than that?

04:51 It seems like it's the same.

04:52 It's not the same.

04:54 It's similar. It's not the same.

04:56 Here's the huge long discussion on the issue that somebody filed that's closed because we're not resolving it and we don't leave it as an open issue.

05:03 But you go look in the closed issues and you'll see the discussion and you can participate there, right?

05:07 That kind of just point them in the right direction.

05:09 Yeah, that's really cool.

05:11 I think there's a lot of stuff like this.

05:13 I actually talked with Ned Batchelder last week, seven days ago it says, on an episode that's coming out on Talk Python called Tools for ReadMe, Creation and Maintenance.

05:24 >> Oh, yeah.

05:24 >> As well as FAQs and change logs and those sorts of things.

05:28 Remember I did a shout out for it.

05:29 Give me all the tools for ReadMes on here.

05:32 So this is the episode we ended up doing because three of the tools out of the eight or nine we covered were written by Ned.

05:38 We're like, I should just have Ned on the show because it seems like he's a major topic here.

05:43 >> Nice.

05:44 >> Anyway, there's a lot of other tools that do that, but what I think is relevant here is this automation and this suggest feature.

05:52 This is what makes it really stand out as being different.

05:54 >> Yeah. Even on some of my small projects, I'm going to go ahead and turn it on and then probably issue questions myself and play with it and see how it works.

06:03 >> Yeah. It'll be awesome.

06:05 >> Yeah.

06:05 >> Cool. Now, Steve in the audience, what's the answer to what's the difference between a duck?

06:09 I must know.

06:10 >> What's the difference?

06:11 >> It's an FAQ. We'll put it on the FAQ, Steve, we'll help you out there.

06:15 >> Yeah.

06:15 >> All right. Should we go off to the next one?

06:17 >> Yes.

06:18 >> All right. So way back in, let's see, Python Bytes.

06:23 We have a pretty cool search engine here.

06:25 Search for Kagi, live with it.

06:27 Way back here, we had Tina Huska on the show.

06:32 I talked about this Kagi thing.

06:35 >> Yeah.

06:35 >> That was it, right?

06:36 >> Like a paid search thing?

06:37 >> Yeah. There it is.

06:39 That was suggested by Daniel.

06:41 At least I said, you know, like all I'll give this a try and I'll give you all a report.

06:44 That was in June.

06:45 Well, it's December now.

06:47 So maybe not just one month, which was my idea.

06:49 But I finally got around to writing up a report on Kaggy and, you know, TLDR.

06:56 I'm still using it.

06:56 I still really like it.

06:57 So for those of you who don't have a six month perfect memory of the extras, I don't, don't doubt that it's, you know, faded.

07:05 Kaggy is a paid search engine that is super privacy respecting and very customizable.

07:11 So instead of being the product, you can pay for a product, which is search, which is pretty rare, actually, right? There's not many others that do that. So what I did is I went through and did a little write up here. And it's really kind of the, what are my thoughts on this? Why did I go through this whole process? But I entitled it paying for search in 2022. Am I crazy? Which, No, no, we'll see.

07:36 So, some of the highlights of the savings, I'm really enjoying it.

07:40 I laid out some of the reasons I think it matters, like surveillance capitalism is net-net bad for society.

07:45 That is, you being the product by being tracked and having all of that information tracked across different sources, grouped together and resold through data brokers, not good.

07:56 Most search engines, that's their business, right?

07:58 Which is not great, right?

08:01 And also, if you support small companies, we all win, right?

08:04 Even if you don't use it, people are supporting small companies.

08:07 We have many choices.

08:07 There's just, there's just more choice, right?

08:09 We don't, nobody wants a world where there's like one giant or two giant tech companies that make all the decisions.

08:14 and search happens to kind of live in that intersection of all of these things, right?

08:20 So when you go to do search, you know, you're kind of supporting some giant tech company, but at the same time, you're also being tracked and resold and it's just.

08:30 I classified it as like, some things are on the neutral good side, like duck, duck, go like they're mostly good. But there's also that sneaky behind the scenes thing with like only Microsoft can track our users. No one else can. We won't talk about it. A link to that. Others fully on the dark side. Right. So a link to an article about how to retarget your customers. So just some of the highlights here for Kaggy is it's totally privacy respecting because you pay for it. Right. There's no ads which don't lead to these perverse incentives One of these counter incentives.

09:04 One of the things I really like is you can block websites.

09:07 Like I just unblocked all the things that I had previously blocked.

09:09 And I did a search for HTM for div tag event.

09:13 What was the first result?

09:14 W3 schools.

09:16 I know.

09:16 Do you ever run across W3 schools?

09:18 Do you like it?

09:18 Yes.

09:19 No.

09:19 That, and there's a few, there's a few of these that are just, they just turn out questions and answers.

09:24 You're just like, could this just stop?

09:26 Could I just never like, how are they so good at SS SEO and so bad at answers?

09:31 Right.

09:32 And so for those things, you could, there's like a little globey looking icon looking thing next to this and you can press it and just say block.

09:40 I will never ever see W3Schools.

09:42 Now, some people may have extensions.

09:44 There's like a W3School blocker extension you can get for Chrome and other browsers.

09:49 But I also really don't want to install like any more extensions in my browser than necessary.

09:55 There's plenty of examples of like, oh, this extension became unmaintained.

09:59 And so some company bought it and put some tracking into it.

10:02 So not only are your searches tracked, everything you do ever is like now report.

10:06 Right.

10:07 Like, I just don't want to install those things.

10:08 It's just not worth it.

10:09 But here you can just say block these four or five domains or just lower them if you kind of want them to sort.

10:14 Yeah.

10:15 Oh, you, you muted.

10:16 How did I mute?

10:17 Sorry.

10:17 check this out, Brian.

10:19 If you do a search for CNN, see how this globe turns reddish orange.

10:24 Yeah.

10:24 Just in the search results.

10:25 This is on Kaggy, right?

10:26 On the right next to it.

10:28 And you're like, wait a minute.

10:28 Why is it red?

10:29 If you go over to it, it has a big red water.

10:33 You can click it.

10:33 It'll give you more information.

10:34 It has a big red warning.

10:35 There's 43 trackers detected on this page.

10:37 So if you click on it, you're getting 43 trackers put on you.

10:40 It's like jumping like that pool is full of leeches.

10:42 Don't go in it.

10:43 You're going to go in it morning.

10:45 And it even gives you the categorization of it has fingerprinting advertising has Google as a tracking category and email.

10:51 Isn't that nuts and cool.

10:52 Yeah.

10:53 I mean, cool.

10:54 It tells you not cool that it is.

10:55 Yeah.

10:55 But then just to be fair, things like Vivaldi and stuff can block most of that stuff.

11:00 >> Yes, exactly. So if you want to block it, you can.

11:03 Certainly, you should be blocking it, I think.

11:06 But anyway, it's also nice that the search engine is got your back in that regard.

11:11 >> Yeah.

11:12 >> This is the category of the site.

11:15 >> Are the results good though?

11:17 >> That is a super important question because if they're not, then all this doesn't matter.

11:22 I would say they're pretty close to Google.

11:25 I'm pretty sure that the cost, which is $10 a month, I think the cost mostly, because that can't be compute.

11:32 There's just no way that it costs that much.

11:33 I think the results are, I'm pretty sure they're buying Search as a Service from Google and Bing.

11:40 >> Okay.

11:40 >> I haven't been able to verify it, but they talk about enhancing their search results with open source and other results.

11:48 So it's like, we've got those results plus.

11:51 You know what I mean?

11:51 >> Yeah.

11:52 >> So as far as I can tell, They're pretty, it's quite similar to Google actually.

11:56 I think it actually might--

11:57 - But with the extra features, be able to block sites you don't ever wanna see, so that's cool.

12:01 - Exactly, yeah, so here's the follow up to live with it, Kaggy.

12:05 I give it a solid thumbs up.

12:06 The only, really the only downside is that it costs money.

12:10 Are you interested in paying another subscription, another $10 a month for something?

12:14 For me, it makes me happy.

12:16 I search for stuff just constantly all day and every time I'm like, yep, still not being tracked.

12:21 Feels pretty good.

12:22 And so for me, it's worth it.

12:23 People can decide.

12:25 - All right, well, I gotta say, this is a random comment from Vincent.

12:31 I don't know how to read this.

12:35 Once again, I'm rocking my baby to sleep, and once again, y'all voices aid me in doing so.

12:39 So we're so boring, you're putting your kid to sleep?

12:42 I'm not sure how to, no, yeah, I'm not sure.

12:45 - No, that's awesome.

12:46 Hey, Vincent, great to have you here.

12:48 As somebody who had one of those baby carriers when I had twins, I would hook them both on me and I would sit there and like work on my keyboard.

12:55 Cause like in the middle of the night, because they would sleep if they were stuck to me, but not if I was like trying to lay them down.

13:00 Oh God.

13:00 No.

13:00 So hopefully we're just, I feel you.

13:03 Oh, a newborn.

13:05 He has a newborn.

13:05 So they're not listening anyway.

13:07 They're just our voices.

13:08 So, or, or are they, and are they going to grow up to know Python by the time they're five?

13:13 Yeah.

13:14 Yeah.

13:15 And know how to properly protect themselves against search engines.

13:20 That's right.

13:21 - That's right.

13:22 All right, Brian, before we move on, let me tell folks about our sponsor, Microsoft for Startups.

13:27 Microsoft for Startups has been a great support of the show and it's really good to have them on board, make sure that we can keep this going strong.

13:34 You know what they don't have in this ad, by the way, Brian?

13:36 Retargeting.

13:37 We don't have any retargeting for you.

13:39 So I'm sorry about that, but you do have some really great offers if you go visit it.

13:43 If you start a business, obviously it's hard to get started.

13:47 A lot, 90% or more businesses go out of business within the first year.

13:51 And so Microsoft for Startups set out to understand what are some of the challenges and what are some of the assets that they can bring to bear to help that.

13:59 So Microsoft for Startups Founders Hub was created and it has a bunch of free resources or once you accepted into the program, a lot of included resources that are just given to you.

14:10 And they come in two categories.

14:12 They come in bunch of cloud credits so you can run your infrastructure and code for no money, probably for free for a couple of years.

14:20 And they also come in the form of mentorship and connections and information.

14:24 So you get a bunch of free GitHub credits, you get a bunch of Microsoft Cloud credits, you get many from OpenAI, a global leader in AI research and development as well.

14:36 And it's also not just about who you know, like it is so often for companies out there on their own, you get access to their mentorship network and giving you access to a pool of hundreds of mentors across a range of disciplines like idea validation, fundraising, management, coaching, sales, and marketing.

14:53 That's definitely an important one, as well as a bunch of specific technical aspects.

14:57 So you can even book a one-on-one meeting with these mentors, many of whom are founders themselves.

15:02 So make your idea a reality today with the critical support you'll get from Microsoft for Startups Founders Hub.

15:07 Visit pythonbytes.fm/foundershub2022.

15:11 The link is in your show notes.

15:12 Thank you, Microsoft, for supporting the show.

15:14 - Yeah, thanks a lot.

15:15 >> Is it time to rewrite some code, Brian?

15:18 >> Yeah. This was fun.

15:21 I ran across an article called Tools for Rewriting Python Code by Luke Plant.

15:27 By the way, it's a gorgeous blog formatting.

15:33 It looks like a book almost, but beside the point, we've covered a lot of these tools on the podcast.

15:40 Things like Black and Isort and Linters and things like that.

15:44 but it's kind of fun to see a whole bunch of things listed together.

15:48 So by rewriting, we mean, hopefully, tools that change your code, but hopefully for the better.

15:54 So we've got things like formatting, formatting and style guides like Black.

16:00 And another popular one is that, I don't know if we've covered, is YAPF.

16:05 Or yet another Python formatter, I think.

16:08 And it's similar ethos to Black, but it's more customizable.

16:14 So black, you can't, there's only a few options, but YAPF is often used by companies that have their own style guide to be able to customize it.

16:24 But it's a little more tweaky.

16:25 So you have to kind of get in there and set it up so that it follows your style guide.

16:30 So there's that.

16:31 There's AutoPep8.

16:32 Isort, which I really like, which reorders Python imports.

16:36 And so there's things like this, table format.

16:40 I have to play with this.

16:41 Makes it easy to align columns in your Python source code.

16:43 I kind of want to try this out because that's something I don't like about Black and other formatters sometimes is they muck up my tables.

16:52 But anyway, there's upgrade things, like PyUpgrade and Flint.

16:56 You've mentioned Flint a couple of times.

16:58 >> I'm a big fan of Flint.

17:00 I run it on Python Bytes website code, on DocPython, on the train site, and it's great.

17:06 Yeah.

17:06 >> Actually, I just got a pull request on one of my projects, and I'm pretty sure they just ran Flint over.

17:12 They're just going through and finding some projects and do a run in Flint and then doing PRs against them.

17:17 And I was slightly kind of annoyed by that, but also like, I didn't have to do it.

17:21 So yeah, thanks.

17:22 I grabbed it.

17:23 Type hints, which I didn't know about this stuff.

17:27 So I'm kind of have to look at this.

17:29 So things like pi annotate and monkey type to add, and there's a few others to add type hints to your--

17:37 - This is super interesting.

17:38 Adding type hints based on instrumented test suite runs.

17:42 So instrument, I mean, it watches what functions get called and it says, Hey, this perimeter was always a string.

17:47 This one was always a user object.

17:49 So here's your type parameter, colon string, colon user.

17:52 That's awesome.

17:53 Yeah.

17:53 Have you ever, and then I guess you know, I need to do this.

17:56 Try it.

17:57 yeah.

17:58 Yeah.

17:58 So I'm going to try these.

17:59 There's a few of them.

18:00 so anyway, interesting.

18:03 some refactoring stuff is, that I, it mostly talks about, how a lot of these refactoring tools are built into IDs.

18:12 And I'll have to say, I usually use an IDE-assisted thing, like PyLance or PyWrite, to do some refactoring.

18:20 But I actually don't use them as much as I probably should.

18:23 Usually do manual refactorings.

18:25 But anyway, and then some standalone ones, like Rope and Jedi.

18:29 And then the other category includes things like Shed, which I still have yet to try out.

18:36 I need to try that.

18:37 That combines a whole bunch of the tools.

18:39 But one of the parts that I was really excited about is I didn't know about libcst.

18:46 So this article talks about writing your own.

18:49 There's a project called libcst that apparently you can use to write your own.

18:56 It does a syntax tree thing and you can hopefully write your own reformatter.

19:03 So that might be fun.

19:05 - Okay, nice.

19:06 - And one of the recommendations is The documentation's a little overwhelming for libcst, so maybe use GitHub or libraries.io to find other projects that are using it and then see how they're using it.

19:19 And I love that way to understand how to use something.

19:23 - Yeah, I need pretty much what this does, but I wanna change these two things.

19:27 Let me copy that and go.

19:28 - Yeah, I guess that'd be another way to do it.

19:30 It's like fork black.

19:32 Like the people that forked black and made blue, which gotta love blue.

19:36 Wasn't listed here, but one of the things I wanted to bring up while we're right here is there's what there's upgrades like pyupgrade in flint.

19:47 There was one of them that does set up pyupgrade which upgrades set up py to set up that CFG.

19:54 I'd really like someone to figure out how to take all of your setup stuff and create a pyproject.toml file.

20:01 Yes, that would be excellent.

20:05 Anyway, cool stuff.

20:06 >> Setup Py, Tom alert, something.

20:09 >> Yeah.

20:10 >> Setup Py. Okay. Cool.

20:12 Yeah, this looks really useful.

20:13 It's a really nice taxonomy of ways to clean up your code, improve your code, modernize your code.

20:19 >> Yeah.

20:20 >> Yeah. Very cool. All right.

20:21 Let's go talk some web for a minute.

20:24 Ciro, who I know listen to the show because sometimes drops into the live chat and gives some advice or feedback, created this thing called Socketify.py.

20:36 So Socketify, I suppose the name is inspired by trying to do WebSockets really well, but it's a little more general web framework and server, as far as I can tell.

20:47 So the tagline or whatever is bringing WebSockets, HHPS, high-performance servers for PyPy3, that's the JIT version of Python, Python 3, as well as CPython.

21:00 So what's the website say for us?

21:03 So it's pretty interesting.

21:05 It's, if you look through here, you'll see, I guess we can see some of the features that has WebSocket support with Pub/Sub, fast HTTPS, I think that's probably the biggest thing that people care about.

21:18 It runs on all the versions.

21:20 So, you know, think kind of micro-Whiskey or UVicorn or something like that with a little bit of Flask type of stuff on top of it.

21:30 Okay. It has URL routing, sync and async function.

21:35 So it's kind of a mix of like a web server that is also a web framework.

21:39 Fast TLS. What else we got here?

21:43 This one's interesting for the async story is max back pressure, max payload and timeouts.

21:49 One of the problems that can happen if you have async code is your async code will just accept the request and it'll forward it on through and await some database call or wait some microservice other API call, and it can just way pile up on your server and then like slam the database.

22:06 And you might say, look, we only want to have 20 database queries in flight at a time.

22:10 So you can limit how much pressure the web server is putting onto the database, and it'll kind of slow it down and say, instead of accepting more requests or doing more of this work, just queue up the response like a non-async web server would do.

22:24 It has async support, ASGI web server support with extensions for Falcon, which is one of the web frameworks as well as a WSGI one.

22:34 And some new features coming, but the real selling point, the reason people might care to check this out is the performance.

22:40 So Falcon is pretty fast, UVCorn is pretty fast, but if you look at Socketify, I talked to Ciro and they're using the TechEmpower benchmarks.

22:50 I'll pull those up in a second.

22:51 I've actually pulled them up now.

22:52 So over here on mass announces, follow up.

22:55 We break a new record for Python.

22:57 No other web frameworks able to reach 6.2 million requests per second in the tech and power benchmarks.

23:04 As puts Python in the same ballpark is going rust and C++.

23:08 Then we pull this up.

23:09 What do we get?

23:09 We get waiting.

23:11 Ironic, isn't it?

23:12 Wait on that.

23:13 Well, look at this.

23:15 You've got socketify at 6.2 million requests per second on the tech and power benchmark and then Vibora and Gibranto.

23:22 And what's really interesting is like down here at 10, we have 360,000 for UVicorn, but follow me down here.

23:29 There's a couple of interesting ones.

23:31 Pyramid, go pyramid.

23:32 I love pyramid.

23:33 Python by stock Python or pyramid at the moment at a quarter million.

23:36 We make our way down, down, down, down, down, down, down, down, down.

23:40 Async flask is at 57,000.

23:42 straight flask is at 8,000 and let's see, we've got tornado at 40,000.

23:48 Here's another one at 50,000 for tornado turbo gears at 70.

23:52 Another one at 90.

23:53 And there's some variations on like some of the internal, like, is it PI PI versus CPython versus whatever.

23:59 There's a bunch of variations in here, but there's a, some, some surprises there.

24:03 Huh?

24:04 Yeah.

24:04 So, so here's the trade-off you got to make, you got to decide, right?

24:07 Like this, this framework is cool.

24:09 It's quite new with 230,000 stars, but it looks also quite promising.

24:14 So for most people, you might not need something like this.

24:18 It's kind of a lower level programming than say your standard Flask, right?

24:25 It doesn't have as many extensions, but it also, it has some, I mean, if you get that kind of performance and you need it, right here's a pretty cool option you could try out.

24:33 So anyway, I encourage people to have a look at it.

24:35 It looks pretty interesting.

24:36 It's also quite new.

24:38 You know, last commit six days ago.

24:40 So that's encouraging, right?

24:42 - Yeah, and also one of the things I like about projects like this, that are assuming they're doing something different to make things faster than, think outside the box, do something a little bit different than everybody else is doing.

24:55 Other people pay attention.

24:56 So the people that are, these other frameworks are paying attention to what's going on here, and everybody learns from each other.

25:04 So having a speed up in one area, maybe we can have somebody that take this and make the interface as easy to work with as like FastAPI or Flask or something.

25:15 >> Yeah, absolutely.

25:17 >> Or get some of the learnings from here and build those into the other frameworks as well.

25:23 Yeah, maybe not for everything you're doing, but if you have some project or some part of your project that needs to be super high speed, this is a good thing to take a look at.

25:35 >> Yeah, absolutely. I agree.

25:37 Put it in the interesting category and >> Congrats, Cyril. Some pretty eye-in performance there.

25:42 >> Yeah. Nice.

25:43 >> Well, I think that's it for all of our items, isn't it? Our main ones.

25:47 >> Yeah. I got a couple of extras.

25:49 >> Yeah, throw them in.

25:50 >> Yeah. I was actually going to cover this, but I think it's a little early.

25:56 It's a project called Mouse Bender from Brett Cannon.

26:00 The idea, I think, is around producing and consuming.

26:05 It says, producing consumed dependency lock files for Python.

26:09 And there's some goals for the project about, this project hopes to eventually provide a way to create reproducible installations for a virtual environment from a lock file.

26:23 And so there's a lot of stuff going on here, but it's a little early in the project.

26:27 So I just wanna point this out, and if people really care about packaging, maybe watch this.

26:34 I care about it, so I'm gonna be watching this project and see if there's any way where I can contribute possibly.

26:39 Anyway, mouse bender looks interesting.

26:42 I don't think it's ready to use for anything yet, but yeah, it looks a little interesting.

26:49 Yeah, it does. Nice work, Brett.

26:51 And I think I got this from Brett too, but I can't remember.

26:54 There's a page called devguide.python.org/versions.

27:01 We've got status of Python versions and a graphic for all the release cycles.

27:07 >> That's so cool. People need to see this graphic. This is cool.

27:10 >> Yeah. It's neat because it shows you all the old end-of-life ones, and how long they've been.

27:18 End-of-life for 2.6 was back in 2013.

27:23 What are you guys doing? If you're still using that.

27:24 >> They should put a skull and crossbones on the 2.7 and 2.6 or something.

27:29 >> But so you've got a whole bunch in end-of-life.

27:31 You got some in the security zone, which means if there's security fixes, they'll add those.

27:37 But then you only got like six months left of 3.7.

27:42 So if you're still using 3.7, it might be a good time to upgrade.

27:46 But it shows all the, the only one with feature is 3.12 right now, because that's the one that's being worked on.

27:53 It's a neat visual.

27:55 This page is pretty simple too.

27:57 At the bottom, you've got more specifics of when things are end of life.

28:01 But at the bottom, the description of what all these mean.

28:04 So what does feature versus end of life mean?

28:07 Things. Good thing.

28:09 >> Yeah, that's cool. I switched our website to run 3.11, by the way.

28:13 >> Nice.

28:14 >> Yeah, like a week ago.

28:15 It's still running, so that's good.

28:16 >> Yeah, I switched some of our test code at work to flip to 3.11.

28:23 One of my team members says, "I wonder if we're ready?" I'm like, "Oh, yeah, we've already switched." (laughing)

28:30 We've had a few, it's been doing it for a while.

28:32 - So, do you have any extras?

28:34 - Of course.

28:36 So I thought this would be the only thing that I would refer back to my website for, but then that write-up I did on Kaggy.

28:42 I'm gonna try to do a video version of that Kaggy Live With It thing, but I ended up realizing that that was gonna take way more time than I have this week, so I just wrote it up.

28:51 But another one I wrote up, people can just check this out, is sometimes you should build it yourself.

28:57 I'm embracing your not built here.

29:00 Maybe we should just build it.

29:01 I know we could buy it, but let's build it.

29:03 Sort of talking about some of the things I did at Talk Python as well as PythonBytes and like how sometimes you sort of get into this cascade of things where new possibilities arise, right?

29:15 So for example, one of the parts that says integrations abound.

29:18 So for our live stream, right?

29:20 We have our live stream here on YouTube at the moment and then it becomes the podcast.

29:25 says because the way we put all this stuff together is not only do we do our live stream, but I push a button on the stream deck that announces this on Twitter and else that I'm asked to nine, I'm asked it on puts the website into live stream mode, but then that platform will, you know, Python bites will take the, the YouTube live stream, grab it's carefully crafted thumbnail, pull that down to actually become the social share image.

29:49 So if somebody shares the episode on mastodon or Twitter, all the way back to the thing we did with the live stream is actually already producing the, the image.

29:58 And so it just talks about like, you know, sometimes because I always have had this tendency, like, well, don't build it yourself, find something that works, find something that's out there and you have to break down and build it yourself.

30:08 And I'm like, you know what?

30:09 There's actually some really cool stuff that we've been able to accomplish because we built it ourselves.

30:13 So here's a kind of a, an essay on that, I would say.

30:15 Nice.

30:16 Yeah.

30:16 So people can check that out.

30:17 Also back to the live with it side of things.

30:20 I'm trying to support smaller companies and be less just integrated into like one big tech giant.

30:29 So for my personal email, I've got a domain, mkennedy.tech is what I went with, which redirects to my other one for my blog.

30:38 But then that was hosted on Gmail on like a paid $6 a month email, docs, whatever.

30:45 And I just got really tired of trying to juggle two Gmail accounts, two Google Drive accounts, to Google calendars, all these things.

30:52 I'm like, why am I doing this?

30:53 Why don't I get a dedicated cool place that is like even a little more on the privacy side as well.

30:58 So I'm trying to try and go all in on Proton.

31:02 Do you have a Proton account to use this?

31:04 - I don't.

31:05 - Well, for a long time it was just email and like you can have like a proton.me or a proton.com or whatever.

31:10 But I realized recently that they have other features where if you pay $7 a month, you get access to all of their things like their calendar and drive and VPN, but that doesn't matter to me.

31:23 But you get three custom domains and 15 email addresses plus catch all email addresses and hide my email aliases.

31:33 So I can have all of my different domains all have email addresses and that all basically resolve back to my personal email.

31:41 - Ooh, cool.

31:42 - Isn't that cool?

31:42 And so I was at Google and I just changed the MX records and now I'm at Proton.

31:46 And if I like it, I'll stay here.

31:47 not I'll change my next records again and I'll be somewhere else.

31:50 But try to take control of the e-mail so it's my thing, not something@gmail.com no matter what you think about it.

31:57 Anyway, people can check that out.

31:59 I just want to mostly point out Proton looks like it has more to offer than it used to.

32:04 >> How about support?

32:05 Can you just use your normal e-mail client to access all this stuff?

32:11 >> Proton is like end-to-end encryption, which is a little tricky, but they have, What is it? It's called Proton Bridge.

32:19 So let's go to the mail thing.

32:22 So this is it.

32:23 So what you can do is you can run this thing on Mac or Windows or Linux.

32:27 And it's like a little, you connect to basically localhost for your email client, for your email server, and it talks to Proton with the end-to-end encryption.

32:37 And then it just does IMAP at the last few, I don't know, it's not even the last step of the network, right?

32:42 It's just, it's a loopback.

32:43 And so yes, you can connect your, your usual things too with that.

32:47 Okay.

32:47 Cool.

32:48 Yeah.

32:48 All right.

32:48 another quick one.

32:49 There was a court in Germany that, stand on the kind of the same theme that decided that, Google fonts usage of Google fonts.

32:57 Like if you look at a lot of web pages, they'll internally have slash slash fonts dot google.com some like open whatever, right?

33:05 Some, some font name and like the weights of it that exchanges a bunch of cookies and tells Google about the visitors.

33:11 Yay.

33:12 And of course it does because even the YouTube thumbnail picture does.

33:16 why wouldn't it?

33:18 So, bunny bunny.net, which is the awesome CDN that we've were, I talked about a couple of times ago, a couple episodes ago, they released this thing called bunny fonts.

33:28 And so bunny fonts is epic.

33:30 They even talk about like this, this court ruling and, GDPR and stuff.

33:34 But the idea is it's a, the bunny fonts is a drop-in placement for Google, - Google fonts.

33:42 - For Google fonts, yeah.

33:42 So whatever URL you would put into your website to get the fonts from Google, you just change the word Google to bunny.

33:49 - Wow, that's really a drop in.

33:51 - Yeah, and it's the same API, it's just you change the word and you get like super fast CDN backed, zero privacy leaking fonts.

34:01 So you just, it's super easy to adopt, right?

34:03 It's pretty cool.

34:04 - Not zero privacy, hyper, yeah, hyper.

34:07 - Zero privacy leaking.

34:09 - Yeah. - Zero privacy trade offs or whatever, where's their, here we go, here's their fonts.

34:14 But anyway. - That's cool.

34:15 - Isn't that cool? - Yeah.

34:17 - Yeah, so super easy. - Since it's a bunny, I mean.

34:20 - You don't even have to have an account, and it's a cute bunny, I mean, their bunny, their iconography is really, really good.

34:25 So there's a place where you go pick the font.

34:28 So you come over here and say, I'm interested in Houma, or whatever, I don't even know a font.

34:34 Let's say you're interested in this one, and you could just like say, I wanna add it, and it gives you like the little URL, which is just Fonstop Bunny instead of the Google one.

34:44 So yeah, it's pretty cool.

34:45 Anyway, that's all I got for my extras.

34:47 - Well, that's great.

34:48 - Yeah.

34:49 - Good stuff.

34:50 - All right, I have a joke for you.

34:51 - Oh, let's do a joke.

34:52 - Are you ready?

34:53 - Yeah.

34:54 - You've heard of ChatGPT, I'm sure.

34:57 - I'm trying to not hear about it.

34:59 - I know, I logged out so I could specifically show the homepage, so I gotta get back.

35:05 Anyway, ChatGP, I'm trying to not hear about it as well. My brother actually shared this with me. Him and his son, my nephew, were playing with it, doing some coding stuff. Somehow they ran across this example. So this is a tweet from someone else that he shared with me. Riley, the tweet is not my brother. It says OpenAI's new ChatGPT explains the worst case timing complexity of the bubble sort algorithm. Okay, so what you can do is you can say, give me a step by step analysis of the worst case time complexity of the bubble sort algorithm with Python code examples, right?

35:39 So that's not a joke, right?

35:41 That's helpful.

35:42 It could tell you, here's the situation, and it could like show you with Python code examples.

35:46 But the next part makes it awesome.

35:48 Give me the explanation with Python code examples, but write every sentence in the speaking style of a fast talking wise guy from a 1940s gangster movie.

35:58 - This is good.

35:59 - Are you ready?

36:00 - Yeah.

36:01 - Okay.

36:02 All right, pal, listen up.

36:03 She's a real simple one, but the worst case time complexity, that's a whole different story.

36:07 You see, in the worst case, every element in the list got to be swapped.

36:10 So the time complexity is going to be proportional to the square, the length of the list.

36:14 Get it?

36:15 Here's the Python code to help you out.

36:16 See if you follow along.

36:17 There's some Python code with comments, by the way.

36:20 See, in the worst case, the while loop is going to keep looping until there ain't no more swaps to be made.

36:26 In a loop, it's going to go through every element in the list.

36:29 So the time complexity is going to be proportional to the square of the list.

36:31 Get it?

36:32 What do you think?

36:33 >> This is good.

36:35 >> It's pretty fun, right?

36:36 >> Yeah.

36:37 >> Anyway, I don't know.

36:39 The chat GP stuff is interesting.

36:42 It's scary, but it's also funny.

36:44 >> But does the algorithm work?

36:47 >> I haven't run it, but I think so.

36:49 >> It looks like the right, at least first glance, it looks right.

36:53 >> I don't know. I could always go and copy the code and try to run it. What do you think?

37:00 - Yeah, hang in there.

37:01 - It's like too much work.

37:02 - No, oh, the indent, the indent is off.

37:05 That's, yeah, I'll, you know what?

37:08 I'll run it and report for next time.

37:10 See if the wise guy's code is actually any good.

37:13 - Yeah, I'm up for, always up for volunteering you for work.

37:16 - Nice, yeah.

37:19 - Anyway, thanks.

37:20 - Yeah, thanks. - That was funny.

37:21 - Yeah, it was.

37:22 All right, see you later.

Back to show page