Transcript #350: You've Got The Stamina For This Episode
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:05 This is episode 350, recorded August 29th, 2023.
00:11 And I'm Michael Kennedy.
00:13 And I'm Brian Okken.
00:14 And this episode is brought to you by Sentry.
00:17 Make sure those errors don't go unnoticed and you get to them quickly with the right information.
00:22 Check them out at pythonbytes.fm/sentry.
00:25 We'll tell you more about them later.
00:27 And of course, connect with us over on Mastodon at mkennedy, at Brian Okken, at pythonbytes, all at fosstodon.org.
00:33 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:41 So if you can drop by and be part of the show, we would love that.
00:45 If not, well, thanks for listening anyway.
00:48 Brian, let's kick this off.
00:50 Just a quick little article from Bob Beldermos to remind us to keep things simple.
00:56 And there's a lot of ways in Python where you can make elegant-looking code, but it also is easier to read.
01:04 And that's, I think, some of the emphasis.
01:06 So Bob from PyBytes, and they see a lot of, they've got all those challenges.
01:12 So I'm sure they see a lot of examples of not quite elegant code, but it does the trick.
01:18 So I think this is good advice from a good person.
01:20 So like, and there's just a whole bunch, there's just a handful of these here, but they're all really good things.
01:27 Like, for instance, using the keyword all.
01:31 I don't use it that much, but here's an example.
01:35 He's got a function where he wants to know if all things in a list are divisible by some number.
01:45 And there's like a function he wrote with just like a for loop that goes through the whole thing.
01:55 However, he rewrote it as a, what is that called?
02:00 It uses all, but it's comprehension, I believe.
02:04 So all numbers divided by divisor equals zero for divisor and divisors.
02:10 So it's kind of neat.
02:11 It actually might be a generator.
02:13 Is it a generator?
02:14 I think it might be.
02:15 But yeah, when it's passed as an argument, parentheses don't really tell you which it is, does it?
02:20 It doesn't.
02:21 Yeah, it's pretty cool to find that out for us.
02:23 Pretty cool to use that generator or whatever as an argument to a function.
02:31 That's pretty slick.
02:32 And it's pretty easy to read still, I think.
02:36 I still think maybe, well, with the function name, you kind of get what it's going at.
02:40 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.
02:48 Dictionary lookups.
02:50 I love this part.
02:51 I use it all the time.
02:52 The dictionary has a get function.
02:55 So normally you reference a key in a dictionary with just brackets.
03:01 But if you want to make, have some default value, if it's not there, use get instead.
03:07 So you grab a key and then the second value is the value.
03:11 Anyway, this saves a lot of code because I do this all the time for dictionary lookups.
03:18 And then it goes through quite a few others.
03:21 Just it's a good, good list.
03:23 We've got list comprehensions.
03:24 Don't forget those.
03:25 The list comprehensions are wonderful.
03:27 We both love those.
03:27 Looking for unique values.
03:30 This one I had to look at for a while.
03:32 It was interesting.
03:32 If you're looking, I actually didn't understand the first one that well.
03:36 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.
03:47 And then like anyway, just lots of lots of fun tricks to shorten your code and make it a little more readable.
03:55 I love it.
03:56 There's all these non-obvious ways, you know, counter.
03:59 I know Bob is a big fan of the counter class, but yeah, that's a really slick way to.
04:03 What is he trying to do with this last one?
04:05 Counting things.
04:06 Yeah, counters.
04:06 Counters pretty cool.
04:07 Just to count things.
04:09 You've got a paragraph or like some text and you want to say which words appear and then how frequently do they appear.
04:15 You could split on space and, you know, throw away the punctuation.
04:19 Yeah.
04:19 And like just basically a couple of lines, right?
04:23 Sentence.split.
04:24 And that's it.
04:25 And you count that.
04:26 It's awesome.
04:27 It says, you know, this word appeared this many times and it even sorts it.
04:30 Yeah.
04:30 That's pretty cool.
04:31 Yeah.
04:31 And it's just like it did sentence.lower.split and then throw it into a counter.
04:38 Interesting.
04:39 Pretty cool.
04:40 Interesting indeed.
04:42 Also interesting is it turns out that is in fact a generator that comes out of that.
04:48 I did a little quick REPL action on it.
04:51 Okay.
04:51 For some real time follow up there.
04:53 Cool.
04:53 Yeah.
04:53 Yeah.
04:54 All right.
04:54 The first one I want to cover today comes from a foundational element of Scrapey.
05:00 So Scrapey is the project around extracting data from websites in a fast, cool way.
05:07 You've got Scrapey.org.
05:08 You've got Scrapey itself.
05:10 But the thing I want to highlight is Parcel.
05:12 You've probably heard of Beautiful Soup and Beautiful Soup has been around for a really long time.
05:17 and it's quite excellent.
05:19 Yeah.
05:19 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.
05:27 And I ran across Parcel and it being the foundation of Scrapey kind of gives it some street cred.
05:33 So Parcel lets you extract data from XML and HTML documents.
05:38 So the fact that it's XML as well, because I was working with some RSS data for some things.
05:45 And you can do either CSS selectors, which are my favorite.
05:50 But sometimes you've got to get things that CSS doesn't really easily make it easy for you to get.
05:55 So you can use XPath as well.
05:57 It also works on JSON, I believe, even though the description doesn't say so.
06:01 Yeah.
06:02 JSON as well.
06:03 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.
06:15 So I want to navigate in kind of like you would with a CSS selector.
06:18 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.
06:26 You can kind of do that with this thing for JSON as well, which is pretty awesome.
06:30 Yeah.
06:31 Instead of, you know, traversing it all over.
06:32 And if you want two problems, you can try to solve it with one with regular expressions.
06:37 Yeah.
06:38 I'll give you a quick example.
06:39 If you pull up the page, it says, okay, we're going to take some texts.
06:42 The text has a body, an H1, an unordered list, a list items in there.
06:48 Those list items are hyperlinks.
06:49 So the hyperlinks have URLs and they have text.
06:52 There's also some JSON in this thing.
06:55 So if you just create a new selector object, you can say H1::text.
07:00 And that is a CSS way to speak about the context, the content of that.
07:06 And that pulls just the value out of there.
07:09 So high parcel or hello parcel is the text inside H1.
07:13 So that simple little selector is a real simple example.
07:16 So maybe it doesn't totally win you over.
07:18 But you know, in a real true complicated HTML document, it would be quite awesome.
07:23 They also show how to do that with XPath.
07:25 I don't know XPath very well.
07:27 And then run a regular expression against it.
07:29 I could break that into pieces.
07:31 That's pretty intense.
07:31 I'm not necessarily doing it.
07:33 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.
07:40 So you can say UL greater than LI and the greater than means immediate child of not somewhere in the hierarchy.
07:48 So you just do that CSS selector.
07:50 And it gives you an iterable.
07:51 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.
07:58 Right.
07:58 To grab that out of the thing that comes back.
08:01 And you can also do similar stuff for the XML that's in here.
08:05 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.
08:13 Pretty cool.
08:14 Again, really simple example, but quite a neat little tool.
08:17 I definitely need this.
08:19 I've got some HTML that I'm parsing that are, it's not well structured stuff.
08:25 It's like, you know, generated from some CMS thing.
08:28 And there's no identifiers anywhere.
08:31 There's hardly any classes.
08:33 It just is like purely generated div nightmares.
08:38 And yeah.
08:41 Yeah.
08:41 And it'll still be lucky if I can find what I'm looking for with something like this.
08:46 Yeah.
08:47 But it'll help, right?
08:48 Yeah.
08:49 Yeah.
08:49 That's pretty cool.
08:50 Yeah, give me.
08:50 I'll see if I can pull up one more example real quick.
08:52 Hold on.
08:53 Let it appear.
08:54 Must appear.
08:54 I just screenshot it.
08:55 Also in our notes here, I put the way to get an RSS feed out of a standard web page.
09:02 So how would you normally do that?
09:03 You would go get the HTML, then you go to the head section.
09:06 And in the head section, there's a bunch of links.
09:08 They mean different things.
09:10 One of them would have the rel type as what is that?
09:16 I can't remember.
09:17 It's like additional or something like that.
09:20 And the, no, that's the rel.
09:23 And then the rel type is something like RSS application plus RSS or, you know, whatever the
09:28 mime type is.
09:29 So you can just grab those things, just saying head greater than link.
09:33 Use a little X path to grab the attributes out of the selector or out of the result and find which
09:39 one of those.
09:39 And then you've got the URL, which is, you know, where the RSS feed is.
09:44 Like if you're looking, if you're writing like a blog engine and somebody puts in the domain, but not the
09:49 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.
09:55 That's pretty cool.
09:57 Yeah.
09:57 Very neat.
09:57 Yeah.
09:58 All right.
09:58 What you got next for us?
09:59 Oh, wait, before, before we move on, Brian, before we move on, let me tell everyone about our sponsor.
10:06 So as I said at the beginning, century is sponsoring this episode and the next, so support the show.
10:12 It really, really helps if you go and if you're considering getting air monitoring or tracing for
10:19 your application, check out python by set of m slash century.
10:23 Yes.
10:23 You can Google them.
10:24 We know you can just Google them and sign up, but you use the code Python bytes, or just use the link
10:29 and click, what is it down here?
10:32 Try century for free.
10:34 Then it'll apply that code automatically, which will then let them know, Hey, it's a good idea to
10:38 sponsor the show.
10:38 So let me tell you about them.
10:40 So if you want to remove a little bit of stress from your life, if you're worried about errors on
10:44 your website or errors, your users are running into that you might not even know about, you know,
10:49 you might want to install something like century.
10:52 So if you're waiting for your users to send you an email saying, Hey, I'm running to this problem.
10:57 How many of them got frustrated?
10:59 What was their opinion of your app or your website or your API?
11:03 Probably not great.
11:04 How much better it would be if you had error or performance details immediately sent to you,
11:09 including things like the call stack, the values of the local variables in that call stack, the
11:14 active user who was logged in, let's say their email address all in some report.
11:18 And you're like, Oh, here's the problem.
11:20 Here's the data.
11:21 I got to pass to it to write a unit test to reproduce it.
11:23 So make sure it doesn't happen again.
11:25 And here's the email, the user who I email and tell them, sorry, we fixed it.
11:30 I know you didn't tell us, but we found out anyway, because we have century.
11:33 So with century, it's not only possible.
11:35 It's simple.
11:36 We use it on Python bytes.
11:37 I use it on talk Python.
11:38 We use it in the talk by the mobile apps.
11:39 There's a way to just plug it right into Flutter as well.
11:42 Nice.
11:42 So pretty, pretty awesome.
11:44 And once I did exactly that, we had some user on talk by the training.
11:49 They ran into a problem.
11:50 I got a notification.
11:52 I saw who it was.
11:52 I fixed it.
11:53 Sent him a message said, Hey, here's the problem.
11:55 It's fixed.
11:55 They said, I was about to write you.
11:57 That's weird, but thank you.
11:58 That's awesome.
11:59 That's really great.
12:01 You know, right?
12:01 Yeah, it's really cool.
12:03 So if you want to have that kind of superpower for your web apps, your APIs, mobile apps,
12:09 whatever, check out century.
12:10 So surprise and delight your users create your century account at pythonbytes.fm/century
12:15 and be sure to sign up with the code Python bytes, all one word.
12:18 It's good for two months of upgraded options for their century business plan,
12:22 which will give you 20 times as many monthly events as well as some other features.
12:26 So thank you to century for sponsoring our show.
12:29 Cool.
12:29 Yeah.
12:30 And Ryan now over to you.
12:33 Well, I want to talk about struck log.
12:36 I'm pretty sure we've covered it before.
12:38 So struck log is a pretty cool way to to do some logging in your Python, especially if you're
12:46 logging from multiple services or, you know, multiple threads.
12:50 And it's really great because you can add extra detail and it's got coloring and stuff.
12:55 Struck log has some pretty good documentation already, which I love.
13:02 And it's a beautiful tool.
13:03 However, I wanted to highlight a new article I saw and it really is pretty fun.
13:09 Wait, hold on.
13:10 Go back real quick.
13:11 Okay.
13:11 Is the icon logo of struck log, is that like Geordi from Star Trek, but a beaver?
13:18 I think so.
13:19 I think so.
13:19 I'm not sure.
13:21 All right.
13:21 Okay.
13:21 And he's holding two brackets.
13:23 It's so good.
13:24 Or curly braces.
13:26 So, so the article I wanted to look at was a comprehensive guide to Python logging with struck log.
13:32 And one of the things I loved about it was just sort of the beginning example.
13:37 There's a, there's a beautiful picture of a whole bunch of, whole bunch of logged items.
13:40 But the, the, what I liked was just the starting one that just said, Hey, all you have to do is
13:48 do pip install struck log.
13:50 And then, and then if you want to just start trying it, it's just a better logger than you're used to.
13:56 So import struck log, do logger struck log, get logger.
14:01 And then you use it just like you normally would logger info.
14:05 And then you can, you can just, here's, here's example.
14:09 You can do debug info warning error, critical, all that sort of stuff.
14:12 This is a big article talking about the different ways you can set it up with,
14:17 you can set the default log logging level.
14:21 You can configure it.
14:22 You can set it up for different, have different loggers on different applications or different
14:26 services, different formatting.
14:29 You can have different renderers.
14:30 That's all awesome.
14:32 And I'm really glad that it walks through that.
14:34 But what I really, what I really like was just this basic tutorial of, Hey, just do this,
14:40 do the, the get logger and then just log stuff and you get this beautiful output.
14:44 Now, the color and the, the weight and alignment of all the output is, is really awesome there.
14:51 Yeah.
14:51 So often you like, okay, you want to do logging?
14:54 Well, okay.
14:54 So what you do is you set up the logger, then you register an output.
14:57 So let's create a standard out stream writer thing.
15:02 And then we can push that into the thing, into it.
15:05 And if you don't do that, then no output shows up.
15:07 You're like, what is going on here?
15:09 Why is this not working?
15:10 You know, it's, yeah, this is really nice.
15:12 This does, so it does show the beauty of struct log that you can get started really fast.
15:16 It has a lot of complexity and it, and it's really not that complicated.
15:19 And like I said, the, the documentation is awesome and configuring, configuring it and everything
15:25 is not that hard, but it does, it's a new tool.
15:28 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,
15:34 start having these great logs.
15:35 And both it can be for going to output, but also you can log to files, of course.
15:41 And a great tool.
15:43 And I love this tutorial that starts super easy and then gets into the more complex.
15:48 So check it out.
15:49 Excellent.
15:50 Excellent.
15:51 What you got for us.
15:52 The last one of the main ones, this one comes to us from a TAS Bach and it's created by Hennick.
16:00 And I mentioned it before and it's stamina, but I didn't know too much about it.
16:05 There were some questions in the audience, like how does it relate to tenacity and other things?
16:09 Right?
16:10 So I thought, all right, this is a cool thing.
16:11 I'll, I'll focus a little bit more.
16:13 Yeah.
16:13 And it has direct struck log integration.
16:16 How's that for a segue, right?
16:18 Yeah.
16:18 Well, I think struck logs that Hennick thing too, maybe.
16:21 Yeah.
16:22 Perhaps it is.
16:22 It seems like it would be.
16:23 So with tenacity, the idea is you can put decorators and other things onto functions or
16:30 operations and say, if something goes wrong, try it again.
16:33 That's the tenaciousness of that package, right?
16:35 That like, yeah, errors will not stop me.
16:38 But as Hennick describes it, the tenacity is great, but unopinionated.
16:42 And you can work yourself into ways where you might be using it wrong or causing other
16:47 sorts of, you know, infinite loop type of issues.
16:50 Okay.
16:50 So the idea is that stamina is an opinionated wrapper around tenacity.
16:55 So it's not a replacement for, but a simplified API for tenacity with the goal of being as
17:02 ergonomic as possible and doing the right thing by default with minimizing the potential for doing
17:07 it wrong.
17:08 So that's pretty cool.
17:10 Basically, Hennick says, he used to copy and paste the way he was working with tenacity over and over.
17:15 And, you know, wouldn't it be cool to just make a package that kind of embedded those ways of working
17:20 with it?
17:20 For example, instead of retrying on an exception, retry only on a certain exception, you know, a certain type of exception.
17:28 Right.
17:28 I want to retry only this only on database connection errors, not if there's a foreign key constraint error,
17:35 because that's never going to go away.
17:37 Right.
17:37 That's always going to be a problem with the data, but maybe the database will come back online.
17:41 So let's retry that one.
17:43 There's exponential back off, which comes from tenacity as well.
17:46 But what about with jitter between the retries instead of just going, I'm going to go one second,
17:51 three seconds, five seconds.
17:52 Let's go one second, then three seconds ish, then five seconds ish and so on.
17:57 Limit the total number of retries, limit the total amount of time, but all at once.
18:01 Right.
18:01 So not just the number of retries, but the time and retries.
18:05 And this one is very relevant to me right now.
18:08 I've been thinking a lot about Python typing.
18:10 I'll talk more about that later.
18:11 But with type hints, you get things like my pie and PyCharm and other tools that say you're
18:18 using this function correctly or using it wrong.
18:21 And with the way the decorators work with stamina is it preserves type hint
18:25 information when you decorate a function that is type hinted.
18:29 Honestly, I don't know how to do that, but I'm really glad that it like decorating the
18:33 function with one of these retries doesn't wipe away its type information.
18:36 That's super cool.
18:37 It logs with struct log retries with basic metadata if they happen to be installed.
18:44 And you can this one you might like, Brian, you can easily deactivate it with a fixture or
18:50 something like that, or just globally for the whole test run so that you don't retry and
18:55 a thousand times while you're doing a unit test testing for an exception on purpose.
18:59 Yeah, that's great.
19:01 Yeah.
19:01 So super, super easy to work with.
19:03 Just basically put a decorator, right?
19:07 Stamina at stamina dot retry.
19:09 And in this case, you can say only on the HTTP x HTTP errors and only try it three times.
19:15 That's pretty cool.
19:15 That's pretty great.
19:17 Yeah.
19:17 So a lot more you can do.
19:19 It's async by default.
19:21 So you don't just decorate an async def function.
19:24 And it does that as well.
19:26 So very, very cool.
19:27 People should certainly check it out.
19:28 And you can also see in the example, he's doing reveal type, which I believe comes from
19:32 my pie and you can reveal type on the example here, which is a decorated thing.
19:37 And it shows you that what you get back is a coroutine of any, any and that ACP x response,
19:44 which is basically how it was set up to go, right?
19:48 Set up to work, right?
19:49 Input on an int and then output on that type of thing.
19:52 So I think it's a pretty cool library.
19:53 It's something I will probably start using.
19:55 I previously used tenacity, but you know, why not?
19:57 Yeah, looks pretty good.
19:59 Cool.
20:00 Indeed.
20:00 All right.
20:01 That's it for our main items, isn't it?
20:03 Yeah.
20:03 Extras.
20:05 Yeah.
20:06 What else have you gathered up?
20:07 I've got a few.
20:08 Do you want to run through?
20:09 We'll run through mine first.
20:10 Let's do it.
20:11 So I have a, so the pytest check, it's a little pytest plugin I've got.
20:17 I had this weird request and, and I guess I, I'm not sure how to deal with it.
20:22 I was curious.
20:23 I'd like to talk through it to see what, what the, the audience has to say.
20:27 So somebody said, Hey, is it possible to start making GitHub releases?
20:32 And I mean, I do, I do versions.
20:35 And so I was, wasn't sure what was going on here.
20:39 And then I, and then I, I thought maybe this is one of those people that have done a lot of
20:43 these requests and a lot of repos.
20:45 So I searched for this, this issue.
20:48 And sure enough, there is 157 identical issues on different repos.
20:56 So speaking of tenacity.
20:58 Yeah.
20:59 so my first reaction was, I don't want to do that.
21:03 That's lame.
21:04 because they're just pushing work on other people.
21:07 but, but also maybe it's okay.
21:11 So the argument here is that like somebody can say watch releases and then get notified
21:16 if a new release happens and they don't, and you can't do that with tags or something.
21:21 I'm not sure.
21:21 so, my, yeah, first reaction was, I don't want to deal with it.
21:27 However, I think there's, oh, I didn't don't have the tab up here, but I think there's
21:32 some, GitHub actions that can do this for me every day.
21:36 If I'm just doing it by pushing a tag up and if it could do it by, by itself, a few minutes
21:41 worth of work, I'd like to know what other people are dealing with, with that.
21:45 If they, if they've added GitHub releases to, to their project or not.
21:49 yeah, just curious.
21:51 So what's a good venue for them to let you know about that?
21:54 Oh yeah.
21:55 probably, probably I'm, Fosset on, yeah, right.
21:59 Not gonna foster on, or, the show has a contact form.
22:03 You can email us.
22:04 So yeah, that would be good.
22:06 okay.
22:07 so there's that, I threw it right across.
22:10 Oh, maybe this is for, funny things.
22:13 We'll save that for later.
22:14 not yet.
22:16 I just pushed up the fixtures chapter for the pytest course.
22:19 and, and about the, the intro, the interest got a nice slide deck in it.
22:25 So check out the, the preview, that's, that's, for chapter three, when you're
22:31 thinking about the course, and I'm trying to describe, how pytest fixtures with work
22:37 with like graphics, not really graphics, but you know, slides and drawings and things like
22:41 that.
22:41 So those are my extras.
22:44 How about you?
22:45 I've got a couple things for us.
22:47 So first of all, there's a shiny new Python 312 to be had.
22:52 And that was as of yesterday, 312 RC one.
22:56 Neato.
22:57 Release can, yeah.
22:58 Release candidate.
22:59 It's important because it's like, we're really not changing it now.
23:03 This is bug fixes.
23:04 So if you've been thinking like, okay, there's, there's more features for f-strings,
23:10 or there's this crazy thing that Eric Snow pulled off called the per interpreter GIL.
23:16 That's pretty awesome.
23:17 buffer protocol, things are accessible in Python and many other things, right?
23:23 If you were waiting around and think, these are all relevant to me, I want to try them out,
23:27 but I don't want to mess with stuff that might go away.
23:29 It might change my, I'm just going to wait.
23:31 Cause I'm not really going to use it until it comes out in October.
23:33 Well, it should be about time to start looking into it with a release candidate.
23:37 So that's why this is double noteworthy.
23:40 Yeah.
23:40 It's also a really good time if you haven't started to start, testing your package.
23:45 If you're, if you have packages, you support, to, to add 312 testing.
23:50 Exactly.
23:51 Cool.
23:52 Okay.
23:52 Then I got three conference ish things.
23:55 PyCon UK 2023 is going to be Friday, 22nd and September to the, the Monday.
24:03 Okay.
24:04 So that's pretty cool.
24:05 I'd love to go to PyCon UK, but it is quite far away.
24:08 Now I do love the UK.
24:10 So if you were closer and you get there, then that'd be a pretty excellent conference to go
24:15 check out.
24:15 I think.
24:15 Yeah.
24:16 Also in the general neighborhood, Eindhoven as a, PyData Eindhoven is going to be November
24:24 30th.
24:24 So check that out as well.
24:26 And the call for proposals is open.
24:28 Finally, this one's a little closer to home for us.
24:31 this one is PyData Seattle.
24:34 Now, normally we wouldn't give a shout out to just a meetup because we can't just go to the huge,
24:39 long list.
24:40 but Don reached out to me and they've got some pretty cool stuff.
24:44 So this is the language creators charity fundraiser for PyData.
24:48 and, the fundraiser goes to num focus and last mile education fund.
24:54 So good stuff there.
24:55 And the whole thing is let's scroll down a little for pictures here.
24:59 We've got Adele Goldberg who created small talk.
25:02 Guido van Rossum who created, you know, this thing called Python.
25:05 Anders Heilsberg who did turbo Pascal C# and typescripts as well as James Gosling from
25:11 Java.
25:12 So this is a live in-person event that people can check out.
25:15 So when is it, it is September 19th.
25:18 So 20 days away or whatever.
25:20 If you're around there, want to be part of that.
25:22 There's no online version this because they want it to be fundraiser for charity.
25:27 It's, it's all about trying to get people to show up in person and be part of it.
25:30 So cool.
25:31 Those are all my extras.
25:32 Nice.
25:32 Yeah.
25:33 How about some jokes?
25:34 Yeah.
25:35 Do you have one?
25:36 I don't know if I can check it.
25:38 I don't know if I can tell you about this.
25:39 This one, I don't believe it was sent into us.
25:42 I just ran across it somewhere.
25:43 How does a librarian access remote computers securely?
25:47 SSH.
25:49 It's terrible.
25:51 It's terrible, isn't it?
25:53 It's very bad.
25:54 Yeah.
25:55 It's very bad.
25:55 Okay.
25:56 I love it.
25:56 Anyway, that's, that's the one I got for us.
25:58 Oh, it's a library and access remote computers securely.
26:01 Well, I have a GitHub repo called the ChatGPT failures.
26:07 and it's got, it's just got a big list of things that have gone bad.
26:12 and so this is pretty cool.
26:15 it looks like a new, new being failures.
26:19 let's see.
26:20 that one about the journalists.
26:22 Who was the journalist on that one?
26:24 Bing gets madly in love with a journalist, tries to break up his marriage and really stalkerish
26:29 effect and then lies about that journalist in a chat with another user, keeps being inappropriate
26:36 and dark.
26:36 So I'm not sure.
26:38 but Kevin Roos.
26:40 Okay.
26:40 That's who it was.
26:42 anyway, so there's, there's, so those are bad user to ask me to do that.
26:46 I'm not a bad user.
26:47 I'm a good user.
26:48 I'm a good chat.
26:49 I'm a good chat bot.
26:51 Oh my gosh.
26:52 So yeah.
26:53 So yeah, some failures on ChatGPT.
26:57 So I'd love to see this kept updated.
27:00 It hasn't been updated for a while.
27:02 So, yeah, we need some new ones.
27:04 It's pretty funny.
27:06 It's crazy how this stuff goes a little bit sideways, isn't it?
27:09 It, it is.
27:10 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
27:16 one of those, I don't know if it's one of those things like crypto that maybe will
27:21 go away.
27:21 or it hasn't really, I know crypto hasn't gone away and there's so many wonderful uses
27:28 for, blockchain.
27:30 It's a blockchain.
27:31 Come on now.
27:31 Yeah.
27:32 Okay.
27:33 I do think it's interesting with the large language models when you ask it subjective stuff,
27:40 right.
27:41 It, it could just be weird about it.
27:43 or you, it can make up things about like previous, case law.
27:49 you know, you got those lawyers who got in trouble for submitting a bunch of documents
27:54 and briefs created by ChatGPT that were false.
27:57 But at the, on the other hand, like you can ask it programming questions and it'll give you
28:01 pretty good answers.
28:03 Yeah.
28:03 Right.
28:03 Like I asked for it to solve a really complicated regex problem that we were talking about before.
28:08 And it's just like, boom, here you go.
28:09 And here's a couple of examples in Python.
28:11 Thank you.
28:12 And those, I don't mind too bad.
28:13 Cause you can test it.
28:14 Like if I run this, do the, the things I want out of the regex expression come out or no?
28:19 If no, then it's a bad chat bot.
28:21 If yes, it's a good chat bot.
28:22 Yeah.
28:23 So anyway, I, I do one of the things I just listened to recently was, Freakonomics
28:30 has started a series on, can, on AI.
28:33 And the first one is can AI take a joke?
28:35 and it is, it is interesting, an interesting discussion.
28:39 One of the things that they talked about was, was the current like strike for,
28:44 the writers and, and actors, in Hollywood right now.
28:49 Right.
28:49 So, and I thought that one of the, I, I, I didn't know some of the details.
28:54 So hearing a few of the details around it are interesting of, of, like the initial
28:59 creation of thing.
29:00 so often you can have an idea and then hire some people to write more stuff about
29:05 around it.
29:06 But, if you didn't come up with the original idea, you don't get as much money.
29:10 So if they just have AI come up with the original idea, they don't have to pay anybody the large
29:14 amount of money.
29:15 oh, I see.
29:16 So kind of filling out the details of the joke.
29:18 Yeah.
29:19 and then some experience around writing of using, some AI to do writing.
29:24 one of the commentaries was, you still have to do human work to come up with
29:30 the prompts to like get it, to do something.
29:32 and then you have to validate it afterwards to make sure that what they said, what it came
29:37 up with was real.
29:38 And those are still kind of the humans have to do.
29:41 that's one of the fears I have around people using AI to, to generate test cases,
29:48 because if they're generating, if AI is coming up their code and coming up with your tests,
29:53 there's no humans verifying that it actually is doing what you want it to do.
29:56 at some point you need to have people there.
29:59 So, Someone's got to be in the loop.
30:01 Yeah.
30:01 Yeah.
30:02 Yeah.
30:02 So anyway, we'll see.
30:04 it's, I'm definitely not a Luddite trying to, actually there's a discussion about Luddite
30:10 also in the, in there that, Luddite apparently, I didn't know this, that it isn't
30:15 people that there weren't people that were, against technology.
30:19 It was people that were against, craftsmen that were against the shoddy craftsmanship
30:26 of manufactured items.
30:28 that, the, there wasn't, there wasn't enough people actually making quality goods.
30:33 They were just, like factories building low quality goods.
30:37 that's what they were opposed to.
30:39 And that's interesting.
30:40 analogy that is, anyway, way on a, on a tangent there.
30:45 So, but, excellent.
30:48 Anyway.
30:49 thanks for being here as always.
30:50 Thank you to everyone who listened.
30:53 See you later.