WEBVTT

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

00:00:05.540 --> 00:00:10.980
This is episode 418, recorded January 27th, 2025.

00:00:10.980 --> 00:00:12.080
And I am Michael Kennedy.

00:00:12.080 --> 00:00:13.520
And I am Brian Okken.

00:00:13.520 --> 00:00:16.480
And this episode is brought to you by us.

00:00:16.480 --> 00:00:18.740
Check out Brian's pytest course.

00:00:18.740 --> 00:00:22.900
Check out his course and a bunch of my courses over at Talk Python Training.

00:00:22.900 --> 00:00:26.500
And thank you to Patreon subscribers, supporters there.

00:00:26.500 --> 00:00:27.920
We appreciate all of you.

00:00:27.920 --> 00:00:31.260
And even if you don't do any of those things, we appreciate that you listen.

00:00:31.260 --> 00:00:32.620
That's why we get to do this stuff.

00:00:32.620 --> 00:00:33.840
You want to connect with us?

00:00:33.840 --> 00:00:37.140
We're Bluesky Mastodon mostly these days.

00:00:37.140 --> 00:00:41.100
Links for Brian, me and the show all in the show notes.

00:00:41.100 --> 00:00:44.480
You can join us live, pythonbysetfm.com slash live.

00:00:44.480 --> 00:00:46.140
A few of you are, most of you aren't.

00:00:46.140 --> 00:00:46.660
That's fine.

00:00:46.660 --> 00:00:48.220
But we do that if you want to join.

00:00:48.220 --> 00:00:50.940
Usually Monday at 10 a.m. Pacific time.

00:00:50.940 --> 00:00:52.920
Sometimes things go a little haywire.

00:00:52.920 --> 00:00:56.820
You can always watch the video replay on the episode page if it's available.

00:00:56.820 --> 00:00:59.820
And finally, Brian and I are crafting.

00:00:59.820 --> 00:01:05.720
We're continuing to hone our artisan craft, Brian, for the artisan newsletter.

00:01:05.720 --> 00:01:10.380
So if people want to get the newsletter, they can go right to Python by Setup M.

00:01:10.380 --> 00:01:11.180
Click on newsletter.

00:01:11.180 --> 00:01:13.860
It's the very center of the five buttons in the hero image.

00:01:14.200 --> 00:01:21.120
And all you got to do is give us your name and email and we will send you summaries, insights, the joke.

00:01:21.120 --> 00:01:23.760
And a couple of things we're doing different now.

00:01:23.760 --> 00:01:29.940
Brian is trying to put the TLDR stuff at the front so you can skim it really quick as well as the joke so people can have fun with that kind of stuff.

00:01:30.300 --> 00:01:32.360
So if they want that, they can check it out.

00:01:32.360 --> 00:01:35.060
And with that, what would you like to talk about first today?

00:01:35.060 --> 00:01:40.940
I actually want to talk about something that's not really wonderful, but I think we should talk about it anyway.

00:01:40.940 --> 00:01:43.620
So this last weekend we lost Michael Ford.

00:01:43.620 --> 00:01:48.840
And many of you might not know who that is, but he was influential.

00:01:48.840 --> 00:01:57.360
He's a core Python dev and influential with a lot of the early stuff in Python and PyCon, at least early in my perspective.

00:01:57.940 --> 00:02:08.860
So one of the things that he is known for is one of the contributors to the unit test library within Python.

00:02:08.860 --> 00:02:24.740
And then also he wrote a package called mock that was separate for a while, but then I think it was 3.3 or something early in the 3xs got incorporated into the standard library as unit test.mock.

00:02:24.740 --> 00:02:32.500
So if you're mocking anything, even if you use, so pytestMock is word I usually use often, but it's a wrapper around that library.

00:02:32.500 --> 00:02:35.420
So a lot of great stuff from Michael.

00:02:35.420 --> 00:02:37.140
He was a larger than life character.

00:02:37.140 --> 00:02:46.400
There is an in memoriam that's up on the python.org discuss site started by Guido.

00:02:46.400 --> 00:02:57.160
And a couple of things that Guido mentioned is that Michael was an original thinker, started the tradition of having the language summit events at PyCon.

00:02:57.160 --> 00:02:58.080
That's pretty big.

00:02:58.080 --> 00:03:04.000
And if I recall, the IRC was that, if I recall correctly, together with Barry Warsaw.

00:03:04.000 --> 00:03:06.680
So he also wrote the mock library.

00:03:06.680 --> 00:03:16.800
And in memoriam, so Guido suggests that to feel free to post positive memories of Michael.

00:03:18.240 --> 00:03:25.940
And perhaps maybe he's got kids, 10 and 13, so hopefully later they can look back and see how influential he was.

00:03:25.940 --> 00:03:28.480
And I really had a hard time with this, actually.

00:03:28.480 --> 00:03:32.600
I had a couple losses in my family recently.

00:03:32.600 --> 00:03:37.480
And I wasn't really close to Michael, but I kind of wished I would have been.

00:03:38.740 --> 00:03:40.260
I did interview him.

