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


Transcript #363: DNS Again? It's Always DNS.

Return to episode page view on github
Recorded on Tuesday, Dec 5, 2023.

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

00:04 This is episode 363, recorded December 5th.

00:09 And I'm Brian Okken.

00:09 I'm Michael Kennedy.

00:10 And this week we are sponsored by ourselves.

00:13 So we will plug our own stuff a little bit later.

00:16 And if you want to follow the show, follow it at pythonbytes at fosstodon.org.

00:23 And also Michael and I are both on Fosstodon as well, which is Mastodon.

00:28 If you're anywhere other than Fosstodon also, that's fine.

00:32 You can still follow us.

00:33 But if you would like an invite, hit one of us up and we will send you an invite.

00:37 Mastodon has made it easier to start following people from other instances, by the way.

00:42 I don't know if you remember how it used to be.

00:43 You'd go and somebody would be like at mass.to and it'd be like, sign in.

00:48 And you couldn't follow them.

00:50 You have to sign in.

00:51 You're like, but I have an account here.

00:52 What is this weirdness?

00:53 So now if you say follow, it'll pull a dropdown and say, you know, give me a few letters out of your

00:57 instance and then we'll direct you over there where you're signed in to click follow.

01:01 So it's a little bit easier to follow anybody on Mastodon.

01:04 It's still clunky.

01:05 I don't know why it's so hard.

01:06 So what I usually do is I'm not trying that.

01:10 I usually like pop somebody's whole, like say, at mkennedy at fosstodon.org or something.

01:16 I pop it in the search, the search bar.

01:18 That's what I did previously as well.

01:20 Yeah.

01:20 Yeah.

01:20 It usually, usually finds the person, right?

01:23 So yeah.

01:23 Yeah.

01:23 You can even put just the whole URL of their profile without reordering it to their username.

01:27 But if I'm trying to find the URL, that's sometimes, yeah.

01:31 Indeed.

01:32 All right.

01:33 Well, it's Mastodon's getting a little smoother and actually Mastodon conversations are going

01:38 to be featured at least in my, my stuff here somewhat heavily.

01:41 So yeah, let's talk about FixIt.

01:42 So FixIt is this, what's the best way to put it?

01:46 It's probably a Flake 8 like, they compare it to Flake 8.

01:50 This comes from Meta, AKA Facebook, and it's a linter for their monorepo.

01:56 And when you hear monorepo, that is not a monolith.

01:59 Ironically, a lot of times the more broken up your code is, the more it fits a monorepo.

02:04 But anyway, it's, they have literally a single repo.

02:08 Is it Git?

02:08 I'm not sure.

02:09 But something like a single Git repo for all of Facebook, which is just insane.

02:13 They want to lint that.

02:15 And they want to have things like Black applied to it.

02:18 And Black actually came from Lukash Lenga, who was at Meta at the time.

02:22 So kind of funny.

02:23 But they don't use Black.

02:24 I don't know why they don't use Black.

02:26 They have some reasons.

02:27 Seems like Black saw some of them and could be probably adapted while Lukash was there.

02:32 But anyway, they don't.

02:33 So they had this thing called FixIt that goes through and is more like Black,

02:38 even though they compare it to Flake 8 in that it not just finds problems,

02:42 but fixes them and normalizes things like, where do your commas go in a list?

02:47 You know, or you have a plus to continue a line.

02:50 Is that at the end of the one line or the beginning of the other line?

02:53 Right?

02:53 Those kinds of things we're all familiar with.

02:55 So they built one called FixIt.

02:57 And now they released another one called FixIt 2 that's supposed to be better.

03:01 And they open sourced it so people can check this out if they're interested.

03:04 Right?

03:05 So I'll tell you quick about it.

03:06 A quick few things about it.

03:07 And let's bump over to the Mastodon.

03:10 Not the Mastodon.

03:11 Omnivore.

03:12 Other thing.

03:12 Other thing.

03:13 Because I have notes on this big, long thing.

03:15 So it turns out that Python is super popular over at Meta, which is really cool.

03:21 They have production engineers and software engineers.

03:24 So production engineers are like software devs who do production.

03:28 Their main role is to do production.

03:29 And they also have a whole Python language foundation team, which is pretty interesting.

03:34 And the job of this team is basically to build tools for the rest of the team.

03:39 And that's where this FixIt thing comes.

03:40 So one question is like, why not just use, say, Black or Flake 8 or whatever, right?

03:46 Or Format.

03:47 Well, hey, now we're getting there.

03:49 Okay.

03:49 So it says, of course, there's alternatives to Flake 8.

03:52 But, for example, Flake 8 doesn't fix things.

03:56 It just tells you that there are errors.

03:58 Yeah.

03:58 It has limited support.

04:01 This is kind of interesting for hierarchical configurations for different projects within

04:06 a monorepo.

04:07 So even though it's a monorepo, maybe like the API gets formatted this way.

04:12 But the, I don't know, the DevOps decode gets a different set of configurations because it's

04:17 a different team.

04:18 But you still want to just hit the repo with it, right?

04:20 Interesting.

04:21 Yeah.

04:21 Yeah.

04:22 That's an interesting, so there's, it's worth bringing up, I thought, because there are

04:24 some interesting ideas and some interesting challenges.

04:27 Slow performance on code, on large code bases.

04:30 And then another thing that they do a lot is they plug in custom rules, blending rules and

04:36 correction rules.

