WEBVTT

00:00:00.020 --> 00:00:05.460
<v Brian Okken>Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:00:05.880 --> 00:00:11.160
<v Brian Okken>This is episode 457, and it's being recorded on November 11th, 2025.

00:00:11.920 --> 00:00:12.700
<v Brian Okken>And I'm Brian Okken.

00:00:12.940 --> 00:00:13.840
<v Michael Kennedy>And I'm Michael Kennedy.

00:00:14.280 --> 00:00:19.860
<v Brian Okken>Wow, nowhere. Oh, it's 11-11. It's corduroy day. I totally forgot to wear corduroy today.

00:00:20.200 --> 00:00:22.160
<v Michael Kennedy>I love it. Is that because the vertical stripes?

00:00:22.660 --> 00:00:23.120
<v Michael Kennedy>Yeah, yeah.

00:00:23.120 --> 00:00:23.420
<v Michael Kennedy>Vertical grooves.

00:00:23.920 --> 00:00:28.880
<v Michael Kennedy>Yeah, yeah. I love it. I have no corduroy on either. We missed the opportunity.

00:00:28.980 --> 00:00:32.240
<v Brian Okken>some stripes on your, it's not corduroy, but your sweater.

00:00:32.380 --> 00:00:34.160
<v Michael Kennedy>Yeah, almost a sweater, almost pulled it off.

00:00:34.800 --> 00:00:40.140
<v Brian Okken>Anyway, we'd like to thank everybody that supports us through going to

00:00:40.610 --> 00:00:43.720
<v Brian Okken>doing Talk Python training or the pytest course,

00:00:44.380 --> 00:00:46.360
<v Brian Okken>Patreon supporters or people that have bought our books.

00:00:47.120 --> 00:00:50.640
<v Brian Okken>We really, really appreciate all of the support and it keeps us going.

00:00:51.000 --> 00:00:57.120
<v Brian Okken>Also love to hear from people on Bluesky, on Mastodon and through email.

00:00:57.400 --> 00:01:01.900
<v Brian Okken>So you can go to the contact us on pythonbytes.fm.

00:01:02.260 --> 00:01:05.580
<v Brian Okken>And there's the links to all the Bluesky Mastermind,

00:01:05.710 --> 00:01:07.020
<v Brian Okken>all those things to get all of us.

00:01:07.640 --> 00:01:10.040
<v Brian Okken>We actually have a couple items today from listeners.

00:01:10.340 --> 00:01:12.940
<v Brian Okken>So feel free to send us things.

00:01:13.700 --> 00:01:15.660
<v Brian Okken>If you'd like to join the show live,

00:01:15.900 --> 00:01:18.400
<v Brian Okken>and even if it's on a weird time like this week,

00:01:19.300 --> 00:01:21.220
<v Brian Okken>you can find out when it's going to happen next

00:01:21.380 --> 00:01:23.800
<v Brian Okken>by going to pythonbytes.fm/live.

00:01:24.820 --> 00:01:28.520
<v Brian Okken>And, you know, jump on and talk with us while we're recording.

00:01:28.680 --> 00:01:28.960
<v Brian Okken>It's fun.

00:01:29.300 --> 00:01:33.760
<v Brian Okken>Also, you don't need to take notes because we're going to send you all the links.

00:01:34.200 --> 00:01:38.320
<v Brian Okken>Well, they're in the show notes, but we'll also send them directly to your inbox if you

00:01:38.480 --> 00:01:44.780
<v Brian Okken>sign up to be a friend of the show and go to pythonbytes.fm and sign up for the newsletter.

00:01:45.220 --> 00:01:46.900
<v Brian Okken>I think that's all of the stuff.

00:01:47.460 --> 00:01:50.160
<v Brian Okken>So let's jump into the first item, Michael.

00:01:50.840 --> 00:01:52.760
<v Michael Kennedy>Let's talk about it now.

00:01:52.960 --> 00:02:00.940
<v Michael Kennedy>I want to talk about something called HTTP tap at HTTP tap.dev. Now this one, it's a little bit

00:02:01.260 --> 00:02:08.240
<v Michael Kennedy>like HTTP pi, HTTP pi, I don't know how you really pronounce that correctly, which is my go to

00:02:08.729 --> 00:02:15.460
<v Michael Kennedy>anytime I need to test something on the terminal or that sort of thing. HTTP pi is because, you know,

00:02:15.580 --> 00:02:20.240
<v Michael Kennedy>it's like curl or whatever, but it gives you lots more stats, gives you more information. And this,

00:02:20.380 --> 00:02:21.380
<v Michael Kennedy>This is a little bit like that.

00:02:21.780 --> 00:02:24.700
<v Michael Kennedy>If you wanted to go into, say, your Chrome DevTools or something

00:02:25.120 --> 00:02:28.780
<v Michael Kennedy>and say, "Hey, I'm requesting this page or this URL

00:02:28.920 --> 00:02:29.980
<v Michael Kennedy>or this API endpoint.

00:02:30.100 --> 00:02:30.880
<v Michael Kennedy>It's a little bit slow.

00:02:31.380 --> 00:02:32.180
<v Michael Kennedy>It's a little bit funky.

00:02:32.880 --> 00:02:33.420
<v Michael Kennedy>What's going on?

00:02:33.460 --> 00:02:34.600
<v Michael Kennedy>Where's the problem?"

00:02:34.660 --> 00:02:35.600
<v Michael Kennedy>- Yeah. - If it's getting hung up,

00:02:35.700 --> 00:02:37.220
<v Michael Kennedy>is it connecting to the server

00:02:37.540 --> 00:02:41.260
<v Michael Kennedy>or is it the backend app server, like Grinny

00:02:41.260 --> 00:02:42.480
<v Michael Kennedy>and whoever is not responding?

00:02:42.920 --> 00:02:44.380
<v Michael Kennedy>So that's what this is all about.

00:02:45.460 --> 00:02:48.720
<v Michael Kennedy>And it's built, I believe it's built with rich or textual.

00:02:48.860 --> 00:02:52.720
<v Michael Kennedy>I can't remember how far down the Will McGugan train it goes,

00:02:52.800 --> 00:02:54.440
<v Michael Kennedy>but it definitely is built on some of those.

00:02:54.740 --> 00:02:55.260
<v Michael Kennedy>Built with Python,

00:02:56.180 --> 00:02:58.640
<v Michael Kennedy>although that's not necessarily that important, right?

00:02:58.780 --> 00:03:00.660
<v Michael Kennedy>It's just I guess it's easier to make improvements to,

00:03:00.780 --> 00:03:03.200
<v Michael Kennedy>but it's more just a tool that anyone doing web stuff

00:03:03.820 --> 00:03:05.820
<v Michael Kennedy>with Python might be interested in.

00:03:06.020 --> 00:03:09.520
<v Michael Kennedy>And I pulled up a little example of just asking Talk Python,

00:03:10.040 --> 00:03:11.680
<v Michael Kennedy>acptptap, then talkpython.fm,

00:03:12.080 --> 00:03:13.240
<v Michael Kennedy>and it says, here's the analysis.

00:03:13.840 --> 00:03:15.120
<v Michael Kennedy>And apparently there's only one step,

00:03:15.200 --> 00:03:16.560
<v Michael Kennedy>maybe if there were redirects or something,

00:03:16.940 --> 00:03:21.980
<v Michael Kennedy>It would show multi-stage flows, but there's no redirects, so there's not.

00:03:22.330 --> 00:03:25.380
<v Michael Kennedy>It shows you the IP address, the TLS version, the cipher,

00:03:25.980 --> 00:03:29.700
<v Michael Kennedy>when the certificate expires, the status, the size, the server.

00:03:30.190 --> 00:03:32.080
<v Michael Kennedy>It gets all of that stuff right, which is pretty cool.

00:03:33.100 --> 00:03:35.940
<v Michael Kennedy>Then it has this waterfall-tiered sort of diagram.

00:03:36.290 --> 00:03:37.980
<v Michael Kennedy>It says the request timeline.

00:03:38.160 --> 00:03:42.680
<v Michael Kennedy>It took 29 milliseconds for DNS to figure out where the heck that was.

00:03:42.960 --> 00:03:45.080
<v Michael Kennedy>I've been on vacation. I haven't been going to the website.