00:03:40.260 --> 00:03:51.820
I tried to interview him early and eventually did, in 2021, get to talk to him about mocking for the Testing Code podcast.

00:03:51.820 --> 00:03:53.940
So just listen to this.

00:03:53.940 --> 00:03:55.980
It's a great, again, it's a great episode.

00:03:55.980 --> 00:03:59.120
He's got some great advice towards software development and testing.

00:03:59.120 --> 00:04:00.280
So check that out also.

00:04:01.260 --> 00:04:09.540
There's also a really great write-up from Nicholas Tollervie, who I also had on the Testing Code podcast.

00:04:09.540 --> 00:04:10.500
Also a great guy.

00:04:10.500 --> 00:04:14.380
He's the dude from the MU editor.

00:04:14.380 --> 00:04:20.780
He wrote up my friend Michael a post about losing Michael.

00:04:20.780 --> 00:04:22.120
And there's some great pictures.

00:04:22.120 --> 00:04:24.120
He was a larger than life.

00:04:24.120 --> 00:04:24.880
That's a great one.

00:04:24.880 --> 00:04:26.420
Larger than life character.

00:04:26.420 --> 00:04:29.200
There's a paragraph in here I wanted to read.

00:04:29.800 --> 00:04:35.000
He was a walking paradox, both completely certain of himself and yet always questioning everything.

00:04:35.000 --> 00:04:45.040
He didn't shy away from fiercely independent thinking, often about the oddest of subjects, and through the most extraordinary, original, and I dare say weird lines of argument.

00:04:45.040 --> 00:04:47.740
Anyway, goodbye, Michael.

00:04:47.740 --> 00:04:48.520
You will be missed.

00:04:48.520 --> 00:04:53.080
Yeah, thoughts out to the whole community, friends, family.

00:04:53.080 --> 00:04:57.040
I didn't get a chance to meet Michael, but certainly it looks like he was very influential.

00:04:57.040 --> 00:04:57.740
Yeah.

00:04:57.740 --> 00:04:58.580
Indeed.

00:04:58.580 --> 00:04:59.460
All right.

00:04:59.460 --> 00:05:03.000
Hopefully you got something a little less depressing next for us.

00:05:03.000 --> 00:05:03.380
Yes.

00:05:03.380 --> 00:05:07.040
Well, it starts with a real smiley picture, so it's going to start out pretty well.

00:05:07.040 --> 00:05:18.800
I had Calvin Hendryx-Parker from Six Feet Up on Python, and we talked about this deployment system, kind of like Cookie Cutter, but way more than that.

00:05:18.800 --> 00:05:24.420
A whole infrastructure for initially Django apps, but growing from there.

00:05:24.420 --> 00:05:29.340
Anyway, during that, we talked about a bunch of the building blocks of those tools and of that framework.

00:05:29.680 --> 00:05:32.760
And that's how we get to the next one, something called Valkey.

00:05:32.760 --> 00:05:35.880
Do you remember, I mean, you know Redis, right?

00:05:35.880 --> 00:05:45.420
So Redis, key value store, it's people sometimes group it in the database category for when you're doing like surveys and what database you use.

00:05:45.600 --> 00:05:48.700
Redis, JSON, or SQL Server.

00:05:48.700 --> 00:05:50.400
Like, huh, wonder which one I should pick.

00:05:50.400 --> 00:05:53.000
Which of these fit and which of these don't or whatever.

00:05:53.480 --> 00:06:00.180
But, you know, Redis is kind of a key value store, mostly in memory cache, high speed, but can be used for other things, for queues.

00:06:00.180 --> 00:06:01.440
I believe it can persist.

00:06:01.440 --> 00:06:05.020
Well, anyway, it's gone through some funky licensing.

00:06:05.020 --> 00:06:06.260
This is not new, by the way.

00:06:06.260 --> 00:06:06.700
This is not new.

00:06:06.700 --> 00:06:09.560
But it's been that way for a little while, and I don't know.

00:06:09.560 --> 00:06:13.600
I've always had prickly reactions with the folks from Redis, but whatever.

00:06:13.600 --> 00:06:20.500
I ran across this thing called Valkey, like value key, key value store.

00:06:20.500 --> 00:06:28.080
And Valkey is a truly open source, no license, no cost, no nothing alternative to Redis.

00:06:28.080 --> 00:06:35.440
So an open source in-memory data store that can kind of be a primary database if you want it to be, but it's not its main goal.

00:06:35.440 --> 00:06:38.480
So here, I'll just give you the quick first paragraph.

00:06:38.880 --> 00:06:46.360
Valkey is an open source, high performance, key value data store that supports a variety of workloads, such as caching, primarily, right?

00:06:46.360 --> 00:06:49.060
Message queues and can act as a primary database.

00:06:49.060 --> 00:06:56.000
Valkey can run either as a standalone daemon or in a cluster, which is pretty awesome with replication and high availability options.

00:06:56.000 --> 00:07:05.280
It even has native support for, well, strings, obviously, numbers, probably, but hashes, listsets, so you can ask for probably like, I want a query into this dictionary type of thing.

00:07:05.280 --> 00:07:05.840
Pretty cool.