04:37 Like at a hierarchical level, which is kind of interesting, right?

04:41 Now, Brian, I don't know, everyone sees it, but I have a list of these four things, these

04:45 four reasons of why not just X.

04:47 Three of them are green because rough space format hits all of those.

04:54 Rough format didn't exist.

04:55 And I honestly wonder if Ruff format existed, you know, this is, is this a thing that gets

05:00 created?

05:01 I'm not sure.

05:01 I mean, it's an open question.

05:03 I didn't know that rough could do hierarchical configuration.

05:06 I actually am.

05:07 Well, what rough can do is you can have a rough.toml that configures it at different levels.

05:12 Right.

05:13 So given the number of engineers and the fact there's a single repo, how hard would it be

05:19 to automate, search this repo for all the rough.tomls, run Ruff format dot in that working directory?

05:26 Yeah.

05:26 Done.

05:27 You know what I mean?

05:27 Right.

05:28 It would, I don't think it inherently does, but in 30 minutes it does.

05:32 You know what I mean?

05:32 Yeah.

05:33 Of one person's time.

05:34 So I wouldn't suspect like as a company, like, well, we couldn't possibly have somebody write

05:39 that automation.

05:39 That's way too much for us.

05:41 So, you know, so I think that obviously I don't believe that's a, you know, dash dash

05:45 hierarchical sort of option, but I think that could easily, easily be added.

05:50 So that's pretty cool.

05:51 It says even with, here's the irony is even with the one we built, the, it didn't contain

05:57 the local rent, linting rules or the hierarchical configuration.

06:01 And those are the core requirements.

06:03 So it's like, okay, well, we redesigned it to this new one.

06:05 Right.

06:06 And what's interesting is it works on the, using the lib CST module.

06:10 Okay.

06:11 Which is a concrete syntax tree.

06:14 You often hear of the AST or abstract syntax tree, which is like the intent of the code

06:18 is to loop over this iterable, but it is not.

06:21 The variable is named this and there's two spaces here and there's a comment, right?

06:26 It tries to like throw away, just get to the essence.

06:28 But the CST is the code just in hierarchy form.

06:31 And which means if you want to fix it, right?

06:33 That's way more applicable for, these kinds of tools here.

06:37 So anyway, people can check it out.

06:38 It's on PyPI.

06:39 And I think it's an, it's an interesting thing to contrast with rough.

06:43 So yeah.

06:44 Yeah.

06:44 Anyway, it's out there for people.

06:46 It's obviously tested on some pretty seriously large code bases and it could be interesting,

06:51 but I'm still going to rough space format dot for my, for my money.

06:57 Yeah.

06:58 Yeah.

06:58 Interesting comment from a grant, in the chat, another YAML file for each, sub

07:05 project as opposed to supporting PyProject.com.

07:08 Yuck.

07:08 Yuck.

07:08 But you know, totally fair.

07:10 In this case, I, I think it might be like, you gotta remember this isn't just Python, right?

07:16 This is like every bit of code at Facebook.

07:18 Oh yeah.

07:18 Right.

07:19 So it's, it's probably react PHP, optimize PHP, go.

07:24 I, who knows how much stuff is in there.

07:26 Gobs of config files in each project.

07:28 Yes.

07:28 It's yeah.

07:29 I mean, you wouldn't want all the configs for all the languages all mixed together.

07:33 Right.

07:33 So anyway, but still interesting, interesting stuff.

07:37 Anyway, all right.

07:38 how would you like to talk about user interfaces?

07:41 No, we have been known to go on a gooey kick before.

07:45 It's been a while.

07:47 Let's do it.

07:48 Yeah.

07:48 I'm here for it.

07:49 All right.

07:49 So, Samuel Colvin, the, make it fast, Brian.

07:53 That was funny.

07:56 the, the person that brought us, Pydantic is, has, has worked very closely with,

08:03 FastAPI as well.

08:05 So FastAPI and Pydantic work great together.

08:07 Now there's fast UI.

08:09 Well, fast UI is working with, FastAPI, but it also works with other stuff too.

08:15 So, so a Samuel Colvin has just recently brought us fast UI, which is, looks like an

08:21 active development.

08:22 It's been modified five hours ago and the, it's already got, but it only, I only heard

08:29 about it like last week and, it's now at 1.8 thousand stars.

08:33 that's pretty awesome.

08:35 Anyway.

08:35 so what's this, it is supposedly a, it's still a work in progress.

08:42 So not production ready, but it's a way to build app web applications and web UIs, defined

08:49 by declarative Python code.

08:51 So, there's a few points around this.

08:53 It's, so it's for, there's a bunch of parts of it.

08:56 It's, it's a pipe UI package, fast UI, but so it brings in some models and some

09:02 UI elements and components.

09:03 it's also an MPM package.

09:05 So you, it brings in a little, react type script stuff.

09:09 the, so what does it really mean though?

09:12 It means that you can kind of look at in, in, there's a couple examples he shows, you

09:18 declare it kind of like this, you're declaring, is sort of for a, or a FastAPI endpoint

09:26 like user table or something like that.

09:27 That's an endpoint.

09:28 It's going to, return this thing that doesn't look like HTML and it doesn't quite look like

09:35 Python either, but it is, it's like a, there's a C page object, which wraps the page.

09:41 There's components inside, which is a list of things like headings and a table.

09:46 And it, it, I don't really know what this looks like, but it's not bad.

09:51 so I'm kind of excited to play with it.

