TRANSCRIPCIÓN 🔗
WEBVTT
00:00:00.001 --> 00:00:05.500
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:00:05.500 --> 00:00:12.800
This is episode 368, recorded January 23rd, 2024.
00:00:12.800 --> 00:00:14.360
I'm Michael Kennedy.
00:00:14.360 --> 00:00:15.620
And I'm Brian Okken.
00:00:15.620 --> 00:00:17.840
This episode is sponsored by us.
00:00:17.840 --> 00:00:20.980
Support us by checking out our work.
00:00:20.980 --> 00:00:22.180
We do lots of things.
00:00:22.180 --> 00:00:24.740
We have many, many courses over at Talk Python Training.
00:00:24.740 --> 00:00:26.580
We have the complete pytest course.
00:00:26.580 --> 00:00:32.340
We have Patreon supporters, which you can become one in the show page, the episode page.
00:00:32.340 --> 00:00:37.840
And connect with all of us, all three of us, Brian, me, and the show over on fosstodon.org.
00:00:37.840 --> 00:00:42.280
And if you want to be part of the live episode, it's pythonbytes.fm/live.
00:00:42.280 --> 00:00:45.080
Usually Tuesdays at 10 a.m.
00:00:45.080 --> 00:00:46.280
We've changed it.
00:00:46.280 --> 00:00:47.160
We have a new time, Brian.
00:00:47.160 --> 00:00:48.200
New time, yes.
00:00:48.200 --> 00:00:48.960
New time.
00:00:48.960 --> 00:00:52.720
So that's the plan for now until it's not the plan.
00:00:52.720 --> 00:00:54.640
But we love it when people show up for the show.
00:00:54.640 --> 00:00:57.260
And now let's dive right in.
00:00:57.260 --> 00:00:57.960
Go for it, Brian.
00:00:57.960 --> 00:00:58.500
What you got?
00:00:58.500 --> 00:01:05.360
Well, I wanted to talk about debugging a little bit because we've got a blog post.
00:01:05.360 --> 00:01:12.200
Actually, it's a blog post and really a newsletter episode from Eunice.
00:01:12.200 --> 00:01:15.160
It's a site called Syntax Error.
00:01:15.580 --> 00:01:22.280
And it looks like it's a newsletter about debugging, which is kind of nice.
00:01:22.280 --> 00:01:25.400
And somehow I missed it in the past year.
00:01:25.400 --> 00:01:28.800
It started, it looks like February of 2023.
00:01:28.800 --> 00:01:31.480
But we're on episode 11 or issue 11.
00:01:31.480 --> 00:01:32.780
And it's kind of a summary.
00:01:32.780 --> 00:01:33.880
So it's pretty neat.
00:01:33.880 --> 00:01:35.240
Talking about debugging Python.
00:01:35.240 --> 00:01:43.620
I really love just the concept of this, of the newsletter, but also just it's really good content in a small thing.
00:01:43.620 --> 00:01:45.180
So what is he talking about?
00:01:45.180 --> 00:01:50.780
So if you're debugging some code, the first thing you got to do is you got to get in the right mindset.
00:01:50.780 --> 00:01:53.200
And then you can use some tools.
00:01:53.200 --> 00:01:55.780
So I'm glad that he starts that with the mindset.
00:01:55.780 --> 00:01:57.120
Just talking about mindset.
00:01:57.120 --> 00:01:58.260
Take a break.
00:01:58.880 --> 00:02:01.960
Stop, breathe, and then come back to it.
00:02:01.960 --> 00:02:08.220
And this breaking away from you're frustrated with your code to clearing your head is really important.
00:02:08.220 --> 00:02:09.520
Don't skip that.
00:02:09.520 --> 00:02:11.360
I think it's essential.
00:02:11.360 --> 00:02:13.080
Go grab a cup of coffee or something.
00:02:13.080 --> 00:02:16.640
And then using a step-by-step process.
00:02:16.640 --> 00:02:23.000
Don't just, I mean, it's hard to say not to just jump to the thing that you think might be broken and try to fix it.
00:02:23.000 --> 00:02:26.380
Okay, after you did that and it didn't work, then come back to this.
00:02:26.860 --> 00:02:29.240
And then do a step-by-step methodical process.
00:02:29.240 --> 00:02:31.360
And I think it's very helpful.
00:02:31.360 --> 00:02:39.200
There's a little comic here, which is great, of Gru from, oh, I forget the name of the movie.
00:02:39.200 --> 00:02:45.020
But he says, need to debug an issue, set a breakpoint to get started.
00:02:45.020 --> 00:02:46.560
The breakpoint never hits.
00:02:46.560 --> 00:02:47.940
The breakpoint never hits.
00:02:47.940 --> 00:02:48.840
It's pretty funny.
00:02:48.840 --> 00:02:52.360
Anyway, so being methodical about it will help.
00:02:52.880 --> 00:02:59.100
And then I'm glad he brought this up, talking about rubber ducking or talking to ducks.
00:02:59.100 --> 00:03:07.600
And this is an age-old, and I don't know if it ever actually happened in my computer science classes in our lab.
00:03:07.720 --> 00:03:19.700
We had a stuffed monkey that if you asked the TAs or the grad students that were hanging out in the lab for help, they would say, ask the monkey first.
00:03:21.140 --> 00:03:32.500
And so this is just essentially getting a description of the bug, the situation, the background information in your mind in a way that you can say it out loud will sometimes completely solve your problem.
00:03:33.200 --> 00:03:35.740
It's an incredible tool.
00:03:35.740 --> 00:03:43.800
And one of the things that was interesting is he talks about brain dump as an alternative solution is write it on paper.
00:03:43.800 --> 00:03:48.040
If you're not the kind of person that verbalizing helps, writing it on paper might help.
00:03:48.040 --> 00:03:48.480
Okay.
00:03:48.480 --> 00:03:52.460
Now let's get into the tools, the tools that help with debugging.
00:03:53.020 --> 00:03:58.500
And I used to feel guilty about this all the time, but I reach for print all the time.
00:03:58.500 --> 00:04:01.700
So, or some sort of log.
00:04:01.700 --> 00:04:03.340
They said, don't do print.
00:04:03.340 --> 00:04:03.800
Come on.
00:04:04.880 --> 00:04:08.180
So his technique is to start with print because it's low friction.
00:04:08.180 --> 00:04:09.580
Everybody knows how to do it.
00:04:09.580 --> 00:04:11.340
Plus we have f-strings now.
00:04:11.340 --> 00:04:19.380
And with the, with the equal sign, if you do like curly braces and then their variable name with the equal, it just says it's great.
Load full transcript
00:04:19.380 --> 00:04:24.120
So anyway, it's, it's really easy to debug print, which is good.
00:04:24.120 --> 00:04:25.580
And it's, it's a little friction.
00:04:25.580 --> 00:04:26.420
It's easy to add.
00:04:26.420 --> 00:04:34.400
Snoop is a, is a interesting, cool toolkit that he talks about for helping to see what's going on within your code.
00:04:34.400 --> 00:04:35.320
At each step.
00:04:35.320 --> 00:04:37.380
It's pretty cool tool as well.
00:04:37.380 --> 00:04:39.660
Let's just quickly go through some of the other two.
00:04:39.660 --> 00:04:42.760
That's, those are the two like printing logging sort of things.
00:04:42.760 --> 00:04:44.620
There's also ice cream that he mentions.
00:04:44.620 --> 00:04:48.060
And there's debuggers.
00:04:48.060 --> 00:04:59.400
So talking about debuggers, this is not, interestingly, he doesn't mention like IDEs, which that's what I usually, usually reach for is like either a PyCharm or VS Code debugger.
00:04:59.400 --> 00:05:02.960
But sometimes you don't have access to those.
00:05:03.100 --> 00:05:05.520
If you've like, if you're SSH into something or whatever.
00:05:05.520 --> 00:05:09.000
So invoking, being able to use PDB.
00:05:09.000 --> 00:05:12.000
I think he talks about PDB, which is the Python debugger.
00:05:12.000 --> 00:05:20.160
I, I learned how to actually had learned how to do this mostly just to talk about using PDB with pytest for the book.
00:05:20.160 --> 00:05:26.780
And now I use it once in a while because sometimes it's, it's, it's even more convenient, especially when using PDB with talks.
00:05:26.780 --> 00:05:27.280
It's great.
00:05:27.280 --> 00:05:31.800
So PDB, IPDB, which is an interactive REPL sort of thing.
00:05:31.800 --> 00:05:37.280
PUDB, which is kind of like a, it got panels and stuff.
00:05:37.280 --> 00:05:38.720
It's a nice terminal UI.
00:05:38.720 --> 00:05:42.480
Web PDB, which the same thing within a browser.
00:05:42.480 --> 00:05:43.320
It's kind of nice.
00:05:43.660 --> 00:05:47.340
Bird's eye is something I hadn't seen before, which is kind of cool talking about bird's eye.
00:05:47.340 --> 00:05:54.600
It has these kind of neat diagrams with like boxes around stuff as things change.
00:05:54.600 --> 00:05:56.820
It's a interesting interface.
00:05:57.080 --> 00:05:58.300
It's pretty, yeah.
00:05:58.300 --> 00:05:59.000
Yeah.
00:05:59.000 --> 00:06:03.460
I don't know if it's for me, but if it resonates with you, that's great.
00:06:03.460 --> 00:06:06.180
It might be worth trying on a, on a project.
00:06:06.180 --> 00:06:07.360
Kind of neat.
00:06:07.360 --> 00:06:11.480
Anyway, and then a quick shout out to some Django tools.
00:06:11.480 --> 00:06:20.620
So if you're, if you're debugging Django, there's the debug Django tool, the Django debug toolbar and a, an extension for VS Code called Colo.
00:06:20.620 --> 00:06:29.320
So anyway, some great advice about debugging specifically Python, but really kind of a lot of this advice applies to
everything.
00:06:29.320 --> 00:06:30.360
So nice.
00:06:30.360 --> 00:06:33.100
And kind of nice that there's a newsletter around that.
00:06:33.100 --> 00:06:34.600
Yeah, it is a nice newsletter.
00:06:34.600 --> 00:06:40.080
There's something kind of good about permanency of written stuff rather than, I mean, what we do is great.
00:06:40.080 --> 00:06:45.460
And I think it connects with a lot of people, but it's, it's harder to go back to it and like search it.
00:06:45.460 --> 00:06:56.380
So, yeah, and I kind of like the idea of, I know that a lot of newsletter, newsletters, software like Substack and things like that can keep it around for you in medium.
00:06:56.380 --> 00:07:04.360
But I like the idea of somebody doing a newsletter and putting the newsletter things on blog posts at the same time for people to reach out to.
00:07:04.360 --> 00:07:05.200
So neat.
00:07:05.200 --> 00:07:06.780
I might have more to say about that later.
00:07:07.980 --> 00:07:13.580
But I also have something to say about what you just pointed out, what you just talked about.
00:07:13.580 --> 00:07:16.380
And I have just done a new project.
00:07:16.380 --> 00:07:18.600
I have some things that I've been working on.
00:07:18.600 --> 00:07:26.520
You know, I already talked about the leave in the cloud and the interview with Mark Persinovich and how that inspired me to kind of rethink how our infrastructure goes.
00:07:26.520 --> 00:07:28.640
And it is just paying so many dividends.
00:07:28.640 --> 00:07:31.120
I'm going to talk about it in some interesting ways.
00:07:31.320 --> 00:07:36.020
And as part of that, I've had to write a little bit of new software and I'm like, I need some logging.
00:07:36.020 --> 00:07:37.860
I'm going to try Log Guru.
00:07:37.860 --> 00:07:38.740
Log Guru?
00:07:38.740 --> 00:07:39.500
No, no.
00:07:39.500 --> 00:07:40.660
The G is combined.
00:07:40.660 --> 00:07:43.640
And wow, is this a nice piece of logging software.
00:07:43.640 --> 00:07:48.440
So what I would suggest, Brian, if you're feeling the print coming on, if you're like, oh, I'm going to print this.
00:07:48.440 --> 00:07:51.260
I'm going to print my way to this bug solving this problem.
00:07:51.580 --> 00:07:54.640
Maybe consider Log Guru-ing your way.
00:07:54.640 --> 00:07:59.800
You just create the Log Guru thing and you can say use color and all of that.
00:07:59.800 --> 00:08:02.960
And it will also do print statements just to sys out, right?
00:08:02.960 --> 00:08:09.460
But you can see like right here on their homepage, it says like how to do like color and stuff like that.
00:08:09.460 --> 00:08:16.960
And then if you just logger.info or whatever, it'll print it out, but way more structured and with color.
00:08:17.060 --> 00:08:21.180
And then if there's an exception, you're going to like say print E or the exception.
00:08:21.180 --> 00:08:29.100
You could just say logger.exception and it will create the traceback showing the local variables at every step.
00:08:29.100 --> 00:08:34.460
So instead of having to jump into the debugger, you can just print your way to like, oh, here's the entire call stack and all the values.
00:08:34.460 --> 00:08:35.360
That's pretty cool.
00:08:35.360 --> 00:08:37.440
I super, super recommend it.
00:08:37.440 --> 00:08:38.500
I've been using Log Book.
00:08:38.500 --> 00:08:40.240
I'm a Log Guru fan.
00:08:40.240 --> 00:08:46.200
I'm resisting the urge to go and rewrite all my logging for all of my things because it's not that productive.
00:08:46.520 --> 00:08:47.740
But boy, my logging look cool.
00:08:47.740 --> 00:08:49.900
All right.
00:08:49.900 --> 00:08:51.000
That's not what I want to talk about.
00:08:51.000 --> 00:08:54.220
But I want to talk about things that were kind of inspired by that.
00:08:54.220 --> 00:08:56.580
So first, I want to talk about Umami.
00:08:56.580 --> 00:09:00.720
And this has a Python loopback really, really quickly here.
00:09:00.720 --> 00:09:03.420
But let's start from the outside in.
00:09:03.420 --> 00:09:03.720
Okay?
00:09:03.720 --> 00:09:04.380
Okay.
00:09:04.380 --> 00:09:12.800
So Brian, I set up Umami at umami.is, which is like Google Analytics, but not evil.
00:09:12.800 --> 00:09:13.740
That's awesome, right?
00:09:14.020 --> 00:09:16.460
So the idea is it's privacy preserving.
00:09:16.460 --> 00:09:20.360
It is GDPR and CCPA compliant.
00:09:20.360 --> 00:09:21.620
It's open source.
00:09:21.620 --> 00:09:24.420
And you can buy it as a service.
00:09:24.420 --> 00:09:24.780
Right?
00:09:24.780 --> 00:09:25.800
I can go over here and say pricing.
00:09:25.800 --> 00:09:31.280
For nine bucks, some period, I will get some number of websites.
00:09:31.280 --> 00:09:35.740
And it'll give me, you know, analytics like Google Analytics for my site.
00:09:35.740 --> 00:09:36.240
Right?
00:09:36.240 --> 00:09:37.120
That's pretty cool.
00:09:37.120 --> 00:09:37.920
Yeah.
00:09:37.960 --> 00:09:39.020
But what's better.
00:09:39.020 --> 00:09:42.800
The problem with that is it's still third-party JavaScript.
00:09:42.800 --> 00:09:45.880
Even if they don't use cookies, but it's still third-party JavaScript.
00:09:45.880 --> 00:09:51.400
And by way of that, it gets blocked a lot, especially by the developer crowd.
00:09:51.400 --> 00:09:51.920
Right?
00:09:51.920 --> 00:09:53.800
And I'm not, that's not a criticism.
00:09:53.800 --> 00:09:55.860
I'm like on the high end of blocking.
00:09:55.860 --> 00:09:56.160
Right?
00:09:56.160 --> 00:09:58.480
Like, I'm like, no, no, we're not doing this.
00:09:58.560 --> 00:10:00.300
No, you don't need this kind of stuff.
00:10:00.300 --> 00:10:00.540
Right?
00:10:00.540 --> 00:10:05.960
But if you run it on your own infrastructure, under your own domain, the app is doing nothing
00:10:05.960 --> 00:10:06.840
nefarious.
00:10:06.840 --> 00:10:10.180
It's talking to itself for some things and it's going back and talking to itself for other
00:10:10.180 --> 00:10:10.700
forward
tracking.
00:10:10.700 --> 00:10:16.780
So this is really, really easy to run under Docker as a multi-tier Docker app on your own
00:10:16.780 --> 00:10:18.020
domain, which is what I'm doing.
00:10:18.020 --> 00:10:23.080
And so now I can have some really nice insights into what are happening on Pythonbytes.fm,
00:10:23.080 --> 00:10:29.420
the courses, all that, without sharing any data with anyone ever and without being blocked
00:10:29.420 --> 00:10:33.700
because it's just code running on our own server, just like everything else on the website.
00:10:33.700 --> 00:10:34.440
That's cool.
00:10:34.440 --> 00:10:35.040
Awesome.
00:10:35.040 --> 00:10:35.260
Right?
00:10:35.260 --> 00:10:37.460
The problem is if you go over here and you're like, awesome.
00:10:37.460 --> 00:10:37.700
Okay.
00:10:37.700 --> 00:10:38.220
Developers.
00:10:38.220 --> 00:10:38.700
This is me.
00:10:38.700 --> 00:10:39.220
I'm a developer.
00:10:39.220 --> 00:10:39.800
Let's go.
00:10:39.800 --> 00:10:40.600
Let's take me to the docs.
00:10:40.600 --> 00:10:41.860
And cool.
00:10:41.860 --> 00:10:44.760
Look, there's an API section at the end down here.
00:10:44.760 --> 00:10:45.560
Okay.
00:10:45.560 --> 00:10:46.900
And now look, there's an API client.
00:10:46.900 --> 00:10:47.780
I don't want to write code.
00:10:47.880 --> 00:10:48.520
That's great.
00:10:48.520 --> 00:10:50.840
NPM install API client.
00:10:50.840 --> 00:10:53.340
Oh, crap.
00:10:53.340 --> 00:10:59.140
The only API client for Umami is JavaScript or TypeScript.
00:10:59.140 --> 00:10:59.500
I don't know.
00:10:59.500 --> 00:10:59.960
It doesn't matter.
00:10:59.960 --> 00:11:00.800
It runs in JavaScript.
00:11:00.800 --> 00:11:01.960
It's not Python, right?
00:11:01.960 --> 00:11:02.780
Actually, TypeScript.
00:11:02.780 --> 00:11:04.740
This whole app is basically TypeScript, right?
00:11:04.740 --> 00:11:06.940
That was until this week.
00:11:06.940 --> 00:11:13.960
So some guy down here named Michael released this thing called Umami-Analytics, put it on
00:11:13.960 --> 00:11:15.920
PyPI, go over to the homepage.
00:11:16.740 --> 00:11:19.320
And you can see it talks about how it works.
00:11:19.320 --> 00:11:23.880
Basically, one of the things that's really nice about Umami over certain other systems,
00:11:23.880 --> 00:11:30.040
like plausible.io is one that has been thrown around in the same space and it's similar,
00:11:30.040 --> 00:11:36.160
is that with Umami, you can send custom events that have nothing to do with direct web actions.
00:11:36.640 --> 00:11:43.200
So for example, suppose somebody signs up for an account and then opts into your newsletter.
00:11:43.200 --> 00:11:44.320
You just talked about newsletters.
00:11:44.320 --> 00:11:45.980
And then that's a double opt-in.
00:11:45.980 --> 00:11:50.360
So they get an email, which then goes back to some other place where they actually say,
00:11:50.360 --> 00:11:52.600
yes, I really, really do want to get this.
00:11:52.600 --> 00:11:55.500
It'd be cool if you could know, okay, that happened, right?
00:11:55.500 --> 00:12:02.420
And so the whole point of this Python library is to add Python-based events to your analytics
00:12:02.420 --> 00:12:04.960
on top of just what the JavaScript is like.
00:12:04.960 --> 00:12:07.860
You're on this page and then you went to that page and you came from this place and you're
00:12:07.860 --> 00:12:08.360
on this browser.
00:12:08.760 --> 00:12:13.980
It'll let you send in things like somebody bought a course, somebody confirmed their email
00:12:13.980 --> 00:12:18.160
address, somebody logged in with the mobile app for the first time.
00:12:18.160 --> 00:12:23.200
Like all of these things that have no straight HTML JavaScript experience, you can just pump
00:12:23.200 --> 00:12:25.280
those in right alongside all of your other analytics.
00:12:25.280 --> 00:12:30.920
Still all privacy preserving, not sharing data with anybody, no retargeting, no cookies, none
00:12:30.920 --> 00:12:31.440
of that crap.
00:12:31.440 --> 00:12:34.200
Just, I want to view into what's happening in my app.
00:12:34.200 --> 00:12:36.380
So this thing lets you add a custom event.
00:12:36.660 --> 00:12:39.060
And also you can like register multiple sites.
00:12:39.060 --> 00:12:40.620
You can list them out.
00:12:40.620 --> 00:12:46.620
It has both synchronous and asynchronous programming models based on Pydantic and HTTPX.
00:12:46.620 --> 00:12:48.620
And yeah, super easy to use.
00:12:48.620 --> 00:12:49.400
Very cool.
00:12:49.400 --> 00:12:50.020
Isn't that neat?
00:12:50.020 --> 00:12:50.540
Yeah.
00:12:50.540 --> 00:12:56.160
So recommend Umami, but one of the problems with Umami is there's not really a great client
00:12:56.160 --> 00:12:57.020
to like round that out.
00:12:57.020 --> 00:12:58.880
So check out the one that I created.
00:12:58.880 --> 00:12:59.440
Nice.
00:12:59.440 --> 00:13:01.020
This is going to be a theme this week.
00:13:01.020 --> 00:13:04.380
So apparently we didn't plan this.
00:13:04.380 --> 00:13:05.080
Like, no.
00:13:05.080 --> 00:13:05.680
Yeah.
00:13:06.100 --> 00:13:08.760
If we did, we would have both worn blue shirts.
00:13:08.760 --> 00:13:09.460
Oh, wait.
00:13:09.460 --> 00:13:10.580
We're both wearing blue shirts.
00:13:10.580 --> 00:13:11.840
We are wearing blue shirts.
00:13:11.840 --> 00:13:13.040
Oh, my tent is off though.
00:13:13.040 --> 00:13:14.360
All right.
00:13:14.360 --> 00:13:15.020
Over to you.
00:13:15.020 --> 00:13:21.340
I had an extra from the last one because there was a link from Eunice that about fstrings.help,
00:13:21.340 --> 00:13:24.040
which I think I've seen before, but I kind of forgot about.
00:13:24.040 --> 00:13:29.920
But just looks like a Jupyter notebook about fstrings, which is okay.
00:13:30.160 --> 00:13:31.860
Well, I'll have a link in the show notes.
00:13:31.860 --> 00:13:34.620
I wanted to mention that.
00:13:35.080 --> 00:13:38.200
So I did an open source thing
also.
00:13:38.200 --> 00:13:44.260
So I released a thing called pytest Suite Timeout.
00:13:44.260 --> 00:13:47.680
And there's a little, I guess, a story around it.
00:13:47.680 --> 00:13:53.000
So what happened was I recorded an episode of Python Test about repeating tests.
00:13:53.420 --> 00:13:56.680
And I noted that pytest Repeat doesn't have a timeout.
00:13:56.680 --> 00:13:59.240
But pytest Flake Finder does have a timeout.
00:13:59.240 --> 00:14:02.380
And it'd be kind of neat if repeat had a timeout also.
00:14:02.900 --> 00:14:07.020
And by timeout, I mean, there's like the entire suite.
00:14:07.020 --> 00:14:10.720
So if I want to say like, hey, I want to run like, I have an example.
00:14:10.720 --> 00:14:16.140
I want to run my suite like a thousand times or a test a thousand times because I'm looking
00:14:16.140 --> 00:14:18.280
for flaky behavior or something.
00:14:18.280 --> 00:14:21.440
But I want to make sure that it only runs like 10 minutes.
00:14:21.440 --> 00:14:24.480
Then I want, that's the behavior I wanted.
00:14:24.480 --> 00:14:28.840
Like the entire suite, not individual tests, but the entire suite to only be like 10 minutes
00:14:28.840 --> 00:14:29.900
or an hour or whatever.
00:14:29.900 --> 00:14:32.000
That's the behavior I want.
00:14:32.000 --> 00:14:33.640
And I couldn't figure it out.
00:14:33.640 --> 00:14:35.960
And so I wrote this.
00:14:35.960 --> 00:14:39.160
Now, it could have been in pytest Repeat.
00:14:39.160 --> 00:14:44.480
But while I was thinking about it, I thought, well, I have other times where like I've got
00:14:44.480 --> 00:14:49.160
parameterized tests that are like big lists, like 20 different waveforms or something that
00:14:49.160 --> 00:14:50.220
I'm passing through something.
00:14:50.220 --> 00:14:54.120
And sometimes I don't really know how long those are going to take.
00:14:54.120 --> 00:14:58.100
It'd be kind of nice to be able to say, hey, I want to make sure that the whole suite isn't
00:14:58.100 --> 00:14:59.420
longer than so much.
00:14:59.420 --> 00:15:02.440
So I made it its own plugin.
00:15:02.440 --> 00:15:03.620
So here it is.
00:15:03.620 --> 00:15:04.820
pytest Sweet Timeout.
00:15:04.820 --> 00:15:07.080
You just pass it a flag.
00:15:07.080 --> 00:15:10.200
It's still, I just sort of did this a couple of days ago.
00:15:10.200 --> 00:15:12.840
And I think there might be bugs in it.
00:15:12.840 --> 00:15:15.380
So I guess don't put it in production yet.
00:15:15.380 --> 00:15:17.300
That's why I never did.
00:15:17.300 --> 00:15:17.720
Well, production.
00:15:17.720 --> 00:15:18.420
Yeah.
00:15:18.420 --> 00:15:24.960
It's a little lower bar for test production rather than I took down the website.
00:15:25.140 --> 00:15:29.120
It just took down CI/CD is possibly what you might take down, which is still a problem.
00:15:29.120 --> 00:15:29.820
Yeah.
00:15:29.820 --> 00:15:33.100
Well, I think I just ran across this morning.
00:15:33.100 --> 00:15:33.900
I was playing with it.
00:15:33.900 --> 00:15:36.740
At least one use case, the word doesn't actually time out.
00:15:36.740 --> 00:15:41.400
But so that's the behavior when it fails is it won't time out.
00:15:41.660 --> 00:15:44.160
But we'll work with it and fix it.
00:15:44.160 --> 00:15:45.040
That's super cool.
00:15:45.040 --> 00:15:47.840
One of the, I announced it on Mastodon.
00:15:47.840 --> 00:15:52.440
And Mike Felder said, that's pretty cool.
00:15:52.440 --> 00:15:55.560
But have you tried pytest-Timeout?
00:15:55.560 --> 00:15:58.060
Which, yeah, there's another one called Timeout.
00:15:58.060 --> 00:16:00.660
And it seems like that should be like what I want.
00:16:00.660 --> 00:16:04.860
It's just the timeout is the pytest timeout is per test.
00:16:04.860 --> 00:16:11.660
It just makes sure that individual tests themselves don't run longer than a certain amount.
00:16:11.660 --> 00:16:15.280
And this is kind of like, you should know this, right?
00:16:15.280 --> 00:16:17.580
Probably about how long your tests run.
00:16:17.580 --> 00:16:21.580
But there's, it's Python and software.
00:16:21.580 --> 00:16:26.240
So sometimes infinite loops happen or some use case that you never break out of.
00:16:26.240 --> 00:16:35.800
And also, like, just the fact that it's taking way longer than it should might be something you want to trigger as an error, right?
00:16:35.800 --> 00:16:47.120
Like, if for some reason you want to talk to a database or an API directly and you're not stubbing it out, if those things are down, it could take 20 seconds for them to say, nope, every single time.
00:16:47.120 --> 00:16:51.060
And you might want to say, if this ever takes more than five seconds, something's wrong and just kill it.
00:16:51.060 --> 00:16:51.860
You know what I mean?
00:16:51.860 --> 00:16:52.320
Right?
00:16:52.320 --> 00:16:54.320
Like, I think that would even be reasonable.
00:16:54.760 --> 00:17:00.320
Yeah, so that's the idea around pytest timeout is if it takes longer than a certain amount, attempts to kill it.
00:17:00.320 --> 00:17:00.860
And it does.
00:17:00.860 --> 00:17:06.080
It does, like, SIG events and stuff to try to kill the process that's taking too long.
00:17:06.080 --> 00:17:06.980
Excellent.
00:17:06.980 --> 00:17:09.880
Whereas the new one, sweet timeout, is nice.
00:17:09.880 --> 00:17:11.340
It won't kill anything.
00:17:11.340 --> 00:17:14.460
But it also, it won't stop, something like that.
00:17:14.460 --> 00:17:19.700
But it'll just, between tests, say, hey, this is taking kind of too long.
00:17:19.700 --> 00:17:20.600
Let's stop now.
00:17:21.040 --> 00:17:22.000
Okay.
00:17:22.000 --> 00:17:25.880
Well, you might not want to SIG kill either.
00:17:25.880 --> 00:17:34.620
Because what if it's going to put something in a database, do some stuff, and then take it back out or make a file change and then clean up the temporary files or, you know, whatever, right?
00:17:35.560 --> 00:17:36.000
Yeah.
00:17:36.000 --> 00:17:40.720
The other part of this, though, is I think it's too nice so far.
00:17:40.720 --> 00:17:44.360
It doesn't throw any exceptions or errors or anything.
00:17:44.360 --> 00:17:46.300
It just stops the counting.
00:17:46.500 --> 00:17:54.060
So if you normally, like, in this example, if I had 1,000 and I only get through, like, 150, it just stops, passes everything.
00:17:54.060 --> 00:17:56.680
But it only ran 150 instead of 1,000.
00:17:56.680 --> 00:18:02.420
I'm trying to figure out a way to, like, alert the user a little bit more that there's something wrong.
00:18:02.420 --> 00:18:04.560
So we'll see.
00:18:04.560 --> 00:18:07.160
It'll grow a little bit after this.
00:18:07.540 --> 00:18:07.620
Cool.
00:18:07.620 --> 00:18:08.500
Oh, excellent.
00:18:08.500 --> 00:18:09.260
Excellent.
00:18:09.260 --> 00:18:12.800
This is a crazy episode of where it's just we all created a bunch of things.
00:18:12.800 --> 00:18:14.500
So let's go back to things we created, huh?
00:18:14.500 --> 00:18:15.040
Okay.
00:18:15.040 --> 00:18:15.200
Next one.
00:18:15.200 --> 00:18:19.640
This one is also a thing I didn't create, but outside in again.
00:18:20.000 --> 00:18:22.920
So I've been using MailChimp for years.
00:18:22.920 --> 00:18:32.480
And when I first started using MailChimp, you know, MailChimp is I want to let you subscribe to my newsletter and put you into groups so that if I only want to talk to the Talk Python people, I can send that message.
00:18:32.480 --> 00:18:35.500
If I only want to talk to the Python Bytes people, I can send that message, right?
00:18:35.500 --> 00:18:40.400
And the price has just been going up and up and up, like hundreds of $100 this month.
00:18:40.400 --> 00:18:41.500
The next one, then another $100.
00:18:41.500 --> 00:18:43.620
You're like, what is going on with these people?
00:18:43.620 --> 00:18:44.740
You know, Intuit bought it.
00:18:44.740 --> 00:18:50.080
And it used to be like kind of a cute little company, and now it's just an accounting firm grinding its users.
00:18:50.080 --> 00:18:51.680
And I kind of don't want anything else to do with it.
00:18:51.680 --> 00:19:00.380
And I would much prefer to not share all of the people, customers, people who just want to subscribe their data with a third party either, right?
00:19:00.380 --> 00:19:03.260
So I went on, I think I talked about this before.
00:19:03.260 --> 00:19:08.320
Remember I talked about the 10 different options that people had sent out of possible newsletter places?
00:19:08.320 --> 00:19:08.720
Yeah.
00:19:08.720 --> 00:19:13.660
I wish I remember who told me on Mastodon, but somebody said, well, there's these five open source ones.
00:19:13.660 --> 00:19:14.480
I'm like, wait a minute.
00:19:14.820 --> 00:19:15.800
Okay, that's interesting.
00:19:15.800 --> 00:19:20.620
And so after a bunch of research, I decided to turn on ListMonk.
00:19:20.620 --> 00:19:25.700
And ListMonk is written in Go, and it's an open source.
00:19:25.700 --> 00:19:27.400
There's not even a SaaS version.
00:19:27.400 --> 00:19:31.440
It's just self-hosted version of basically MailChimp, right?
00:19:31.440 --> 00:19:32.780
You can have different lists.
00:19:32.780 --> 00:19:33.880
People can subscribe to them.
00:19:33.880 --> 00:19:34.660
You can put them into groups.
00:19:34.660 --> 00:19:36.460
You send them emails, all that kind of stuff, right?
00:19:36.460 --> 00:19:36.860
Yeah.
00:19:36.860 --> 00:19:43.380
So again, because I have all this cool Docker infrastructure stuff set up now, it was super easy to just move that over
00:19:43.380 --> 00:19:45.380
and run that in Docker, right?
00:19:45.500 --> 00:19:46.400
Just like you, Mom.
00:19:46.400 --> 00:19:48.580
You're like, okay, how do I talk to it?
00:19:48.580 --> 00:19:50.860
There's not even an official API client.
00:19:50.860 --> 00:19:53.020
The ones you find are like, well, here's one for PHP.
00:19:53.020 --> 00:19:58.380
There's actually several for Python, but they're really bad and they don't work.
00:19:58.600 --> 00:19:59.620
I mean, really bad.
00:19:59.620 --> 00:20:07.740
So some of them, for example, are just, they look at the Swagger docs or the open API docs and they're just auto-generated.
00:20:07.740 --> 00:20:12.280
But somehow it's like stuck in time, auto-generated on an old version that doesn't work anymore.
00:20:12.280 --> 00:20:12.700
I don't know.
00:20:12.700 --> 00:20:14.800
It's like even the auto-generated one doesn't work.
00:20:14.800 --> 00:20:18.280
I'm like, ah, man, I really need this even more than the umami thing.
00:20:18.280 --> 00:20:20.260
I need code to be written.
00:20:20.500 --> 00:20:26.060
So like someone creates an account when they buy a course and they say, yes, I want to be, you know, I ask them, do you want to be in the middle of this?
00:20:26.060 --> 00:20:26.820
Yes, I want to be there.
00:20:26.820 --> 00:20:28.100
How do I make that happen?
00:20:28.100 --> 00:20:28.460
Right?
00:20:28.460 --> 00:20:30.020
Well, Python, of course.
00:20:30.020 --> 00:20:38.940
So over the next project, ListMonk email app API client for Python or just pip install ListMonk.
00:20:39.180 --> 00:20:41.320
So over here, this is the next one.
00:20:41.320 --> 00:20:42.460
Super nice.
00:20:42.460 --> 00:20:44.880
You can add a subscriber, get details about them.
00:20:44.880 --> 00:20:52.800
One of the things that's cool in ListMonk is there's a arbitrary JSON Python dictionary type thing associated with each user.
00:20:52.800 --> 00:20:55.360
So whatever data you want to put in there, you can.
00:20:55.360 --> 00:20:56.660
And with this thing, you can manage it.
00:20:56.660 --> 00:21:03.120
Like, for example, if one thing that's common is you have a rating or things along those lines or actions.
00:21:03.120 --> 00:21:06.040
So you can put that into the user as part of their user record.
00:21:06.040 --> 00:21:07.580
So you can manage it with that.
00:21:07.660 -->
00:21:11.820
You can search them, check the health of your self-hosted thing, segment on your list.
00:21:11.820 --> 00:21:14.100
Obviously, you've got to unsubscribe and delete users.
00:21:14.100 --> 00:21:15.940
You can even send transactional emails.
00:21:15.940 --> 00:21:18.140
So super, super cool stuff.
00:21:18.140 --> 00:21:27.160
Again, one more nice open source thing that's not, you know, some big, super expensive privacy questionable SaaS service.
00:21:27.160 --> 00:21:29.520
And instead, running good over here.
00:21:29.520 --> 00:21:30.520
It does take a little bit of work.
00:21:30.520 --> 00:21:32.700
Umami is like perfect.
00:21:33.260 --> 00:21:38.060
This is a little clunky in some little edge cases, but it's still quite nice.
00:21:38.060 --> 00:21:39.580
So that's the next project.
00:21:39.580 --> 00:21:42.180
Also available on PyPI today.
00:21:42.180 --> 00:21:43.380
Nice.
00:21:43.380 --> 00:21:45.420
Well, that's it for our items.
00:21:45.420 --> 00:21:46.520
Cool.
00:21:46.520 --> 00:21:50.580
Between all these things, we can help people write one, a little bit better test.
00:21:50.700 --> 00:21:57.580
And two, depend a little bit less on just giving up a little bit of privacy to trade it in convenience.
00:21:57.580 --> 00:21:59.540
Like Google Analytics, for example.
00:21:59.540 --> 00:22:02.140
Or to a lesser degree, some of these mail platforms.
00:22:02.140 --> 00:22:02.720
Yeah.
00:22:02.720 --> 00:22:03.200
Yeah.
00:22:03.200 --> 00:22:04.560
And save some money while you're at it.
00:22:04.560 --> 00:22:04.960
All right.
00:22:05.180 --> 00:22:10.900
Well, normally we would jump into some extras and I don't have any extras this week.
00:22:10.900 --> 00:22:12.340
So do you have any extras?
00:22:12.340 --> 00:22:14.060
I do have extras.
00:22:14.060 --> 00:22:15.480
Well, let's see what have I got here.
00:22:15.480 --> 00:22:16.540
Yeah.
00:22:16.540 --> 00:22:16.740
Okay.
00:22:16.740 --> 00:22:19.840
So the first one is if I'm running self-hosting these things, right?
00:22:19.840 --> 00:22:21.160
I'm running them in a Docker cluster.
00:22:21.160 --> 00:22:28.140
So it's really easy to basically just do a Docker pull, restart, you know, relaunch the app.
00:22:28.140 --> 00:22:28.900
Off it goes.
00:22:28.900 --> 00:22:29.360
Right.
00:22:29.360 --> 00:22:30.060
So that's awesome.
00:22:30.060 --> 00:22:32.940
That's one of the reasons I'm willing to run like you, mommy.
00:22:32.940 --> 00:22:37.440
Rather than like I have a server and all these database things that get a patch and whatever.
00:22:37.440 --> 00:22:37.700
Right.
00:22:37.700 --> 00:22:42.140
Just literally one command to manage like 15 multi-tier apps.
00:22:42.140 --> 00:22:42.620
It's awesome.
00:22:42.620 --> 00:22:44.700
But how do you know when there's a new one?
00:22:44.700 --> 00:22:45.100
Right.
00:22:45.100 --> 00:22:47.140
Obviously, you could just set it up to just do it continuously.
00:22:47.440 --> 00:22:52.020
But what I
realized is every GitHub repository, this has nothing to do with you, mommy.
00:22:52.020 --> 00:22:52.740
It's just an example.
00:22:52.740 --> 00:22:56.380
Every GitHub repository, if they use releases, right?
00:22:56.380 --> 00:23:03.520
If you go over here and you say like the releases, like I have a V0 1.10 for my you, mommy thing.
00:23:03.520 --> 00:23:04.940
And there's actually two of them.
00:23:04.940 --> 00:23:12.220
If you have that for any project, you can just go to the GitHub URL for the web, not the dot
00:23:12.220 --> 00:23:12.580
get thing.
00:23:12.580 --> 00:23:15.180
And just to slash releases dot Adam.
00:23:15.540 --> 00:23:20.000
And that's an RSS feed for the releases for any GitHub project, even if they don't have a blog.
00:23:20.000 --> 00:23:20.920
Wow.
00:23:20.920 --> 00:23:21.920
That's cool, right?
00:23:21.920 --> 00:23:22.720
Yeah.
00:23:22.720 --> 00:23:24.400
I can put this in Feedly then.
00:23:24.400 --> 00:23:25.000
Yes.
00:23:25.000 --> 00:23:26.360
I put it in Reader for me.
00:23:26.360 --> 00:23:29.980
And now I have Lismunk and you mommy and a few other things.
00:23:29.980 --> 00:23:34.040
And I'm like, if this gets changed, I probably want to just go take a little action on that real quick.
00:23:34.040 --> 00:23:35.520
And now it's in my RSS feed.
00:23:35.520 --> 00:23:36.760
That's pretty cool.
00:23:36.760 --> 00:23:37.240
Yeah.
00:23:37.240 --> 00:23:37.900
So very simple.
00:23:37.900 --> 00:23:40.640
Anyone can just watch whatever they want.
00:23:40.640 --> 00:23:42.400
Brian, we both tried to do this one.
00:23:42.400 --> 00:23:42.940
Yeah.
00:23:42.940 --> 00:23:43.640
Colo.
00:23:43.860 --> 00:23:45.080
You mentioned it in your article.
00:23:45.080 --> 00:23:50.100
I ran across this because I, sorry, I don't remember the last name, but I saw one of my
00:23:50.100 --> 00:23:51.560
Mastodon followers, Lily.
00:23:51.560 --> 00:23:56.980
She somehow interacted with me and her profile came by in my app.
00:23:56.980 --> 00:24:02.060
And I saw that she works on this thing called Colo, debugging for Django apps.
00:24:02.060 --> 00:24:02.860
I'm like, oh, that's interesting.
00:24:02.860 --> 00:24:03.400
What is this?
00:24:03.400 --> 00:24:04.960
So this is a thing that's in beta.
00:24:04.960 --> 00:24:10.300
It says, see everything happening in your running Django app.
00:24:10.380 --> 00:24:13.960
And they have a really nice design of their webpage here.
00:24:13.960 --> 00:24:16.720
So probably best to see visually.
00:24:16.720 --> 00:24:20.680
It says debug your Django app 10 times faster, get instant access, et cetera, et cetera.
00:24:20.680 --> 00:24:23.000
So this is a plugin or extension for VS Code.
00:24:23.000 --> 00:24:27.580
And it just has tons of information all available to you.
00:24:27.580 --> 00:24:30.640
So it has a tab or whatever the thing on the left is.
00:24:30.700 --> 00:24:40.400
You can see it as a plugin, and it shows you the request response, kind of like
dev tools
00:24:40.400 --> 00:24:41.140
in a web browser.
00:24:41.140 --> 00:24:48.760
So you can see headers, HTTP requests, responses as kind of a running history of the HTTP exchange
00:24:48.760 --> 00:24:50.900
your browser is having with your Django app.
00:24:50.900 --> 00:24:51.720
That's cool, right?
00:24:51.940 --> 00:24:57.480
And I think it's showing you, I'm not entirely sure, but I think it might be showing you even
00:24:57.480 --> 00:25:00.120
Python code, not just web things, right?
00:25:00.120 --> 00:25:05.460
It has local variables, arguments, and then it has even like this tree thing for visualizing
00:25:05.460 --> 00:25:06.660
code execution paths.
00:25:06.660 --> 00:25:08.300
So, yeah.
00:25:08.300 --> 00:25:11.680
So you click on the, sorry, you click on the request.
00:25:11.680 --> 00:25:15.260
It shows you the code, and then it actually shows you the local variables that were passed
00:25:15.260 --> 00:25:15.800
around as well.
00:25:15.800 --> 00:25:16.520
It's pretty neat.
00:25:16.840 --> 00:25:17.040
Yeah.
00:25:17.040 --> 00:25:22.240
I don't know that the tree, the visual thing is super pretty, but I don't know how full
00:25:22.240 --> 00:25:23.880
it is, but I haven't played with it yet.
00:25:23.880 --> 00:25:24.820
I agree with you.
00:25:24.820 --> 00:25:25.580
It's awesome.
00:25:25.580 --> 00:25:26.680
Wouldn't use it.
00:25:26.680 --> 00:25:30.560
Yeah.
00:25:30.560 --> 00:25:32.440
You can do, what is it?
00:25:32.440 --> 00:25:34.900
Inspect all the outbound HTTP requests made.
00:25:34.900 --> 00:25:35.740
That's kind of neat.
00:25:35.740 --> 00:25:41.000
And SQL queries, you can, it'll track all the SQL queries that were made.
00:25:41.000 --> 00:25:42.860
Really good for understanding what's happening.
00:25:42.860 --> 00:25:43.740
What's up, Brian?
00:25:43.740 --> 00:25:43.960
Good.
00:25:43.960 --> 00:25:46.700
No, it's just really nice because you never know when you're,
00:25:46.700 --> 00:25:50.300
queries get out of hand and you're making way more than you need to.
00:25:50.300 --> 00:25:51.020
Exactly.
00:25:51.020 --> 00:25:56.900
Especially in the ORM space, because it's so easy to do lazy loading and say, give me all
00:25:56.900 --> 00:25:58.480
the customers for each customer.
00:25:58.480 --> 00:26:00.400
Get me this thing about them.
00:26:00.400 --> 00:26:02.200
And that's a relationship.
00:26:02.200 --> 00:26:07.240
So every time through the loop, it's another database query, the so-called N plus one performance
00:26:07.240 --> 00:26:07.580
problem.
00:26:07.580 --> 00:26:07.800
Right.
00:26:07.800 --> 00:26:10.680
And you would just see like, whoa, the SQL thing is full.
00:26:10.680 --> 00:26:13.740
I thought there were like two or three requests and now it's just full.
00:26:13.740 --> 00:26:14.940
What is happening here?
00:26:14.940 --> 00:26:15.180
Right.
00:26:15.180 --> 00:26:16.240
So that's great.
00:26:16.620 --> 00:26:17.160
Yeah.
00:26:17.160 --> 00:26:17.480
Anyway.
00:26:17.480 --> 00:26:18.780
Ooh, background jobs.
00:26:18.780 --> 00:26:19.340
Yeah.
00:26:19.340 --> 00:26:21.500
Even contract your salary background tasks.
00:26:21.500 --> 00:26:22.640
So right now it's in beta.
00:26:22.640 --> 00:26:25.240
I'm pretty sure this is a thing that costs money at some point.
00:26:25.240 --> 00:26:26.540
Yeah.
00:26:26.540 --> 00:26:28.640
So if you VS Code, check this out.
00:26:28.640 --> 00:26:29.300
It's kind of interesting.
00:26:29.300 --> 00:26:30.340
Yeah, definitely.
00:26:30.340 --> 00:26:30.940
Neat.
00:26:30.940 --> 00:26:31.460
Neat.
00:26:31.460 --> 00:26:31.820
All right.
00:26:31.820 --> 00:26:37.900
Another thing that's cool is I've talked about warp before and I've been using warp at the
00:26:37.900 --> 00:26:38.760
terminal a lot.
00:26:38.760 --> 00:26:44.620
one of the drawbacks of warp for all of its beauty and cool features is that it doesn't,
00:26:44.620 --> 00:26:48.840
it only works on Mac for now, which is a limitation, let's call it.
00:26:48.840 --> 00:26:49.800
Not for me.
00:26:50.940 --> 00:26:51.760
For other people.
00:26:51.760 --> 00:26:53.500
Not for me, but for a good chunk.
00:26:53.500 --> 00:26:55.680
Now I say it's only somewhat of a limitation.
00:26:55.680 --> 00:27:02.840
So like on my Mac, if I SSH into my Docker cluster thing that I've been talking about, warp will
00:27:02.840 --> 00:27:08.280
like inject the warp behaviors into the Linux shell over there.
00:27:08.280 --> 00:27:11.900
So I get like end to end warp as a Mac user.
00:27:11.900 --> 00:27:17.220
But if I was actually a Linux user, I couldn't use warp because it's a Mac app until pretty
00:27:17.220 --> 00:27:17.660
much now.
00:27:17.660 --> 00:27:17.860
Right.
00:27:17.860 --> 00:27:20.720
So coming soon is warp on Linux.
00:27:20.720 --> 00:27:22.260
So people want to sign up for that.
00:27:22.260 --> 00:27:26.840
I put a link for in the Linux terminal signup page to get on the wait list.
00:27:26.840 --> 00:27:31.680
And warp is just a super neat way to work with, with your terminal.
00:27:31.680 --> 00:27:32.920
It's more like an editor.
00:27:32.920 --> 00:27:36.120
It's got AI built in, which most AI built in things I hate.
00:27:36.120 --> 00:27:36.960
They're really bad.
00:27:36.980 --> 00:27:39.200
But you can say things like just say hash.
00:27:39.200 --> 00:27:44.580
And then you'll say something like, you know, search this directory for all files with this
00:27:44.580 --> 00:27:46.500
pattern, except that directory.
00:27:46.500 --> 00:27:49.840
And then it'll go, here's the command that you type, you know, like that kind of it's
00:27:49.840 --> 00:27:52.800
because it's that kind of stuff that I'm like, what's the parameter to this?
00:27:52.800 --> 00:27:54.240
How do I grep that again?
00:27:54.240 --> 00:27:55.040
I don't have no idea.
00:27:55.040 --> 00:27:57.000
So anyway, it's pretty cool.
00:27:57.000 --> 00:27:58.780
I wonder if it's set up.
00:27:58.780 -->
00:28:04.280
I'm just curious if it's since they're doing different platforms, if they've got a UI layer
00:28:04.280 --> 00:28:05.600
and then a warp core.
00:28:06.140 --> 00:28:08.420
Oh my God, they probably do have a warp core.
00:28:08.420 --> 00:28:11.960
And if they didn't name it that they've really lost a chance here, right?
00:28:11.960 --> 00:28:13.100
Yeah, hopefully.
00:28:13.100 --> 00:28:15.500
So I talked about this before.
00:28:15.500 --> 00:28:21.480
I realized through search about two and a half years ago, something called BPytop.
00:28:21.700 --> 00:28:26.580
So BPytop is an awesome, if it gets too small, it thinks it's going to hide all of its graphics,
00:28:26.580 --> 00:28:30.120
way to look at how your server is going.
00:28:30.120 --> 00:28:34.820
And it is so neat the way that this app works.
00:28:34.820 --> 00:28:36.560
I definitely, let me just, I'll put it up.
00:28:36.780 --> 00:28:42.700
Here's the live running version of the one that I've been messing with lately.
00:28:42.700 --> 00:28:45.100
And Brian, you can see you've got your memory.
00:28:45.100 --> 00:28:47.420
There's not a whole lot of action going on right now.
00:28:47.420 --> 00:28:48.740
So it's kind of blank graphs.
00:28:48.740 --> 00:28:51.200
But like if the memory jumped up, you would see it go up.
00:28:51.240 --> 00:28:56.660
It shows you how much memory is free, how much is being used, how much of that is being cached.
00:28:56.660 --> 00:28:57.860
Disk activity.
00:28:57.860 --> 00:29:00.880
You can see the network traffic.
00:29:00.880 --> 00:29:03.820
The multiple, you know, it has four CPUs.
00:29:03.820 --> 00:29:07.760
And it shows you graphs for all four CPUs as well as like the combined.
00:29:08.320 --> 00:29:13.080
And I'm not going to show the processes because they might show command arguments that I don't
00:29:13.080 --> 00:29:13.160
know.
00:29:13.160 --> 00:29:13.740
I just don't want to share.
00:29:13.740 --> 00:29:18.220
But it seems like it probably somehow could be a bad idea that I'm not aware of.
00:29:18.220 --> 00:29:20.060
But we'll learn later in a hard way.
00:29:20.060 --> 00:29:24.940
But isn't that an amazing way to just, this is over an SSH session.
00:29:24.940 --> 00:29:26.200
Oh, that's pretty cool.
00:29:26.200 --> 00:29:26.960
That's amazing.
00:29:26.960 --> 00:29:27.740
Yeah.
00:29:27.740 --> 00:29:28.980
And watch this.
00:29:28.980 --> 00:29:35.480
So if I just hit escape, you get even, it's like an old video game options with mouse support
00:29:35.480 --> 00:29:36.060
and everything.
00:29:36.060 --> 00:29:37.060
Oh, that's pretty cool.
00:29:37.060 --> 00:29:37.480
Yeah.
00:29:37.720 --> 00:29:44.900
So another thing to sort of announce here is there's bPyTop, which you can pipx install.
00:29:44.900 --> 00:29:49.380
But they've also, as part of this, released a bTop rewritten.
00:29:49.380 --> 00:29:51.120
And I think it must be C++.
00:29:51.120 --> 00:29:53.460
So anyway, that's cool, right?
00:29:53.460 --> 00:29:56.680
People can, I think that's supposed to be a little bit more high performance.
00:29:56.680 --> 00:30:00.080
Although to me, they kind of seem like the same type of thing.
00:30:00.080 --> 00:30:01.320
Anyway, really cool.
00:30:01.320 --> 00:30:06.580
If you've been using like Top or something like this, you know, there's a really much better
00:30:06.580 --> 00:30:08.800
way and glances is good.
00:30:08.800 --> 00:30:11.580
But bTop is the new, the new winner in my world here.
00:30:11.580 --> 00:30:16.260
And you know, those sort of graphs, even if you don't need them, you can have a second monitor
00:30:16.260 --> 00:30:17.340
and have one of those running.
00:30:17.340 --> 00:30:21.160
Everybody in your life will think you do something cooler than you actually do.
00:30:21.160 --> 00:30:21.640
Whoa.
00:30:21.640 --> 00:30:22.940
You're a hacker, aren't you?
00:30:22.940 --> 00:30:23.580
That's a terminal.
00:30:23.580 --> 00:30:25.960
Yeah, I am.
00:30:26.040 --> 00:30:26.160
Okay.
00:30:26.160 --> 00:30:26.700
Yeah.
00:30:26.700 --> 00:30:27.660
Don't cross me.
00:30:27.660 --> 00:30:28.660
Don't you cross me.
00:30:28.660 --> 00:30:29.060
All right.
00:30:29.060 --> 00:30:29.740
Nice.
00:30:29.740 --> 00:30:31.660
Right.
00:30:31.660 --> 00:30:33.100
I think that's our extras.
00:30:33.100 --> 00:30:34.780
It is.
00:30:34.780 --> 00:30:37.000
Chris Tyler, just real quick, has a recommendation.
00:30:37.000 --> 00:30:38.420
Switch to bottom.
00:30:38.760 --> 00:30:42.100
BTM, which is similar, but written in Rust and a little more performant.
00:30:42.100 --> 00:30:44.600
Also cross platform like BITOP.
00:30:44.600 --> 00:30:45.220
Hmm.
00:30:45.520 --> 00:30:45.840
Okay.
00:30:45.840 --> 00:30:49.220
Well, maybe, maybe that needs to be checked out as well.
00:30:49.220 --> 00:30:50.940
Maybe my time with BTOP was short.
00:30:50.940 --> 00:30:52.900
I'll be over to bottom before I know it.
00:30:52.900 --> 00:30:53.900
Top and bottom.
00:30:53.900 --> 00:30:54.960
That's just terrible.
00:30:54.960 --> 00:30:55.720
Yeah.
00:30:55.720 --> 00:30:56.260
These are funny.
00:30:56.260 --> 00:30:57.160
Yeah.
00:30:57.160 --> 00:30:57.800
Thanks, Christopher.
00:30:57.800 --> 00:30:58.200
All right.
00:30:58.540 --> 00:30:59.820
I think I'm ready for a joke.
00:30:59.820 --> 00:31:00.400
Yeah.
00:31:00.400 --> 00:31:05.660
I got something, you know, I've been talking about consolidating all these servers and running
00:31:05.660 --> 00:31:06.460
different things.
00:31:06.460 --> 00:31:10.100
We just talked about the monitoring your server and Docker.
00:31:10.100 --> 00:31:17.340
So I thought it might be fun to share this post on InfoSecExchange Mastodon from Jeff Hall.
00:31:17.340 --> 00:31:19.820
And it's got this, you described this for us, Brian.
00:31:19.820 --> 00:31:23.940
It's just a mess of cables coming out of the back of what?
00:31:23.940 --> 00:31:25.660
A bunch of, I don't know.
00:31:25.660 --> 00:31:26.760
Network equipment.
00:31:26.760 --> 00:31:27.220
Yeah.
00:31:27.820 --> 00:31:32.540
It's just like the world, you couldn't imagine a worse set of tangled wires.
00:31:32.540 --> 00:31:34.000
And they're dirty too, right?
00:31:34.000 --> 00:31:38.720
It's not just like, they're covered in all these routers and others.
00:31:38.720 --> 00:31:43.260
They're white, but they're most, they're significantly brown as well.
00:31:43.260 --> 00:31:45.920
With like a whole bunch of hubs hanging in between and stuff.
00:31:45.920 --> 00:31:46.320
Yeah.
00:31:46.320 --> 00:31:46.660
Yeah.
00:31:46.660 --> 00:31:51.000
And a lot of these pieces are just suspended by the wires and it just says the cloud.
00:31:51.000 --> 00:31:53.040
Yeah.
00:31:53.040 --> 00:31:54.520
Yeah.
00:31:54.520 --> 00:31:55.500
It's very nice.
00:31:55.500 --> 00:31:56.000
I love it.
00:31:56.000 --> 00:31:56.420
Yeah.
00:31:56.420 --> 00:31:57.300
That's very cool.
00:31:57.300 --> 00:31:57.820
So.
00:31:57.820 --> 00:31:58.220
Indeed.
00:31:58.220 --> 00:31:58.740
Funny.
00:31:58.740 --> 00:31:59.220
All right.
00:31:59.220 --> 00:32:01.180
Well, that's it for the show, I suppose.
00:32:01.180 --> 00:32:06.700
And, you know, we don't normally have a final call to action, but go check out your new Pi
00:32:06.700 --> 00:32:11.420
test thing, your timeout and check out some of these other self-hosted things.
00:32:11.420 --> 00:32:11.920
Yeah.
00:32:11.920 --> 00:32:11.960
Yeah.
00:32:11.960 --> 00:32:12.620
It's really cool.
00:32:12.620 --> 00:32:15.320
A lot of stuff people can adopt.
00:32:15.320 --> 00:32:16.060
And yeah.
00:32:16.060 --> 00:32:17.020
Thanks for being here.
00:32:17.020 --> 00:32:17.620
Thank you.