00:07:06.460 --> 00:07:10.800
People can check it out if you go to the GitHub somewhere.

00:07:10.800 --> 00:07:11.960
There's got to be a GitHub, right?

00:07:11.960 --> 00:07:12.540
Here we go.

00:07:12.540 --> 00:07:15.800
And you go to the repositories somewhere.

00:07:15.800 --> 00:07:16.660
Oh, there it is right there.

00:07:16.660 --> 00:07:17.100
Finally.

00:07:17.100 --> 00:07:17.640
Found it.

00:07:17.640 --> 00:07:20.300
18,000 GitHub stars, 700 forks.

00:07:20.300 --> 00:07:22.160
So it's got a lot of life to it.

00:07:22.160 --> 00:07:23.380
And let's see.

00:07:23.380 --> 00:07:24.900
Does it tell you how old it was?

00:07:24.900 --> 00:07:26.100
About a year old, I think.

00:07:26.100 --> 00:07:27.240
Anyway, isn't that cool?

00:07:27.240 --> 00:07:28.500
I think it's really neat.

00:07:28.500 --> 00:07:30.260
Yeah, I'll definitely check this out.

00:07:30.260 --> 00:07:30.860
I do too.

00:07:30.860 --> 00:07:32.100
I'm pretty excited about it.

00:07:32.100 --> 00:07:37.480
I'm not using anything like this yet, but there's some situations where I might be able to use this recently.

00:07:37.860 --> 00:07:46.660
Certainly, this is something I would give a hard look at if I was doing a key value in memory cache type of thing, especially with the failover and the replication.

00:07:46.660 --> 00:07:49.220
Because a lot of times, you've got to restart these things.

00:07:49.220 --> 00:07:50.920
They have to repopulate the cache.

00:07:50.920 --> 00:07:52.420
And that can be really kind of slow.

00:07:52.420 --> 00:07:54.200
And, you know, you see systems fall down.

00:07:54.200 --> 00:07:57.320
Then they can't quite get back up because the cache isn't there.

00:07:57.320 --> 00:07:58.260
And they keep getting killed.

00:07:58.520 --> 00:08:01.700
Anyway, these are pretty neat technologies if you need them.

00:08:01.700 --> 00:08:03.100
And Valkey, yeah, check it out.

00:08:03.100 --> 00:08:03.420
Cool.

00:08:03.420 --> 00:08:03.840
Cool.

00:08:03.840 --> 00:08:04.320
All right.

00:08:04.320 --> 00:08:05.140
Back to you.

00:08:05.140 --> 00:08:06.720
Let's see.

00:08:06.720 --> 00:08:07.480
Doing this again.

00:08:07.480 --> 00:08:08.000
Okay.

00:08:08.000 --> 00:08:19.220
I'm going to go back to Michael Ford again because actually in 2017, he wrote an article called 30 Best Practices for Software Development and Testing.

00:08:19.220 --> 00:08:28.580
And I think I didn't talk about it on this podcast because my intent was to talk about it on Testing Code and interview Michael.

00:08:28.580 --> 00:08:33.080
And that was a long story as to why we didn't talk about this.

00:08:33.080 --> 00:08:35.520
But I can't believe we haven't covered this yet.

00:08:35.520 --> 00:08:38.480
So a really great article, 30 Best Practices.

00:08:38.480 --> 00:08:42.220
I'm not going to read all of them, but I want to read like a few of them.

00:08:42.220 --> 00:08:48.240
Yagni, it's not the only place I've listened, heard the term Yagni, but Yagni is number one.

00:08:48.240 --> 00:08:50.260
Yagni stands for you ain't going to need it.

00:08:50.260 --> 00:08:54.460
So don't write code that you think that you might need in the future, but don't need yet.

00:08:54.460 --> 00:08:55.560
Just don't do that.

00:08:55.560 --> 00:08:58.640
You write it in the future because you might not need it.

00:08:58.640 --> 00:08:58.840
Yeah.

00:08:58.840 --> 00:09:00.360
People stress so much about this.

00:09:00.360 --> 00:09:01.500
Like, oh, we got a plan for the future.

00:09:01.500 --> 00:09:02.400
We got to get just right.

00:09:02.400 --> 00:09:04.200
Or just embrace refactoring.

00:09:04.200 --> 00:09:05.660
Just embrace refactoring.

00:09:05.660 --> 00:09:06.020
Right?

00:09:06.020 --> 00:09:07.200
Like write it so it works now.

00:09:07.200 --> 00:09:10.480
And if you need to change it, there's all sorts of amazing tools to change it.

00:09:10.480 --> 00:09:12.980
Source Control doesn't not break it so you can save it.

00:09:12.980 --> 00:09:13.900
We'll refactor.

00:09:13.900 --> 00:09:15.640
Just test to make sure it works.

00:09:15.640 --> 00:09:16.120
Yep.

00:09:17.260 --> 00:09:18.900
Going to jump down a little bit.

00:09:18.900 --> 00:09:20.940
A bunch of great stuff in here.

00:09:20.940 --> 00:09:22.860
Oh, I love this.

00:09:22.860 --> 00:09:26.160
When it comes to API design, simple things should be simple.