00:03:45.440 --> 00:03:47.000
<v Michael Kennedy>So I had to go get it from the internet.

00:03:47.380 --> 00:03:49.920
<v Michael Kennedy>And then it took 80 milliseconds to connect to the server.

00:03:50.360 --> 00:03:52.940
<v Michael Kennedy>By the way, it's about 80 milliseconds ping time.

00:03:53.100 --> 00:03:55.380
<v Michael Kennedy>So you got to keep that in mind when all these numbers, right?

00:03:55.480 --> 00:03:59.200
<v Michael Kennedy>Like that's East Coast, West Coast, US, 2,500 miles.

00:03:59.680 --> 00:04:01.820
<v Michael Kennedy>So connect 80 milliseconds.

00:04:02.300 --> 00:04:04.580
<v Michael Kennedy>TLS took 130 milliseconds.

00:04:05.060 --> 00:04:08.680
<v Michael Kennedy>So if you ever see your browser doing like keep alive type of stuff,

00:04:09.120 --> 00:04:10.640
<v Michael Kennedy>that's a big savings right there.

00:04:10.680 --> 00:04:12.560
<v Michael Kennedy>That's almost 200 milliseconds savings

00:04:13.060 --> 00:04:14.960
<v Michael Kennedy>if it doesn't have to keep doing that over and over, right?

00:04:15.040 --> 00:04:15.580
<v Michael Kennedy>So that's pretty nice.

00:04:15.870 --> 00:04:21.060
<v Michael Kennedy>And then you can see it's actually sending the request and waiting for the response.

00:04:21.840 --> 00:04:24.880
<v Michael Kennedy>So it goes out, comes back, takes 170 milliseconds.

00:04:25.420 --> 00:04:27.320
<v Michael Kennedy>Again, ping time in there as well.

00:04:27.510 --> 00:04:30.720
<v Michael Kennedy>And then the transfer is a whopping 4.3 milliseconds.

00:04:31.020 --> 00:04:32.100
<v Michael Kennedy>So this is pretty cool.

00:04:32.240 --> 00:04:34.280
<v Michael Kennedy>A really quick view of just seeing what's going on, right, Brian?

00:04:34.660 --> 00:04:36.940
<v Brian Okken>Yeah, actually, I love that.

00:04:37.920 --> 00:04:44.840
<v Brian Okken>Very useful, especially if you've got some lag issues or some part of your website that's a little slow.

00:04:44.880 --> 00:04:46.300
<v Brian Okken>you can look at what's going on.

00:04:46.670 --> 00:04:47.720
<v Brian Okken>Is it DNS?

00:04:48.220 --> 00:04:49.560
<v Brian Okken>Is it the transfer?

00:04:50.300 --> 00:04:51.480
<v Brian Okken>Where's this delay coming from?

00:04:51.880 --> 00:04:53.400
<v Brian Okken>I mean, it's not super fine-grained,

00:04:53.540 --> 00:04:54.480
<v Brian Okken>but this is pretty good.

00:04:54.640 --> 00:04:56.000
<v Michael Kennedy>Yeah, well, there's just, yeah, for sure.

00:04:56.070 --> 00:04:57.460
<v Michael Kennedy>And there's a lot of stuff involved, right?

00:04:57.660 --> 00:04:58.620
<v Michael Kennedy>There's, like you said,

00:04:58.770 --> 00:05:00.160
<v Michael Kennedy>the DNS might be taking forever,

00:05:00.290 --> 00:05:01.780
<v Michael Kennedy>which could be part of the problem,

00:05:02.040 --> 00:05:02.860
<v Michael Kennedy>or who knows, right?

00:05:02.980 --> 00:05:03.820
<v Michael Kennedy>There's just a lot of things.

00:05:04.000 --> 00:05:08.740
<v Michael Kennedy>So really neat to see this little UI built in Python.

00:05:09.219 --> 00:05:12.280
<v Brian Okken>Yeah, and I guess we have to say it.

00:05:12.500 --> 00:05:13.080
<v Brian Okken>It's always DNS.

00:05:13.740 --> 00:05:14.240
<v Brian Okken>It's always DNS.

00:05:14.360 --> 00:05:15.080
<v Brian Okken>I mean, that's...

00:05:16.080 --> 00:05:17.900
<v Brian Okken>It's not always DNS, but yeah.

00:05:18.780 --> 00:05:18.880
<v Brian Okken>Anyway.

00:05:19.260 --> 00:05:20.020
<v Michael Kennedy>Yeah, but often.

00:05:20.960 --> 00:05:21.240
<v Brian Okken>Often.

00:05:21.510 --> 00:05:22.940
<v Brian Okken>No, I think this is great.

00:05:23.300 --> 00:05:23.800
<v Brian Okken>This is cool.

00:05:24.340 --> 00:05:26.520
<v Brian Okken>I've got actually some side projects

00:05:26.610 --> 00:05:30.100
<v Brian Okken>that I've got some weird speed issues,

00:05:30.230 --> 00:05:31.180
<v Brian Okken>and I don't know why.

00:05:31.540 --> 00:05:34.160
<v Brian Okken>And even just looking at some of this stuff,

00:05:34.300 --> 00:05:36.200
<v Brian Okken>help out to figure out where to start debugging.

00:05:36.680 --> 00:05:38.600
<v Michael Kennedy>Yeah, you can get some of these types of things

00:05:39.020 --> 00:05:40.880
<v Michael Kennedy>in the dev tools and browsers,

00:05:41.120 --> 00:05:42.020
<v Michael Kennedy>but this is really nice.

00:05:42.260 --> 00:05:43.740
<v Michael Kennedy>It's visual, it's colorful, it's graphical.

00:05:44.240 --> 00:05:44.480
<v Brian Okken>I love it.

00:05:44.480 --> 00:05:44.800
<v Brian Okken>I like it.

00:05:44.960 --> 00:05:45.660
<v Brian Okken>And it's command line.

00:05:46.080 --> 00:05:46.960
<v Brian Okken>Yay, we love command line.

00:05:47.140 --> 00:05:47.440
<v Brian Okken>Yay.

00:05:48.340 --> 00:05:48.500
<v Brian Okken>Okay.

00:05:50.660 --> 00:05:55.120
<v Brian Okken>I'm not usually, I have to admit, I click on listicles all the time.

00:05:55.220 --> 00:05:59.840
<v Brian Okken>But we don't cover very many listicles on the show, but I'm going to cover one today.

00:06:01.100 --> 00:06:03.820
<v Brian Okken>I actually, oh, my aspect ratio is off.

00:06:04.700 --> 00:06:05.220
<v Brian Okken>There we go.

00:06:05.440 --> 00:06:05.740
<v Brian Okken>Here we go.

00:06:07.000 --> 00:06:08.120
<v Brian Okken>This is from PyCharm.

00:06:08.380 --> 00:06:11.119
<v Brian Okken>It's actually from Evgenia Verbena.

00:06:12.040 --> 00:06:12.620
<v Brian Okken>That's a cool name.

00:06:13.400 --> 00:06:19.240
<v Brian Okken>10 smart performance hacks for faster Python code.

00:06:19.560 --> 00:06:25.940
<v Brian Okken>And there's some that, well, actually, I think stuff like this is really good to talk to people about

00:06:26.060 --> 00:06:28.460
<v Brian Okken>because we don't really think about performance too much.

00:06:28.780 --> 00:06:31.880
<v Brian Okken>I mean, when you're starting Python, you don't think about it too much.

00:06:32.060 --> 00:06:34.460
<v Brian Okken>It's hopefully, you know, hopefully you don't.

00:06:34.580 --> 00:06:37.520
<v Brian Okken>There's, we don't want people to prematurely optimize.

00:06:37.960 --> 00:06:44.020
<v Brian Okken>But there's just some habits that maybe are decent to get into that avoid problems later on.

00:06:44.210 --> 00:06:46.940
<v Brian Okken>And so that's one of the reasons why I like going through this.

00:06:48.320 --> 00:06:53.020
<v Brian Okken>Oh, nice menu on the right side, also with all the hacks on the right.

00:06:53.360 --> 00:07:00.840
<v Brian Okken>Anyway, the first one, not too surprising if you've done through any leak code stuff or whatever,