09:54 But in a few lines of code, he shows a fairly workable, clean looking user interface.

09:59 And then, along with it, for the release, he released a full demo, which you can walk

10:06 through, a UI demo that was really zippy and works pretty good.

10:11 Like the tables one is kind of fun because it shows like, a whole bunch of names and

10:16 popular of names of cities and populations.

10:18 And you can quickly filter by country and it's like super fast.

10:22 So, I think you get kind of a lot for not much work.

10:26 If the, if the workflow looks okay.

10:30 So you've done more UIs than I have.

10:32 What do you think of this?

10:33 It's interesting.

10:34 Okay.

10:35 so when I think of building web apps for myself, I don't shy away from saying, oh, I

10:40 have to write HTML or there has to be a template model or something like that.

10:46 Right.

10:46 That's, that's okay for me.

10:47 Yeah.

10:47 But I've been doing it for 15 years, at least I would say probably started doing web stuff

10:53 in 2000.

10:53 So that's a little bit more than that.

10:55 Anyway, that's a long time.

10:56 And so I'm super comfortable with it, but I know there's a lot of use cases where I just

11:00 want something quick and easy.

11:01 I want a simple deployment or I'm not a web developer and I just want to get this up and

11:06 going.

11:06 I like it.

11:07 a lot of the sort of low code zero HTML styles of that I've seen like, oh, here you

11:15 can do it in Python have kind of a top to bottom linear way of creating the code.

11:21 And I super dislike that, right?

11:23 Like first I'm going to create a page object.

11:25 Then I'm going to say page.components.add.

11:27 Then I'm going to go page.components.add.

11:29 And then I'll get a table and I'll say table.rows.add, you know, like, wow, like makes it really

11:34 hard to see the visual look.

11:36 So you go check out the fast UI, GitHub readme.

11:40 You'll see that the structure and the indentation of the code matches the DOM.

11:45 And that's quite nice.

11:46 Yeah.

11:47 So I really liked that aspect of it.

11:48 it reminds me a lot of Flutter where you write code in the exact same way.

11:54 You've got, I don't know if you call it a DOM, but whatever the, the widget graph is in called

11:59 in Flutter, you do the same type of thing.

12:01 Like you, you'd have a body and then the body has a child and then the child can be some complex

12:07 thing.

12:07 And it's all inherited, nested in a very, very similar way.

12:10 So yeah, I think it's super interesting.

12:12 I think it will empower a lot of people.

12:14 I like the structure of the code matches the thing you're building.

12:18 That makes it way more appealing to me.

12:20 Cause that's part of what's nice about HTML.

12:21 You go in there and you're like, you're in the table and you're indented in the table

12:25 visually.

12:25 You know what I mean?

12:26 Yeah.

12:26 Yeah.

12:27 The, and there's, there's, there's a lot of fun stuff here too.

12:31 So even like forms and stuff that you can do with, even server side validation.

12:35 So, that it's not just a component library, but also some, some react and some other

12:43 things going with it is pretty cool.

12:45 The, Kim brings up, something that I, I thought of directly for myself.

12:50 he says it's got a lot of appeal for enterprise grade web apps where boring, simple table layout

12:56 is more than enough.

12:57 And, I'm kind of thinking of it, I was thinking of it kind of like that, a dataset

13:03 sort of thing.

13:04 If basically I've got a database that I want to front in for, but if, but I, you know, it's

13:09 not necessarily SQL or something or dataset just freaks me out maybe.

13:12 but something like this is I think pretty nice.

13:17 And I think a lot of enterprise projects will be using, using this to play with.

13:21 So yeah, I'm actually thinking about it for my own, for an internal project myself.

13:26 So yeah, sure.

13:27 It looks quite neat.

13:28 And being based on FastAPI.

13:30 Yeah.

13:30 boy, would it be cool if there was a run it locally as an electron app like thing where,

13:37 where the electron app shipped with Python and just ran a hidden building user.

13:42 So like it becomes a, make it a thing, an exe or a dot app I could share with my users.

13:48 Yeah.

13:49 But yeah, I agree.

13:50 I agree with Kim that forms over data.

13:52 This nails it.

13:53 Yeah.

13:53 And like you said, if, I mean, a most web app, a web, a lot of web developers, it doesn't

13:58 take that much web training to, to write some HTML.

14:02 I mean, to do it well, it takes a little bit, but, but to do it good enough for a lot

14:09 of projects, it's not bad.

14:10 And, or a normal HTML, CSS and the normal tool chain is still pretty good or build a

14:17 Django app or something.

14:18 But, there's a lot of people that don't even, that don't even want to get into it at

14:22 all.

14:23 So I think this is a good fit for that.

14:25 So anyway, indeed.

14:27 And Chris may ask about, you know, Hey, I wonder what the escape hatch story is.

14:31 That's always a good question when you're in a framework that kind of defines so much for

14:34 you.

14:34 Like, well, what if I went a little bit more, then what?

14:38 So yeah.

14:39 Yeah.

14:40 Brian, is it a good time to remind people that maybe they should check out a course or two?

14:45 Yeah, sure.

14:46 Let's, I will.

14:48 So I'll, I'll remind people that this, this episode is brought to you by both of us,

14:52 Michael and Brian.

14:53 And the thing that I've been working on a lot lately is courses, courses, python

15:00 test.com.

15:01 And that is the complete by test course.

15:04 And, it's almost done.