00:09:26.160 --> 00:09:27.880
Complex things should be possible.

00:09:28.740 --> 00:09:29.700
I can't remember.

00:09:29.700 --> 00:09:33.480
I don't remember if I got this from him or not, but I live by this.

00:09:33.480 --> 00:09:36.260
Trying to keep the easy things easy.

00:09:36.260 --> 00:09:39.800
And it can be complicated for the not easy things.

00:09:39.800 --> 00:09:40.420
That's okay.

00:09:40.960 --> 00:09:43.640
Number six is unit tests.

00:09:43.640 --> 00:09:50.020
Unit tests test to the unit of behavior, not the unit of implementation.

00:09:50.020 --> 00:09:52.480
And these are kind of fighting words.

00:09:53.280 --> 00:09:59.540
This is pretty much the difference between classical versus Marcus test driven development.

00:09:59.540 --> 00:10:02.700
But I stand by Michael's side on this one.

00:10:02.700 --> 00:10:04.300
Number eight.

00:10:04.300 --> 00:10:05.840
We've got a couple more that I want to hit.

00:10:05.840 --> 00:10:06.580
Number eight.

00:10:06.580 --> 00:10:08.020
Code is the enemy.

00:10:08.020 --> 00:10:09.000
It can go wrong.

00:10:09.000 --> 00:10:09.980
It needs maintenance.

00:10:09.980 --> 00:10:10.900
Write less code.

00:10:10.900 --> 00:10:11.540
Delete code.

00:10:11.540 --> 00:10:12.300
Don't write code.

00:10:12.300 --> 00:10:14.140
You don't need less code.

00:10:14.140 --> 00:10:14.820
It's true.

00:10:15.020 --> 00:10:17.960
The less code you got, the less bugs could be in there.

00:10:17.960 --> 00:10:20.320
For the most part, as a general rule.

00:10:20.320 --> 00:10:22.860
Last one that I want to cover.

00:10:22.860 --> 00:10:24.140
More about nine as well, by the way.

00:10:24.140 --> 00:10:25.060
Oh, nine.

00:10:25.060 --> 00:10:25.660
Yeah.

00:10:25.660 --> 00:10:28.260
Inevitably code comments become lies over time.

00:10:28.260 --> 00:10:28.940
Yeah, definitely.

00:10:28.940 --> 00:10:31.340
In practice, few people update comments.

00:10:31.340 --> 00:10:35.980
I still remember that I had a code base that there's so many comments in them.

00:10:35.980 --> 00:10:41.440
And there were boilerplate comments that in order to understand the code, I wrote a script

00:10:41.440 --> 00:10:44.680
to copy the entire code base into a different directory structure.

00:10:44.680 --> 00:10:46.520
and strip all the comments out.

00:10:46.520 --> 00:10:48.520
And it was so much easier to deal with.

00:10:48.520 --> 00:10:50.880
Gosh, I feel that way about help docs.

00:10:50.880 --> 00:10:51.680
Help strings.

00:10:51.680 --> 00:10:52.840
Doc strings sometimes.

00:10:52.840 --> 00:10:53.400
Yeah.

00:10:53.400 --> 00:10:56.800
It's like there's three lines of code and 18 lines of doc strings.

00:10:56.800 --> 00:10:57.340
Like, wow.

00:10:57.340 --> 00:10:59.160
If that just weren't there, I could read it.

00:10:59.160 --> 00:10:59.560
Yeah.

00:10:59.560 --> 00:11:01.860
And then that can blow up the entire file.

00:11:01.860 --> 00:11:07.340
If each function is like that, you've got a few hundred lines of code and 2,000 lines

00:11:07.340 --> 00:11:08.020
of file.

00:11:08.020 --> 00:11:08.460
Anyway.

00:11:08.460 --> 00:11:08.880
Anyway.

00:11:08.880 --> 00:11:10.640
15.

00:11:10.640 --> 00:11:11.840
We'll jump to 15.

00:11:12.500 --> 00:11:18.900
The more you have to mock out to test your code, the worse your code is.

00:11:18.900 --> 00:11:22.500
And that was one of the things that surprises me coming from him.

00:11:22.500 --> 00:11:24.420
This is the dude that wrote the mock library.

00:11:24.420 --> 00:11:32.400
And one of the things he discusses in the episode where I got to interview him is he was developing

00:11:32.400 --> 00:11:38.460
this when he was on a team that was doing a mock test, you know, a mockist isolation test

00:11:38.460 --> 00:11:40.120
driven development philosophy.

00:11:40.120 --> 00:11:47.900
And they ran into the issues that I've run into before also is if you're testing the implementation,

00:11:47.900 --> 00:11:52.280
that means when you have to refactor your code, your tests don't help at all.

00:11:52.280 --> 00:11:53.740
They just all break.

00:11:54.080 --> 00:11:56.180
So testing behavior is better.

00:11:56.180 --> 00:12:00.500
And then also just trying to not have to mock your code.

00:12:00.500 --> 00:12:01.760
That's not a hard and fast rule.

00:12:01.760 --> 00:12:03.600
Sometimes it's the easiest thing.