00:07:00.990 --> 00:07:04.020
<v Brian Okken>is leverage set for membership testing.

00:07:04.600 --> 00:07:08.580
<v Brian Okken>So if you've got a big list, you can throw the list into a set,

00:07:08.780 --> 00:07:13.960
<v Brian Okken>and then you can find out easily if something's in the list by putting it in a set.

00:07:14.839 --> 00:07:19.160
<v Brian Okken>And oddly, that speeds things up quite a bit, like drastically.

00:07:20.240 --> 00:07:23.140
<v Brian Okken>List lookup versus set lookup is super fast.

00:07:24.500 --> 00:07:25.800
<v Michael Kennedy>Same predictionaries, too.

00:07:26.040 --> 00:07:29.720
<v Michael Kennedy>If you're looking up by some kind of key, either one, it's ridiculous.

00:07:30.260 --> 00:07:30.440
<v Brian Okken>Yeah.

00:07:32.000 --> 00:07:34.080
<v Brian Okken>Like I said, some not too surprising.

00:07:34.420 --> 00:07:38.500
<v Brian Okken>Slots are great if you're going to use classes or data classes even.

00:07:39.740 --> 00:07:43.940
<v Brian Okken>If it's not going to grow over time, you can define slots and stuff.

00:07:44.900 --> 00:07:50.320
<v Brian Okken>And then the lookup for each element within a data class is a lot faster with slots.

00:07:52.099 --> 00:07:55.900
<v Brian Okken>I want to jump around because there were some that I didn't really realize

00:07:56.680 --> 00:07:58.680
<v Brian Okken>or I just didn't think about before.

00:07:59.140 --> 00:08:01.680
<v Brian Okken>And one of them is use math functions instead of operators.

00:08:01.760 --> 00:08:03.760
<v Brian Okken>and I guess I wouldn't

00:08:04.080 --> 00:08:05.020
<v Brian Okken>some of these are weird

00:08:06.080 --> 00:08:08.380
<v Brian Okken>so math.square

00:08:08.820 --> 00:08:10.240
<v Brian Okken>sqrt for square root

00:08:10.620 --> 00:08:12.160
<v Brian Okken>is faster and more accurate

00:08:12.440 --> 00:08:14.260
<v Brian Okken>than raising a number to the power of

00:08:14.700 --> 00:08:16.060
<v Brian Okken>0.5 using

00:08:16.500 --> 00:08:17.660
<v Brian Okken>exponentation operator

00:08:17.900 --> 00:08:19.860
<v Brian Okken>I wouldn't do that anyway because that's weird

00:08:20.100 --> 00:08:21.280
<v Brian Okken>it just looks weird

00:08:22.199 --> 00:08:23.900
<v Brian Okken>I don't know, bad code style

00:08:24.420 --> 00:08:25.640
<v Brian Okken>but there's a whole bunch of others

00:08:25.960 --> 00:08:27.600
<v Brian Okken>similarly the sine function exponent

00:08:28.200 --> 00:08:30.239
<v Brian Okken>log, those are really fast operators

00:08:30.260 --> 00:08:36.520
<v Brian Okken>in math so go ahead and utilize math and uh so that's a good pointer pre-allocate memory

00:08:36.840 --> 00:08:41.780
<v Brian Okken>with known sizes now this is some like an old trick that i think that i didn't really think

00:08:41.820 --> 00:08:45.780
<v Brian Okken>that it was a huge difference and it looks like one of the things that's it's cool in this article

00:08:45.860 --> 00:08:51.000
<v Brian Okken>it does the pre-allocated time versus or the uh before and after times so there's a bit of

00:08:51.320 --> 00:08:59.719
<v Brian Okken>you know uh 0.01 second speed up um but so the trick is just to uh i guess have an array with

00:08:59.740 --> 00:09:01.800
<v Brian Okken>If you're going to fill an array anyway,

00:09:02.000 --> 00:09:05.260
<v Brian Okken>may as well just fill it with some zeros or something initially.

00:09:05.900 --> 00:09:09.460
<v Brian Okken>And then it seems like a waste of time to fill it with zeros

00:09:09.760 --> 00:09:10.960
<v Brian Okken>because you're going to fill everything up.

00:09:11.220 --> 00:09:14.160
<v Brian Okken>But it isn't because it's the allocation that takes a little bit longer

00:09:14.360 --> 00:09:15.860
<v Brian Okken>than the filling it with zeros.

00:09:16.880 --> 00:09:20.380
<v Michael Kennedy>Yeah, and Brian, it's worth thinking through how that goes a little bit

00:09:20.560 --> 00:09:22.680
<v Michael Kennedy>because if you just go append, append, append,

00:09:22.940 --> 00:09:25.300
<v Michael Kennedy>and this is something I don't do and it's inspiring me to consider,

00:09:25.460 --> 00:09:26.480
<v Michael Kennedy>well, maybe I should.

00:09:26.840 --> 00:09:30.140
<v Michael Kennedy>But the array doesn't know if you're going to put a million items in there.

00:09:30.390 --> 00:09:34.880
<v Michael Kennedy>Every time you do like a array.append or list.append, it doesn't go, guess what?

00:09:35.040 --> 00:09:35.900
<v Michael Kennedy>We're going to add a million, right?

00:09:35.990 --> 00:09:37.180
<v Michael Kennedy>It's like, well, what about 16?

00:09:37.960 --> 00:09:39.020
<v Michael Kennedy>What about 32 of them?

00:09:39.300 --> 00:09:40.040
<v Michael Kennedy>Oh, now we need more.

00:09:40.110 --> 00:09:41.360
<v Michael Kennedy>Okay, what about 64 of them?

00:09:41.480 --> 00:09:45.760
<v Michael Kennedy>You know, it just, it has to keep reallocating and copying as you build this up.

00:09:45.900 --> 00:09:46.400
<v Michael Kennedy>So, yeah.

00:09:46.520 --> 00:09:49.380
<v Brian Okken>And I don't remember how, I mean, it's a little smarter than that.

00:09:49.530 --> 00:09:52.680
<v Brian Okken>So I think it like does, like doubles it in size or takes a chunk.

00:09:53.160 --> 00:09:54.360
<v Brian Okken>I can't remember what it does.

00:09:54.380 --> 00:09:56.100
<v Michael Kennedy>Yeah, it's not allocating every one, right?

00:09:56.140 --> 00:09:56.640
<v Michael Kennedy>It's got an awkward.

00:09:56.740 --> 00:09:56.780
<v Michael Kennedy>Right.

00:09:57.080 --> 00:09:57.560
<v Michael Kennedy>Or heuristic.

00:09:57.900 --> 00:10:00.460
<v Brian Okken>But if you already know how big it's going to be,

00:10:00.770 --> 00:10:02.960
<v Brian Okken>you can just tell it to do it once, which is cool.

00:10:03.110 --> 00:10:05.280
<v Brian Okken>But I don't really think about that too much.

00:10:06.640 --> 00:10:09.360
<v Brian Okken>A couple of the ones down below I really wanted to cover.

00:10:09.600 --> 00:10:13.240
<v Brian Okken>This was avoid exception handling and hot loops.

00:10:13.780 --> 00:10:15.360
<v Brian Okken>And I am guilty of this too,

00:10:15.490 --> 00:10:17.580
<v Brian Okken>because I try to have my exception handling

00:10:17.830 --> 00:10:20.960
<v Brian Okken>as close to the place where it can go wrong as possible.

00:10:21.460 --> 00:10:23.300
<v Brian Okken>Just as it's a visual thing

00:10:23.860 --> 00:10:26.180
<v Brian Okken>and a code readability thing to have this tight.

00:10:26.980 --> 00:10:28.520
<v Brian Okken>have the try right around it.

00:10:28.680 --> 00:10:31.120
<v Brian Okken>Like the example has a zero division error,

00:10:31.520 --> 00:10:33.380
<v Brian Okken>has the try and accept right there.

00:10:34.079 --> 00:10:37.600
<v Brian Okken>However, that might slow down a little bit.

00:10:38.480 --> 00:10:40.560
<v Brian Okken>And it did, in this case,

00:10:40.820 --> 00:10:42.000
<v Brian Okken>was the try and accept on this one.