15:06 We'll be done this month.

15:07 I've got 13 out of 16 chapters done so far and it will grow then.

15:12 after, after I've gone through the entire Python testing with my test book, there's extras

15:17 there.

15:17 And as I've noted before, there's a lot of stuff at the end, that has changed a

15:22 lot like talks and CI and things, since the book came out.

15:25 So, it's pretty excited.

15:27 So how about you?

15:28 Sure.

15:28 Yeah.

15:29 Very awesome.

15:29 I would just want to like highlight maybe some of our new courses.

15:32 We have an early access Visual Studio Code for Python developers course, which is partway

15:38 done, but available in early access mode.

15:40 If you want to check that out, we have a data science jumpstart with 10 projects from Matt

15:44 Harrison and, HTMX plus Django course by Christopher Trudeau.

15:50 So all of those are excellent and we've got plenty more coming as well.

15:55 So people should check those out.

15:56 Sweet.

15:56 All right.

15:57 Let's go to Mastodon.

15:58 So this one's not exactly Python, but there are Python elements to it.

16:03 And basically I said, like, we talked about this after the show and I thought, you know,

16:07 why don't I just have this conversation for people out there?

16:10 I'll throw out a list.

16:11 It's like, I've got a bunch of emails.

16:12 want to be able to reach out to people.

16:15 I want to run a newsletter or I want to run a training company in a podcast, you know,

16:19 and wouldn't gather those up.

16:21 And for many years I've been using MailChimp and they just increasingly rubbed me the wrong

16:25 way.

16:25 It's just on principle.

16:27 I'm not super keen about it.

16:29 Like three months ago, like, oh, we got to raise our prices because the database storage

16:34 for your 20 K or whatever it turns out to be is really rough.

16:37 So it's another a hundred dollars.

16:38 Then the next month, like, oh, we're going to need to raise our prices.

16:41 It's another a hundred dollars on top of the previous another a hundred dollars.

16:44 And she's like, I'm not really using a lot of this.

16:46 And it's, I kind of want to look for something else.

16:48 Right.

16:48 So I went to Mastodon and said, Hey folks, MailChimp alternatives.

16:52 And boy, oh boy, do we get like a ton of conversation about this.

16:56 And so I've gathered this all up and put the results of that into, into a list that I

17:03 posted on the show notes.

17:04 So I just want to run through this really quick because there's some interesting choices

17:08 for people that have like small or large mailing lists.

17:11 Right.

17:11 So they come from all these different places and interesting choices.

17:15 So for example, one of them is called email octopus because it can how much it can send

17:21 like eight times as much email as like a regular, maybe for like a two handed creature with all

17:26 of its eight arms.

17:26 It can really send email.

17:27 Now.

17:28 So this one is email marketing, which is kind of interesting.

17:30 There's list monk, which is an open source free self-hosted newsletter and mailing list manager.

17:37 Interesting.

17:38 Right.

17:38 With 12,000 GitHub stars.

17:40 There's Calia, which, is similar is also open source.

17:44 Gemacht in Deutschland made in Germany.

17:46 Very, very cool.

17:47 It looks kind of visually nice.

17:49 Right.

17:50 There's Millie Harold, which is a Ruby on rails one also self-hosted, which is kind of fun.

17:57 There's send portal again.

17:59 So I didn't know about so many of these open source ones.

18:01 And that's kind of why I thought my, it might be interesting to point this out to people on

18:05 the show.

18:06 Right.

18:06 Like there's actually a bunch of open source ones.

18:08 Quite sadly, I haven't found a decent Python one.

18:10 So there's that there's Brevo, which is another one.

18:14 button down.

18:15 This one is not open source, but it is made with Python open source.

18:19 So I talked to the guy who runs button down and this one is written in Django.

18:23 So if you want your newsletters powered by Django, I don't think it's open source, but anyway,

18:29 pretty, pretty neat option there.

18:30 There's Zoho, which is pretty cool.

18:33 Cindy.

18:34 Here's another cool one.

18:35 Cindy as also self-hosted, but you, it's not open source, but you buy it.

18:40 It wants for like $70 and then you run it on your system.

18:44 And what's cool is it hooks into AWS SES, which is our simple email service, which if

18:49 you send a bunch of emails, you probably have.

18:51 I don't, I do, but I don't use it.

18:53 I have send grid, which it also works with and mail jet and elastic email.

18:56 And the thing that's cool about these is you can send like 10,000 emails for a dollar.

19:00 Right.

19:01 And it's based on consumption, right?

19:02 Like even if I don't send a mail in MailChimp, it's many hundreds of dollars to just say, well,

19:08 we're going to keep your database records fresh for you.

19:10 We'll sit here.

19:11 But this one, it's like, you know, they say a hundred times cheaper.

19:15 I mean, obviously it matters how you use it, but you plug it into one of these super, super

19:19 simple things and they'll even set it up for you.

19:21 You can pay them like another 70 bucks and they'll set up a server and a Ubuntu server or

19:25 Linux server.

19:25 I'll set it for you.

19:26 So this is the one I'm actually thinking of going with potentially.

19:28 And there's ConvertKit, Mautic, I don't know, open source marketing instead of just email,

19:35 Constant Contact.

19:37 I don't have any relations with any of these, by the way, folks, get response, ConvertKit,

19:41 all of those.

19:42 So if you want to see the Mastodon conversation about why people suggested them, some people

19:48 are like, oh, I worked with that, but it sucks.