00:12:03.600 --> 00:12:03.900
So.

00:12:03.900 --> 00:12:04.280
Yeah.

00:12:04.280 --> 00:12:05.980
And plus you're going to hurt his feelings if you mock it.

00:12:05.980 --> 00:12:08.060
It's just not nice.

00:12:08.060 --> 00:12:09.380
I mean, sometimes you got to.

00:12:09.380 --> 00:12:10.200
Just not nice.

00:12:10.200 --> 00:12:10.780
It's just not nice.

00:12:10.780 --> 00:12:11.240
Come on.

00:12:11.240 --> 00:12:11.720
Yeah.

00:12:11.720 --> 00:12:14.160
That's funny.

00:12:14.160 --> 00:12:14.480
Anyway.

00:12:14.480 --> 00:12:15.560
Great article.

00:12:15.560 --> 00:12:17.440
Go have a read.

00:12:18.080 --> 00:12:23.100
I've reposted it on social media and a lot of people have said, hey, this is great.

00:12:23.100 --> 00:12:23.860
Awesome.

00:12:23.860 --> 00:12:24.360
It's good.

00:12:24.360 --> 00:12:25.660
All right.

00:12:25.660 --> 00:12:27.120
I got a question for you, Brian.

00:12:27.120 --> 00:12:27.660
Okay.

00:12:27.660 --> 00:12:32.360
If you're working on a web project, and I've been working on some web projects, and you

00:12:32.360 --> 00:12:38.940
have to do direct requests, like say, for example, over on Python Bytes, if I go to, say,

00:12:38.940 --> 00:12:43.440
like our latest, which is very, very close to being not true, but our latest episode,

00:12:43.440 --> 00:12:46.780
Bug Tied from the Light, you can see there's an image here.

00:12:47.080 --> 00:12:48.900
And that's the thumbnail from YouTube.

00:12:48.900 --> 00:12:54.240
And we have stuff in Python Bytes.fm that when you load this page, it'll look for the

00:12:54.240 --> 00:12:56.240
YouTube link, and then it'll talk to YouTube.

00:12:56.240 --> 00:12:58.740
Pull that and get the thumbnail.

00:12:58.740 --> 00:13:02.020
Now, you might think, why don't you just put the YouTube embed right there?

00:13:02.020 --> 00:13:09.060
Because Google is parasitic, and when you embed a YouTube video, it puts tracking cookies

00:13:09.060 --> 00:13:12.780
onto you, which means we would have to have a cookie banner.

00:13:12.780 --> 00:13:14.040
Do you accept our cookies?

00:13:14.040 --> 00:13:16.880
Because we're making our website better for you by tracking you.

00:13:16.960 --> 00:13:19.120
Like, I'm pretty sure you're not, but okay.

00:13:19.120 --> 00:13:24.600
Or you could download the image, put it in your database, and then serve it out of court,

00:13:24.600 --> 00:13:27.680
or Flask, or Pyramid, or whatever it is you're using, right?

00:13:27.680 --> 00:13:28.100
Yeah.

00:13:28.100 --> 00:13:32.820
When you do that kind of stuff, you need to know what the MIME type is, or the content

00:13:32.820 --> 00:13:33.760
type, more importantly.

00:13:33.760 --> 00:13:37.620
Like, you need to tell the browser, this is not just binary stuff, but this is an image.

00:13:37.620 --> 00:13:38.620
I know it came from a database.

00:13:38.620 --> 00:13:42.800
It doesn't have a file name, but it's a PNG, or it's a JPEG, or whatever, right?

00:13:42.800 --> 00:13:48.700
So back to my item, MIME type.io, which I would prefer to say is content type.io.

00:13:48.700 --> 00:13:53.180
But, you know, for example, tell me, what is the content type of a JPEG?

00:13:53.400 --> 00:13:59.720
Well, it's probably image slash JPEG, but is there a E in there, like JPEG, or is it JPG?

00:13:59.720 --> 00:14:00.360
Hmm.

00:14:00.360 --> 00:14:02.020
But you better not get it wrong, right?

00:14:02.020 --> 00:14:08.160
So there's this site, MIME type.io, and you just type in whatever file extension you think

00:14:08.160 --> 00:14:08.820
you can imagine.

00:14:09.000 --> 00:14:12.600
It'll tell you it's image slash JPEG with an E, not without.

00:14:12.600 --> 00:14:16.060
And it shows you all the file type extensions for which this applies.

00:14:16.060 --> 00:14:21.040
And it gives you, like, the history of it, what if there's other things it's known as.

00:14:21.040 --> 00:14:26.900
Like, sometimes, I think if I put it in JSON, there might be, like, JSON is application slash

00:14:26.900 --> 00:14:29.940
JSON, but there's a deprecated text slash JSON.

00:14:29.940 --> 00:14:31.460
It might also appear as.

00:14:31.460 --> 00:14:32.280
Isn't that cool?

00:14:32.280 --> 00:14:32.760
Yeah.

00:14:32.760 --> 00:14:33.220
Yeah.

00:14:33.220 --> 00:14:38.100
So if you're doing web projects and you need to send files, you need to specify the content