00:10:42.240 --> 00:10:42.880
<v Brian Okken>It's just not there.

00:10:43.100 --> 00:10:44.760
<v Michael Kennedy>I think the top one versus the bottom one.

00:10:44.980 --> 00:10:46.600
<v Michael Kennedy>Yeah, but there's no try and accept at the top.

00:10:46.860 --> 00:10:47.920
<v Michael Kennedy>That's the baseline.

00:10:48.360 --> 00:10:48.760
<v Michael Kennedy>Oh, okay.

00:10:48.860 --> 00:10:50.620
<v Michael Kennedy>The conditional check versus.

00:10:51.280 --> 00:10:52.700
<v Michael Kennedy>It's like checking for the condition

00:10:52.840 --> 00:10:55.200
<v Michael Kennedy>that would cause the exception to avoid the exception.

00:10:55.760 --> 00:10:56.720
<v Brian Okken>Oh, OK.

00:10:57.070 --> 00:10:59.580
<v Brian Okken>I guess I would just put the try and accept at the top

00:11:00.330 --> 00:11:03.020
<v Brian Okken>or around the larger one as a better comparison.

00:11:03.360 --> 00:11:03.560
<v Brian Okken>Anyway.

00:11:04.300 --> 00:11:05.100
<v Brian Okken>Yeah, I agree.

00:11:05.300 --> 00:11:06.000
<v Brian Okken>But this is a big one.

00:11:06.320 --> 00:11:07.680
<v Brian Okken>But that's a big one.

00:11:08.500 --> 00:11:12.720
<v Brian Okken>Then we get into some really, except there's exception handling,

00:11:13.620 --> 00:11:16.360
<v Brian Okken>using iter tools for combinatorial operations.

00:11:16.700 --> 00:11:18.100
<v Brian Okken>And this is huge.

00:11:18.650 --> 00:11:23.480
<v Brian Okken>If you're working with chunks of lists or chunks of stuff,

00:11:23.860 --> 00:11:26.580
<v Brian Okken>using iter tools and knowing what's in there,

00:11:26.910 --> 00:11:28.660
<v Brian Okken>it speeds up a huge amount.

00:11:29.030 --> 00:11:32.120
<v Brian Okken>So using iter tools versus loops for,

00:11:32.510 --> 00:11:34.000
<v Brian Okken>I forget what the example is here,

00:11:34.360 --> 00:11:36.900
<v Brian Okken>but the speed up is using product

00:11:37.500 --> 00:11:40.920
<v Brian Okken>and the speed up is massive from, you know,

00:11:40.930 --> 00:11:43.480
<v Brian Okken>like what, 440 times bigger or something?

00:11:44.140 --> 00:11:46.840
<v Brian Okken>Or 4 divided by, oh, 5 divided by 20.

00:11:47.140 --> 00:11:47.440
<v Brian Okken>That's 4.

00:11:47.710 --> 00:11:48.820
<v Brian Okken>So it's 4 times speed up.

00:11:49.860 --> 00:11:50.500
<v Brian Okken>Math is hard.

00:11:51.460 --> 00:11:54.240
<v Brian Okken>BISect is also a great thing to look at.

00:11:54.760 --> 00:12:01.040
<v Brian Okken>And yeah, anyway, just some cool, wow, that's a massive speedup, 100 times speedup for using

00:12:01.240 --> 00:12:02.440
<v Brian Okken>BISect in the right places.

00:12:03.000 --> 00:12:08.080
<v Brian Okken>So finding out places where you can use BISect or iter tools and just knowing that those

00:12:08.140 --> 00:12:10.200
<v Brian Okken>are there to look them up, those are good speedups.

00:12:10.520 --> 00:12:13.960
<v Brian Okken>Anyway, occasionally it's good to think about how fast is my code going?

00:12:14.220 --> 00:12:21.420
<v Michael Kennedy>You know, I think we could summarize up that article by basically saying, know the standard

00:12:21.800 --> 00:12:23.520
<v Michael Kennedy>know your data structures, mostly.

00:12:24.080 --> 00:12:24.320
<v Michael Kennedy>Yeah.

00:12:24.700 --> 00:12:26.980
<v Michael Kennedy>Use DICT, use Zitter Tools, et cetera.

00:12:27.779 --> 00:12:30.300
<v Brian Okken>And the standard library is still pretty big.

00:12:30.400 --> 00:12:32.540
<v Brian Okken>I would probably limit that to the standard library

00:12:32.760 --> 00:12:35.180
<v Brian Okken>that manipulates data structures.

00:12:35.920 --> 00:12:37.560
<v Michael Kennedy>Yeah, it kind of intersects with data structures.

00:12:37.640 --> 00:12:38.960
<v Brian Okken>Yeah, I guess that's kind of what I was getting at.

00:12:39.280 --> 00:12:42.220
<v Michael Kennedy>And by the way, this was written by Dito Grigorov

00:12:42.860 --> 00:12:44.340
<v Michael Kennedy>and posted by Uvigena.

00:12:44.880 --> 00:12:45.560
<v Michael Kennedy>Oh, okay.

00:12:45.640 --> 00:12:48.400
<v Michael Kennedy>Just want to make sure Dito gets a little credit for writing it.

00:12:48.580 --> 00:12:49.760
<v Brian Okken>Thanks for that clarification.

00:12:50.120 --> 00:12:50.780
<v Michael Kennedy>Yeah, no worries.

00:12:51.400 --> 00:12:53.040
<v Michael Kennedy>- It's tricky, I think it's 'cause the way

00:12:53.200 --> 00:12:55.060
<v Michael Kennedy>the JetBrains CMS works.

00:12:55.510 --> 00:12:56.780
<v Michael Kennedy>Yeah, so cool, cool.

00:12:57.000 --> 00:12:59.660
<v Michael Kennedy>Well, maybe we should, Brian,

00:12:59.770 --> 00:13:00.800
<v Michael Kennedy>maybe we should talk to him about it.

00:13:00.980 --> 00:13:02.780
<v Michael Kennedy>Put him up on a little video call, you know what I mean?

00:13:03.060 --> 00:13:03.460
<v Michael Kennedy>What do you think?

00:13:03.570 --> 00:13:04.520
<v Michael Kennedy>Do a little WebRTC?

00:13:05.240 --> 00:13:06.580
<v Michael Kennedy>- I've kind of forgot about RTC.

00:13:07.140 --> 00:13:09.300
<v Michael Kennedy>- I know, but you and I are sitting here,

00:13:09.480 --> 00:13:11.660
<v Michael Kennedy>people don't necessarily know how we're doing this.

00:13:12.480 --> 00:13:15.120
<v Michael Kennedy>It's magic, we basically, you and I, we speak through magic,

00:13:15.660 --> 00:13:18.840
<v Michael Kennedy>but some of that magic is WebRTC

00:13:18.860 --> 00:13:22.800
<v Michael Kennedy>because all of this is recording, streaming, et cetera,

00:13:23.450 --> 00:13:26.260
<v Michael Kennedy>video and voice, multiple channels, multiple screens,

00:13:26.260 --> 00:13:30.320
<v Michael Kennedy>and so on over WebRTC in the browser, which is ridiculous.

00:13:30.960 --> 00:13:32.780
<v Michael Kennedy>It's just ridiculous that this works.

00:13:33.220 --> 00:13:36.480
<v Michael Kennedy>So I want to talk about a library from Freddie Bolton,

00:13:36.980 --> 00:13:39.760
<v Michael Kennedy>who is behind the Gradio project, Gradio, Gradio,

00:13:39.880 --> 00:13:43.080
<v Michael Kennedy>Gradio project, and I had him on Talk Python

00:13:43.280 --> 00:13:46.140
<v Michael Kennedy>a couple of years ago, and this is called FastRTC.

00:13:46.760 --> 00:13:50.180
<v Michael Kennedy>So kind of like, hey, I'm a fan of integrating with FastAPI,

00:13:50.520 --> 00:13:51.760
<v Michael Kennedy>and I want to do WebRTC.

00:13:52.480 --> 00:13:55.540
<v Michael Kennedy>It's kind of ridiculous how simple some of these things are.

00:13:55.600 --> 00:13:56.340
<v Michael Kennedy>So it's pretty popular.