19:49 Don't use that.

19:50 And so on.

19:51 You can check it out.

19:52 So I thought there's probably enough people out there who are going like, I have this

19:56 problem and I just see so many choices and what are they?

19:59 Maybe there's open source.

20:00 Maybe there's some Python thing.

20:01 So there it is.

20:02 So we don't have a solution, but you've got something.

20:05 Well, I'll.

20:06 Well, I can report back to people how things go.

20:09 So it's a fork in the road for me.

20:11 Right.

20:11 Yeah.

20:12 On one hand, I don't really do.

20:14 I don't do any tracking of people.

20:16 And so I don't know, like retargeting and all these kind of like campaigns where like, if

20:19 you come and visit this page, but then two days you visit that page, then we're going to

20:23 send, you know, like that kind of stuff.

20:24 I don't really do that.

20:26 So I just basically send emails to people.

20:28 And in that case, right, you should be looking at something simpler.

20:32 Maybe one of those open source ones is pretty nice.

20:34 But if you want to do really interesting automations, which maybe I should look into, I don't know.

20:40 Then maybe one of the real simple ones is not the right choice.

20:43 So I should either go way more simpler or more advanced, but I'm in this like middle ground

20:47 paying tons of money for something that I don't really appreciate.

20:50 And I've also finally wrapping this, put a bow on this.

20:53 People have said, well, you know, you can just use mail merge with Excel, with Google

20:57 sheets and like send it out of your Gmail.

20:59 Like, no, that's awesome.

21:00 If you want to, if you run like a, like a soccer team and you want to send them a message or

21:06 something like that.

21:06 But if you have to be subjected to the U.S.

21:08 Can't spam act, the GDPR, people delete my stuff, delete my, my info you have on me.

21:14 I want to unsubscribe.

21:17 I want to partially unsubscribe or my mail bounced.

21:20 And then you got to stop sending it.

21:21 Like all of that, you can't just like automate send.

21:25 Even out of send grade is not enough, right?

21:26 You need to have a whole backend that like deals with all that crap.

21:29 And that's what a lot of these like open source ones bring.

21:32 So anyway, pretty cool.

21:33 Newsletter is having a newsletter is more complicated than people think because it, it's just is.

21:40 It's way more complicated.

21:43 And the weird thing that like the first time I tried to set one up was that you have to put your address down.

21:49 And, it's, it's kind of a weird work.

21:52 It makes sense, but also it's weird.

21:55 But it kind of doesn't make sense.

21:56 It kind of doesn't make sense.

21:58 Yeah.

21:58 Yeah.

21:59 Like, yeah.

21:59 I really just have to put my house there.

22:01 What can I put there?

22:02 Like, but because the U S can't spam act, I think is the reason that that is there.

22:06 And yeah, you know, that's the government, right?

22:09 Like maybe we should have cook up cookie banners that everyone clicks like five times an hour a day for the rest of their life.

22:15 That's going to make things better.

22:17 Well, you know, I, I used to like, I know we've done this enough, but sorry about that.

22:22 the, I used to do MailChimp, but I had a PO box set up just for that.

22:28 And I was like, I don't use it for anything.

22:30 So instead of paying the post office, I switched to paying a convert kit because convert.

22:35 One of the things convert kit does is you can use their address, which, which is interesting.

22:40 but, I'm, I'm, I'm still on the fence on convert kit.

22:44 I'm trying it out.

22:45 So we'll see.

22:45 Yeah.

22:46 We can both report back to people and see, but it's tricky stuff.

22:50 So anyway, hopefully it helps the folks.

22:51 Now completely change of gears, back to command line interfaces.

22:56 I talked about user interfaces, on GUIs, but let's talk CLIs a little bit.

23:01 so back on episode, what was it?

23:04 361.

23:05 We talked about appeal.

23:07 and I've talked about art person click and typer and stuff like that before appeal was another one.

23:13 and, and this all came out because I did an episode on, on Python test about, art parse applications and testing.

23:22 So somebody actually Sander 76, on fostered on, contacted me and said, Hey, there's a bunch of other options other than the ones you've covered so far.

23:34 have you looked at this?

23:35 have you looked at these and how do you test them?

23:36 I don't have an answer about how to test them, but I was interested in this whole kind of line of things.

23:41 So there's a, there's a, a, a, a, a set of command line interface tools that instead of, instead of art parse style or something of telling, you know, defining flags, they define it based on an object, a configurable object.

23:56 So, let's, his, clip stick for instance, let's, let's start with Tyro.

24:02 This is one of the early ones.

24:04 It's kind of easy to figure out.

24:05 Tyro is a, is a command line interface, tool that you can use, data classes or Pydantic or adders to define the, the, all the options.

24:16 So for instance, here's an example it was showing the video.

24:20 you can take a, you import Tyro and then you define a data class with, types on, on a bunch of arcs.

24:29 You just, it doesn't matter what it is, what's called, but you have a class with a bunch of elements in it.

24:34 And those are the things that you can pass to your application now.

24:37 And then you just, you, you implement a Tyro CLI, application.

24:42 That's, that's the arguments.

24:44 And that's, it's kind of cool on parsing arcs that way.

24:47 so that, that's Tyro.

24:50 And then there's, there's clip stick, which is kind of cute.

24:53 Like CLI.

24:54 Yeah.

24:56 Anyway, that defines, defines all of your types within a, a base model, like from Pydantic, Pydantic base model.