00:14:38.100 --> 00:14:38.320
type.

00:14:38.400 --> 00:14:38.960
And here you go.

00:14:38.960 --> 00:14:39.780
This is how you do it.

00:14:39.780 --> 00:14:40.880
So I really like this.

00:14:40.880 --> 00:14:41.520
I ran across this.

00:14:41.520 --> 00:14:48.160
And I had tipped to a very, very similar project for HTTP status codes at HTTP statuses.io.

00:14:48.160 --> 00:14:52.100
So, for example, you've seen 200, 201, like 200 is good.

00:14:52.100 --> 00:14:55.900
201 is created if you did, like, post a new thing or whatever.

00:14:55.900 --> 00:14:57.940
What is about 203?

00:14:57.940 --> 00:14:59.100
I don't know, man.

00:14:59.100 --> 00:15:03.100
But if you click on it, it says this is a, you know, lets you dive into them.

00:15:03.100 --> 00:15:05.100
It's a 203 non-authoritative information.

00:15:05.100 --> 00:15:06.660
This request was successful.

00:15:06.660 --> 00:15:12.720
But the enclosed payload has been modified from that of the origin server's 200 OK response

00:15:12.720 --> 00:15:14.220
by a transforming proxy.

00:15:14.220 --> 00:15:14.580
Woo!

00:15:14.580 --> 00:15:20.460
But it also shows you, like, how to get to these as enumerations in, say, Python or the

00:15:20.460 --> 00:15:22.220
new new Python and so on.

00:15:22.220 --> 00:15:22.540
Right?

00:15:22.580 --> 00:15:26.020
So you're not programming with magic numbers like 203 or quote 203.

00:15:26.020 --> 00:15:28.360
Sometimes these are representative strings, and I don't know why.

00:15:28.360 --> 00:15:28.880
But yeah.

00:15:28.880 --> 00:15:31.140
Anyway, we're going to come back to this for our joke.

00:15:31.140 --> 00:15:36.200
But the takeaway is mime type.io, which I wish were called content type.io.

00:15:36.200 --> 00:15:36.640
But whatever.

00:15:36.640 --> 00:15:37.220
It still works.

00:15:37.220 --> 00:15:37.760
Okay.

00:15:37.760 --> 00:15:38.800
I like mime types.

00:15:38.800 --> 00:15:39.280
Yeah.

00:15:39.280 --> 00:15:42.520
Like the types that are stuck in a bubble.

00:15:42.520 --> 00:15:43.520
Like, I can't get out.

00:15:43.680 --> 00:15:44.120
I know.

00:15:44.120 --> 00:15:44.380
Yeah.

00:15:44.380 --> 00:15:46.180
They really do act it out.

00:15:46.180 --> 00:15:47.200
They do act it out.

00:15:47.200 --> 00:15:49.200
Sorry.

00:15:49.200 --> 00:15:50.020
No, it's all right.

00:15:50.020 --> 00:15:50.360
All right.

00:15:50.360 --> 00:15:51.700
That's it for our main items, right?

00:15:51.700 --> 00:15:52.740
Yeah, I think so.

00:15:52.740 --> 00:15:53.700
You got any extras?

00:15:54.300 --> 00:15:56.300
I just noticed, just one.

00:15:56.300 --> 00:15:58.180
I noticed, sorry.

00:15:58.180 --> 00:16:03.740
I noticed somebody posted online today that Python 1.1 is out.

00:16:03.740 --> 00:16:07.240
Actually, 31 years ago, as of today, Python 1.1.

00:16:07.240 --> 00:16:07.320
Yeah.

00:16:07.320 --> 00:16:08.000
That's awesome.

00:16:08.000 --> 00:16:12.720
On January 27th, 1994, Guido posted 1.00 is out.

00:16:12.720 --> 00:16:13.520
So anyway.

00:16:13.520 --> 00:16:16.420
I'm tired of deciphering that Perl code you got last week.

00:16:16.420 --> 00:16:17.900
Sick of CGI.

00:16:17.900 --> 00:16:18.700
Let's go.

00:16:18.700 --> 00:16:20.840
Frustrated with born shell syntax.

00:16:20.840 --> 00:16:21.580
Yeah.

00:16:21.580 --> 00:16:22.960
Yeah, yeah, yeah, yeah.

00:16:22.960 --> 00:16:23.660
Yeah.

00:16:23.660 --> 00:16:24.020
Funny.

00:16:24.020 --> 00:16:24.200
Cool.

00:16:24.200 --> 00:16:25.260
Well, I don't know.

00:16:25.260 --> 00:16:26.380
We'll see if that thing takes off.

00:16:26.380 --> 00:16:28.640
Hope so.

00:16:28.640 --> 00:16:29.220
It's got a feature.

00:16:29.220 --> 00:16:30.340
We'll see.

00:16:30.340 --> 00:16:31.080
All right, cool.

00:16:31.080 --> 00:16:32.220
I got a few extras.

00:16:32.220 --> 00:16:33.080
I'll keep it quick.

00:16:33.080 --> 00:16:33.700
I don't got a lot.