00:13:56.460 --> 00:13:58.900
<v Michael Kennedy>It's got 4,000 GitHub stars, 400 forks.

00:13:59.280 --> 00:14:00.660
<v Michael Kennedy>It's been around for a while.

00:14:01.020 --> 00:14:03.900
<v Michael Kennedy>Freddie pointed this out to me a decent while ago,

00:14:04.020 --> 00:14:05.460
<v Michael Kennedy>and I finally ain't getting around to talking about it.

00:14:05.800 --> 00:14:06.820
<v Michael Kennedy>But it's quite neat.

00:14:07.060 --> 00:14:08.800
<v Michael Kennedy>There's a little video you can watch about how to do it,

00:14:08.920 --> 00:14:10.580
<v Michael Kennedy>but it's got some examples for you.

00:14:10.720 --> 00:14:13.240
<v Michael Kennedy>Like if you want to do an Echo Audio,

00:14:13.340 --> 00:14:17.440
<v Michael Kennedy>which is kind of a sadistic example, you know what I mean?

00:14:17.640 --> 00:14:19.940
<v Michael Kennedy>Because that's usually the worst thing about a video meeting,

00:14:20.180 --> 00:14:20.700
<v Michael Kennedy>is the echo.

00:14:21.380 --> 00:14:23.120
<v Michael Kennedy>But if you want to listen to yourself echo back

00:14:23.220 --> 00:14:26.200
<v Michael Kennedy>just to prove that it's going round and round,

00:14:26.700 --> 00:14:28.580
<v Michael Kennedy>then how many lines is that?

00:14:28.640 --> 00:14:30.620
<v Michael Kennedy>I mean, there's a huge comma in there,

00:14:30.780 --> 00:14:32.440
<v Michael Kennedy>but if you take out the comma

00:14:33.020 --> 00:14:34.520
<v Michael Kennedy>and you format it a little bit wider,

00:14:34.660 --> 00:14:37.340
<v Michael Kennedy>it's probably five lines of code to set up a server,

00:14:38.120 --> 00:14:39.660
<v Michael Kennedy>connect to it, and echo back.

00:14:39.780 --> 00:14:41.300
<v Michael Kennedy>Like, that's insane.

00:14:41.779 --> 00:14:42.180
<v Michael Kennedy>Insane.

00:14:42.240 --> 00:14:46.660
<v Michael Kennedy>And there's also ways to set up LLM voice chat if you care about that.

00:14:46.960 --> 00:14:52.260
<v Michael Kennedy>You know, that's obviously the thing du jour is I want to talk to my LLM.

00:14:52.440 --> 00:14:55.480
<v Michael Kennedy>But, you know, you could do that pretty easily, pretty quickly here.

00:14:55.800 --> 00:14:59.360
<v Michael Kennedy>But also just stream your webcam back or object detection.

00:14:59.360 --> 00:15:00.460
<v Michael Kennedy>It's just like a handful of lines of code.

00:15:00.740 --> 00:15:01.480
<v Michael Kennedy>It's insane.

00:15:01.720 --> 00:15:04.020
<v Michael Kennedy>But this stuff seems so complicated, doesn't it, Brian?

00:15:04.740 --> 00:15:05.040
<v Michael Kennedy>It's cool.

00:15:05.200 --> 00:15:05.520
<v Michael Kennedy>It's cool.

00:15:05.640 --> 00:15:07.580
<v Brian Okken>You're wrapping stuff up in a library.

00:15:08.460 --> 00:15:08.560
<v Michael Kennedy>Yeah.

00:15:08.680 --> 00:15:13.440
<v Michael Kennedy>So it comes with automatic voice detection, turn-taking built-in, which is interesting.

00:15:14.360 --> 00:15:20.420
<v Michael Kennedy>It's got a UI to launch it in built-in Gradio UI, if you want to do that.

00:15:20.450 --> 00:15:22.000
<v Michael Kennedy>I believe that's probably JavaScript.

00:15:22.920 --> 00:15:24.660
<v Michael Kennedy>Automatic Web RTC support.

00:15:25.360 --> 00:15:30.820
<v Michael Kennedy>So mount it onto a FastAPI app and get a Web RTC endpoint for your own front end.

00:15:31.050 --> 00:15:33.640
<v Michael Kennedy>So you can kind of go Gradio or you can go this way.

00:15:33.940 --> 00:15:34.940
<v Michael Kennedy>It's got WebSocket support.

00:15:35.450 --> 00:15:35.860
<v Michael Kennedy>Listen to this.

00:15:36.120 --> 00:15:36.960
<v Michael Kennedy>Automatic telephone support.

00:15:37.320 --> 00:15:41.840
<v Michael Kennedy>use FastPhone on the string and get your own temporary phone number.

00:15:42.600 --> 00:15:43.720
<v Brian Okken>Actually, that's pretty cool.

00:15:44.480 --> 00:15:44.580
<v Michael Kennedy>Yeah.

00:15:45.300 --> 00:15:47.860
<v Michael Kennedy>So, yeah, there's a lot of stuff going on here.

00:15:48.020 --> 00:15:50.640
<v Michael Kennedy>It says you can easily be mounted on your own FastAPI app

00:15:50.640 --> 00:15:52.100
<v Michael Kennedy>and customize it entirely,

00:15:52.680 --> 00:15:55.180
<v Michael Kennedy>extend it to fit within your production app,

00:15:55.500 --> 00:15:57.080
<v Michael Kennedy>I guess, assuming that's a FastAPI app.

00:15:57.340 --> 00:16:00.460
<v Michael Kennedy>Although you could certainly squeeze it in using, like,

00:16:00.720 --> 00:16:02.680
<v Michael Kennedy>Nginx routes to make it look like one app,

00:16:02.780 --> 00:16:05.320
<v Michael Kennedy>but it's not exactly the same back end and so on.

00:16:05.420 --> 00:16:06.240
<v Michael Kennedy>So there's examples for that.

00:16:06.500 --> 00:16:06.660
<v Michael Kennedy>Wow.

00:16:06.960 --> 00:16:08.520
<v Michael Kennedy>Yeah, so I thought it was pretty cool.

00:16:09.460 --> 00:16:10.100
<v Brian Okken>That's pretty neat.

00:16:10.350 --> 00:16:15.040
<v Brian Okken>I interviewed somebody in like three years ago, 2012, about WebRTC.

00:16:15.410 --> 00:16:17.240
<v Brian Okken>They wrote a book on it.

00:16:17.680 --> 00:16:17.840
<v Brian Okken>Nice.

00:16:19.020 --> 00:16:20.980
<v Brian Okken>I thought, like, I don't think I'd ever use that.

00:16:21.220 --> 00:16:24.060
<v Brian Okken>But of course I use tools that use WebRTC all the time.

00:16:24.540 --> 00:16:26.300
<v Brian Okken>So like you said, we're using it for.

00:16:26.520 --> 00:16:27.460
<v Brian Okken>We're using it right now.

00:16:27.880 --> 00:16:28.520
<v Brian Okken>We're using it right now.

00:16:29.100 --> 00:16:30.880
<v Michael Kennedy>And yeah, it's one of those things where it's like,

00:16:30.940 --> 00:16:32.220
<v Michael Kennedy>I don't think I'll ever build one of those.

00:16:33.070 --> 00:16:36.280
<v Michael Kennedy>And then you're like, oh, but what if I could do it for this project

00:16:36.300 --> 00:16:39.160
<v Michael Kennedy>or something comes up or, you know, just knowing about it as a...

00:16:39.160 --> 00:16:39.660
<v Michael Kennedy>I think it's...

00:16:40.110 --> 00:16:47.840
<v Brian Okken>Yeah, and right now, like you said, with things like hooking up LLMs to, you know, some vibe coding.

00:16:48.660 --> 00:16:49.340
<v Brian Okken>Yeah, exactly.

00:16:49.960 --> 00:16:51.320
<v Brian Okken>I mean, no comment.

00:16:51.920 --> 00:16:52.740
<v Brian Okken>No comment.

00:16:54.000 --> 00:16:56.540
<v Brian Okken>Okay, so this is a listener suggestion, actually.

00:16:57.860 --> 00:17:01.100
<v Brian Okken>Comes to us as a request from Nicholas Kersner.

