رونوشت 🔗
WEBVTT
00:00:00.001 --> 00:00:05.640
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:00:05.640 --> 00:00:11.760
This is episode 350, recorded August 29th, 2023.
00:00:11.760 --> 00:00:13.220
And I'm Michael Kennedy.
00:00:13.220 --> 00:00:14.340
And I'm Brian Okken.
00:00:14.340 --> 00:00:17.000
And this episode is brought to you by Sentry.
00:00:17.000 --> 00:00:22.040
Make sure those errors don't go unnoticed and you get to them quickly with the right information.
00:00:22.040 --> 00:00:25.660
Check them out at pythonbytes.fm/sentry.
00:00:25.660 --> 00:00:27.420
We'll tell you more about them later.
00:00:27.420 --> 00:00:33.900
And of course, connect with us over on Mastodon at mkennedy, @brianokken, at pythonbytes, all at fosstodon.org.
00:00:33.900 --> 00:00:41.960
And if you want to be part of the live stream, part of the live audience, that's usually on Tuesdays, 11 a.m. Pacific time, as we are recording today.
00:00:41.960 --> 00:00:45.800
So if you can drop by and be part of the show, we would love that.
00:00:45.800 --> 00:00:48.040
If not, well, thanks for listening anyway.
00:00:48.040 --> 00:00:50.140
Brian, let's kick this off.
00:00:50.140 --> 00:00:56.320
Just a quick little article from Bob Beldermos to remind us to keep things simple.
00:00:56.820 --> 00:01:04.180
And there's a lot of ways in Python where you can make elegant-looking code, but it also is easier to read.
00:01:04.180 --> 00:01:06.020
And that's, I think, some of the emphasis.
00:01:06.020 --> 00:01:12.280
So Bob from PyBytes, and they see a lot of, they've got all those challenges.
00:01:12.280 --> 00:01:18.060
So I'm sure they see a lot of examples of not quite elegant code, but it does the trick.
00:01:18.600 --> 00:01:20.940
So I think this is good advice from a good person.
00:01:20.940 --> 00:01:27.920
So like, and there's just a whole bunch, there's just a handful of these here, but they're all really good things.
00:01:27.920 --> 00:01:31.940
Like, for instance, using the keyword all.
00:01:31.940 --> 00:01:34.740
I don't use it that much, but here's an example.
00:01:35.000 --> 00:01:45.980
He's got a function where he wants to know if all things in a list are divisible by some number.
00:01:45.980 --> 00:01:55.360
And there's like a function he wrote with just like a for loop that goes through the whole thing.
00:01:55.360 --> 00:02:00.300
However, he rewrote it as a, what is that called?
00:02:00.300 --> 00:02:04.900
It uses all, but it's comprehension, I believe.
00:02:04.900 --> 00:02:10.320
So all numbers divided by divisor equals zero for divisor and divisors.
00:02:10.320 --> 00:02:11.640
So it's kind of neat.
00:02:11.640 --> 00:02:13.200
It actually might be a generator.
00:02:13.200 --> 00:02:14.240
Is it a generator?
00:02:14.240 --> 00:02:15.860
I think it might be.
00:02:15.860 --> 00:02:20.400
But yeah, when it's passed as an argument, parentheses don't really tell you which it is,
Load full transcript
does it?
00:02:20.400 --> 00:02:21.260
It doesn't.
00:02:21.580 --> 00:02:23.680
Yeah, it's pretty cool to find that out for us.
00:02:23.680 --> 00:02:31.640
Pretty cool to use that generator or whatever as an argument to a function.
00:02:31.640 --> 00:02:32.860
That's pretty slick.
00:02:32.860 --> 00:02:36.080
And it's pretty easy to read still, I think.
00:02:36.080 --> 00:02:40.960
I still think maybe, well, with the function name, you kind of get what it's going at.
00:02:40.960 --> 00:02:48.400
But if it was out of scope of a function, both of these methods would have used a, could use a comment here or there.
00:02:48.400 --> 00:02:50.120
Dictionary lookups.
00:02:50.120 --> 00:02:51.580
I love this part.
00:02:51.580 --> 00:02:52.480
I use it all the time.
00:02:52.480 --> 00:02:55.640
The dictionary has a get function.
00:02:55.640 --> 00:03:01.020
So normally you reference a key in a dictionary with just brackets.
00:03:01.020 --> 00:03:07.580
But if you want to make, have some default value, if it's not there, use get instead.
00:03:07.580 --> 00:03:11.020
So you grab a key and then the second value is the value.
00:03:11.880 --> 00:03:18.700
Anyway, this saves a lot of code because I do this all the time for dictionary lookups.
00:03:18.700 --> 00:03:21.680
And then it goes through quite a few others.
00:03:21.680 --> 00:03:23.100
Just it's a good, good list.
00:03:23.100 --> 00:03:24.480
We've got list comprehensions.
00:03:24.480 --> 00:03:25.440
Don't forget those.
00:03:25.440 --> 00:03:27.020
The list comprehensions are wonderful.
00:03:27.020 --> 00:03:27.940
We both love those.
00:03:27.940 --> 00:03:30.100
Looking for unique values.
00:03:30.100 --> 00:03:32.000
This one I had to look at for a while.
00:03:32.000 --> 00:03:32.640
It was interesting.
00:03:32.720 --> 00:03:36.880
If you're looking, I actually didn't understand the first one that well.
00:03:36.880 --> 00:03:47.800
But making sure that all items in a set or items in a something are unique by taking the length and then doing a set of items.
00:03:47.800 --> 00:03:55.560
And then like anyway, just lots of lots of fun tricks to shorten your code and make it a little more readable.
00:03:55.560 --> 00:03:56.720
I love it.
00:03:56.720 --> 00:03:59.480
There's all these non-obvious ways, you know, counter.
00:03:59.480 --> 00:04:03.680
I know Bob is a big fan of the counter class, but yeah, that's a really slick way to.
00:04:03.680 --> 00:04:05.400
What is he trying to do with this last one?
00:04:05.400 --> 00:04:06.120
Counting things.
00:04:06.120 --> 00:04:06.840
Yeah, counters.
00:04:06.840 --> 00:04:07.980
Counters pretty cool.
00:04:07.980 --> 00:04:09.040
Just to count things.
00:04:09.040 --> 00:04:15.460
You've got a paragraph or like some text and you want to say which words appear and then how frequently do they appear.
00:04:15.460 --> 00:04:19.400
You could split on space and, you know, throw away the punctuation.
00:04:19.400 --> 00:04:19.960
Yeah.
00:04:19.960 --> 00:04:23.220
And like just basically a couple of lines, right?
00:04:23.220 --> 00:04:24.320
Sentence.split.
00:04:24.320 --> 00:04:25.900
And that's it.
00:04:25.900 --> 00:04:26.860
And you count that.
00:04:26.860 --> 00:04:27.300
It's awesome.
00:04:27.300 --> 00:04:30.140
It says, you know, this word appeared this many times and it even sorts it.
00:04:30.140 --> 00:04:30.680
Yeah.
00:04:30.680 --> 00:04:31.420
That's pretty cool.
00:04:31.420 --> 00:04:31.860
Yeah.
00:04:31.860 --> 00:04:38.240
And it's just like it did sentence.lower.split and then throw it into a counter.
00:04:38.240 --> 00:04:39.420
Interesting.
00:04:39.420 --> 00:04:40.800
Pretty cool.
00:04:40.800 --> 00:04:42.160
Interesting indeed.
00:04:42.160 --> 00:04:48.560
Also interesting is it turns out that is in fact a generator that comes out of that.
00:04:48.560 --> 00:04:51.060
I did a little quick REPL action on it.
00:04:51.060 --> 00:04:51.480
Okay.
00:04:51.480 --> 00:04:53.000
For some real time follow up there.
00:04:53.000 --> 00:04:53.380
Cool.
00:04:53.380 --> 00:04:53.860
Yeah.
00:04:53.860 --> 00:04:54.180
Yeah.
00:04:54.180 --> 00:04:54.780
All right.
00:04:54.780 --> 00:05:00.700
The first one I want to cover today comes from a foundational element of Scrapey.
00:05:00.700 --> 00:05:07.460
So Scrapey is the project around extracting data from websites in a fast, cool way.
00:05:07.460 --> 00:05:08.680
You've got Scrapey.org.
00:05:08.680 --> 00:05:10.220
You've got Scrapey itself.
00:05:10.220 --> 00:05:12.540
But the thing I want to highlight is Parcel.
00:05:12.540 --> 00:05:17.960
You've probably heard of Beautiful Soup and Beautiful Soup has been around for a really long time.
00:05:17.960 --> 00:05:19.380
and it's quite excellent.
00:05:19.380 --> 00:05:19.960
Yeah.
00:05:19.960 --> 00:05:27.460
But I was looking for something, you know, is there something kind of newer that's got some new paradigms just to try out basically.
00:05:27.460 --> 00:05:32.720
And I ran across Parcel and it being the foundation of Scrapey kind of gives it some street cred.
00:05:33.400 --> 00:05:38.780
So Parcel lets you extract data from XML and HTML documents.
00:05:38.780 --> 00:05:45.860
So the fact that it's XML as well, because I was working with some RSS data for some things.
00:05:45.860 --> 00:05:50.940
And you can do either CSS selectors, which are my favorite.
00:05:50.940 --> 00:05:55.780
But sometimes you've got to get things that CSS doesn't really easily make it easy for you to get.
00:05:55.780 --> 00:05:57.200
So you can use XPath as well.
00:05:57.200 --> 00:06:01.580
It also works on JSON, I believe, even though the description doesn't say so.
00:06:01.580 --> 00:06:02.080
Yeah.
00:06:02.080 --> 00:06:02.840
JSON as well.
00:06:03.280 --> 00:06:15.200
So the CSS and XPath is for HTML and XML and it use JMS path, JMS path expressions for JSON documents, which kind of lets you say, I've got some big structure.
00:06:15.200 --> 00:06:18.700
So I want to navigate in kind of like you would with a CSS selector.
00:06:18.700 --> 00:06:26.920
Like show me all the paragraphs and then get the images and get the title of the image out of every paragraph on the page, no matter how it's structured.
00:06:26.920 --> 00:06:30.660
You can kind of do that with this thing for JSON as well, which is pretty awesome.
00:06:30.660 --> 00:06:31.140
Yeah.
00:06:31.140 --> 00:06:32.900
Instead of, you know, traversing it all over.
00:06:32.900 --> 00:06:37.140
And if you want two problems, you can try to solve it with one with regular expressions.
00:06:37.140 --> 00:06:38.060
Yeah.
00:06:38.060 --> 00:06:39.260
I'll give you a quick example.
00:06:39.260 --> 00:06:42.380
If you pull up the page, it says, okay, we're going to take some texts.
00:06:42.380 --> 00:06:48.380
The text has a body, an H1, an unordered list, a list items in there.
00:06:48.380 --> 00:06:49.980
Those list items are hyperlinks.
00:06:49.980 --> 00:06:52.860
So the hyperlinks have URLs and they have text.
00:06:52.860 --> 00:06:55.500
There's also some JSON in this thing.
00:06:55.500 --> 00:07:00.460
So if you just create a new selector object, you can say H1::text.
00:07:00.460 --> 00:07:06.780
And that is a CSS way to speak about the context, the content of that.
00:07:06.780 --> 00:07:09.620
And that pulls just the value out of there.
00:07:09.620 --> 00:07:13.500
So high parcel or hello parcel is the text inside H1.
00:07:13.500 --> 00:07:16.140
So that simple little selector is a real simple example.
00:07:16.140 --> 00:07:18.060
So maybe it doesn't totally win you over.
00:07:18.060 --> 00:07:23.660
But you know, in a real true complicated HTML document, it would be quite awesome.
00:07:23.660 --> 00:07:25.740
They also show how to do that with XPath.
00:07:25.740 --> 00:07:27.100
I don't know XPath very well.
00:07:27.100 --> 00:07:29.180
And then run a regular expression against it.
00:07:29.180 --> 00:07:31.100
I could break that into pieces.
00:07:31.100 --> 00:07:31.980
That's pretty intense.
00:07:31.980 --> 00:07:33.020
I'm not necessarily doing it.
00:07:33.020 --> 00:07:40.460
But you can do things like, for example, I want all the LIs that are only appearing in unordered lists, not the ordered lists ones.
00:07:40.460 --> 00:07:48.940
So you can say UL greater than LI and the greater than means immediate child of not somewhere in the hierarchy.
00:07:48.940 --> 00:07:50.540
So you just do that CSS selector.
00:07:50.540 --> 00:07:51.980
And it gives you an iterable.
00:07:51.980 --> 00:07:58.540
It gives you all the list elements that you can pull out the hyperlinks out of both of those by doing slash slash at href.
00:07:58.540 --> 00:07:58.620
Right.
00:07:58.620 --> 00:08:01.180
To grab that out of the thing that comes back.
00:08:01.180 --> 00:08:05.580
And you can also do similar stuff for the XML that's in here.
00:08:05.580 --> 00:08:13.980
So you can say, just go find me the thing that has the name A, no matter where it appears in the document, or get me all the items to the list and so on.
00:08:13.980 --> 00:08:14.460
Pretty cool.
00:08:14.460 --> 00:08:17.580
Again, really simple example, but quite a neat little tool.
00:08:17.580 --> 00:08:19.180
I definitely need this.
00:08:19.180 --> 00:08:25.020
I've got some HTML that I'm parsing that are, it's not well structured stuff.
00:08:25.020 --> 00:08:28.460
It's like, you know, generated from some CMS thing.
00:08:28.460 --> 00:08:31.340
And there's no identifiers anywhere.
00:08:31.340 --> 00:08:33.980
There's hardly any classes.
00:08:33.980 --> 00:08:38.300
It just is like purely generated div nightmares.
00:08:38.300 --> 00:08:41.100
And yeah.
00:08:41.100 --> 00:08:41.500
Yeah.
00:08:41.500 --> 00:08:46.300
And it'll still be lucky if I can find what I'm looking for with something like this.
00:08:46.300 --> 00:08:47.420
Yeah.
00:08:47.420 --> 00:08:48.700
But it'll help, right?
00:08:48.700 --> 00:08:49.260
Yeah.
00:08:49.260 --> 00:08:49.660
Yeah.
00:08:49.660 --> 00:08:50.220
That's pretty cool.
00:08:50.220 --> 00:08:50.860
Yeah, give me.
00:08:50.860 --> 00:08:52.780
I'll see if I can pull up one more example real quick.
00:08:52.780 --> 00:08:53.180
Hold on.
00:08:53.180 --> 00:08:54.300
Let it appear.
00:08:54.300 --> 00:08:54.860
Must appear.
00:08:54.860 --> 00:08:55.820
I just screenshot it.
00:08:55.820 --> 00:09:02.060
Also in our notes here, I put the way to get an RSS feed out of a standard web page.
00:09:02.060 --> 00:09:03.580
So how would you normally do that?
00:09:03.580 --> 00:09:06.700
You would go get the HTML, then you go to the head section.
00:09:06.700 --> 00:09:08.940
And in the head section, there's a bunch of links.
00:09:08.940 --> 00:09:10.300
They mean different things.
00:09:10.300 --> 00:09:16.540
One of them would have the rel type as what is that?
00:09:16.540 --> 00:09:17.180
I can't remember.
00:09:17.180 --> 00:09:20.620
It's like additional or something like that.
00:09:20.620 --> 00:09:23.500
And the, no, that's the rel.
00:09:23.500 --> 00:09:28.700
And then the rel type is something like RSS application plus RSS or, you know, whatever the
00:09:28.700 --> 00:09:29.820
mime type is.
00:09:29.820 --> 00:09:33.340
So you can just grab those things, just saying head greater than link.
00:09:33.340 --> 00:09:39.500
Use a little X path to grab the attributes out of the selector or out of the result and find which
00:09:39.500 --> 00:09:39.980
one of those.
00:09:39.980 --> 00:09:44.700
And then you've got the URL, which is, you know, where the RSS feed is.
00:09:44.700 --> 00:09:49.580
Like if you're looking, if you're writing like a blog engine and somebody puts in the domain, but not the
00:09:49.580 --> 00:09:55.820
actual RSS entry, you could get that page, find the RSS entry automatically for them and go on with just a couple lines of code.
00:09:55.820 --> 00:09:57.020
That's pretty cool.
00:09:57.020 --> 00:09:57.420
Yeah.
00:09:57.420 -->
00:09:57.820
Very neat.
00:09:57.820 --> 00:09:58.060
Yeah.
00:09:58.060 --> 00:09:58.780
All right.
00:09:58.780 --> 00:09:59.980
What you got next for us?
00:09:59.980 --> 00:10:06.060
Oh, wait, before, before we move on, Brian, before we move on, let me tell everyone about our sponsor.
00:10:06.060 --> 00:10:12.300
So as I said at the beginning, century is sponsoring this episode and the next, so support the show.
00:10:12.300 --> 00:10:19.900
It really, really helps if you go and if you're considering getting air monitoring or tracing for
00:10:19.900 --> 00:10:23.020
your application, check out python by set of m slash century.
00:10:23.020 --> 00:10:23.340
Yes.
00:10:23.340 --> 00:10:24.380
You can Google them.
00:10:24.380 --> 00:10:29.980
We know you can just Google them and sign up, but you use the code Python bytes, or just use the link
00:10:29.980 --> 00:10:32.700
and click, what is it down here?
00:10:32.700 --> 00:10:34.060
Try century for free.
00:10:34.060 --> 00:10:38.140
Then it'll apply that code automatically, which will then let them know, Hey, it's a good idea to
00:10:38.140 --> 00:10:38.860
sponsor the show.
00:10:38.860 --> 00:10:40.140
So let me tell you about them.
00:10:40.140 --> 00:10:44.300
So if you want to remove a little bit of stress from your life, if you're worried about errors on
00:10:44.300 --> 00:10:49.580
your website or errors, your users are running into that you might not even know about, you know,
00:10:49.580 --> 00:10:52.060
you might want to install something like century.
00:10:52.060 --> 00:10:57.660
So if you're waiting for your users to send you an email saying, Hey, I'm running to this problem.
00:10:57.660 --> 00:10:59.740
How many of them got frustrated?
00:10:59.740 --> 00:11:03.580
What was their opinion of your app or your website or your API?
00:11:03.580 --> 00:11:04.460
Probably not great.
00:11:04.460 --> 00:11:09.500
How much better it would be if you had error or performance details immediately sent to you,
00:11:09.500 --> 00:11:14.620
including things like the call stack, the values of the local variables in that call stack, the
00:11:14.620 --> 00:11:18.700
active user who was logged in, let's say their email address all in some report.
00:11:18.700 --> 00:11:20.460
And you're like, Oh, here's the problem.
00:11:20.460 --> 00:11:21.100
Here's the data.
00:11:21.100 --> 00:11:23.980
I got to pass to it to write a unit test to reproduce it.
00:11:23.980 --> 00:11:25.740
So make sure it doesn't happen again.
00:11:25.740 --> 00:11:30.140
And here's the email, the user who I email and tell them, sorry, we fixed it.
00:11:30.140 --> 00:11:33.260
I know you didn't tell us, but we found out anyway, because we have century.
00:11:33.260 --> 00:11:35.580
So with century, it's not only possible.
00:11:35.580 --> 00:11:36.060
It's simple.
00:11:36.060 --> 00:11:37.260
We use it on Python bytes.
00:11:37.260 --> 00:11:38.220
I use it on talk Python.
00:11:38.220 --> 00:11:39.900
We use it in
the talk by the mobile apps.
00:11:39.900 --> 00:11:42.140
There's a way to just plug it right into Flutter as well.
00:11:42.140 --> 00:11:42.860
Nice.
00:11:42.860 --> 00:11:44.860
So pretty, pretty awesome.
00:11:44.860 --> 00:11:49.500
And once I did exactly that, we had some user on talk by the training.
00:11:49.500 --> 00:11:50.940
They ran into a problem.
00:11:50.940 --> 00:11:52.060
I got a notification.
00:11:52.060 --> 00:11:52.860
I saw who it was.
00:11:52.860 --> 00:11:53.580
I fixed it.
00:11:53.580 --> 00:11:55.420
Sent him a message said, Hey, here's the problem.
00:11:55.420 --> 00:11:55.820
It's fixed.
00:11:55.820 --> 00:11:57.420
They said, I was about to write you.
00:11:57.420 --> 00:11:58.940
That's weird, but thank you.
00:11:58.940 --> 00:11:59.660
That's awesome.
00:11:59.660 --> 00:12:01.100
That's really great.
00:12:01.100 --> 00:12:01.820
You know, right?
00:12:01.820 --> 00:12:03.100
Yeah, it's really cool.
00:12:03.100 --> 00:12:09.180
So if you want to have that kind of superpower for your web apps, your APIs, mobile apps,
00:12:09.180 --> 00:12:10.460
whatever, check out century.
00:12:10.460 --> 00:12:15.180
So surprise and delight your users create your century account at pythonbytes.fm/century
00:12:15.180 --> 00:12:18.220
and be sure to sign up with the code Python bytes, all one word.
00:12:18.220 --> 00:12:22.620
It's good for two months of upgraded options for their century business plan,
00:12:22.620 --> 00:12:26.220
which will give you 20 times as many monthly events as well as some other features.
00:12:26.220 --> 00:12:29.500
So thank you to century for sponsoring our show.
00:12:29.500 --> 00:12:29.980
Cool.
00:12:29.980 --> 00:12:30.300
Yeah.
00:12:30.300 --> 00:12:33.020
And Ryan now over to you.
00:12:33.020 --> 00:12:36.540
Well, I want to talk about struck log.
00:12:36.540 --> 00:12:38.620
I'm pretty sure we've covered it before.
00:12:38.620 --> 00:12:46.540
So struck log is a pretty cool way to to do some logging in your Python, especially if you're
00:12:46.540 --> 00:12:50.460
logging from multiple services or, you know, multiple threads.
00:12:50.460 --> 00:12:55.500
And it's really great because you can add extra detail and it's got coloring and stuff.
00:12:55.500 --> 00:13:02.060
Struck log has some pretty good documentation already, which I love.
00:13:02.060 --> 00:13:03.580
And it's a beautiful tool.
00:13:03.580 --> 00:13:09.820
However, I wanted to highlight a new article I saw and it really is pretty fun.
00:13:09.820 --> 00:13:10.860
Wait, hold on.
00:13:10.860 --> 00:13:11.580
Go back real quick.
00:13:11.580 --> 00:13:11.900
Okay.
00:13:11.900 --> 00:13:18.300
Is the icon logo of struck log, is that like Geordi from Star Trek, but a beaver?
00:13:18.300 --> 00:13:19.260
I think so.
00:13:19.260 --> 00:13:19.260
I think so.
00:13:19.260 --> 00:13:21.020
I'm not sure.
00:13:21.020 --> 00:13:21.340
All right.
00:13:21.340 --> 00:13:21.980
Okay.
00:13:21.980 --> 00:13:23.660
And he's holding two brackets.
00:13:23.660 --> 00:13:24.620
It's so good.
00:13:24.620 --> 00:13:26.220
Or curly braces.
00:13:26.220 --> 00:13:32.700
So, so the article I wanted to look at was a comprehensive guide to Python logging with struck log.
00:13:32.700 --> 00:13:37.260
And one of the things I loved about it was just sort of the beginning example.
00:13:37.260 --> 00:13:40.220
There's a, there's a beautiful picture of a whole bunch of, whole bunch of logged items.
00:13:40.220 --> 00:13:48.380
But the, the, what I liked was just the starting one that just said, Hey, all you have to do is
00:13:48.380 --> 00:13:50.220
do pip install struck log.
00:13:50.220 --> 00:13:56.940
And then, and then if you want to just start trying it, it's just a better logger than you're used to.
00:13:56.940 --> 00:14:01.500
So import struck log, do logger struck log, get logger.
00:14:01.500 --> 00:14:05.180
And then you use it just like you normally would logger info.
00:14:05.180 --> 00:14:09.180
And then you can, you can just, here's, here's example.
00:14:09.180 --> 00:14:12.300
You can do debug info warning error, critical, all that sort of stuff.
00:14:12.300 --> 00:14:17.260
This is a big article talking about the different ways you can set it up with,
00:14:17.260 --> 00:14:21.100
you can set the default log logging level.
00:14:21.100 --> 00:14:22.060
You can configure it.
00:14:22.060 --> 00:14:26.700
You can set it up for different, have different loggers on different applications or different
00:14:26.700 --> 00:14:29.100
services, different formatting.
00:14:29.100 --> 00:14:30.620
You can have different renderers.
00:14:30.620 --> 00:14:32.060
That's all awesome.
00:14:32.060 --> 00:14:34.060
And I'm really glad that it walks through that.
00:14:34.060 --> 00:14:40.380
But what I really, what I really like was just this basic tutorial of, Hey, just do this,
00:14:40.380 --> 00:14:44.700
do the get logger and then just log stuff and you get this beautiful output.
00:14:44.700 --> 00:14:51.660
Now, the color and the weight and alignment of all the output is, is really awesome there.
00:14:51.660 --> 00:14:51.980
Yeah.
00:14:51.980 --> 00:14:54.060
So often you like, okay, you want to do logging?
00:14:54.060 --> 00:14:54.620
Well, okay.
00:14:54.620 --> 00:14:57.900
So what you do is you set up the logger, then you register an output.
00:14:57.900 --> 00:15:02.780
So let's create a standard out stream writer thing.
00:15:02.780 --> 00:15:05.100
And then we can push that into the thing, into it.
00:15:05.100 --> 00:15:07.660
And if you don't do that, then no output shows up.
00:15:07.660 --> 00:15:09.260
You're like, what is going on here?
00:15:09.260 --> 00:15:10.380
Why is this not working?
00:15:10.380 --> 00:15:12.220
You know, it's, yeah, this is really nice.
00:15:12.220 --> 00:15:16.380
This does, so it does show the beauty of struct log that you can get started really fast.
00:15:16.380 --> 00:15:19.980
It has a lot of complexity and it,
and it's really not that complicated.
00:15:19.980 --> 00:15:24.700
And like I said, the documentation is awesome and configuring, configuring it and everything
00:15:25.260 --> 00:15:28.540
is not that hard, but it does, it's a new tool.
00:15:28.540 --> 00:15:34.460
So it's a, it's, it's great that it's an easy way to get on, on board with it, start using it,
00:15:34.460 --> 00:15:35.740
start having these great logs.
00:15:35.740 --> 00:15:41.340
And both it can be for going to output, but also you can log to files, of course.
00:15:41.340 --> 00:15:43.580
And a great tool.
00:15:43.580 --> 00:15:48.620
And I love this tutorial that starts super easy and then gets into the more complex.
00:15:48.620 --> 00:15:49.900
So check it out.
00:15:49.900 --> 00:15:50.300
Excellent.
00:15:50.300 --> 00:15:51.260
Excellent.
00:15:51.260 --> 00:15:52.700
What you got for us.
00:15:52.700 --> 00:16:00.140
The last one of the main ones, this one comes to us from a TAS Bach and it's created by Hennick.
00:16:00.140 --> 00:16:05.100
And I mentioned it before and it's stamina, but I didn't know too much about it.
00:16:05.100 --> 00:16:09.580
There were some questions in the audience, like how does it relate to tenacity and other things?
00:16:09.580 --> 00:16:10.140
Right?
00:16:10.140 --> 00:16:11.900
So I thought, all right, this is a cool thing.
00:16:11.900 --> 00:16:13.180
I'll, I'll focus a little bit more.
00:16:13.180 --> 00:16:13.820
Yeah.
00:16:13.820 --> 00:16:16.220
And it has direct struck log integration.
00:16:16.220 --> 00:16:18.140
How's that for a segue, right?
00:16:18.140 --> 00:16:18.700
Yeah.
00:16:18.700 --> 00:16:21.580
Well, I think struck logs that Hennick thing too, maybe.
00:16:21.580 --> 00:16:22.140
Yeah.
00:16:22.140 --> 00:16:22.940
Perhaps it is.
00:16:22.940 --> 00:16:23.980
It seems like it would be.
00:16:23.980 --> 00:16:30.540
So with tenacity, the idea is you can put decorators and other things onto functions or
00:16:30.540 --> 00:16:33.100
operations and say, if something goes wrong, try it again.
00:16:33.100 --> 00:16:35.580
That's the tenaciousness of that package, right?
00:16:35.580 --> 00:16:38.140
That like, yeah, errors will not stop me.
00:16:38.140 --> 00:16:42.780
But as Hennick describes it, the tenacity is great, but unopinionated.
00:16:42.780 --> 00:16:47.740
And you can work yourself into ways where you might be using it wrong or causing other
00:16:47.740 --> 00:16:50.140
sorts of, you know, infinite loop type of issues.
00:16:50.140 --> 00:16:50.620
Okay.
00:16:50.620 --> 00:16:55.740
So the idea is that stamina is an opinionated wrapper around tenacity.
00:16:55.740 --> 00:17:02.140
So it's not a replacement for, but a simplified API for tenacity with the goal of being as
00:17:02.140 --> 00:17:07.660
ergonomic as possible and doing the right thing by default with minimizing the potential for doing
00:17:07.660 --> 00:17:08.380
it wrong.
00:17:08.380 --> 00:17:10.140
So that's pretty cool.
00:17:10.140 --> 00:17:15.660
Basically, Hennick says, he used to copy and paste the way he was working with tenacity over and over.
00:17:15.660 --> 00:17:20.300
And, you know, wouldn't it be cool to just make a package that kind of embedded those ways of working
00:17:20.300 --> 00:17:20.540
with it?
00:17:20.540 --> 00:17:28.060
For example, instead of retrying on an exception, retry only on a certain exception, you know, a certain type of exception.
00:17:28.060 --> 00:17:28.540
Right.
00:17:28.540 --> 00:17:35.900
I want to retry only this only on database connection errors, not if there's a foreign key constraint error,
00:17:35.900 --> 00:17:37.580
because that's never going to go away.
00:17:37.580 --> 00:17:37.820
Right.
00:17:37.820 --> 00:17:41.740
That's always going to be a problem with the data, but maybe the database will come back online.
00:17:41.740 --> 00:17:43.020
So let's retry that one.
00:17:43.020 --> 00:17:46.460
There's exponential back off, which comes from tenacity as well.
00:17:46.460 --> 00:17:51.020
But what about with jitter between the retries instead of just going, I'm going to go one second,
00:17:51.020 --> 00:17:52.140
three seconds, five seconds.
00:17:52.140 --> 00:17:57.180
Let's go one second, then three seconds ish, then five seconds ish and so on.
00:17:57.180 --> 00:18:01.660
Limit the total number of retries, limit the total amount of time, but all at once.
00:18:01.660 --> 00:18:01.980
Right.
00:18:01.980 --> 00:18:05.740
So not just the number of retries, but the time and retries.
00:18:05.740 --> 00:18:08.380
And this one is very relevant to me right now.
00:18:08.380 --> 00:18:10.220
I've been thinking a lot about Python typing.
00:18:10.220 --> 00:18:11.180
I'll talk more about that later.
00:18:11.180 --> 00:18:18.460
But with type hints, you get things like mypy and PyCharm and other tools that say you're
00:18:18.460 --> 00:18:21.420
using this function correctly or using it wrong.
00:18:21.420 --> 00:18:25.740
And with the way the decorators work with stamina is it preserves type hint
00:18:25.740 --> 00:18:29.660
information when you decorate a function that is type hinted.
00:18:29.660 --> 00:18:33.260
Honestly, I don't know how to do that, but I'm really glad that it like decorating the
00:18:33.260 --> 00:18:36.700
function with one of these retries doesn't wipe away its type information.
00:18:36.700 --> 00:18:37.580
That's super cool.
00:18:37.580 --> 00:18:44.140
It logs with struct log retries with basic metadata if they happen to be installed.
00:18:44.140 --> 00:18:50.060
And you can this one you might like, Brian, you can easily deactivate it with a fixture or
00:18:50.060 --> 00:18:55.580
something like that, or just globally for the whole test run so that you don't retry and
00:18:55.580 --> 00:18:59.660
a thousand times while you're doing a unit test testing for an exception on purpose.
00:18:59.660 --> 00:19:01.260
Yeah, that's great.
00:19:01.260 --> 00:19:01.580
Yeah.
00:19:01.580 --> 00:19:03.660
So super, super easy to work with.
00:19:03.660 --> 00:19:07.580
Just basically put a decorator, right?
00:19:07.580 --> 00:19:09.660
Stamina at stamina dot retry.
00:19:09.660 --> 00:19:15.260
And in this case, you can say only on the HTTP x HTTP errors and only try it three times.
00:19:15.260 --> 00:19:15.900
That's pretty cool.
00:19:15.900 --> 00:19:17.020
That's pretty great.
00:19:17.020 --> 00:19:17.500
Yeah.
00:19:17.500 --> 00:19:19.100
So a lot more you can do.
00:19:19.100 --> 00:19:21.100
It's async by default.
00:19:21.100 --> 00:19:24.220
So you don't just decorate an async def function.
00:19:24.220 --> 00:19:26.060
And it does that as well.
00:19:26.060 --> 00:19:27.100
So very, very cool.
00:19:27.100 --> 00:19:28.380
People should certainly check it out.
00:19:28.380 --> 00:19:32.060
And you can also see in the example, he's doing reveal type, which I believe comes from
00:19:32.060 --> 00:19:37.260
mypy and you can reveal type on the example here, which is a decorated thing.
00:19:37.260 --> 00:19:44.300
And it shows you that what you get back is a coroutine of any, any and that ACP x response,
00:19:44.300 --> 00:19:48.060
which is basically how it was set up to go, right?
00:19:48.060 --> 00:19:49.020
Set up to work, right?
00:19:49.020 --> 00:19:52.220
Input on an int and then output on that type of thing.
00:19:52.220 --> 00:19:53.580
So I think it's a pretty cool library.
00:19:53.580 --> 00:19:55.340
It's something I will probably start using.
00:19:55.340 --> 00:19:57.980
I previously used tenacity, but you know, why not?
00:19:57.980 --> 00:19:59.660
Yeah, looks pretty good.
00:19:59.660 --> 00:20:00.060
Cool.
00:20:00.060 --> 00:20:00.380
Indeed.
00:20:00.380 --> 00:20:01.340
All right.
00:20:01.340 --> 00:20:03.740
That's it for our main items, isn't it?
00:20:03.740 --> 00:20:03.980
Yeah.
00:20:03.980 --> 00:20:05.740
Extras.
00:20:05.740 --> 00:20:06.300
Yeah.
00:20:06.300 --> 00:20:07.500
What else have you gathered up?
00:20:07.500 --> 00:20:08.220
I've got a few.
00:20:08.220 --> 00:20:09.500
Do you want to run through?
00:20:09.500 --> 00:20:10.620
We'll run through mine first.
00:20:10.620 --> 00:20:11.820
Let's do it.
00:20:11.820 --> 00:20:17.180
So I have a, so the pytest check, it's a little pytest plugin I've got.
00:20:17.180 --> 00:20:22.460
I had this weird request and, and I guess I, I'm not sure how to deal with it.
00:20:22.460 --> 00:20:23.420
I was curious.
00:20:23.420 --> 00:20:27.900
I'd like to talk through it to see what, what the audience has to say.
00:20:27.900 --> 00:20:32.140
So somebody said, Hey, is it possible to start making GitHub releases?
00:20:32.140 --> 00:20:35.020
And I mean, I do, I do versions.
00:20:35.020 --> 00:20:39.020
And so I was, wasn't sure what was going on here.
00:20:39.020 --> 00:20:43.100
And then I, and then I thought maybe this is one of those people that have done a lot of
00:20:43.100 --> 00:20:45.100
these requests and a lot of repos.
00:20:45.100 --> 00:20:48.540
So I searched for this, this issue.
00:20:48.540 --> 00:20:56.300
And sure enough, there is 157 identical issues on different repos.
00:20:56.300 --> 00:20:58.540
So speaking of tenacity.
00:20:58.540 --> 00:20:59.100
Yeah.
00:20:59.100 --> 00:21:03.980
so my first reaction was, I don't want to do that.
00:21:03.980 --> 00:21:04.700
That's lame.
00:21:04.700 --> 00:21:07.820
because they're just pushing work on other people.
00:21:07.820 --> 00:21:11.820
but, but also maybe it's okay.
00:21:11.820 --> 00:21:16.620
So the argument here is that like somebody can say watch releases and then get notified
00:21:16.620 --> 00:21:21.100
if a new release happens and they don't, and you can't do that with tags or something.
00:21:21.100 --> 00:21:21.580
I'm not sure.
00:21:21.580 --> 00:21:27.020
so, my, yeah, first reaction was, I don't want to deal with it.
00:21:27.020 --> 00:21:32.780
However, I think there's, oh, I didn't don't have the tab up here, but I think there's
00:21:32.780 --> 00:21:36.620
some, GitHub actions that can do this for me every day.
00:21:36.620 --> 00:21:41.180
If I'm just doing it by pushing a tag up and if it could do it by, by itself, a few minutes
00:21:41.180 --> 00:21:45.020
worth of work, I'd like to know what other people are dealing with, with that.
00:21:45.020 --> 00:21:49.820
If they, if they've added GitHub releases to, to their project or not.
00:21:49.820 --> 00:21:51.260
yeah, just curious.
00:21:51.260 --> 00:21:54.780
So what's a good venue for them to let you know about that?
00:21:54.780 --> 00:21:55.420
Oh yeah.
00:21:55.420 --> 00:21:59.820
probably, probably I'm, Fosset on, yeah, right.
00:21:59.820 --> 00:22:03.820
Not gonna foster on, or, the show has a contact form.
00:22:03.820 --> 00:22:04.620
You can email us.
00:22:04.620 --> 00:22:06.620
So yeah, that would be good.
00:22:06.620 --> 00:22:07.580
okay.
00:22:07.580 --> 00:22:10.540
so there's that, I threw it right across.
00:22:10.540 --> 00:22:13.180
Oh, maybe this is for, funny things.
00:22:13.180 --> 00:22:14.620
We'll save that for later.
00:22:14.620 --> 00:22:16.060
not yet.
00:22:16.060 --> 00:22:19.820
I just pushed up the fixtures chapter for the pytest course.
00:22:19.820 --> 00:22:25.260
and, and about the intro, the interest got a nice slide deck in it.
00:22:25.260 --> 00:22:31.180
So check out the preview, that's, that's, for chapter three, when you're
00:22:31.180 --> 00:22:37.260
thinking about the course, and I'm trying to describe, how pytest fixtures with work
00:22:37.260 --> 00:22:41.500
with like graphics, not really graphics, but you know, slides and drawings and things like
00:22:41.500 --> 00:22:41.660
that.
00:22:41.660 --> 00:22:44.300
So those are my extras.
00:22:44.300 --> 00:22:45.660
How about you?
00:22:45.660 --> 00:22:47.900
I've got a couple things for us.
00:22:47.900 --> 00:22:52.620
So first of all, there's a shiny new Python 312 to be had.
00:22:52.620 -->
00:22:56.860
And that was as of yesterday, 312 RC one.
00:22:56.860 --> 00:22:57.580
Neato.
00:22:57.580 --> 00:22:58.700
Release can, yeah.
00:22:58.700 --> 00:22:59.340
Release candidate.
00:22:59.340 --> 00:23:03.260
It's important because it's like, we're really not changing it now.
00:23:03.260 --> 00:23:04.620
This is bug fixes.
00:23:04.620 --> 00:23:10.940
So if you've been thinking like, okay, there's, there's more features for f-strings,
00:23:10.940 --> 00:23:16.380
or there's this crazy thing that Eric Snow pulled off called the per interpreter GIL.
00:23:16.380 --> 00:23:17.580
That's pretty awesome.
00:23:17.580 --> 00:23:23.100
buffer protocol, things are accessible in Python and many other things, right?
00:23:23.100 --> 00:23:27.100
If you were waiting around and think, these are all relevant to me, I want to try them out,
00:23:27.100 --> 00:23:29.580
but I don't want to mess with stuff that might go away.
00:23:29.580 --> 00:23:31.500
It might change my, I'm just going to wait.
00:23:31.500 --> 00:23:33.980
Cause I'm not really going to use it until it comes out in October.
00:23:33.980 --> 00:23:37.580
Well, it should be about time to start looking into it with a release candidate.
00:23:37.580 --> 00:23:40.060
So that's why this is double noteworthy.
00:23:40.060 --> 00:23:40.780
Yeah.
00:23:40.780 --> 00:23:45.100
It's also a really good time if you haven't started to start, testing your package.
00:23:45.100 --> 00:23:50.380
If you're, if you have packages, you support, to, to add 312 testing.
00:23:50.380 --> 00:23:51.340
Exactly.
00:23:51.340 --> 00:23:52.380
Cool.
00:23:52.380 --> 00:23:52.780
Okay.
00:23:52.780 --> 00:23:55.900
Then I got three conference ish things.
00:23:55.900 --> 00:24:03.900
PyCon UK 2023 is going to be Friday, 22nd and September to the Monday.
00:24:03.900 --> 00:24:04.300
Okay.
00:24:04.300 --> 00:24:05.260
So that's pretty cool.
00:24:05.260 --> 00:24:08.860
I'd love to go to PyCon UK, but it is quite far away.
00:24:08.860 --> 00:24:10.140
Now I do love the UK.
00:24:10.140 --> 00:24:15.100
So if you were closer and you get there, then that'd be a pretty excellent conference to go
00:24:15.100 --> 00:24:15.500
check out.
00:24:15.500 --> 00:24:15.820
I think.
00:24:15.820 --> 00:24:16.540
Yeah.
00:24:16.540 --> 00:24:24.140
Also in the general neighborhood, Eindhoven as a, PyData Eindhoven is going to be November
00:24:24.140 --> 00:24:24.700
30th.
00:24:24.700 --> 00:24:26.460
So check that out as well.
00:24:26.460 --> 00:24:28.940
And the call for proposals is open.
00:24:28.940 --> 00:24:31.980
Finally, this one's a little closer to home for us.
00:24:31.980 --> 00:24:34.620
this one is PyData Seattle.
00:24:34.620 --> 00:24:39.900
Now, normally we wouldn't give a shout out to just a meetup because we can't just go to the huge,
00:24:39.900 --> 00:24:40.460
long list.
00:24:40.460 --> 00:24:44.140
but Don reached out to me and they've got some pretty cool stuff.
00:24:44.140 --> 00:24:48.940
So this is the language creators charity fundraiser for PyData.
00:24:48.940 --> 00:24:54.300
and, the fundraiser goes to num focus and last mile education fund.
00:24:54.300 --> 00:24:55.900
So good stuff there.
00:24:55.900 --> 00:24:59.820
And the whole thing is let's scroll down a little for pictures here.
00:24:59.820 --> 00:25:02.860
We've got Adele Goldberg who created small talk.
00:25:02.860 --> 00:25:05.900
Guido van Rossum who created, you know, this thing called Python.
00:25:05.900 --> 00:25:11.500
Anders Heilsberg who did turbo Pascal C# and typescripts as well as James Gosling from
00:25:11.500 --> 00:25:12.220
Java.
00:25:12.220 --> 00:25:15.580
So this is a live in-person event that people can check out.
00:25:15.580 --> 00:25:18.860
So when is it, it is September 19th.
00:25:18.860 --> 00:25:20.940
So 20 days away or whatever.
00:25:20.940 --> 00:25:22.620
If you're around there, want to be part of that.
00:25:22.620 --> 00:25:27.100
There's no online version this because they want it to be fundraiser for charity.
00:25:27.100 --> 00:25:30.380
It's, it's all about trying to get people to show up in person and be part of it.
00:25:30.380 --> 00:25:31.180
So cool.
00:25:31.180 --> 00:25:32.300
Those are all my extras.
00:25:32.300 --> 00:25:32.860
Nice.
00:25:32.860 --> 00:25:33.420
Yeah.
00:25:33.420 --> 00:25:34.300
How about some jokes?
00:25:34.300 --> 00:25:35.740
Yeah.
00:25:35.740 --> 00:25:36.460
Do you have one?
00:25:36.460 --> 00:25:38.700
I don't know if I can check it.
00:25:38.700 --> 00:25:39.740
I don't know if I can tell you about this.
00:25:39.740 --> 00:25:42.220
This one, I don't believe it was sent into us.
00:25:42.220 --> 00:25:43.820
I just ran across it somewhere.
00:25:43.820 --> 00:25:47.180
How does a librarian access remote computers securely?
00:25:47.180 --> 00:25:49.660
SSH.
00:25:49.660 --> 00:25:51.740
It's terrible.
00:25:51.740 --> 00:25:53.660
It's terrible, isn't it?
00:25:53.660 --> 00:25:54.300
It's very bad.
00:25:54.300 --> 00:25:55.020
Yeah.
00:25:55.020 --> 00:25:55.660
It's very bad.
00:25:55.660 --> 00:25:56.380
Okay.
00:25:56.380 --> 00:25:56.860
I love it.
00:25:56.860 --> 00:25:58.940
Anyway, that's, that's the one I got for us.
00:25:58.940 --> 00:26:01.900
Oh, it's a library and access remote computers securely.
00:26:01.900 --> 00:26:07.660
Well, I have a GitHub repo called the ChatGPT failures.
00:26:07.660 --> 00:26:12.860
and it's got, it's just got a big list of things that have gone bad.
00:26:12.860 --> 00:26:15.260
and so this is pretty cool.
00:26:15.260 --> 00:26:19.340
it looks like a new, new being failures.
00:26:19.340 --> 00:26:20.060
let's see.
00:26:20.060 --> 00:26:22.700
that one about the journalists.
00:26:22.700 --> 00:26:24.140
Who was the journalist on that one?
00:26:24.140 --> 00:26:29.500
Bing gets madly in love with a journalist, tries to break up his marriage and really stalkerish
00:26:29.500 --> 00:26:36.220
effect and then lies about
that journalist in a chat with another user, keeps being inappropriate
00:26:36.220 --> 00:26:36.940
and dark.
00:26:36.940 --> 00:26:38.220
So I'm not sure.
00:26:38.220 --> 00:26:40.380
but Kevin Roos.
00:26:40.380 --> 00:26:40.620
Okay.
00:26:40.620 --> 00:26:41.180
That's who it was.
00:26:42.940 --> 00:26:46.700
anyway, so there's, there's, so those are bad user to ask me to do that.
00:26:46.700 --> 00:26:47.660
I'm not a bad user.
00:26:47.660 --> 00:26:48.300
I'm a good user.
00:26:48.300 --> 00:26:49.260
I'm a good chat.
00:26:49.260 --> 00:26:51.900
I'm a good chat bot.
00:26:51.900 --> 00:26:52.860
Oh my gosh.
00:26:52.860 --> 00:26:53.820
So yeah.
00:26:53.820 --> 00:26:57.340
So yeah, some failures on ChatGPT.
00:26:57.340 --> 00:27:00.780
So I'd love to see this kept updated.
00:27:00.780 --> 00:27:02.220
It hasn't been updated for a while.
00:27:02.220 --> 00:27:04.620
So, yeah, we need some new ones.
00:27:04.620 --> 00:27:06.460
It's pretty funny.
00:27:06.460 --> 00:27:09.260
It's crazy how this stuff goes a little bit sideways, isn't it?
00:27:09.260 --> 00:27:10.780
It, it is.
00:27:10.780 --> 00:27:16.620
And I'm, I'm still on, I still don't know if I need to care about it a lot or if it's
00:27:16.620 --> 00:27:21.100
one of those, I don't know if it's one of those things like crypto that maybe will
00:27:21.100 --> 00:27:21.660
go away.
00:27:21.660 --> 00:27:28.540
or it hasn't really, I know crypto hasn't gone away and there's so many wonderful uses
00:27:28.540 --> 00:27:30.540
for, blockchain.
00:27:30.540 --> 00:27:31.420
It's a blockchain.
00:27:31.420 --> 00:27:31.980
Come on now.
00:27:31.980 --> 00:27:32.940
Yeah.
00:27:32.940 --> 00:27:33.260
Okay.
00:27:33.260 --> 00:27:40.380
I do think it's interesting with the large language models when you ask it subjective stuff,
00:27:40.380 --> 00:27:41.260
right.
00:27:41.260 --> 00:27:43.180
It, it could just be weird about it.
00:27:43.180 --> 00:27:49.980
or you, it can make up things about like previous, case law.
00:27:49.980 --> 00:27:54.780
you know, you got those lawyers who got in trouble for submitting a bunch of documents
00:27:54.780 --> 00:27:57.900
and briefs created by ChatGPT that were false.
00:27:57.900 --> 00:28:01.820
But at the, on the other hand, like you can ask it programming questions and it'll give you
00:28:01.820 --> 00:28:03.340
pretty good answers.
00:28:03.340 --> 00:28:03.740
Yeah.
00:28:03.740 --> 00:28:03.820
Right.
00:28:03.820 --> 00:28:08.140
Like I asked for it to solve a really complicated regex problem that we were talking about before.
00:28:08.140 --> 00:28:09.820
And it's just like, boom, here you go.
00:28:09.820 --> 00:28:11.580
And here's a couple of examples in Python.
00:28:11.580 --> 00:28:12.140
Thank you.
00:28:12.140 --> 00:28:13.660
And those, I don't mind too bad.
00:28:13.660 --> 00:28:14.380
Cause you can test it.
00:28:14.380 --> 00:28:19.020
Like if I run this, do the things I want out of the regex expression come
out or no?
00:28:19.020 --> 00:28:21.100
If no, then it's a bad chat bot.
00:28:21.100 --> 00:28:22.860
If yes, it's a good chat bot.
00:28:22.860 --> 00:28:23.420
Yeah.
00:28:23.420 --> 00:28:30.380
So anyway, I do one of the things I just listened to recently was, Freakonomics
00:28:30.380 --> 00:28:33.660
has started a series on, can, on AI.
00:28:33.660 --> 00:28:35.660
And the first one is can AI take a joke?
00:28:35.660 --> 00:28:39.020
and it is, it is interesting, an interesting discussion.
00:28:39.020 --> 00:28:44.620
One of the things that they talked about was, was the current like strike for,
00:28:44.620 --> 00:28:49.020
the writers and, and actors, in Hollywood right now.
00:28:49.020 --> 00:28:49.420
Right.
00:28:49.420 --> 00:28:54.220
So, and I thought that one of the, I didn't know some of the details.
00:28:54.220 --> 00:28:59.420
So hearing a few of the details around it are interesting of, of, like the initial
00:28:59.420 --> 00:29:00.780
creation of thing.
00:29:00.780 --> 00:29:05.980
so often you can have an idea and then hire some people to write more stuff about
00:29:05.980 --> 00:29:06.700
around it.
00:29:06.700 --> 00:29:10.540
But, if you didn't come up with the original idea, you don't get as much money.
00:29:10.540 --> 00:29:14.860
So if they just have AI come up with the original idea, they don't have to pay anybody the large
00:29:14.860 --> 00:29:15.420
amount of money.
00:29:15.420 --> 00:29:16.700
oh, I see.
00:29:16.700 --> 00:29:18.860
So kind of filling out the details of the joke.
00:29:18.860 --> 00:29:19.100
Yeah.
00:29:19.100 --> 00:29:24.300
and then some experience around writing of using, some AI to do writing.
00:29:24.300 --> 00:29:30.380
one of the commentaries was, you still have to do human work to come up with
00:29:30.380 --> 00:29:32.540
the prompts to like get it, to do something.
00:29:32.540 --> 00:29:37.420
and then you have to validate it afterwards to make sure that what they said, what it came
00:29:37.420 --> 00:29:38.700
up with was real.
00:29:38.700 --> 00:29:41.740
And those are still kind of the humans have to do.
00:29:41.740 --> 00:29:48.540
that's one of the fears I have around people using AI to, to generate test cases,
00:29:48.540 --> 00:29:53.340
because if they're generating, if AI is coming up their code and coming up with your tests,
00:29:53.340 --> 00:29:56.860
there's no humans verifying that it actually is doing what you want it to do.
00:29:56.860 --> 00:29:59.500
at some point you need to have people there.
00:29:59.500 --> 00:30:00.380
So,
00:30:00.380 --> 00:30:01.500
Someone's got to be in the loop.
00:30:01.500 --> 00:30:01.660
Yeah.
00:30:01.660 --> 00:30:02.060
Yeah.
00:30:02.060 --> 00:30:02.220
Yeah.
00:30:02.220 --> 00:30:04.620
So anyway, we'll see.
00:30:04.620 --> 00:30:10.140
it's, I'm definitely not a Luddite trying to, actually there's a discussion about Luddite
00:30:10.140 --> 00:30:15.820
also in the, in there that, Luddite apparently, I didn't know this, that it isn't
00:30:15.820 --> 00:30:19.500
people that there weren't people that were, against technology.
00:30:19.500 --> 00:30:26.460
It was people that were against, craftsmen that were against the shoddy craftsmanship
00:30:26.460 --> 00:30:28.140
of manufactured items.
00:30:28.140 --> 00:30:33.820
that, the, there wasn't, there wasn't enough people actually making quality goods.
00:30:33.820 --> 00:30:37.820
They were just, like factories building low quality goods.
00:30:37.820 --> 00:30:39.500
that's what they were opposed to.
00:30:39.500 --> 00:30:40.860
And that's interesting.
00:30:40.860 --> 00:30:45.500
analogy that is, anyway, way on a, on a tangent there.
00:30:45.500 --> 00:30:48.060
So, but, excellent.
00:30:48.060 --> 00:30:48.780
Anyway.
00:30:49.080 --> 00:30:50.920
thanks for being here as always.
00:30:50.920 --> 00:30:53.240
Thank you to everyone who listened.
00:30:53.240 --> 00:30:53.800
See you later.