00:16:33.700 --> 00:16:42.720
Speaking of releases, Python 3.14.0 Alpha 4 came out last week, minutes after we recorded

00:16:42.720 --> 00:16:43.620
our last episode.

00:16:43.620 --> 00:16:46.040
So since last time, something to announce.

00:16:46.040 --> 00:16:47.220
People can check it out.

00:16:47.220 --> 00:16:48.140
It's coming along.

00:16:48.140 --> 00:16:48.920
This is Alpha 4.

00:16:48.920 --> 00:16:50.780
That means there's three more Alpha releases.

00:16:50.780 --> 00:16:51.600
Then we hit beta.

00:16:51.600 --> 00:16:55.380
Then you can start to treat it seriously as a fixed item, right?

00:16:55.380 --> 00:16:57.260
Chances are no new features.

00:16:57.260 --> 00:16:59.860
Just bug fixes and polish before it goes.

00:16:59.860 --> 00:17:02.940
Although I'm sure they could decide, you know, this is too rough.

00:17:02.940 --> 00:17:03.780
We're not going to make it.

00:17:03.780 --> 00:17:04.700
We'll take a feature out.

00:17:04.700 --> 00:17:06.740
But the idea is that the betas are fixed.

00:17:07.100 --> 00:17:13.080
Yeah, and actually, so I usually haven't been testing new stuff until we had to betas.

00:17:13.080 --> 00:17:20.000
But uv has made it so easy to load up pre-release stuff that I'm testing with 3.14 already.

00:17:20.000 --> 00:17:21.020
That's awesome.

00:17:21.020 --> 00:17:22.380
And it's not just easy.

00:17:22.380 --> 00:17:23.800
It's also low impact.

00:17:23.800 --> 00:17:26.840
It's not like you're taking over your machines.

00:17:26.840 --> 00:17:28.760
The latest Python is now this Alpha thing.

00:17:28.760 --> 00:17:29.640
Yeah, right.

00:17:29.640 --> 00:17:30.640
Yeah, yeah.

00:17:31.220 --> 00:17:33.880
Same goes true for free-threaded Python, right?

00:17:33.880 --> 00:17:35.360
You can get that with uv.

00:17:35.360 --> 00:17:35.940
Pretty cool.

00:17:35.940 --> 00:17:36.720
All right.

00:17:36.720 --> 00:17:39.460
This wasn't even going to be here, but then I was thinking about it as we were setting up.

00:17:39.460 --> 00:17:41.620
I just set up a Fastmail account.

00:17:41.620 --> 00:17:46.400
And wow, Fastmail is so much better than Protonmail for what I've been doing these days.

00:17:46.400 --> 00:17:51.300
Like Protonmail is always slow and clunky and even things like archiving.

00:17:51.300 --> 00:17:53.180
Like they have a hotkey to archive your mail.

00:17:53.180 --> 00:17:55.140
And you're viewing the mail and you press archive.

00:17:55.380 --> 00:17:58.700
It's like three seconds later before it archives it and it goes away.

00:17:58.700 --> 00:18:00.000
Like what is it doing?

00:18:00.000 --> 00:18:02.860
So I've switched my personal mail over to Fastmail.

00:18:02.860 --> 00:18:04.780
And so far, I highly recommend it.

00:18:04.780 --> 00:18:06.000
Yeah, I've been using it for a while.

00:18:06.000 --> 00:18:06.480
I love it.

00:18:06.480 --> 00:18:07.120
You like it?

00:18:07.120 --> 00:18:07.380
Yeah.

00:18:07.380 --> 00:18:08.620
I'm really enjoying it as well.

00:18:08.620 --> 00:18:09.120
Okay.

00:18:09.120 --> 00:18:11.940
Well, that brings us to our joke.

00:18:11.940 --> 00:18:12.720
Okay.

00:18:12.720 --> 00:18:14.700
And back to HTTP status codes.

00:18:14.700 --> 00:18:16.080
What episode is it, Brian?

00:18:16.080 --> 00:18:17.120
I don't remember.

00:18:17.120 --> 00:18:17.740
418.

00:18:17.740 --> 00:18:18.640
418.

00:18:18.640 --> 00:18:20.540
Well, let's go down to status code 418.

00:18:20.540 --> 00:18:24.660
And there was somebody in one of the socials, Mastodon or Bluesky, I can't remember,

00:18:24.820 --> 00:18:26.500
I believe, who said, it's coming up.

00:18:26.500 --> 00:18:27.040
It's coming up.

00:18:27.040 --> 00:18:28.160
You got to do this.

00:18:28.160 --> 00:18:29.180
Oh, yeah.

00:18:29.180 --> 00:18:30.740
They were still right.

00:18:30.740 --> 00:18:31.540
And they gave us a picture.

00:18:31.540 --> 00:18:32.860
I can't find the post again.

00:18:32.860 --> 00:18:33.280
So I'm sorry.

00:18:33.280 --> 00:18:34.440
I can't shout out credit.

00:18:34.440 --> 00:18:35.600
But thank you for sending that in.

00:18:35.600 --> 00:18:38.220
htpstatuses.io slash 418.

00:18:38.220 --> 00:18:38.780
418.