00:17:01.500 --> 00:17:05.920
<v Brian Okken>He said, hey, I'm using PipDepTree a lot lately.

00:17:06.180 --> 00:17:07.860
<v Brian Okken>And it's pretty cool if you covered that.

00:17:07.930 --> 00:17:09.180
<v Brian Okken>And I'm like, yeah, we covered it.

00:17:09.500 --> 00:17:10.560
<v Brian Okken>But I looked it up.

00:17:11.260 --> 00:17:13.540
<v Brian Okken>It was, I should have had the episode up.

00:17:13.819 --> 00:17:16.520
<v Brian Okken>But we covered it in episode 17.

00:17:17.660 --> 00:17:19.040
<v Brian Okken>That was what?

00:17:20.140 --> 00:17:20.439
<v Brian Okken>2017.

00:17:21.260 --> 00:17:23.800
<v Brian Okken>So yeah, it was a minute ago that we've covered it.

00:17:23.939 --> 00:17:25.760
<v Brian Okken>So it's totally fine to cover it again

00:17:26.160 --> 00:17:27.100
<v Brian Okken>because there's been changes.

00:17:27.420 --> 00:17:30.720
<v Brian Okken>So I did want to talk about both pip Deptree,

00:17:31.080 --> 00:17:34.300
<v Brian Okken>but also I have been, I used pip Deptree for a long time,

00:17:34.480 --> 00:17:36.320
<v Brian Okken>But now usually I use uv pip tree.

00:17:36.740 --> 00:17:39.520
<v Brian Okken>And so I just decided to write an article on it just to,

00:17:40.120 --> 00:17:41.540
<v Brian Okken>because I wanted to show some code examples.

00:17:42.700 --> 00:17:46.040
<v Brian Okken>One of the cool things I did not know that pip dep tree did.

00:17:46.120 --> 00:17:51.080
<v Brian Okken>One of the things that I would always do is I'd have a project install pip dep tree.

00:17:51.100 --> 00:17:52.440
<v Brian Okken>And what it does is when you run it,

00:17:52.700 --> 00:17:56.240
<v Brian Okken>it looks at all the stuff you have installed and then shows, shows them.

00:17:56.580 --> 00:17:59.220
<v Brian Okken>It's kind of like pip list, but it shows all the,

00:17:59.720 --> 00:18:04.440
<v Brian Okken>it's like a tree structure and it shows them we're like in a tree structure with

00:18:04.460 --> 00:18:10.320
<v Brian Okken>versions that are installed and it kind of it's extra information like the uh like if i'm using

00:18:10.320 --> 00:18:16.440
<v Brian Okken>it from pyproject.toml i have an example of the cards project why it chose the particular version

00:18:16.580 --> 00:18:23.380
<v Brian Okken>that's installed um so it's pretty handy but the i would always install it in the project and it

00:18:23.460 --> 00:18:29.059
<v Brian Okken>would also tell me that pip dep tree is installed but the uh the trick is to install it somewhere

00:18:29.080 --> 00:18:36.500
<v Brian Okken>globally like either uh using uh uvx pip dep tree or uv tool install pip dep tree and then you've

00:18:36.600 --> 00:18:43.740
<v Brian Okken>got it just available to you always and and then you can use python auto and it the python auto flag

00:18:44.100 --> 00:18:49.880
<v Brian Okken>will tell you um it will look in the current environment that you're in so um so then you can

00:18:49.940 --> 00:18:56.840
<v Brian Okken>have it in global uh and then yeah and just look at whatever project you're in which is cool i didn't

00:18:56.860 --> 00:19:02.740
<v Brian Okken>know it could do the auto thing too so i'm glad i looked that up the um but what i'm using usually

00:19:03.000 --> 00:19:08.980
<v Brian Okken>is uv pip tree because it's already installed with uv and i have uv everywhere now by default i wanted

00:19:08.980 --> 00:19:13.240
<v Brian Okken>to go through a couple flags that i um actually i just learned about this i i when i was i was

00:19:13.360 --> 00:19:18.540
<v Brian Okken>comparing this beauty if you do uv pip tree it'll show you a tree structure but it only shows you

00:19:18.540 --> 00:19:24.900
<v Brian Okken>the versions that are installed and it does do like for instance i'm showing cards and rich is showing

00:19:24.900 --> 00:19:30.800
<v Brian Okken>up and it looks like it's in a couple places. Package tree already displayed. Oh yeah,

00:19:30.900 --> 00:19:37.040
<v Brian Okken>because the cards project depends on rich, but it also depends on typer, which also depends on rich.

00:19:37.080 --> 00:19:41.860
<v Brian Okken>So rich is duplicated and there's a little note that says that. There's a flag where you can turn

00:19:41.860 --> 00:19:46.860
<v Brian Okken>it off, but I kind of like seeing the duplication. It's just to see who all is using something.

00:19:47.280 --> 00:19:54.880
<v Brian Okken>Now, to get a similar look as pip dep tree, you can add show version specifiers and then it shows

00:19:55.520 --> 00:19:57.840
<v Brian Okken>that it used to figure out what to install.

00:19:58.310 --> 00:20:00.440
<v Brian Okken>But the new flag that I just learned about,

00:20:00.630 --> 00:20:01.820
<v Brian Okken>which I'm super excited about,

00:20:02.060 --> 00:20:03.520
<v Brian Okken>is --outdated.

00:20:04.180 --> 00:20:05.100
<v Brian Okken>And this tells you,

00:20:06.020 --> 00:20:06.660
<v Brian Okken>it tells you,

00:20:07.140 --> 00:20:08.320
<v Brian Okken>it throws the latest up.

00:20:08.540 --> 00:20:10.180
<v Brian Okken>It looks at all the things you got installed

00:20:10.250 --> 00:20:11.560
<v Brian Okken>and tells you if there's newer ones.

00:20:11.860 --> 00:20:13.100
<v Brian Okken>So you can go into your project

00:20:13.290 --> 00:20:15.160
<v Brian Okken>and you can run UVPIP tree outdated

00:20:15.640 --> 00:20:18.140
<v Brian Okken>and it'll tell you which ones you should maybe update.

00:20:18.860 --> 00:20:20.980
<v Brian Okken>So it's pretty fun, both of those.

00:20:21.260 --> 00:20:22.400
<v Michael Kennedy>So I like both tools.

00:20:22.700 --> 00:20:23.120
<v Michael Kennedy>That's nice.

00:20:23.210 --> 00:20:23.880
<v Michael Kennedy>I do as well.

00:20:24.020 --> 00:20:25.620
<v Michael Kennedy>I've used pip dep tree for a long time.

00:20:26.040 --> 00:20:28.240
<v Michael Kennedy>It's nice to just go, why is this here?

00:20:28.620 --> 00:20:31.220
<v Michael Kennedy>Why is click installed?

00:20:31.270 --> 00:20:32.380
<v Michael Kennedy>I don't remember installing click.

00:20:32.980 --> 00:20:34.420
<v Michael Kennedy>It's fine, but I just don't remember installing it.

00:20:35.320 --> 00:20:37.140
<v Michael Kennedy>But oh, it's Icy because I installed Typer,

00:20:37.140 --> 00:20:38.940
<v Michael Kennedy>and I forgot that Typer is a wrapper on click.

00:20:39.900 --> 00:20:41.700
<v Brian Okken>Yeah, and one of the things, for instance,

00:20:42.320 --> 00:20:45.620
<v Brian Okken>I'm thinking about update like a hypothetical scenario.

00:20:46.140 --> 00:20:49.160
<v Brian Okken>I've got Rich, or I've got on my cards application,

00:20:50.240 --> 00:20:56.560
<v Brian Okken>I'm using rich, but maybe I'll try to tighten the dependencies by not using rich.

00:20:56.920 --> 00:20:58.820
<v Brian Okken>But if I'm using typer, it's going to come in anyway.

00:20:59.180 --> 00:21:04.800
<v Brian Okken>So I like to see the duplication because I'm not going to save anything if I don't depend on rich directly.

00:21:05.260 --> 00:21:06.980
<v Brian Okken>It's already there because of typer.

00:21:08.020 --> 00:21:08.620
<v Michael Kennedy>Yes, exactly.