25:05 And then you can define a whole bunch of types in there.

25:07 and then you can, and it has help and all that stuff.

25:11 So basing it on, on, on, Pydantic object.

25:14 And then also there's, there's a, a, nicely designed website called, with, Pydantic art parse.

25:21 So art parse with Pydantic.

25:23 So there's another one that's, defining, arguments based on a base model.

25:29 and I just, I haven't played with these yet.

25:32 I just wanted to report back that these are some different ways to, to set up user interfaces using, using like Pydantic or data classes or adders or something like that.

25:43 Yeah.

25:44 As an object.

25:45 And then, and then you have, instead of, you get like this Arga, Args object, instead of having a whole bunch of different elements, you have like this object with all of your arguments that you can pass around.

25:55 And since it's things like Pydantic, you can do things.

25:59 I'm, I haven't played with it, but I'm guessing that you can do things like limit the scope.

26:03 So it's not just an integer, but it's an integer between one and five or something like that.

26:08 right.

26:09 Yeah.

26:09 That's cool.

26:09 Yeah.

26:10 So these are fun.

26:11 Those are super fun.

26:12 Yeah.

26:12 Pydantic is great.

26:14 Typing for this kind of stuff is great because it, it's usually not open-ended, right?

26:18 That should be a number.

26:19 And if it's not, it's going to be a problem or that should be a string for the host name.

26:23 Yeah.

26:23 It's required.

26:24 All these things like really map over to that validation side of Pydantic.

26:27 But I do want to, so, from, Sandra 76 is a question.

26:32 How do you test these or, or is testing easier?

26:34 it is a good question.

26:36 And I, it, I've put it on my to-do list for January, January or sometime in 2024 to take a look at.

26:43 So I'll have to report back about that also.

26:45 Yeah.

26:46 Very nice.

26:46 Very nice.

26:47 So it's the, Samuel Colvin and team day for you with fast UI and the Pydantic based stuff.

26:54 Yeah, indeed.

26:54 Good stuff.

26:55 So.

26:55 All right.

26:56 Extras.

26:57 You want me to do mine first?

26:58 Yeah.

26:58 Let's hit yours first.

26:59 All right.

27:00 Well, I have one and it's super quick.

27:01 So I just, you know, there was this, announcement here that Google is, Google Chrome in particular

27:09 is looking to limit ad blockers and start like limiting how much control people have over their

27:16 privacy and data and stuff with what's called the manifest V three, API for basically for

27:22 using, extensions.

27:24 And the main rule here is that they're limiting how many domains and rules you can apply to block

27:30 basically to limit network traffic.

27:32 So you can say, well, there's 500 ads you can block, but those are the only 500, right?

27:38 Which really limits it.

27:39 So people are whining.

27:40 I'm like, you know, why don't I just write an article?

27:42 Because like I could turn all that stuff off and I don't care at my house.

27:46 And you could too, just instead of worrying about what these browsers are doing, just go

27:51 and turn on a network level ad blocker.

27:52 Like you can use next DNS, which I've talked about before, or you can, if you want to run

27:56 your own server and only have it when you're home, you can do this pie hole.

27:59 I know that's super awesome, but next DNS is a service, which so when you're at the

28:04 coffee shop or traveling or on your phone, you can also have the benefit of pie hole.

28:08 But anyway, I talked a lot about how, how that works and how you set it up with some cool

28:12 graphs, like it's like 10,000 block queries on my network for just two people for a little

28:17 bit.

28:17 And also this is all great.

28:19 Once you set this up though, when you get to a place that says, Hey, you have to disable

28:22 your ad blocker or you can't watch this movie, read this article.

28:25 You're like, you know what?

28:26 I hate you, but just for a minute, I have to do this because I really, really need to get

28:29 here.

28:29 It talks about how you can set up a second browser.

28:32 Like for me, it's Firefox, not Vivaldi, like Vivaldi's my own, but Firefox, I set it up

28:37 to use a DNS over HTTPS, but one that doesn't block like Cloudflare or something that doesn't

28:42 filter anything.

28:43 So if I have to escape my, my blocking network for whatever reason, I can just run Firefox

28:47 and it tunnels out of all this restrictions, which is usually nice, but when you need to turn

28:52 it off, you got to turn it off.

28:54 So there's quick article essay, whatever you want to call it for people to check out.

28:58 Yeah.

28:58 Things like that still bug me though.

29:00 Like the turn off ad blockers.

29:02 There's, it's not, can't be that high of a percentage of the population that's turning them off.

29:07 So yeah, I know.

29:08 Weird.

29:09 Yeah.

29:09 There was a, one show was like Peacock or Paramount.

29:13 One of those streaming platforms would not let my wife watch some show because it says she

29:20 had her ad blocker on.

29:20 Of course she didn't.

29:21 She had, she was on the wifi, which was blocking everything.

29:24 and also the side of the extra benefit here is this means your mobile apps have ad

29:29 blockers built in.

29:30 This means your TV has an ad blocker built in.

29:32 This means like everything has an ad blocker built in, not just your browser.

29:35 Right.

29:35 So, all this whinging over, like whether or not you're, you can do blocking in a browser,

29:40 like, you know, you could just do better and it's not even your problem anymore.

29:43 Right.

29:44 So yeah, it was super.

29:46 She's like, well, Michael, how do I watch this?

29:48 I'm like, I don't know, actually.

