Transcript #368: That episode where we just ship open source
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:05 This is episode 368, recorded January 23rd, 2024.
00:12 I'm Michael Kennedy.
00:14 And I'm Brian Okken.
00:15 This episode is sponsored by us.
00:17 Support us by checking out our work.
00:20 We do lots of things.
00:22 We have many, many courses over at Talk Python Training.
00:24 We have the complete pytest course.
00:26 We have Patreon supporters, which you can become one in the show page, the episode page.
00:32 And connect with all of us, all three of us, Brian, me, and the show over on Fauceton.org.
00:37 And if you want to be part of the live episode, it's pythonbytes.fm/live.
00:42 Usually Tuesdays at 10 a.m.
00:45 We've changed it.
00:46 We have a new time, Brian.
00:47 New time, yes.
00:48 New time.
00:48 So that's the plan for now until it's not the plan.
00:52 But we love it when people show up for the show.
00:54 And now let's dive right in.
00:57 Go for it, Brian.
00:57 What you got?
00:58 Well, I wanted to talk about debugging a little bit because we've got a blog post.
01:05 Actually, it's a blog post and really a newsletter episode from Eunice.
01:12 It's a site called Syntax Error.
01:15 And it looks like it's a newsletter about debugging, which is kind of nice.
01:22 And somehow I missed it in the past year.
01:25 It started, it looks like February of 2023.
01:28 But we're on episode 11 or issue 11.
01:31 And it's kind of a summary.
01:32 So it's pretty neat.
01:33 Talking about debugging Python.
01:35 I really love just the concept of this, of the newsletter, but also just it's really good content in a small thing.
01:43 So what is he talking about?
01:45 So if you're debugging some code, the first thing you got to do is you got to get in the right mindset.
01:50 And then you can use some tools.
01:53 So I'm glad that he starts that with the mindset.
01:55 Just talking about mindset.
01:57 Take a break.
01:58 Stop, breathe, and then come back to it.
02:01 And this breaking away from you're frustrated with your code to clearing your head is really important.
02:08 Don't skip that.
02:09 I think it's essential.
02:11 Go grab a cup of coffee or something.
02:13 And then using a step-by-step process.
02:16 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.
02:23 Okay, after you did that and it didn't work, then come back to this.
02:26 And then do a step-by-step methodical process.
02:29 And I think it's very helpful.
02:31 There's a little comic here, which is great, of Gru from, oh, I forget the name of the movie.
02:39 But he says, need to debug an issue, set a breakpoint to get started.
02:45 The breakpoint never hits.
02:46 The breakpoint never hits.
02:47 It's pretty funny.
02:48 Anyway, so being methodical about it will help.
02:52 And then I'm glad he brought this up, talking about rubber ducking or talking to ducks.
02:59 And this is an age-old, and I don't know if it ever actually happened in my computer science classes in our lab.
03:07 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.
03:21 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.
03:33 It's an incredible tool.
03:35 And one of the things that was interesting is he talks about brain dump as an alternative solution is write it on paper.
03:43 If you're not the kind of person that verbalizing helps, writing it on paper might help.
03:48 Okay.
03:48 Now let's get into the tools, the tools that help with debugging.
03:53 And I used to feel guilty about this all the time, but I reach for print all the time.
03:58 So, or some sort of log.
04:01 They said, don't do print.
04:03 Come on.
04:04 So his technique is to start with print because it's low friction.
04:08 Everybody knows how to do it.
04:09 Plus we have f-strings now.
04:11 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.
04:19 So anyway, it's, it's really easy to debug print, which is good.
04:24 And it's, it's a little friction.
04:25 It's easy to add.
04:26 Snoop is a, is a interesting, cool toolkit that he talks about for helping to see what's going on within your code.
04:34 At each step.
04:35 It's pretty cool tool as well.
04:37 Let's just quickly go through some of the other two.
04:39 That's, those are the two like printing logging sort of things.
04:42 There's also ice cream that he mentions.
04:44 And there's debuggers.
04:48 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.
04:59 But sometimes you don't have access to those.
05:03 If you've like, if you're SSH into something or whatever.
05:05 So invoking, being able to use PDB.
05:09 I think he talks about PDB, which is the Python debugger.
05:12 I, I learned how to actually had learned how to do this mostly just to talk about using PDB with pytest for the book.
05:20 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.
05:26 It's great.
05:27 So PDB, IPDB, which is an interactive REPL sort of thing.
05:31 PUDB, which is kind of like a, it got panels and stuff.
05:37 It's a nice terminal UI.
05:38 Web PDB, which the same thing within a browser.
05:42 It's kind of nice.
05:43 Bird's eye is something I hadn't seen before, which is kind of cool talking about bird's eye.
05:47 It has these kind of neat diagrams with like boxes around stuff as things change.
05:54 It's a interesting interface.
05:57 It's pretty, yeah.
05:58 Yeah.
05:59 I don't know if it's for me, but if it resonates with you, that's great.
06:03 It might be worth trying on a, on a project.
06:06 Kind of neat.
06:07 Anyway, and then a quick shout out to some Django tools.
06:11 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.
06:20 So anyway, some great advice about debugging specifically Python, but really kind of a lot of this advice applies to everything.
06:29 So nice.
06:30 And kind of nice that there's a newsletter around that.
06:33 Yeah, it is a nice newsletter.
06:34 There's something kind of good about permanency of written stuff rather than, I mean, what we do is great.
06:40 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.
06:45 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.
06:56 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.
07:04 So neat.
07:05 I might have more to say about that later.
07:07 But I also have something to say about what you just pointed out, what you just talked about.
07:13 And I have just done a new project.
07:16 I have some things that I've been working on.
07:18 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.
07:26 And it is just paying so many dividends.
07:28 I'm going to talk about it in some interesting ways.
07:31 And as part of that, I've had to write a little bit of new software and I'm like, I need some logging.
07:36 I'm going to try Log Guru.
07:37 Log Guru?
07:38 No, no.
07:39 The G is combined.
07:40 And wow, is this a nice piece of logging software.
07:43 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.
07:48 I'm going to print my way to this bug solving this problem.
07:51 Maybe consider Log Guru-ing your way.
07:54 You just create the Log Guru thing and you can say use color and all of that.
07:59 And it will also do print statements just to sys out, right?
08:02 But you can see like right here on their homepage, it says like how to do like color and stuff like that.
08:09 And then if you just logger.info or whatever, it'll print it out, but way more structured and with color.
08:17 And then if there's an exception, you're going to like say print E or the exception.
08:21 You could just say logger.exception and it will create the traceback showing the local variables at every step.
08:29 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.
08:34 That's pretty cool.
08:35 I super, super recommend it.
08:37 I've been using Log Book.
08:38 I'm a Log Guru fan.
08:40 I'm resisting the urge to go and rewrite all my logging for all of my things because it's not that productive.
08:46 But boy, my logging look cool.
08:47 All right.
08:49 That's not what I want to talk about.
08:51 But I want to talk about things that were kind of inspired by that.
08:54 So first, I want to talk about Umami.
08:56 And this has a Python loopback really, really quickly here.
09:00 But let's start from the outside in.
09:03 Okay?
09:03 Okay.
09:04 So Brian, I set up Umami at umami.is, which is like Google Analytics, but not evil.
09:12 That's awesome, right?
09:14 So the idea is it's privacy preserving.
09:16 It is GDPR and CCPA compliant.
09:20 It's open source.
09:21 And you can buy it as a service.
09:24 Right?
09:24 I can go over here and say pricing.
09:25 For nine bucks, some period, I will get some number of websites.
09:31 And it'll give me, you know, analytics like Google Analytics for my site.
09:35 Right?
09:36 That's pretty cool.
09:37 Yeah.
09:37 But what's better.
09:39 The problem with that is it's still third-party JavaScript.
09:42 Even if they don't use cookies, but it's still third-party JavaScript.
09:45 And by way of that, it gets blocked a lot, especially by the developer crowd.
09:51 Right?
09:51 And I'm not, that's not a criticism.
09:53 I'm like on the high end of blocking.
09:55 Right?
09:56 Like, I'm like, no, no, we're not doing this.
09:58 No, you don't need this kind of stuff.
10:00 Right?
10:00 But if you run it on your own infrastructure, under your own domain, the app is doing nothing
10:05 nefarious.
10:06 It's talking to itself for some things and it's going back and talking to itself for other
10:10 forward tracking.
10:10 So this is really, really easy to run under Docker as a multi-tier Docker app on your own
10:16 domain, which is what I'm doing.
10:18 And so now I can have some really nice insights into what are happening on Pythonbytes.fm,
10:23 the courses, all that, without sharing any data with anyone ever and without being blocked
10:29 because it's just code running on our own server, just like everything else on the website.
10:33 That's cool.
10:34 Awesome.
10:35 Right?
10:35 The problem is if you go over here and you're like, awesome.
10:37 Okay.
10:37 Developers.
10:38 This is me.
10:38 I'm a developer.
10:39 Let's go.
10:39 Let's take me to the docs.
10:40 And cool.
10:41 Look, there's an API section at the end down here.
10:44 Okay.
10:45 And now look, there's an API client.
10:46 I don't want to write code.
10:47 That's great.
10:48 NPM install API client.
10:50 Oh, crap.
10:53 The only API client for Umami is JavaScript or TypeScript.
10:59 I don't know.
10:59 It doesn't matter.
10:59 It runs in JavaScript.
11:00 It's not Python, right?
11:01 Actually, TypeScript.
11:02 This whole app is basically TypeScript, right?
11:04 That was until this week.
11:06 So some guy down here named Michael released this thing called Umami-Analytics, put it on
11:13 PyPI, go over to the homepage.
11:16 And you can see it talks about how it works.
11:19 Basically, one of the things that's really nice about Umami over certain other systems,
11:23 like plausible.io is one that has been thrown around in the same space and it's similar,
11:30 is that with Umami, you can send custom events that have nothing to do with direct web actions.
11:36 So for example, suppose somebody signs up for an account and then opts into your newsletter.
11:43 You just talked about newsletters.
11:44 And then that's a double opt-in.
11:45 So they get an email, which then goes back to some other place where they actually say,
11:50 yes, I really, really do want to get this.
11:52 It'd be cool if you could know, okay, that happened, right?
11:55 And so the whole point of this Python library is to add Python-based events to your analytics
12:02 on top of just what the JavaScript is like.
12:04 You're on this page and then you went to that page and you came from this place and you're
12:07 on this browser.
12:08 It'll let you send in things like somebody bought a course, somebody confirmed their email
12:13 address, somebody logged in with the mobile app for the first time.
12:18 Like all of these things that have no straight HTML JavaScript experience, you can just pump
12:23 those in right alongside all of your other analytics.
12:25 Still all privacy preserving, not sharing data with anybody, no retargeting, no cookies, none
12:30 of that crap.
12:31 Just, I want to view into what's happening in my app.
12:34 So this thing lets you add a custom event.
12:36 And also you can like register multiple sites.
12:39 You can list them out.
12:40 It has both synchronous and asynchronous programming models based on Pydantic and HTTPX.
12:46 And yeah, super easy to use.
12:48 Very cool.
12:49 Isn't that neat?
12:50 Yeah.
12:50 So recommend Umami, but one of the problems with Umami is there's not really a great client
12:56 to like round that out.
12:57 So check out the one that I created.
12:58 Nice.
12:59 This is going to be a theme this week.
13:01 So apparently we didn't plan this.
13:04 Like, no.
13:05 Yeah.
13:06 If we did, we would have both worn blue shirts.
13:08 Oh, wait.
13:09 We're both wearing blue shirts.
13:10 We are wearing blue shirts.
13:11 Oh, my tent is off though.
13:13 All right.
13:14 Over to you.
13:15 I had an extra from the last one because there was a link from Eunice that about fstrings.help,
13:21 which I think I've seen before, but I kind of forgot about.
13:24 But just looks like a Jupyter notebook about fstrings, which is okay.
13:30 Well, I'll have a link in the show notes.
13:31 I wanted to mention that.
13:35 So I did an open source thing also.
13:38 So I released a thing called pytest Suite Timeout.
13:44 And there's a little, I guess, a story around it.
13:47 So what happened was I recorded an episode of Python Test about repeating tests.
13:53 And I noted that pytest Repeat doesn't have a timeout.
13:56 But pytest Flake Finder does have a timeout.
13:59 And it'd be kind of neat if repeat had a timeout also.
14:02 And by timeout, I mean, there's like the entire suite.
14:07 So if I want to say like, hey, I want to run like, I have an example.
14:10 I want to run my suite like a thousand times or a test a thousand times because I'm looking
14:16 for flaky behavior or something.
14:18 But I want to make sure that it only runs like 10 minutes.
14:21 Then I want, that's the behavior I wanted.
14:24 Like the entire suite, not individual tests, but the entire suite to only be like 10 minutes
14:28 or an hour or whatever.
14:29 That's the behavior I want.
14:32 And I couldn't figure it out.
14:33 And so I wrote this.
14:35 Now, it could have been in pytest Repeat.
14:39 But while I was thinking about it, I thought, well, I have other times where like I've got
14:44 parameterized tests that are like big lists, like 20 different waveforms or something that
14:49 I'm passing through something.
14:50 And sometimes I don't really know how long those are going to take.
14:54 It'd be kind of nice to be able to say, hey, I want to make sure that the whole suite isn't
14:58 longer than so much.
14:59 So I made it its own plugin.
15:02 So here it is.
15:03 pytest Sweet Timeout.
15:04 You just pass it a flag.
15:07 It's still, I just sort of did this a couple of days ago.
15:10 And I think there might be bugs in it.
15:12 So I guess don't put it in production yet.
15:15 That's why I never did.
15:17 Well, production.
15:17 Yeah.
15:18 It's a little lower bar for test production rather than I took down the website.
15:25 It just took down CICD is possibly what you might take down, which is still a problem.
15:29 Yeah.
15:29 Well, I think I just ran across this morning.
15:33 I was playing with it.
15:33 At least one use case, the word doesn't actually time out.
15:36 But so that's the behavior when it fails is it won't time out.
15:41 But we'll work with it and fix it.
15:44 That's super cool.
15:45 One of the, I announced it on Mastodon.
15:47 And Mike Felder said, that's pretty cool.
15:52 But have you tried pytest-Timeout?
15:55 Which, yeah, there's another one called Timeout.
15:58 And it seems like that should be like what I want.
16:00 It's just the timeout is the pytest timeout is per test.
16:04 It just makes sure that individual tests themselves don't run longer than a certain amount.
16:11 And this is kind of like, you should know this, right?
16:15 Probably about how long your tests run.
16:17 But there's, it's Python and software.
16:21 So sometimes infinite loops happen or some use case that you never break out of.
16:26 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?
16:35 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.
16:47 And you might want to say, if this ever takes more than five seconds, something's wrong and just kill it.
16:51 You know what I mean?
16:51 Right?
16:52 Like, I think that would even be reasonable.
16:54 Yeah, so that's the idea around pytest timeout is if it takes longer than a certain amount, attempts to kill it.
17:00 And it does.
17:00 It does, like, SIG events and stuff to try to kill the process that's taking too long.
17:06 Excellent.
17:06 Whereas the new one, sweet timeout, is nice.
17:09 It won't kill anything.
17:11 But it also, it won't stop, something like that.
17:14 But it'll just, between tests, say, hey, this is taking kind of too long.
17:19 Let's stop now.
17:21 Okay.
17:22 Well, you might not want to SIG kill either.
17:25 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?
17:35 Yeah.
17:36 The other part of this, though, is I think it's too nice so far.
17:40 It doesn't throw any exceptions or errors or anything.
17:44 It just stops the counting.
17:46 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.
17:54 But it only ran 150 instead of 1,000.
17:56 I'm trying to figure out a way to, like, alert the user a little bit more that there's something wrong.
18:02 So we'll see.
18:04 It'll grow a little bit after this.
18:07 Cool.
18:07 Oh, excellent.
18:08 Excellent.
18:09 This is a crazy episode of where it's just we all created a bunch of things.
18:12 So let's go back to things we created, huh?
18:14 Okay.
18:15 Next one.
18:15 This one is also a thing I didn't create, but outside in again.
18:20 So I've been using MailChimp for years.
18:22 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.
18:32 If I only want to talk to the Python Bytes people, I can send that message, right?
18:35 And the price has just been going up and up and up, like hundreds of $100 this month.
18:40 The next one, then another $100.
18:41 You're like, what is going on with these people?
18:43 You know, Intuit bought it.
18:44 And it used to be like kind of a cute little company, and now it's just an accounting firm grinding its users.
18:50 And I kind of don't want anything else to do with it.
18:51 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?
19:00 So I went on, I think I talked about this before.
19:03 Remember I talked about the 10 different options that people had sent out of possible newsletter places?
19:08 Yeah.
19:08 I wish I remember who told me on Mastodon, but somebody said, well, there's these five open source ones.
19:13 I'm like, wait a minute.
19:14 Okay, that's interesting.
19:15 And so after a bunch of research, I decided to turn on ListMonk.
19:20 And ListMonk is written in Go, and it's an open source.
19:25 There's not even a SaaS version.
19:27 It's just self-hosted version of basically MailChimp, right?
19:31 You can have different lists.
19:32 People can subscribe to them.
19:33 You can put them into groups.
19:34 You send them emails, all that kind of stuff, right?
19:36 Yeah.
19:36 So again, because I have all this cool Docker infrastructure stuff set up now, it was super easy to just move that over
19:43 and run that in Docker, right?
19:45 Just like you, Mom.
19:46 You're like, okay, how do I talk to it?
19:48 There's not even an official API client.
19:50 The ones you find are like, well, here's one for PHP.
19:53 There's actually several for Python, but they're really bad and they don't work.
19:58 I mean, really bad.
19:59 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.
20:07 But somehow it's like stuck in time, auto-generated on an old version that doesn't work anymore.
20:12 I don't know.
20:12 It's like even the auto-generated one doesn't work.
20:14 I'm like, ah, man, I really need this even more than the umami thing.
20:18 I need code to be written.
20:20 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?
20:26 Yes, I want to be there.
20:26 How do I make that happen?
20:28 Right?
20:28 Well, Python, of course.
20:30 So over the next project, ListMonk email app API client for Python or just pip install ListMonk.
20:39 So over here, this is the next one.
20:41 Super nice.
20:42 You can add a subscriber, get details about them.
20:44 One of the things that's cool in ListMonk is there's a arbitrary JSON Python dictionary type thing associated with each user.
20:52 So whatever data you want to put in there, you can.
20:55 And with this thing, you can manage it.
20:56 Like, for example, if one thing that's common is you have a rating or things along those lines or actions.
21:03 So you can put that into the user as part of their user record.
21:06 So you can manage it with that.
21:07 You can search them, check the health of your self-hosted thing, segment on your list.
21:11 Obviously, you've got to unsubscribe and delete users.
21:14 You can even send transactional emails.
21:15 So super, super cool stuff.
21:18 Again, one more nice open source thing that's not, you know, some big, super expensive privacy questionable SaaS service.
21:27 And instead, running good over here.
21:29 It does take a little bit of work.
21:30 Umami is like perfect.
21:33 This is a little clunky in some little edge cases, but it's still quite nice.
21:38 So that's the next project.
21:39 Also available on PyPI today.
21:42 Nice.
21:43 Well, that's it for our items.
21:45 Cool.
21:46 Between all these things, we can help people write one, a little bit better test.
21:50 And two, depend a little bit less on just giving up a little bit of privacy to trade it in convenience.
21:57 Like Google Analytics, for example.
21:59 Or to a lesser degree, some of these mail platforms.
22:02 Yeah.
22:02 Yeah.
22:03 And save some money while you're at it.
22:04 All right.
22:05 Well, normally we would jump into some extras and I don't have any extras this week.
22:10 So do you have any extras?
22:12 I do have extras.
22:14 Well, let's see what have I got here.
22:15 Yeah.
22:16 Okay.
22:16 So the first one is if I'm running self-hosting these things, right?
22:19 I'm running them in a Docker cluster.
22:21 So it's really easy to basically just do a Docker pull, restart, you know, relaunch the app.
22:28 Off it goes.
22:28 Right.
22:29 So that's awesome.
22:30 That's one of the reasons I'm willing to run like you, mommy.
22:32 Rather than like I have a server and all these database things that get a patch and whatever.
22:37 Right.
22:37 Just literally one command to manage like 15 multi-tier apps.
22:42 It's awesome.
22:42 But how do you know when there's a new one?
22:44 Right.
22:45 Obviously, you could just set it up to just do it continuously.
22:47 But what I realized is every GitHub repository, this has nothing to do with you, mommy.
22:52 It's just an example.
22:52 Every GitHub repository, if they use releases, right?
22:56 If you go over here and you say like the releases, like I have a V0 1.10 for my you, mommy thing.
23:03 And there's actually two of them.
23:04 If you have that for any project, you can just go to the GitHub URL for the web, not the dot
23:12 get thing.
23:12 And just to slash releases dot Adam.
23:15 And that's an RSS feed for the releases for any GitHub project, even if they don't have a blog.
23:20 Wow.
23:20 That's cool, right?
23:21 Yeah.
23:22 I can put this in Feedly then.
23:24 Yes.
23:25 I put it in Reader for me.
23:26 And now I have Lismunk and you mommy and a few other things.
23:29 And I'm like, if this gets changed, I probably want to just go take a little action on that real quick.
23:34 And now it's in my RSS feed.
23:35 That's pretty cool.
23:36 Yeah.
23:37 So very simple.
23:37 Anyone can just watch whatever they want.
23:40 Brian, we both tried to do this one.
23:42 Yeah.
23:42 Colo.
23:43 You mentioned it in your article.
23:45 I ran across this because I, sorry, I don't remember the last name, but I saw one of my
23:50 Mastodon followers, Lily.
23:51 She somehow interacted with me and her profile came by in my app.
23:56 And I saw that she works on this thing called Colo, debugging for Django apps.
24:02 I'm like, oh, that's interesting.
24:02 What is this?
24:03 So this is a thing that's in beta.
24:04 It says, see everything happening in your running Django app.
24:10 And they have a really nice design of their webpage here.
24:13 So probably best to see visually.
24:16 It says debug your Django app 10 times faster, get instant access, et cetera, et cetera.
24:20 So this is a plugin or extension for VS Code.
24:23 And it just has tons of information all available to you.
24:27 So it has a tab or whatever the thing on the left is.
24:30 You can see it as a plugin, and it shows you the request response, kind of like dev tools
24:40 in a web browser.
24:41 So you can see headers, HTTP requests, responses as kind of a running history of the HTTP exchange
24:48 your browser is having with your Django app.
24:50 That's cool, right?
24:51 And I think it's showing you, I'm not entirely sure, but I think it might be showing you even
24:57 Python code, not just web things, right?
25:00 It has local variables, arguments, and then it has even like this tree thing for visualizing
25:05 code execution paths.
25:06 So, yeah.
25:08 So you click on the, sorry, you click on the request.
25:11 It shows you the code, and then it actually shows you the local variables that were passed
25:15 around as well.
25:15 It's pretty neat.
25:16 Yeah.
25:17 I don't know that the tree, the visual thing is super pretty, but I don't know how full
25:22 it is, but I haven't played with it yet.
25:23 I agree with you.
25:24 It's awesome.
25:25 Wouldn't use it.
25:26 Yeah.
25:30 You can do, what is it?
25:32 Inspect all the outbound HTTP requests made.
25:34 That's kind of neat.
25:35 And SQL queries, you can, it'll track all the SQL queries that were made.
25:41 Really good for understanding what's happening.
25:42 What's up, Brian?
25:43 Good.
25:43 No, it's just really nice because you never know when you're, queries get out of hand and you're making way more than you need to.
25:50 Exactly.
25:51 Especially in the ORM space, because it's so easy to do lazy loading and say, give me all
25:56 the customers for each customer.
25:58 Get me this thing about them.
26:00 And that's a relationship.
26:02 So every time through the loop, it's another database query, the so-called N plus one performance
26:07 problem.
26:07 Right.
26:07 And you would just see like, whoa, the SQL thing is full.
26:10 I thought there were like two or three requests and now it's just full.
26:13 What is happening here?
26:14 Right.
26:15 So that's great.
26:16 Yeah.
26:17 Anyway.
26:17 Ooh, background jobs.
26:18 Yeah.
26:19 Even contract your salary background tasks.
26:21 So right now it's in beta.
26:22 I'm pretty sure this is a thing that costs money at some point.
26:25 Yeah.
26:26 So if you VS Code, check this out.
26:28 It's kind of interesting.
26:29 Yeah, definitely.
26:30 Neat.
26:30 Neat.
26:31 All right.
26:31 Another thing that's cool is I've talked about warp before and I've been using warp at the
26:37 terminal a lot.
26:38 one of the drawbacks of warp for all of its beauty and cool features is that it doesn't,
26:44 it only works on Mac for now, which is a limitation, let's call it.
26:48 Not for me.
26:50 For other people.
26:51 Not for me, but for a good chunk.
26:53 Now I say it's only somewhat of a limitation.
26:55 So like on my Mac, if I SSH into my Docker cluster thing that I've been talking about, warp will
27:02 like inject the warp behaviors into the Linux shell over there.
27:08 So I get like end to end warp as a Mac user.
27:11 But if I was actually a Linux user, I couldn't use warp because it's a Mac app until pretty
27:17 much now.
27:17 Right.
27:17 So coming soon is warp on Linux.
27:20 So people want to sign up for that.
27:22 I put a link for in the Linux terminal signup page to get on the wait list.
27:26 And warp is just a super neat way to work with, with your terminal.
27:31 It's more like an editor.
27:32 It's got AI built in, which most AI built in things I hate.
27:36 They're really bad.
27:36 But you can say things like just say hash.
27:39 And then you'll say something like, you know, search this directory for all files with this
27:44 pattern, except that directory.
27:46 And then it'll go, here's the command that you type, you know, like that kind of it's
27:49 because it's that kind of stuff that I'm like, what's the parameter to this?
27:52 How do I grep that again?
27:54 I don't have no idea.
27:55 So anyway, it's pretty cool.
27:57 I wonder if it's set up.
27:58 I'm just curious if it's since they're doing different platforms, if they've got a UI layer
28:04 and then a warp core.
28:06 Oh my God, they probably do have a warp core.
28:08 And if they didn't name it that they've really lost a chance here, right?
28:11 Yeah, hopefully.
28:13 So I talked about this before.
28:15 I realized through search about two and a half years ago, something called BPytop.
28:21 So BPytop is an awesome, if it gets too small, it thinks it's going to hide all of its graphics,
28:26 way to look at how your server is going.
28:30 And it is so neat the way that this app works.
28:34 I definitely, let me just, I'll put it up.
28:36 Here's the live running version of the one that I've been messing with lately.
28:42 And Brian, you can see you've got your memory.
28:45 There's not a whole lot of action going on right now.
28:47 So it's kind of blank graphs.
28:48 But like if the memory jumped up, you would see it go up.
28:51 It shows you how much memory is free, how much is being used, how much of that is being cached.
28:56 Disk activity.
28:57 You can see the network traffic.
29:00 The multiple, you know, it has four CPUs.
29:03 And it shows you graphs for all four CPUs as well as like the combined.
29:08 And I'm not going to show the processes because they might show command arguments that I don't
29:13 know.
29:13 I just don't want to share.
29:13 But it seems like it probably somehow could be a bad idea that I'm not aware of.
29:18 But we'll learn later in a hard way.
29:20 But isn't that an amazing way to just, this is over an SSH session.
29:24 Oh, that's pretty cool.
29:26 That's amazing.
29:26 Yeah.
29:27 And watch this.
29:28 So if I just hit escape, you get even, it's like an old video game options with mouse support
29:35 and everything.
29:36 Oh, that's pretty cool.
29:37 Yeah.
29:37 So another thing to sort of announce here is there's bPyTop, which you can pipx install.
29:44 But they've also, as part of this, released a bTop rewritten.
29:49 And I think it must be C++.
29:51 So anyway, that's cool, right?
29:53 People can, I think that's supposed to be a little bit more high performance.
29:56 Although to me, they kind of seem like the same type of thing.
30:00 Anyway, really cool.
30:01 If you've been using like Top or something like this, you know, there's a really much better
30:06 way and glances is good.
30:08 But bTop is the new, the new winner in my world here.
30:11 And you know, those sort of graphs, even if you don't need them, you can have a second monitor
30:16 and have one of those running.
30:17 Everybody in your life will think you do something cooler than you actually do.
30:21 Whoa.
30:21 You're a hacker, aren't you?
30:22 That's a terminal.
30:23 Yeah, I am.
30:26 Okay.
30:26 Yeah.
30:26 Don't cross me.
30:27 Don't you cross me.
30:28 All right.
30:29 Nice.
30:29 Right.
30:31 I think that's our extras.
30:33 It is.
30:34 Chris Tyler, just real quick, has a recommendation.
30:37 Switch to bottom.
30:38 BTM, which is similar, but written in Rust and a little more performant.
30:42 Also cross platform like BITOP.
30:44 Hmm.
30:45 Okay.
30:45 Well, maybe, maybe that needs to be checked out as well.
30:49 Maybe my time with BTOP was short.
30:50 I'll be over to bottom before I know it.
30:52 Top and bottom.
30:53 That's just terrible.
30:54 Yeah.
30:55 These are funny.
30:56 Yeah.
30:57 Thanks, Christopher.
30:57 All right.
30:58 I think I'm ready for a joke.
30:59 Yeah.
31:00 I got something, you know, I've been talking about consolidating all these servers and running
31:05 different things.
31:06 We just talked about the monitoring your server and Docker.
31:10 So I thought it might be fun to share this post on InfoSecExchange Mastodon from Jeff Hall.
31:17 And it's got this, you described this for us, Brian.
31:19 It's just a mess of cables coming out of the back of what?
31:23 A bunch of, I don't know.
31:25 Network equipment.
31:26 Yeah.
31:27 It's just like the world, you couldn't imagine a worse set of tangled wires.
31:32 And they're dirty too, right?
31:34 It's not just like, they're covered in all these routers and others.
31:38 They're white, but they're most, they're significantly brown as well.
31:43 With like a whole bunch of hubs hanging in between and stuff.
31:45 Yeah.
31:46 Yeah.
31:46 And a lot of these pieces are just suspended by the wires and it just says the cloud.
31:51 Yeah.
31:53 Yeah.
31:54 It's very nice.
31:55 I love it.
31:56 Yeah.
31:56 That's very cool.
31:57 So.
31:57 Indeed.
31:58 Funny.
31:58 All right.
31:59 Well, that's it for the show, I suppose.
32:01 And, you know, we don't normally have a final call to action, but go check out your new Pi
32:06 test thing, your timeout and check out some of these other self-hosted things.
32:11 Yeah.
32:11 Yeah.
32:11 It's really cool.
32:12 A lot of stuff people can adopt.
32:15 And yeah.
32:16 Thanks for being here.
32:17 Thank you.