00:21:08.940 --> 00:21:10.220
<v Michael Kennedy>You're like, can I just get rid of this thing?

00:21:10.300 --> 00:21:11.060
<v Michael Kennedy>You're like, nope.

00:21:11.280 --> 00:21:11.360
<v Michael Kennedy>No.

00:21:11.940 --> 00:21:12.560
<v Brian Okken>Not easily.

00:21:12.700 --> 00:21:13.420
<v Michael Kennedy>Not directly anyway.

00:21:14.240 --> 00:21:14.360
<v Brian Okken>Yeah.

00:21:14.660 --> 00:21:18.900
<v Brian Okken>But if I got rid of typer also somehow and then I could get rid of rich.

00:21:19.360 --> 00:21:21.360
<v Brian Okken>And maybe I'll redo the TinyDB too.

00:21:21.740 --> 00:21:21.840
<v Brian Okken>Yeah.

00:21:22.120 --> 00:21:24.080
<v Brian Okken>Anyway, tighten it up.

00:21:24.920 --> 00:21:25.520
<v Brian Okken>All right.

00:21:25.910 --> 00:21:28.560
<v Brian Okken>Those are, that's my items to talk about.

00:21:28.800 --> 00:21:33.880
<v Brian Okken>Oh, I do have links to both PipTrapTree and uv treeRich.

00:21:33.980 --> 00:21:36.040
<v Brian Okken>UV PipTreeRich also.

00:21:36.330 --> 00:21:37.400
<v Brian Okken>Those are all different words.

00:21:37.680 --> 00:21:37.920
<v Michael Kennedy>Nice.

00:21:38.400 --> 00:21:38.520
<v Michael Kennedy>All right.

00:21:38.600 --> 00:21:39.620
<v Michael Kennedy>Well, just keep going.

00:21:39.840 --> 00:21:40.860
<v Michael Kennedy>You're the only one with extras today.

00:21:41.220 --> 00:21:41.460
<v Brian Okken>Okay.

00:21:41.490 --> 00:21:42.340
<v Brian Okken>I got a couple extras.

00:21:43.660 --> 00:21:46.700
<v Brian Okken>I've got one of the benefits of working at the office,

00:21:46.840 --> 00:21:51.440
<v Brian Okken>like the back to office thing is I was walking by one of my colleagues and he's got a bunch of

00:21:51.620 --> 00:21:58.680
<v Brian Okken>colors up on his screen. And I'm like, what are those colors? And, and I use, use

00:21:58.680 --> 00:22:04.120
<v Brian Okken>VS Code at work and the, and I've often got different projects up the same thing he's using.

00:22:04.640 --> 00:22:09.860
<v Brian Okken>And I started using this just like last week, a thing called peacock. and what it does is it

00:22:10.120 --> 00:22:16.800
<v Brian Okken>shows different colors around the outside of your, terminal and it only it's, or outside of your

00:22:16.820 --> 00:22:23.660
<v Brian Okken>VS Code window, but the colors are picked and stored in the project or like the workspace.

00:22:23.950 --> 00:22:24.540
<v Brian Okken>Yeah, the workspace.

00:22:25.070 --> 00:22:28.420
<v Brian Okken>So that if you've got different projects open, they all have different colors.

00:22:29.060 --> 00:22:33.340
<v Brian Okken>So when you're like, I want to go back to that window, you just have to remember which

00:22:33.450 --> 00:22:34.500
<v Brian Okken>color goes to which project.

00:22:34.880 --> 00:22:36.020
<v Brian Okken>And that's kind of up to you.

00:22:36.510 --> 00:22:39.160
<v Brian Okken>But Brian, I'm often still this.

00:22:39.950 --> 00:22:45.780
<v Brian Okken>I in even if you one of the cool things is I'm like, well, I chose green and it's a little

00:22:45.780 --> 00:22:46.520
<v Brian Okken>too bright for me.

00:22:46.680 --> 00:22:48.280
<v Brian Okken>I kind of wanted a darker green.

00:22:48.680 --> 00:22:51.720
<v Brian Okken>It has built-in buttons to just go a little darker,

00:22:52.010 --> 00:22:54.000
<v Brian Okken>a little darker, a little darker, or a little lighter.

00:22:54.300 --> 00:22:56.880
<v Brian Okken>You can do custom, like pick your own color,

00:22:57.140 --> 00:22:58.940
<v Brian Okken>but you can also say, this is close,

00:22:59.090 --> 00:23:00.160
<v Brian Okken>but I'd like it a little darker.

00:23:00.420 --> 00:23:02.160
<v Michael Kennedy>And I'm loving that.

00:23:02.310 --> 00:23:04.020
<v Michael Kennedy>Yeah, and it's not incredibly popular,

00:23:04.240 --> 00:23:05.560
<v Michael Kennedy>but it looks like it's from John Papa,

00:23:05.720 --> 00:23:07.640
<v Michael Kennedy>who's been around in the tech space for a long time.

00:23:07.770 --> 00:23:08.600
<v Michael Kennedy>So it seems trustworthy.

00:23:09.000 --> 00:23:10.540
<v Brian Okken>Where do you see the popularity?

00:23:10.820 --> 00:23:11.340
<v Brian Okken>Is it in here?

00:23:11.900 --> 00:23:12.420
<v Brian Okken>It's the downloads.

00:23:13.160 --> 00:23:14.020
<v Brian Okken>Oh, I take it back.

00:23:14.030 --> 00:23:16.480
<v Michael Kennedy>I thought it was, it may have more than I initially,

00:23:16.940 --> 00:23:21.220
<v Michael Kennedy>said it has three point basically four million downloads okay so actually there's a few downloads

00:23:21.420 --> 00:23:28.020
<v Michael Kennedy>people like this idea oh i was looking at the um the open vsx marketplace which is like a similar

00:23:28.400 --> 00:23:33.640
<v Brian Okken>but not the same uh the other update so one of the things i mentioned last week is that i'm writing

00:23:33.640 --> 00:23:40.640
<v Brian Okken>a book again and um i just updated uh this last night i think last night there's um a chapter

00:23:41.140 --> 00:23:46.580
<v Brian Okken>another chapter written so i gotta clean this up both versions are here but i did essential

00:23:46.600 --> 00:23:48.420
<v Brian Okken>for successful software projects.

00:23:48.570 --> 00:23:49.620
<v Brian Okken>I got that one up

00:23:49.860 --> 00:23:51.600
<v Brian Okken>and I completely rewrote the introduction

00:23:52.210 --> 00:23:53.280
<v Brian Okken>and I should stop doing that.

00:23:54.500 --> 00:23:56.240
<v Brian Okken>An editor a long time ago told me,

00:23:56.980 --> 00:23:57.920
<v Brian Okken>do a quick introduction

00:23:58.250 --> 00:23:58.980
<v Brian Okken>and then leave it alone

00:23:59.150 --> 00:23:59.960
<v Brian Okken>until you finish the book

00:24:00.050 --> 00:24:00.980
<v Brian Okken>and then you can update it

00:24:01.120 --> 00:24:02.740
<v Brian Okken>to be what the book actually is.

00:24:03.000 --> 00:24:04.200
<v Brian Okken>And so I got to do that.

00:24:04.480 --> 00:24:05.140
<v Michael Kennedy>A hundred percent.

00:24:05.190 --> 00:24:06.100
<v Michael Kennedy>I think that's a great idea

00:24:07.140 --> 00:24:07.700
<v Michael Kennedy>about the introduction.

00:24:08.140 --> 00:24:09.320
<v Michael Kennedy>I do it with my courses.

00:24:09.550 --> 00:24:10.960
<v Michael Kennedy>Sometimes I'll record the whole course

00:24:11.120 --> 00:24:12.060
<v Michael Kennedy>and then I'll record the introduction

00:24:12.360 --> 00:24:12.860
<v Michael Kennedy>because I'm like,

00:24:13.140 --> 00:24:13.780
<v Michael Kennedy>I want to be able to say,

00:24:13.940 --> 00:24:14.780
<v Michael Kennedy>and we're going to cover this

00:24:14.830 --> 00:24:15.399
<v Michael Kennedy>in this section

00:24:15.420 --> 00:24:17.020
<v Michael Kennedy>and then actually have that match.