29:50 I'm sorry, but I don't want to turn it off for the whole everything.

29:52 Right.

29:53 Like, I just want to let you watch your movies.

29:54 How do you do that?

29:55 So that's in there as well.

29:56 Yeah.

29:56 Okay, cool.

29:57 Nice.

29:57 Okay.

29:58 I've got a few extras.

29:59 won't take long though.

30:01 Django five released yesterday.

30:03 we've already talked about all the cool features of Django five.

30:07 Didn't we?

30:07 I think you covered it a couple of weeks ago.

30:08 but, it, I just noticed that it is, it's not a beta or anything anymore.

30:15 It's, it's released.

30:16 So as of December 4th, it's all grown up.

30:19 Yeah.

30:19 So that's awesome.

30:20 I'm excited to play with that.

30:22 so that that's fun.

30:23 A, and then something submitted by Paul Barry.

30:26 So thank you is, it's Brian seemed, he says, Brian seems to like Vim and you can use

30:31 Vim key bindings in a lot of places.

30:33 And so he sent over the Vim key bindings everywhere, the ultimate list.

30:38 And, it is a GitHub repo with a whole bunch of awesome, things like, debuggers

30:45 and, like Vim PDB.

30:47 I didn't know you could do that.

30:48 That's, that'd be fun.

30:49 IPython, you can turn, VIK bindings on with IPython.

30:54 anyway, quite a few fun, fun settings and telling you how to do it for different

31:01 things.

31:02 So even email clients, look at that.

31:04 Yeah.

31:06 None of them I use, but I used to use mutt a long time ago.

31:09 yeah, I don't see mine either, but that's so good.

31:13 Thunderbird.

31:13 I should try that.

31:14 Yeah.

31:15 So, okay.

31:16 So, and then I've got for my last extra, I have a little drama.

31:21 So I talked about last week that I think that Python or we have before the testing code is

31:27 now Python test my other podcast, but I left it on the domain testing code for a while.

31:33 But, recently I tried switching it to, to podcasts.

31:38 so what we're looking at now is podcast.pythontest.com.

31:42 So the new URL is that.

31:44 but if you just go to, if you just go to pythontest.com, there's a, there's a link to

31:48 the podcast.

31:48 So you can find it that way.

31:50 Just podcast.pythontest.com.

31:52 Anyway, what do I do with the old domain?

31:54 I redirected it, but it didn't work.

31:56 I don't know what I did wrong.

31:58 I contacted, name cheap and they said, it looks fine to us.

32:02 so not sure what went wrong.

32:04 So I changed it, changed the DNS settings last night to, to just point to like a small

32:11 site.

32:11 So, a small site that looks like this, this morning, it just says, Hey, I'm here.

32:17 Testing code.

32:17 The podcast moved.

32:19 It's over there.

32:19 and so just so that it won't 404 on people.

32:23 And I also have some redirects.

32:24 So if you say like testing code.com slash 23, it'll redirect to the 23rd episode over

32:30 on the other one.

32:31 Awesome.

32:31 Except it didn't work last night.

32:33 I was pulling my hair out and then, I woke up this morning and it worked on my phone,

32:39 but not here yet.

32:40 So, I know that there's this thing of saying, if you ever muck with DNS, it can take up to

32:45 72 hours to like ripple through the internet.

32:48 I haven't ever had to deal with that before.

32:50 It's always been pretty quick.

32:51 Whenever I muck with DNS settings, apparently I'm, hitting that.

32:55 So hopefully in a few days, it'll be all resolved.

32:58 And so now I have to reset my, days since it lasts DNS problem to zero.

33:03 so.

33:04 Days since last.

33:05 Oh my God.

33:07 That is so amazing.

33:08 I love it.

33:09 So I'm showing a, an Etsy.

33:11 I think you can find them lots of places, but there's an Etsy state sticker that says zero

33:15 days since it, it was DNS and in parentheses, it's always DNS.

33:19 It is anyway.

33:22 Oh my gosh, Brian.

33:24 Are you, are you foreshadowing here?

33:26 Maybe.

33:27 Do you know what I did this whole weekend?

33:28 I have two things to cover for my extras.

33:30 Okay.

33:30 well I, I covered the one and I also just realized I wanted to give a quick mention just

33:35 in case.

33:36 I spent my, I don't know anything to show, but so let's just leave this up because it's

33:39 perfect.

33:40 Okay.

33:40 I spent all of the weekend and a good chunk of Monday migrating domains from different places.

33:46 I have a bunch of old ones.

33:47 I have a bunch of old ones at GoDaddy because 15 years ago that seemed all right.

33:52 Yeah.

33:53 And they're super hard to get out of there.

33:55 so I've got a bunch of Google domains because I thought Google domains is beautiful until Google

34:01 decided to shut that down because apparently it's too much work to store like a DNS file.

34:06 That's it's a hundred characters.

34:08 I don't know.

34:09 Cause it's a commodity now and they can't make money off of it.

34:11 I know.

34:12 I know.

34:13 Anyway, I can understand it.

34:14 But anyway, so I had like, well, I don't want to stuff on that thing.

34:17 That's like shutting down.

34:18 I got to move that off and I got some others in other place.

34:21 So moving that all together, holy moly, does that take some time?

34:24 And sometimes they move quickly.

34:26 Sometimes they don't.

34:27 Some of the domains have, security turned on that if they transfer, it takes three days

34:33 for it to disable, but the domain will transfer right away.