00:18:38.780 --> 00:18:39.900
Client error.

00:18:39.900 --> 00:18:40.700
418.

00:18:40.700 --> 00:18:41.720
I'm a teapot.

00:18:41.720 --> 00:18:44.280
This is literally in the HTTP spec.

00:18:44.280 --> 00:18:46.900
You can return it for whatever value it serves.

00:18:46.900 --> 00:18:47.480
418.

00:18:47.480 --> 00:18:48.180
I'm a teapot.

00:18:48.180 --> 00:18:51.280
Any attempt to brew coffee with a teapot should result in an error code.

00:18:51.280 --> 00:18:51.800
418.

00:18:51.800 --> 00:18:52.500
I'm a teapot.

00:18:52.500 --> 00:18:54.280
The resulting entity body.

00:18:54.480 --> 00:18:55.800
may be short and stout.

00:18:55.800 --> 00:18:59.800
I am quite disappointed in Python.

00:18:59.800 --> 00:19:01.300
I am disappointed.

00:19:01.300 --> 00:19:03.800
There's a .NET enumeration.

00:19:03.800 --> 00:19:04.480
Status code.

00:19:04.480 --> 00:19:05.220
Status.

00:19:05.220 --> 00:19:05.980
Status.

00:19:05.980 --> 00:19:06.840
418.

00:19:06.840 --> 00:19:07.400
I'm a teapot.

00:19:07.400 --> 00:19:08.220
There's a Rust.

00:19:08.220 --> 00:19:08.820
I'm a teapot.

00:19:08.820 --> 00:19:09.480
There's a Go.

00:19:09.480 --> 00:19:10.360
Status teapot.

00:19:10.360 --> 00:19:11.500
There's no Python.

00:19:11.500 --> 00:19:12.180
I'm a teapot.

00:19:12.180 --> 00:19:14.600
They didn't implement all of the status codes.

00:19:14.600 --> 00:19:15.260
Come on, people.

00:19:15.640 --> 00:19:16.280
Oh, dear.

00:19:16.280 --> 00:19:18.100
This could be my first pep, Ryan.

00:19:18.100 --> 00:19:18.680
Yeah.

00:19:18.680 --> 00:19:20.340
I think you should do this as a PEP.

00:19:20.340 --> 00:19:21.820
I got to get this accepted.

00:19:21.820 --> 00:19:23.460
Yeah.

00:19:23.460 --> 00:19:25.240
So one, it's funny.

00:19:25.240 --> 00:19:32.580
But also, do you think it's in place just for something for people to debug their status codes?

00:19:32.580 --> 00:19:32.960
Yeah.

00:19:32.960 --> 00:19:33.600
Possibly.

00:19:33.600 --> 00:19:38.560
I'm pretty sure it was an April Fool's joke that got into the spec, and people are like,

00:19:38.560 --> 00:19:39.020
we're doing it.

00:19:39.020 --> 00:19:39.440
Yeah.

00:19:39.440 --> 00:19:40.880
We just have to keep it.

00:19:40.880 --> 00:19:41.480
I'm a teapot.

00:19:41.480 --> 00:19:43.020
This is a perfect status code.

00:19:44.320 --> 00:19:46.420
So this is I'm a teapot episode.

00:19:46.420 --> 00:19:48.200
I mean, show title right there.

00:19:48.200 --> 00:19:48.700
What do you think?

00:19:48.700 --> 00:19:49.760
Yeah, definitely.

00:19:49.760 --> 00:19:51.580
Number 418.

00:19:51.580 --> 00:19:52.220
I'm a teapot.

00:19:52.220 --> 00:19:52.680
Let's go.

00:19:52.680 --> 00:19:53.020
All right.

00:19:53.020 --> 00:19:55.900
Hopefully, the RSS readers will still get it.

00:19:55.900 --> 00:19:56.840
I know.

00:19:56.840 --> 00:20:00.620
Will they read the 200 OK on the RSS, or will they read the title?

00:20:00.620 --> 00:20:01.680
The 418.

00:20:01.680 --> 00:20:02.680
We'll see.

00:20:02.680 --> 00:20:03.180
And there we go.

00:20:03.180 --> 00:20:04.100
We're sorry.

00:20:04.100 --> 00:20:06.100
Your podcast letter is not short and stout.

00:20:06.100 --> 00:20:08.400
Yeah.

00:20:08.400 --> 00:20:08.860
I hope so.

00:20:08.860 --> 00:20:10.460
No, I hope it actually works.

00:20:10.460 --> 00:20:12.940
Awesome.

00:20:12.940 --> 00:20:13.700
We'll see where it goes.

00:20:13.780 --> 00:20:17.260
But that was a lot of fun, as has been doing this show for 418 episodes.

00:20:17.260 --> 00:20:18.100
So thanks for being here.

00:20:18.100 --> 00:20:18.460
Yeah.

00:20:18.460 --> 00:20:18.940
Thank you.

00:20:18.940 --> 00:20:19.300
Yeah.

00:20:19.300 --> 00:20:20.320
And thanks to everyone who listens.

00:20:20.320 --> 00:20:20.680
Bye.