00:24:17.440 --> 00:24:19.700
<v Brian Okken>Yeah, but my brain won't let me go on

00:24:19.800 --> 00:24:21.680
<v Brian Okken>if I don't write an introduction to start with.

00:24:22.120 --> 00:24:23.960
<v Brian Okken>It's like, but I haven't done an introduction, man.

00:24:25.659 --> 00:24:27.660
<v Brian Okken>And the essential components chapter,

00:24:28.120 --> 00:24:29.180
<v Brian Okken>this was tough, man,

00:24:29.300 --> 00:24:29.740
<v Brian Okken>because there's like,

00:24:30.400 --> 00:24:31.520
<v Brian Okken>I needed it to be tight

00:24:31.620 --> 00:24:33.300
<v Brian Okken>or I wanted it to be a tight chapter,

00:24:33.720 --> 00:24:35.620
<v Brian Okken>but I rewrote it like five times

00:24:36.020 --> 00:24:37.640
<v Brian Okken>because I had so many stories and stuff

00:24:37.660 --> 00:24:38.620
<v Brian Okken>I wanted to throw in

00:24:38.820 --> 00:24:40.560
<v Brian Okken>and I decided to take the stories out

00:24:40.660 --> 00:24:42.480
<v Brian Okken>and leave those stories as blog posts later.

00:24:43.200 --> 00:24:45.240
<v Brian Okken>But, oh, I guess the third extra,

00:24:45.320 --> 00:24:54.400
<v Brian Okken>I don't have anything to show for this, but when I'm writing and I've got all this great stuff that I want to save, but I know it shouldn't be in this chapter or it shouldn't be in this blog post.

00:24:54.820 --> 00:24:59.920
<v Brian Okken>I've decided for my editor, I've got a file called cut bucket, like CUT bucket.

00:25:00.340 --> 00:25:05.840
<v Brian Okken>And I just put a divider line, put another title and paste the stuff I want to save there.

00:25:06.230 --> 00:25:06.860
<v Brian Okken>And then I don't.

00:25:07.000 --> 00:25:10.700
<v Brian Okken>And then my brain, it's a brain trick is I haven't thrown it away.

00:25:10.920 --> 00:25:11.320
<v Brian Okken>It's there.

00:25:11.770 --> 00:25:14.380
<v Brian Okken>You don't have to remember it and move on with writing.

00:25:14.980 --> 00:25:15.040
<v Michael Kennedy>Yeah.

00:25:15.060 --> 00:25:15.620
<v Michael Kennedy>Yeah, awesome.

00:25:16.300 --> 00:25:18.080
<v Michael Kennedy>What's your editor that you're writing in?

00:25:18.360 --> 00:25:19.400
<v Brian Okken>Like, do you have a markdown?

00:25:19.470 --> 00:25:20.200
<v Michael Kennedy>What is the story?

00:25:20.230 --> 00:25:22.200
<v Brian Okken>Oh, yeah, it's markdown in VS Code.

00:25:23.080 --> 00:25:27.420
<v Brian Okken>And so the pytest book had tons of code snippets and everything.

00:25:27.880 --> 00:25:30.920
<v Brian Okken>I think this is going to be a code snippet-free book.

00:25:31.150 --> 00:25:34.740
<v Brian Okken>So that I can, the goal is to do an audio version later.

00:25:35.040 --> 00:25:38.400
<v Brian Okken>And, you know, I might have some code snippets, but probably not.

00:25:39.240 --> 00:25:43.400
<v Brian Okken>Actually, it's one of the things of reading the Tester of Development book

00:25:43.440 --> 00:25:45.640
<v Brian Okken>from the old, the OG one from Kent Beck.

00:25:47.320 --> 00:25:49.060
<v Brian Okken>It's all in Java, I think.

00:25:50.560 --> 00:25:51.580
<v Brian Okken>And it's like too much.

00:25:51.600 --> 00:25:52.500
<v Brian Okken>You're lucky it's not Smalltalk.

00:25:52.940 --> 00:25:53.520
<v Brian Okken>Well, right.

00:25:54.080 --> 00:25:55.040
<v Brian Okken>Maybe it is Smalltalk.

00:25:55.100 --> 00:25:55.400
<v Brian Okken>I don't know.

00:25:55.520 --> 00:25:56.980
<v Brian Okken>I think it's, I don't remember.

00:25:57.400 --> 00:26:01.700
<v Brian Okken>But I just sort of scammed by the code snippets

00:26:01.860 --> 00:26:02.840
<v Brian Okken>because I'm like, I don't care.

00:26:03.460 --> 00:26:04.800
<v Brian Okken>I'm just like here for the concepts.

00:26:05.320 --> 00:26:06.440
<v Brian Okken>So I'm trying to keep this book,

00:26:06.640 --> 00:26:08.240
<v Brian Okken>the concepts and not the code

00:26:08.380 --> 00:26:10.600
<v Brian Okken>because the code is different for everybody, man.

00:26:11.240 --> 00:26:11.580
<v Michael Kennedy>Absolutely.

00:26:12.280 --> 00:26:12.500
<v Michael Kennedy>Anyway.

00:26:12.620 --> 00:26:12.820
<v Michael Kennedy>Love it.

00:26:13.100 --> 00:26:13.620
<v Michael Kennedy>That's all I got.

00:26:14.020 --> 00:26:14.300
<v Michael Kennedy>All right.

00:26:14.480 --> 00:26:17.740
<v Michael Kennedy>Well, let's tell a joke then and close it out.

00:26:18.340 --> 00:26:18.680
<v Michael Kennedy>Okay.

00:26:19.020 --> 00:26:20.120
<v Michael Kennedy>I've done a few AI ones.

00:26:20.560 --> 00:26:21.780
<v Michael Kennedy>It's not an AI joke, folks.

00:26:22.000 --> 00:26:24.500
<v Michael Kennedy>So if you're tired of the AI jokes, well, then don't worry.

00:26:25.000 --> 00:26:25.560
<v Michael Kennedy>This isn't a AI.

00:26:25.800 --> 00:26:32.500
<v Michael Kennedy>This one is a joke about the future of Python and people being stuck in their ways or having

00:26:32.740 --> 00:26:37.340
<v Michael Kennedy>assumptions about Python not being as fast as it could be or having limitations that it

00:26:37.460 --> 00:26:41.160
<v Michael Kennedy>doesn't have anymore, theoretically, or semi-theoretically, whatever.

00:26:41.940 --> 00:26:52.520
<v Michael Kennedy>And it's a woman in a walker, probably 70 or so, with the granddaughter helping her back to sit down or something.

00:26:53.560 --> 00:26:58.860
<v Michael Kennedy>So I think I named, what did I name the project, the joke here?

00:26:58.860 --> 00:27:00.520
<v Michael Kennedy>I think I called it, okay, Grandma, it's the joke.

00:27:01.060 --> 00:27:07.720
<v Michael Kennedy>So, honey, do you know that the gil prevents multiple Python threads from executing parallel?

00:27:08.600 --> 00:27:10.340
<v Michael Kennedy>Sure, Grandma, let's get you back to bed.

00:27:13.020 --> 00:27:18.940
<v Michael Kennedy>a bit of a testament to python 314 and python t and free thread python and all that that'd be

00:27:19.380 --> 00:27:24.420
<v Brian Okken>that's funny i can just like fast forward i can imagine like me 10 years from now telling the kids

00:27:24.680 --> 00:27:29.140
<v Brian Okken>you know was that when i was a kid we had a GIL we had a one thread at a time

00:27:30.800 --> 00:27:35.680
<v Michael Kennedy>your little whippersnappers don't know how good you got it my python used to just run

00:27:35.700 --> 00:27:38.940
<v Michael Kennedy>interpreted and it was so slow we would debate whether it was fast enough

00:27:41.340 --> 00:27:44.560
<v Michael Kennedy>uh yeah anyway that's what i got for a joke for us i like it

00:27:46.800 --> 00:27:54.320
<v Brian Okken>yeah all right it worked for me i liked it so nice all right well uh thanks everybody for joining

00:27:54.860 --> 00:28:00.500
<v Brian Okken>and listening and we love you all and um we'll talk to you next week yeah thanks brian thanks