34:35 But if you transfer it to, you reset it too quickly, it'll like just permanently stop working.

34:40 Some of them have to have SSL as part of the DNS definition, like, dot dev requires

34:47 only SSL.

34:48 But if you want to use let's encrypt, well, it's got to resolve to someplace, but it can't

34:51 resolve to someplace.

34:52 It's not as SSL.

34:53 You're like, okay, who decided to invent a catch 22 for domain names?

34:57 Like, oh, ah.

34:58 So the last one of the last ones switching is Python bytes.fm, which I requested after a

35:04 45 minute phone call, figure out why GoDaddy couldn't give me the access code to do the

35:09 switch.

35:09 I finally did this morning and I got it, but I hope everyone gets to hear from us after

35:15 it switches.

35:16 So if there's the reason, the whole reason to tell the story is that for some reason it

35:21 stops working, it will be back.

35:23 I apologize.

35:23 I'll get it.

35:24 I'll get it there.

35:25 I think it's going to go seamlessly.

35:26 Sometimes I do.

35:27 Sometimes they don't.

35:28 Fingers crossed for this one.

35:29 So we need to buy these stickers in bulk then.

35:32 We're going to zero days since it was DNS.

35:35 It's always DNS.

35:36 Yeah.

35:37 So we need to get those ordered now.

35:38 Mojo's asking where I ended up.

35:42 I ended up, let me do it like this so I don't give away the joke.

35:46 I ended up at hover.com.

35:49 Okay.

35:49 It's the one thing that they do.

35:51 They don't do other stuff.

35:53 They don't kill white rhinos for sport, nor do they not care about their DNS.

35:58 It's like their job.

35:59 So it seemed like a good place so far.

36:01 Fingers crossed.

36:02 Thank you, Robert.

36:02 All right.

36:03 So you already had probably the best joke for the show, but I've got a joke as well.

36:07 You ready for it?

36:07 Okay.

36:08 Yeah.

36:08 Okay.

36:09 Oh, I love this.

36:10 So, yeah.

36:10 So Chris, no, Josh Collinsworth, sorry, came up with this thing and it looks like some kind

36:17 of code he's written.

36:17 It's over on codepen.io that generates these.

36:20 So it's an honest LinkedIn notification generator.

36:25 So, you know, you go to like your activity or your notifications and it tells you stuff.

36:29 Well, this one tells you stuff that is, you know, more in line with the reality of LinkedIn

36:35 rather than what LinkedIn wants to tell you.

36:37 So here's a picture of this woman.

36:39 It says, congratulate a near stranger for tears at a job.

36:42 You didn't know they had, they had.

36:44 And then there's like a, yeah, it's so good.

36:46 There's like a blurred picture of somebody.

36:48 It says, someone looked at your profile.

36:50 Who?

36:50 We're holding that information for ransom.

36:52 It says, smiling guys, says, follow the worst coworker you've ever had for their sudden

36:59 unsolicited insights.

37:00 And it just goes on and on.

37:02 I think it even has infinite scroll.

37:03 Somebody connected with your first manager from your job in 2014 reacted to a former classmate's

37:10 post.

37:10 Thought you should know.

37:11 So one of the influencers shared an incredibly crappy opinion just for the engagement.

37:16 Click to engage.

37:17 Never hire anyone who writes CSF ever.

37:20 No CSS.

37:21 So on and so on.

37:23 It's just, it's so good.

37:25 Wish that guy who made you cry in the bathroom a happy birthday.

37:28 That was great.

37:30 Oh, that was, that was a, did you already get the one where it was like free work?

37:34 The free labor one?

37:35 Oh yeah.

37:35 No, where is it?

37:36 No, right there.

37:37 You're, you're one of the few experts invited.

37:39 Oh yeah.

37:40 Yeah.

37:40 You're one of the few experts invited to slash do free unpaid labor rather add to this

37:46 collaborative article.

37:48 How do you exploit users without them noticing?

37:50 Well, I've been getting those like a whole bunch lately and I, and I actually clicked on

37:54 it when I'm like, what are they talking about?

37:56 Oh, they want me to write articles for free.

37:58 no, I'm not doing that.

38:00 I got one this morning even.

38:03 So I got not one of these, but I got a congratulate John Gould on his new or gold, on his new,

38:10 promotion.

38:11 And I'm like, he owns the company.

38:12 I don't understand.

38:13 I don't understand.

38:15 I don't understand.

38:16 Yeah.

38:16 Good little pat on the old back there, John.

38:19 Good job.

38:19 Giving yourself a promotion there.

38:21 Exactly.

38:23 Chris Taylor and 36 others at soul sucking corporation shared this post from the CEO in hopes of

38:27 avoiding the next round of layoffs.

38:29 These are good.

38:30 Get a lot of those.

38:31 Yeah.

38:31 All right.

38:32 Well, I don't know if it's too dark, but that's what I brought for the joke.

38:35 I think it's great.

38:36 I think I do.

38:37 I kind of like LinkedIn to like keep in touch with people and keep up your resume and stuff

38:42 like that.

38:43 But I don't actually ever use it as a finding new articles through service.

38:49 But anyway, there's a whole group of people who do.

38:51 I don't think I'm part of it either, but yeah, I'm not the target audience.

38:54 So it's all right.

38:55 Yeah.

38:55 All right.

38:56 Well, thanks again for a lovely Python bites.

38:59 Absolutely.

39:00 Bye.

Back to show page