WEBVTT

00:00:00.001 --> 00:00:03.880
Hey there, thanks for listening. Before we jump into this episode, I just want to remind you

00:00:03.880 --> 00:00:09.680
that this episode is brought to you by us over at Talk Python Training and Brian through his pytest

00:00:09.680 --> 00:00:14.940
book. So if you want to get hands-on and learn something with Python, be sure to consider our

00:00:14.940 --> 00:00:21.720
courses over at Talk Python Training. Visit them via pythonbytes.fm/courses. And if you're

00:00:21.720 --> 00:00:27.320
looking to do testing and get better with pytest, check out Brian's book at pythonbytes.fm slash

00:00:27.320 --> 00:00:32.920
pytest. Enjoy the episode. Hello and welcome to Python Bytes, where we deliver Python news and

00:00:32.920 --> 00:00:41.040
headlines directly to your earbuds. This is episode 265, recorded January 5th, 2022. I'm Brian Okken.

00:00:41.040 --> 00:00:46.780
I'm Michael Kennedy. And I'm Matt Kramer. Matt, welcome to the show. Thanks. Happy to be here.

00:00:46.780 --> 00:00:53.060
Yeah, welcome, Matt. Who are you? Oh, so a huge fan. I've listened to every episode. I actually,

00:00:53.060 --> 00:00:58.020
I'm one of these folks that started their career outside of software. I've heard a similar parallel

00:00:58.020 --> 00:01:03.240
story a bunch of times in the past. So I have my degree actually in naval architecture, marine

00:01:03.240 --> 00:01:09.400
engineering, which is design of ships and offshore structures. In grad school, I started, I was started

00:01:09.400 --> 00:01:14.320
with MATLAB, picked up Python, thanks to a professor. And then over time, that's just grown and grown.

00:01:14.320 --> 00:01:20.940
Spent eight years in the oil and gas industry and using Python mostly for doing engineering analysis,

00:01:20.940 --> 00:01:28.400
a lot of digital type stuff, IoT type monitoring work. And about three months ago, I joined Anaconda

00:01:28.400 --> 00:01:33.740
as a software engineer. And I'm working on our Nucleus cloud platform as a backend software.

00:01:33.740 --> 00:01:38.520
Very cool. Awesome. Yeah. Congrats on the new job as well. That's a big change from oil and gas.

00:01:38.520 --> 00:01:43.440
A couple of years. I mean, it is in Texas and all, but it's still, it's still on the tech side.

00:01:43.880 --> 00:01:49.460
Yeah. No, it's, it's related, but obviously a different focus. I wanted to make writing code

00:01:49.460 --> 00:01:52.660
my job rather than the thing I did to get my job done. So.

00:01:52.660 --> 00:01:55.040
Fantastic. I'm sure you're having a good time.

00:01:55.040 --> 00:01:58.900
Yeah. Well, Michael, we had some questions for people last week.

00:01:58.900 --> 00:02:04.660
We did. I want to make our first topic a meta topic. And by that, I mean a topic about Python

00:02:04.660 --> 00:02:12.540
bytes. So you're right. We discussed whether the format, which is sort of, I wouldn't say changed.

00:02:12.540 --> 00:02:18.900
It's, I would rather categorize it as drifted over time. It's sort of drifted to adding this little

00:02:18.900 --> 00:02:22.400
thing and do that different thing. And we just said, Hey, everyone, do you still like this format? It's

00:02:22.400 --> 00:02:26.020
not exactly what we started with, but it's, it's where we are. So we asked some questions.

00:02:26.180 --> 00:02:30.400
The first question I asked, which I have an interesting follow-up at the end here, by the

00:02:30.400 --> 00:02:36.560
way, is, is Python bytes too long at 45 minutes? That's roughly the time that we're, we're going

00:02:36.560 --> 00:02:42.320
these days, probably about 45 minutes. And so I would say, got to do the quick math here. I would say

00:02:42.320 --> 00:02:48.600
70, 65%, let's say 65% are like, no, it's good. With a third of that being like, are you kidding me?

00:02:48.600 --> 00:02:52.660
It could go way longer. I'm not sure we want to go way longer, but there are definitely a couple of

00:02:52.660 --> 00:02:57.260
people that get, it's getting a little bit long. So I would say probably 12% of people said it's

00:02:57.260 --> 00:03:03.400
too long. So I feel like it's actually kind of a decent length. And one of the things I thought it's

00:03:03.400 --> 00:03:08.560
like, as we've changed this format, we've added things on, right? We added the joke that we started

00:03:08.560 --> 00:03:13.540
always doing at the end. We added our extra, extra, extra stuff, but the original format was the six

00:03:13.540 --> 00:03:17.860
items. You covered three, I covered three. Now it's two, two. And we got Matt here to help out with that.

00:03:17.860 --> 00:03:24.780
So what is the length of that? And it turns out that that's pretty much the same length still. So the last

00:03:24.780 --> 00:03:30.840
episodes, 39 minutes, 32 minutes, 35 minutes, 33 minutes, that's how long are our main segments up to the

00:03:30.840 --> 00:03:34.860
end of the minute. So it's kind of like, for people who feel it's too long, I wanted to sort of say, like, feel free

00:03:34.860 --> 00:03:39.900
to just delete it. Like you hear the six items, like delete it at that point. If you don't want to hear us ramble

00:03:39.900 --> 00:03:44.660
about other things that are not pure Python, you don't hear us talk about the joke or tell jokes, no problem.

00:03:44.660 --> 00:03:50.100
Yeah. Just, just stop. It's at the end for a reason. So if you're kind of like, all right,

00:03:50.100 --> 00:03:53.760
well, I'm kind of done, then, then be done. That's totally good. Yeah. we'll put the important

00:03:53.760 --> 00:04:01.420
stuff up first. the other one was, do you like us having a third coast like Matt or, shell

00:04:01.420 --> 00:04:07.820
or whoever it is we've had on recently? And most people love that format or, you know, it's okay. So

00:04:07.820 --> 00:04:11.820
that's like, I think that that's, that's pretty good. I do want to read out just a couple of comments as

00:04:11.820 --> 00:04:16.600
well. There's stuff that you always get that are like, you just can't balance it. A couple of people

00:04:16.600 --> 00:04:19.220
are saying like, you just got to drop the joke. Like, don't do that. The other people are like,

00:04:19.220 --> 00:04:24.220
the joke is the best. Who doesn't want to stay for that? So, you know, like, well, again, it's at the

00:04:24.220 --> 00:04:29.000
end. So, you, you can do that. But I also just wanted to say, thank you to everybody. They,

00:04:29.000 --> 00:04:35.440
they wrote a ton of nice comments to you and me at the end of that Google forum. So, one is,

00:04:35.540 --> 00:04:39.540
I can't tell what counts as an extra or normal, but it's fine. I love it. By the way,

00:04:39.540 --> 00:04:44.840
it's such an excellent show. Fun way to keep current. Brian is awesome.

00:04:44.840 --> 00:04:47.180
Oh, good. I asked my daughter to submit that.

00:04:47.180 --> 00:04:53.360
She's good. I think your third grass, having a third guest is great. Like I said, drop the jokes,

00:04:53.360 --> 00:04:58.760
keep the jokes for sure. Ideal. I, so anyway, there, there's a bunch of, nice comments.

00:04:58.760 --> 00:05:03.740
I think the other thing, that I would like to just speak to real quick and get your thoughts on

00:05:03.740 --> 00:05:08.500
and maybe you as well, Matt, cause you've been on the receiving end of this a lot is us having the

00:05:08.500 --> 00:05:14.260
live audience. Right. I think having a live audience is really interesting. I also want to just acknowledge,

00:05:14.260 --> 00:05:19.840
like we knew that that would be a slight drift of format, right? So if you're listening in the car

00:05:19.840 --> 00:05:23.440
and there's a live audience comment, it's kind of like, well, but I'm not listening to it live.

00:05:23.440 --> 00:05:28.320
That's kind of different, but I think it's really valuable. One time we had four,

00:05:28.320 --> 00:05:34.160
maybe four Python core developers commenting on the stuff we were covering relative. Like that's a

00:05:34.160 --> 00:05:39.940
huge value to have people coming and sort of feeding that in though. For me personally, I feel like it's,

00:05:39.940 --> 00:05:44.500
yeah, it's a little bit of a blend of formats, but I think having the feedback from the audience,

00:05:44.500 --> 00:05:47.800
especially when people are involved in what we're talking about, I think that's worth it.

00:05:47.800 --> 00:05:48.600
Brian, what do you think?

00:05:48.600 --> 00:05:54.720
Well, we, we, we try not to, to let it interrupt the flow too much, but there's some great stuff.

00:05:54.720 --> 00:05:59.980
Like if somebody, if we say something that's just wrong, somebody will correct us. And that's,

00:05:59.980 --> 00:06:07.280
that's nice. the other thing is, sometimes somebody has a great question on a topic that like,

00:06:07.280 --> 00:06:11.380
we should have, we should have talked about, but we didn't, we didn't, we didn't. Right. We don't know

00:06:11.380 --> 00:06:18.440
everything. We certainly don't. so I do want to add one more thing. the, there was a comment

00:06:18.440 --> 00:06:23.720
like, Hey, we as hosts should let the guests speak. We should be better interviewers. I'm like,

00:06:23.720 --> 00:06:28.020
this is not an interview format, you know, like talk Python is a great interview format. Oh,

00:06:28.020 --> 00:06:31.860
that's where the guest is featured. Testing code is a great form interview format where the guest is

00:06:31.860 --> 00:06:37.240
featured. This is sort of just three people chatting. It's not really an interview format. So,

00:06:37.240 --> 00:06:42.720
and, and we always tell the guests to interrupt us and they just, they don't much. So, yeah. Yeah.

00:06:42.720 --> 00:06:46.760
So Matt, what do you think of this live audience aspect? Like, do you feel like that's tracks or is it good?

00:06:47.100 --> 00:06:52.120
Well, yeah. First of all, thank, I'm, I'm, I'm glad that, people generally like having a guest.

00:06:52.120 --> 00:06:56.580
Otherwise this would have been very awkward. but no, I do like it. I think.

00:06:56.580 --> 00:06:58.420
Well, where'd Matt go? Oh, he must've disconnected.

00:06:58.420 --> 00:07:02.640
There was one. Occasionally there is a kind of a, a little bit of a disruption,

00:07:02.640 --> 00:07:07.920
but I think in general it's been great. Yeah. I've definitely been listening when times when,

00:07:07.920 --> 00:07:11.940
um, you know, a bunch of people are chiming in because there's always, as you know, that you,

00:07:11.940 --> 00:07:15.800
you mentioned a GUI library and then there's about 12 other options that you may not have

00:07:15.800 --> 00:07:20.580
covered in. Instead of waiting 12 weeks, you could just get them right out. so I think that's

00:07:20.580 --> 00:07:26.380
great. And I, I'm, I'm generally a audio listener. I listen when I'm walking my dogs, but, but I love

00:07:26.380 --> 00:07:30.660
having the video because when I am very, when I'm interested in something, I can go hop to it right

00:07:30.660 --> 00:07:36.360
away and see what you're showing, which I really like. So. Yeah. Awesome. Thank you. two other

00:07:36.360 --> 00:07:40.660
things that came to mind. Someone said it would be great if there's a way where we could submit

00:07:40.660 --> 00:07:47.060
like ideas and stuff like that for guests, and whatnot. right here at the top in our menu,

00:07:47.060 --> 00:07:53.400
it says submit. So please, reach out to us on Twitter, send us an email, do submit it there.

00:07:53.400 --> 00:08:00.340
The other one was, if we could have time links, like if, if you go to the, the, to listen and at some

00:08:00.340 --> 00:08:04.740
certain time, a thing is interesting that's mentioned, be cool. If you could like link at,

00:08:04.880 --> 00:08:10.140
at a time, if you look in your podcast player, it has chapters and each chapter has both a link

00:08:10.140 --> 00:08:15.320
and a time. So, like the thing that Brian's going to talk about next interpreters, if you want

00:08:15.320 --> 00:08:20.200
to hear about that during that section in your podcast player, you can click the chapter title

00:08:20.200 --> 00:08:26.100
and it will literally navigate you to there. So it's already built in. Just make sure you can see it in

00:08:26.100 --> 00:08:31.620
your device. Yeah. All right. I think that's it, for that one, but yeah, thank you for everybody

00:08:31.620 --> 00:08:35.940
who had comments and took the time. Really appreciate it. Yeah. And just the comment,

00:08:35.940 --> 00:08:40.560
if you, if you want to be a guest, just email on that form and you might be able to do it.

00:08:40.560 --> 00:08:43.580
That's right. That's right. Yeah. Great to have you here.

00:08:43.580 --> 00:08:47.040
actually I didn't want to talk about interpreters. No, that's me.

00:08:47.040 --> 00:08:51.780
Oh, wait, you're right. Well, you're talking about it now because I've changed. No,

00:08:51.780 --> 00:08:54.720
let's talk about Adder. Sorry. I saw the wrong screen.

00:08:54.720 --> 00:08:55.360
Go for it.

00:08:55.360 --> 00:09:01.520
Apparently we're not professional here, but, no, it's okay. I wanted to talk about

00:09:01.520 --> 00:09:06.780
Adder's. We, we haven't really talked about it much for a while because there are lots of reasons,

00:09:06.780 --> 00:09:14.800
but Adder's is a great library and it just came out with Adder's, came out with a release 21.3.0,

00:09:14.800 --> 00:09:18.420
which is why we're talking about it now. And there's some documents. There's a little bit

00:09:18.420 --> 00:09:23.000
of change. There's some changes and some documentation changes. And I really,

00:09:23.000 --> 00:09:27.860
in an article I wanted to cover. So one of the things you'll see right off the bat, if you look at the,

00:09:27.860 --> 00:09:35.800
the overview page of the Adder's site is, is it, is it highlighting the define, decorator.

00:09:35.800 --> 00:09:41.820
It's a different kind of way that if you've used Adder's from years ago, this is a little different.

00:09:41.820 --> 00:09:49.360
So the, there's a, there's, there was a different weighted to a different API that was added in the

00:09:49.360 --> 00:09:56.180
last release. And this is, or one of the previous releases. And now that's the preferred way. So this

00:09:56.180 --> 00:10:01.920
is what we're calling modern Adder's. but along with this, I wanted to talk about an article,

00:10:01.920 --> 00:10:08.940
uh, that Hinnick wrote, about, about Adder's. And it's a little bit of a history and I really love this

00:10:08.940 --> 00:10:16.020
discussion. So, and I'll try to quickly go through the history. early on, we didn't have

00:10:16.020 --> 00:10:21.740
data classes. Obviously we had, we could handcraft classes, but there were problems with it. And there

00:10:21.740 --> 00:10:27.240
was a library called characteristic, which I didn't know about. This was, this was, before I started

00:10:27.240 --> 00:10:34.160
looking into things, that, and then glyph and Hinnick in, in 2015, we're discussing it ways to

00:10:34.160 --> 00:10:41.360
change it. And that begat the old original Adder's, interface. And there were things like

00:10:41.360 --> 00:10:49.300
Adder.s and Adder attribute that were partly out of the fact that the old way of characteristic

00:10:49.300 --> 00:10:55.600
attribute was a lot of typing. So they wanted to something a little shorter. and then it kind of

00:10:55.600 --> 00:11:02.560
took off. Adder's was pretty, pretty popular for a long time, especially fueled by a 2016 article by

00:11:02.560 --> 00:11:08.340
glyph called the one Python library. Everyone needs, which was a great, this is kind of how I

00:11:08.340 --> 00:11:15.200
learned about it. and then, there was a, you know, different kind of API that we were used to

00:11:15.200 --> 00:11:22.480
for attrs and it was good and everything was great. And then in 2017, Guido and Hinnick and Eric

00:11:22.480 --> 00:11:29.140
Smith talked about, at, in the Python 2017, they talked about how to make something like that

00:11:29.140 --> 00:11:36.840
in the standard library. and that came out of that came PEP 557 and data classes and data classes

00:11:36.840 --> 00:11:43.000
showed up in, in Python three seven. and then, so what, then a dark period happened,

00:11:43.000 --> 00:11:49.680
which was people were like, why do we need attrs anymore? If we have data classes? Well,

00:11:50.000 --> 00:11:54.640
that's one of the things I like about this, this article. And then there's an attached article

00:11:54.640 --> 00:12:02.480
that is called why not, why not, why not data classes instead of attrs? And, and this

00:12:02.480 --> 00:12:09.360
is, it's, it's important to realize that data classes have always been a limited set of

00:12:09.360 --> 00:12:15.480
adders. Adders was a, is a super set of functionality and there's a lot of stuff missing in data classes,

00:12:15.480 --> 00:12:22.380
like, like, equal equality customization and validators. Validators and converters are very

00:12:22.380 --> 00:12:28.020
important if you're using a lot of these. and then also people were like, well, data classes

00:12:28.020 --> 00:12:35.960
kind of a nicer interface, right? Well, not anymore. the pound defines pretty, or they at

00:12:35.960 --> 00:12:40.080
defines really nice. This is a really easy interface now to work with. So anyway,

00:12:40.080 --> 00:12:46.000
yeah. And it has typing and it has typing. and, and I'm glad he wrote this because I'm,

00:12:46.000 --> 00:12:52.080
I kind of was one of those people of like, am I doing something wrong? If I'm, if I'm, using

00:12:52.080 --> 00:12:57.060
data classes, why should I look at attrs? And one of the things that there's a whole bunch of

00:12:57.060 --> 00:13:03.440
reasons. One of the things that I really like is attrs, has, slots, the slots are

00:13:03.440 --> 00:13:09.260
on to by, by default. So you have, you kind of define your class once instead of, keeping

00:13:09.260 --> 00:13:15.100
it growing. Whereas the default Python way and data classes is to allow classes to grow at runtime,

00:13:15.100 --> 00:13:21.000
have more, more attributes, but that's not really how a lot of people use classes. So if you, if you

00:13:21.000 --> 00:13:26.280
came from another language where you have to kind of define the class once and not at runtime,

00:13:26.280 --> 00:13:28.260
adders might be a closer fit for you.

00:13:28.260 --> 00:13:32.420
I like it. And it's whether you say at define or at data class, pretty similar.

00:13:32.420 --> 00:13:38.200
Yeah. Yeah. Adders is really cool. I personally haven't used it, but I've always wanted to try it.

00:13:38.200 --> 00:13:42.820
we're using FastAPI and, and Pydantic. So I've really come to like that library, but

00:13:42.820 --> 00:13:47.640
adders is something that looks really full featured and nice. definitely something I want to pick up.

00:13:47.640 --> 00:13:53.640
Yeah, it's cool. And Pydantic also seems very inspired by data classes, which I'm learning now.

00:13:53.640 --> 00:13:58.140
I suspected, but now learning that is actually inspired by attrs and they kind of sort of

00:13:58.140 --> 00:14:01.860
leapfrog each other in this, this same trend, which is interesting.

00:14:01.860 --> 00:14:07.200
Yep. So yeah, cool. Good one, Brian, Matt. I thought Brian was going to talk about this,

00:14:07.200 --> 00:14:07.880
but you can talk about it.

00:14:07.880 --> 00:14:12.900
This would be me. Yeah. so this one's not strictly Python related, but I think it's very

00:14:12.900 --> 00:14:20.360
relevant to Python. so I mentioned earlier, I came from a non CS background. and I've always,

00:14:20.360 --> 00:14:25.440
I've just been going down the rabbit hole for about 10 years now, trying to understand everything and pick

00:14:25.440 --> 00:14:30.460
it up and, and really connect the dots between how do these very flexible objects that you're

00:14:30.460 --> 00:14:34.920
working with every day, how do those get actually implemented? and so the first thing I did,

00:14:34.920 --> 00:14:39.740
if you heard of this guy, Anthony Shaw, yeah, I think he's been mentioned once or twice. He wrote

00:14:39.740 --> 00:14:42.780
a great book, shout out CPython internals. Really?

00:14:42.780 --> 00:14:46.660
Anthony's out in the audience. He even says happy, happy new years. Hey, happy new years.

00:14:46.660 --> 00:14:52.320
So this book is great. If you want to learn how CPython's implemented. but because I don't have a

00:14:52.320 --> 00:14:56.700
traditional CS background, I've always wanted, you know, I felt like I wanted to get a little bit more

00:14:56.700 --> 00:15:01.200
to the fundamentals and I don't remember where I found out about this book, but crafting interpreters,

00:15:01.300 --> 00:15:07.600
um, I got the paperback here too. I highly recommend it. It's, it's, it's a, implementation of a

00:15:07.600 --> 00:15:13.000
language from start to finish. Every line of code is in the book. it's a dynamic interpreted language,

00:15:13.000 --> 00:15:19.840
um, much like Python. but I really like how the book is structured. So it is, it was written

00:15:19.840 --> 00:15:25.140
over, I think five years in the open. I think the paperback may have just come out last year,

00:15:25.140 --> 00:15:31.480
but you walk through every step from tokenization, scanning, building a syntax tree, and all the

00:15:31.480 --> 00:15:37.420
way through the end. But what I really like about it is, is you actually, you develop two separate

00:15:37.420 --> 00:15:42.300
interpreters for the same language. So the first one is written in Java. it's a direct,

00:15:42.300 --> 00:15:48.940
evaluation of the abstract syntax tree. so that was really how I got a lot of these bits in my

00:15:48.940 --> 00:15:52.380
head about what is an abstract syntax tree. How do you start from there? How do you represent these

00:15:52.380 --> 00:15:56.860
types? But the second part is actually very, where I think it becomes really relevant for Python

00:15:56.860 --> 00:16:02.860
because you, the second part is written in C it's a bytecode virtual machine, with garbage

00:16:02.860 --> 00:16:07.700
collection. So it's not exactly the same as Python, but if you want to dig down into how would you

00:16:07.700 --> 00:16:13.700
actually, you know, implement this with the types that you have available for you in C, but get

00:16:13.700 --> 00:16:18.680
something flexible, much like Python, I really recommend this. so again, it's not directly,

00:16:18.680 --> 00:16:23.440
there's some good side notes in here where they, he compares, you know, different implementations

00:16:23.440 --> 00:16:29.240
between different languages like, Python and JavaScript, et cetera, Ruby. But I really liked

00:16:29.240 --> 00:16:34.980
this book. I devoured it during my time between jobs and, yeah, I keep telling everyone about

00:16:34.980 --> 00:16:39.180
it. So I thought it would be good for the community to hear. Yeah. Nice. Yeah. I didn't study this

00:16:39.180 --> 00:16:45.020
stuff in college either. I mostly studied math and things like that. And so understanding how virtual

00:16:45.020 --> 00:16:49.780
machines work and all that is just how code executes. I think it's really important. You

00:16:49.780 --> 00:16:54.380
know, it's, it's not the kind of thing that you actually need to know how to do in terms of you

00:16:54.380 --> 00:16:59.660
got to get anything done with it. But sometimes your intuition of like, if I asked the program to

00:16:59.660 --> 00:17:04.860
work this way and it doesn't work as you expected, you expect, you know, maybe understanding that

00:17:04.860 --> 00:17:08.940
internal is like, Oh, it's because the, it's really doing this and all, everything's all scattered

00:17:08.940 --> 00:17:11.980
out on the heap. And I thought numbers would be fast. Why are numbers so slow?

00:17:11.980 --> 00:17:17.580
But okay. I understand now. Yeah. I really liked the, I mean, it answered a lot of questions

00:17:17.580 --> 00:17:22.300
for me. Like how does a hash map work? Right. That's a dictionary in Python. What is a stack?

00:17:22.300 --> 00:17:27.020
Why would you use it? What is the, when you do a disassemble and you see bytecode, what does that

00:17:27.020 --> 00:17:33.100
actually mean? Right. I really, I really enjoyed it. And he's got a really great, books open source.

00:17:33.100 --> 00:17:37.180
It's got a really great build system. If you're interested in writing a book, it's very cool

00:17:37.180 --> 00:17:43.260
how the adding lines of code and things like that are all embedded in there. And he's got tests,

00:17:43.260 --> 00:17:48.300
written for every part where you add a new, you know, a new bit to the code, there's tests written

00:17:48.300 --> 00:17:52.460
and there's ways where he uses macros and things to block them out. It's pretty, pretty interesting.

00:17:52.460 --> 00:17:54.300
Nice. Testing books.

00:17:54.300 --> 00:18:00.380
That's pretty excellent. Yeah. Yeah. So Matt, now being at Anaconda, like that world,

00:18:00.380 --> 00:18:05.980
the, the Python world over in the data science stack, and especially around there has so much

00:18:05.980 --> 00:18:10.060
of like, here's a bunch of C and here's a bunch of Python and they kind of go together. Does this

00:18:10.060 --> 00:18:15.500
give you a deeper understanding of what's happening? Yeah, for sure. I think, CPython internals

00:18:15.500 --> 00:18:20.300
gave me a really good understanding a bit about a bit more about the C API and why that's important.

00:18:20.300 --> 00:18:25.100
it is, I'm sure you, well, as you know, and the listeners may know, like the binary compatibility

00:18:25.100 --> 00:18:29.660
is really important, between the two and dealing with locking and the, the,

00:18:29.660 --> 00:18:35.500
global interpreter lock and everything like that. so it's definitely given me a better conceptual

00:18:35.500 --> 00:18:39.100
view of how these things are working. As you mentioned, I don't, you don't need to know it

00:18:39.100 --> 00:18:43.660
necessarily on a day-to-day basis, but I've just found that it's given me a much better mental model.

00:18:43.660 --> 00:18:50.620
Having an intuition is valuable. Yeah. quick audience feedback. Sam out in the live audience

00:18:50.620 --> 00:18:55.420
says, I started reading this book over Christmas day and it's an absolute joy. So yeah, very cool.

00:18:55.420 --> 00:19:01.500
one more vote of confidence for you there. Cool. Brian, are we ready for my, my next one?

00:19:01.500 --> 00:19:09.100
Yes, definitely. A little, Yamale. Yeah, I'm hungry. So this one is cool. it's called

00:19:09.100 --> 00:19:14.620
Yamale or Yamaly. I'm not a hundred percent sure, but it was suggested by Andrew Simon. Thank

00:19:14.620 --> 00:19:22.460
you, Andrew, for sending this in. And the idea of this is we work with YAML files that's often used

00:19:22.460 --> 00:19:29.980
for configuration and whatnot. But if you want to verify your YAML, right, it's just text. Maybe you

00:19:29.980 --> 00:19:37.180
want to have some YAML that has a number for a value, or you want to have a string, or maybe you want to have

00:19:37.180 --> 00:19:42.300
true false, or you want to have some nested thing, right? Like you could say, I'm going to have a person

00:19:42.300 --> 00:19:48.140
in my YAML. And then that person has to have fields or value set on it, like a name and an age

00:19:48.140 --> 00:19:55.340
with this library. You can actually create a schema that talks about what the shape and types of these

00:19:55.340 --> 00:20:02.060
are much like data classes. And then you can use Yamaly to say, given a YAML file, does it validate?

00:20:02.060 --> 00:20:07.580
Think kind of like Pydantic is for JSON. This is for YAML, except it doesn't actually parse the

00:20:07.580 --> 00:20:10.860
results out. It just tells you whether or not it's, it's correct. Isn't that cool?

00:20:10.860 --> 00:20:13.020
I think it looks neat. yeah.

00:20:13.020 --> 00:20:19.660
Yeah. So it's, it's a pretty easy to work with, obviously requires modern Python. It has a CLI

00:20:20.220 --> 00:20:26.060
version, right? So you can just say, YAML, give it a schema, give it a file, and it'll go through and

00:20:26.060 --> 00:20:32.460
check it. It has a strict and a non-strict mode. It also has an API. So then to use it, just say,

00:20:32.460 --> 00:20:39.020
YAML.validate schema and data, either in code or on the CLI. And in terms of schemas, like I said,

00:20:39.020 --> 00:20:44.620
it looks like data classes. You just have a file like name:str, age:int. And then you can even add

00:20:44.620 --> 00:20:50.940
additional limitations. Like the max integer value has to be 200 or less, which is pretty cool.

00:20:50.940 --> 00:20:55.980
then also, like I said, you can have, more complex structures. So for example, they have what

00:20:55.980 --> 00:21:01.100
they call a person, but then the person here, actually you could nest them. So you could have

00:21:01.100 --> 00:21:06.540
like part of your YAML could have a person in it and then your person schema could validate that person.

00:21:06.540 --> 00:21:11.740
So very much like Pydantic, but for YAML files, like here, you can see, scroll down, there's a, an

00:21:11.740 --> 00:21:16.460
example of, I think it's called recursion is how they refer to it, but you can have like

00:21:16.460 --> 00:21:21.900
nested versions of these things and so on. So if you're working with YAML and you want to validate

00:21:21.900 --> 00:21:28.140
it through unit tests or some data ingestion pipeline or whatever, I just want to make sure

00:21:28.140 --> 00:21:32.700
you're loading the files correctly, then you might as well hit it with some YAML-y guessing.

00:21:32.700 --> 00:21:38.620
One of the things I like about stuff like this is that, things like YAML files, sometimes people

00:21:38.620 --> 00:21:45.020
just sort of edit it in, in the Git repo, instead of making sure it works first and then

00:21:45.020 --> 00:21:52.380
it gets, and then having a CI stage that says, Hey, making sure the animals valid syntax is,

00:21:52.380 --> 00:21:57.740
is pretty nice so that you, so that you know it before it blows up somewhere else with some weird

00:21:57.740 --> 00:22:03.900
error message. So yeah, exactly. Yeah. This is really cool. The validation of these types of input files,

00:22:03.900 --> 00:22:09.260
especially YAML files is really tough. I've found just cause it's indentation based and, white space

00:22:09.260 --> 00:22:15.100
is not a bad thing, obviously, but for YAML, it's tough. I can't tell you how many hours I've banged

00:22:15.100 --> 00:22:20.140
my head against the wall in the past life. trying to get Ansible scripts to run and things like that.

00:22:20.140 --> 00:22:25.020
So this is really neat. And anytime I see something like this, I just wish that there was one way to

00:22:25.020 --> 00:22:31.740
describe those types somewhere like, and if preferably in Python, just cause I like that more, but this is

00:22:31.740 --> 00:22:36.940
really cool. Yeah. I wouldn't be surprised if there's some kind of Pydantic mapping to YAML instead of to

00:22:36.940 --> 00:22:41.740
JSON. and you can just kind of run it through there, but yeah, I think this is more of a challenge

00:22:41.740 --> 00:22:48.220
than it is safe for JSON because JSON, there's a validity to the file, regardless of what the schema is,

00:22:48.220 --> 00:22:53.420
where YAML less so, right? Like, well, if you didn't indent that, well, it just, that means it's,

00:22:53.420 --> 00:22:57.980
it belongs somewhere else, I guess, you know, it's a little, a little more freeform. So I guess that's

00:22:57.980 --> 00:23:02.540
why it's popular, but also nice to have this validation. So yeah. Thank you for Andrew. Thank

00:23:02.540 --> 00:23:08.860
you to Andrew for sending that in. yeah. So next I wanted to talk about Pimpler, which is

00:23:08.860 --> 00:23:15.580
great name. and I honestly can't remember where I saw this. I think it was a post on or something by Bob

00:23:15.580 --> 00:23:23.100
Belderbos, or something he wrote on five bites. I'm not sure. anyway, so I'll give him credit. Maybe it was

00:23:23.100 --> 00:23:28.940
somebody else. So if it was somebody else, I apologize. But anyway, what is Pimpler? Pimpler is a little tiny library,

00:23:28.940 --> 00:23:37.740
which has a few tools in it. And it has, one of the things that says is, one of the things I saw, it does a few

00:23:37.740 --> 00:23:45.260
things, but what I, it measures monitors and analyzes memory behavior and Python objects. but the, it's the memory

00:23:45.260 --> 00:23:54.660
size thing that, that was interesting to me. So, you've got, like for instance, it has three, three tools

00:23:54.660 --> 00:24:03.980
built into it, a size of and muppy, which is a great name, and class tracker. So a size of is a, provides a basic

00:24:03.980 --> 00:24:11.580
size information for one or a set of objects. And muppy is a monitoring. I didn't play with this. I

00:24:11.580 --> 00:24:15.580
didn't play with the grass, the class tracker, either class tracker provides offline analysis of

00:24:15.580 --> 00:24:21.260
lifetimes of Python objects. Maybe if you've got a memory leak, you can see like there's a hundred

00:24:21.260 --> 00:24:25.900
downs of my hundreds of thousands of this type. And I thought I only had three of them.

00:24:25.900 --> 00:24:31.180
Yeah. And so one of the things that I really liked of, with a size of is, it's,

00:24:31.180 --> 00:24:39.500
it, I mean, we already have, sys get size of in Python, but that just kind of tells you the

00:24:39.500 --> 00:24:48.540
size of the object itself, not of the, like later on. So a size of will tell you not just what the size

00:24:48.540 --> 00:24:53.700
of the object is, but all of the recursively, it goes recursively and, and, looks at the size of all

00:24:53.700 --> 00:24:57.860
the stuff that it contents of it. So, right. And people haven't looked at this, you know,

00:24:57.860 --> 00:25:02.660
they should check out Anthony's book, right? But if you've got a list and say, the list has a hundred

00:25:02.660 --> 00:25:09.700
items in it and you say, what is the size of the list? The list will be roughly 900 bytes. Cause it's

00:25:09.700 --> 00:25:15.220
108 byte pointers, plus a little bit of overhead. Those pointers could point at megabytes of memory.

00:25:15.220 --> 00:25:19.660
You could have a hundred megabytes of stuff loaded in your list. And if it's really only a hundred,

00:25:19.660 --> 00:25:24.380
like, no, that's 900 bytes, not 800 megabytes or whatever. Right. So you really need to,

00:25:24.380 --> 00:25:28.780
if you actually care about real whole memory size, you got to use something like a size up. It's cool

00:25:28.780 --> 00:25:32.460
that this is built in. I had to write this myself and, it was not as fun.

00:25:32.460 --> 00:25:38.620
Yeah, this is awesome. I also, I hit this, sometime in grad school, I remember when I was

00:25:38.620 --> 00:25:44.140
going to add a deadline or something. And, just, I hit the same thing about the number of bytes in a

00:25:44.140 --> 00:25:48.780
list being so small and just writing something that was hacky to try to do the same thing,

00:25:48.780 --> 00:25:54.380
but to have it so nice and available is great. And the name is awesome. I love silly names.

00:25:54.380 --> 00:25:56.700
Yeah, for sure.

00:25:56.700 --> 00:26:01.260
one of the example, and I was confused that the example we're showing on the screen is,

00:26:01.260 --> 00:26:07.740
just a, there's, you've got a, a list of, a few items, some of it's a text to, some of them are

00:26:07.740 --> 00:26:13.580
integers and some are lists of integers or tuples of integers and being able to go down and do the

00:26:13.580 --> 00:26:19.260
size of everything. But then there's also a, you can get more detailed. You can, give it,

00:26:19.260 --> 00:26:25.660
a sized, a size, with, with a detail numbers. I'd have to look at the API to figure

00:26:25.660 --> 00:26:31.580
out what all this means, but the example shows each element, not just the total, but each element,

00:26:31.580 --> 00:26:36.380
what the size of the different components are, which is kind of cool, but it lists like a flat size.

00:26:36.380 --> 00:26:41.020
And I'm like, what's the flat thing? So I had to look that up and a flat, the,

00:26:41.020 --> 00:26:47.020
flat size returns the flat size of a Python object in bytes determined as the basic size.

00:26:47.020 --> 00:26:53.660
So like in these examples, it's, like the tuple is just a flat, the tuple itself is 32 bytes,

00:26:53.660 --> 00:26:56.540
but the tuple and its contents is 64.

00:26:56.540 --> 00:27:03.100
I see. So flat is like sys.get size of, and size is a size of that bit.

00:27:03.100 --> 00:27:05.500
I think that's what it is.

00:27:05.500 --> 00:27:08.220
It is. but yeah, not sure, but that's what I'm thinking.

00:27:08.220 --> 00:27:11.020
Yeah. So for people who are listening, they don't see this. You should check out

00:27:11.020 --> 00:27:15.740
the docs page, right? Like a usage example, because if you have a list containing a bunch of stuff,

00:27:15.740 --> 00:27:21.660
you can just say, basically print this out and it shows line by line. This part of the list was this

00:27:21.660 --> 00:27:26.300
much. And then it pointed at these things. Each of those things is this big and it has constituents

00:27:26.300 --> 00:27:32.060
and, and so on. my theory is that the detail equals one is recurse one level down,

00:27:32.060 --> 00:27:35.420
but don't keep traversing to like show the size of numbers and stuff. Yeah.

00:27:35.420 --> 00:27:37.980
Yeah. Cool. Yeah. I love it. This is great. Yeah.

00:27:37.980 --> 00:27:39.020
Oop.

00:27:39.020 --> 00:27:41.740
All right. Take it all.

00:27:41.740 --> 00:27:48.540
Okay. So, I'm going to talk about HV plot and, HV plot dot interactive,

00:27:48.540 --> 00:27:53.500
specifically. so this is something I actually wasn't very aware of until I joined Anaconda,

00:27:53.500 --> 00:27:58.460
but one of my colleagues, Philip Rodeger, who I know is on talk Python, work point,

00:27:58.460 --> 00:28:02.860
um, is our, is the developer working on this. And there's basically there's, you know,

00:28:02.860 --> 00:28:06.860
when you're working in the PI data ecosystem, there's pandas and X array and tasks, there's all

00:28:06.860 --> 00:28:11.740
these different data frame type interfaces, and there's a lot of plotting interfaces. And there's

00:28:11.740 --> 00:28:19.740
a project called hollow views or HV plot, which is a consistent plotting API for that you can use. And,

00:28:19.740 --> 00:28:25.980
and the really cool part about this is you can swap the backend. So for example, pandas default

00:28:25.980 --> 00:28:29.980
plot, we'll use dot plot and it'll make a mat pot lib. But if you want to use something more

00:28:29.980 --> 00:28:35.980
interactive, like bokeh or hollow views, you can just change the backend and you can use the same

00:28:35.980 --> 00:28:40.940
commands to do that. so that's, that's cool. And you set it on the, on the data frame.

00:28:40.940 --> 00:28:46.700
Yeah. Yeah, exactly. So what you, what you do is you import HV plot dot pandas. And then on the

00:28:46.700 --> 00:28:51.740
data frame, if you change the backend, you just do data frame dot plot. and there's a bunch of

00:28:51.740 --> 00:28:55.740
kind of, you know, rational defaults built in for how it would show the different

00:28:55.740 --> 00:29:00.780
columns in your data frame, versus the index. And then I like that. Cause you could swap out

00:29:00.780 --> 00:29:05.100
the plots by writing one line, even if you've got hundreds of lines of plotting and stuff,

00:29:05.100 --> 00:29:11.020
right. And it just picks it up. Exactly. Yeah. And, and the common workflow for a data scientist is

00:29:11.020 --> 00:29:15.340
you got, you're reading in a lot of input data, right? Then you want to transform that data. So

00:29:15.340 --> 00:29:21.340
you're doing generally a lot of method chaining, is a common pattern where you want to do things like

00:29:21.340 --> 00:29:26.700
filter and select a time and maybe pick a drop a column and do all kinds of things. Right.

00:29:26.700 --> 00:29:31.180
At the end, you either want to show that data or write it somewhere or plot it, which is very common.

00:29:31.180 --> 00:29:37.900
now there's interactive part. Philip demoed this or he gave a talk at PI data global about two

00:29:37.900 --> 00:29:43.900
months ago. I think, it kind of extends on that. And this blew my mind when I saw it. So,

00:29:43.900 --> 00:29:49.340
if you had a data frame like thing and you put dot interactive after it, then you can put your

00:29:49.340 --> 00:29:55.580
method chaining after that. So this is an example where you say, I want to select a discrete time and

00:29:55.580 --> 00:30:00.540
then I want to plot it. And this is, this particular example is not, doesn't have a kernel running in the

00:30:00.540 --> 00:30:06.940
backend, so it's not going to switch. But if you were running this, in an actual live notebook,

00:30:06.940 --> 00:30:12.380
it would be changing the time on this chart. And again, this is built to work with the, a lot of the

00:30:12.380 --> 00:30:18.140
big data type APIs that match the pandas API. Nice. so for people listening, if you say

00:30:18.140 --> 00:30:22.540
dot interactive and then you give the parameter that's meant to be interactive, that just puts

00:30:22.540 --> 00:30:27.580
one of those I Python widget things into your notebook right there. Right. That's cool.

00:30:27.580 --> 00:30:35.180
Yeah. So, a related, library is called panel, which is, it is for building dashboards

00:30:35.180 --> 00:30:41.580
directly from your notebooks. so you can, if you had a, a Jupyter notebook, you could say panel

00:30:41.580 --> 00:30:46.460
serve and pass in the notebook file. and it'll make a dashboard. That's the thing I want to show

00:30:46.460 --> 00:30:51.980
in a, in a, in a second here, but the way the interactive works is really neat. So wherever you

00:30:51.980 --> 00:30:57.980
would put a number, you can put one of these widgets. And so you can have time selectors, you can have

00:30:57.980 --> 00:31:04.220
things like, sliders and you can have input boxes and things like that. And all you do is you would

00:31:04.220 --> 00:31:09.180
change the place where you put your input number at, put one of those widgets in. And then it sort of,

00:31:09.180 --> 00:31:13.660
it, it, I actually don't know how it works exactly under the hood, but from what I understand,

00:31:13.660 --> 00:31:18.300
you put this interactive in, and then it's capturing all the different methods that you're adding onto

00:31:18.300 --> 00:31:22.380
it. And anytime one of those widget changes, it will change everything from that point on.

00:31:22.380 --> 00:31:29.100
and so the demo here was from another panel contributor, Mark Skoff, and that's in,

00:31:29.100 --> 00:31:33.580
and I'm just going to play this and try to explain it. So we have a data pipeline on the right where we've

00:31:33.580 --> 00:31:39.660
chained methods together. and what he's done here is he's just placed a widget in as a parameter

00:31:39.660 --> 00:31:44.780
to these different methods on your data frame. And then this is actually a panel dashboard that's been

00:31:44.780 --> 00:31:49.740
served up in the browser. And you can see this is all generated from the, a little bit of code on the

00:31:49.740 --> 00:31:56.140
right. So if you want to do interactive data analysis or exploratory data analysis, you can really do this,

00:31:56.140 --> 00:32:02.780
um, very easily with this interactive function. And when I saw this, I kind of hit myself in the head

00:32:02.780 --> 00:32:07.900
because the, normally my pattern here was I had a cell at the top with a whole bunch of constants defined.

00:32:07.900 --> 00:32:13.100
And, you know, I would manually go through and okay, change the time, start time from this time to this

00:32:13.100 --> 00:32:16.300
time, or change this parameter to this and run it again. And over and over.

00:32:16.300 --> 00:32:18.780
You got to remember to run all the cells that are affected.

00:32:18.780 --> 00:32:24.540
Exactly. So the fact that the fact that you can kind of do this, interactively while you're working,

00:32:24.540 --> 00:32:30.140
um, I could see how this would just, you know, you don't break your flow while you're trying to work.

00:32:30.140 --> 00:32:35.180
And the method chaining itself is, I really like too, because you can comment out each stage of that,

00:32:35.180 --> 00:32:40.380
um, as you're going and debugging what you're working on. So, yeah, this is really neat.

00:32:40.380 --> 00:32:45.900
And I definitely, I put a link in the show notes to the actual talk, as well as this gist that

00:32:45.900 --> 00:32:51.820
Mark Skobmatson put on GitHub. And, yeah, it's, it blew my mind. It would have made my life a lot

00:32:51.820 --> 00:32:56.780
easier had I known about this earlier. So, yeah. And one of the important things I think

00:32:56.780 --> 00:33:02.940
about plotting and, interactive stuff is it's not, even if your end result isn't a panel or an

00:33:02.940 --> 00:33:10.380
interactive thing, sometimes getting to see the, see the plot, seeing, seeing the data in

00:33:10.380 --> 00:33:13.980
the visual form helps you understand what you need to do with it.

00:33:13.980 --> 00:33:18.860
Yeah, no, exactly. I mean, I did a lot of work in the past with time series data and

00:33:18.860 --> 00:33:23.260
time series data, especially if this was sensor data, you had a lot of dropouts. you might

00:33:23.260 --> 00:33:28.140
have spikes and, and you're always looking at it and trying to make some judgment about your filter

00:33:28.140 --> 00:33:33.900
parameters and, and being able to have that feedback loop between, changing some of those and seeing

00:33:33.900 --> 00:33:39.820
what the result is, is a huge game changer. So yeah. Yeah. And you, you can hand it off to someone

00:33:39.820 --> 00:33:43.500
else who's not writing the code and say, here, you play with it and you, you tell, you know,

00:33:43.500 --> 00:33:44.780
give it to a scientist or somebody.

00:33:44.780 --> 00:33:49.820
Oh, that's exactly right. That's what panel's all about is what the biggest challenge that I

00:33:49.820 --> 00:33:54.460
always had in many data scientists have is you do all your analysis in a notebook, but then you got

00:33:54.460 --> 00:34:00.060
to show your manager or you got to show your teammates and going from that, going through that

00:34:00.060 --> 00:34:06.540
trajectory is, can be very challenging. these new tools are amazing to do that, but that's how I

00:34:06.540 --> 00:34:10.700
turned myself into a software engineer because that's what I wanted to do. But I went out,

00:34:10.700 --> 00:34:15.740
went down the rabbit hole and learned Flask and dash and how to deploy web apps and all this stuff.

00:34:15.740 --> 00:34:20.620
And yeah, well, I'm glad you did. Yeah. Maybe I wouldn't be here if I hadn't done that, but,

00:34:20.620 --> 00:34:24.780
but yeah, this is really cool. And I definitely recommend people look at this. there was also

00:34:24.780 --> 00:34:30.060
another talk this, sorry, this is an extra, but, there was another talk at PI data global,

00:34:30.060 --> 00:34:36.220
um, hosted by Jim, James Bednar, who's our head of consulting, but he leads pyviz, which is a community

00:34:36.220 --> 00:34:42.780
for visualization tools. And it was a comparison of four different, dashboarding apps. So it's

00:34:42.780 --> 00:34:50.060
panel dash, voila and streamlit. And they, they just had, you know, main contributors from the four

00:34:50.060 --> 00:34:54.860
libraries talking about the benefits and pros and cons of all of them. So if anyone wants to go look at

00:34:54.860 --> 00:34:59.580
those, I definitely recommend that too. That sounds amazing. All those libraries are great.

00:34:59.580 --> 00:35:04.540
Nice. Thanks. Oh, speaking of those extra parts of the podcast that make the podcast longer,

00:35:04.540 --> 00:35:10.220
uh, we should do some extras. We should, we should do some extras. Got any?

00:35:10.220 --> 00:35:17.260
I don't have anything extra. Matt, how about you? Yeah. two things. So first, you can show my

00:35:17.260 --> 00:35:24.140
screen. last year at a kind of hired the piston developers, piston is a faster implementation fork of

00:35:24.140 --> 00:35:29.900
c python. I think it was at Instagram first. I can't recall, but anyway, before, right before the

00:35:29.900 --> 00:35:35.580
holidays, they released, pre-compiled packages for many of a couple hundred of the most popular

00:35:35.580 --> 00:35:41.260
python packages. So if you're interested in trying piston, I put a link to their blog post in here.

00:35:41.260 --> 00:35:45.660
they're using conda right now. They were able to leverage a lot of the conda forge recipes for

00:35:45.660 --> 00:35:50.220
building these. this is that binary compatibility challenge that we talked about earlier. So,

00:35:50.220 --> 00:35:55.340
yeah, I know the team's looking for feedback on, on that. If you want to try that,

00:35:55.340 --> 00:35:59.580
feel free to go there. And it mentions in the blog that they're working on pip. That's a little harder

00:35:59.580 --> 00:36:04.860
to just because of how, you know, the build stages for all the packages aren't centralized with

00:36:04.860 --> 00:36:10.220
PIP. So it's a little more challenging for them to do that. and then just the last thing is,

00:36:10.220 --> 00:36:17.260
um, you know, I don't want to be too much of a salesman here, but, we are hiring. It's an amazing

00:36:17.260 --> 00:36:21.820
place to work and I definitely recommend anyone to go check it out if they're interested.

00:36:21.820 --> 00:36:25.340
so fantastic. Yeah. And you put a link in the show notes. People want to, yeah,

00:36:25.340 --> 00:36:31.580
it's anaconda.com slash careers. and we're doing a lot of cool stuff and growing. So if anyone's

00:36:31.580 --> 00:36:37.180
looking for work in, in data science or just software and building out some of the things we're

00:36:37.180 --> 00:36:42.220
doing to try to help the open source community, and bridge that gap, spelled it wrong, bridge that

00:36:42.220 --> 00:36:45.820
gap between, enterprise and open source and data science in particular.

00:36:45.820 --> 00:36:51.100
Yeah. And definitely seems like a fun place to work. So cool. People looking for a change or for

00:36:51.100 --> 00:36:57.580
a fun Python job. Yeah. Yeah. Cool. People do reach out to Brian and me and say, Hey,

00:36:57.580 --> 00:37:02.780
I really want to get a Python job and doing other stuff, but how do I get a Python job? Help us out.

00:37:02.780 --> 00:37:07.020
So we don't know, but we can recommend places like Anaconda for sure.

00:37:07.020 --> 00:37:10.860
Yeah. It looks like there's about 40 jobs right now. And, so check it out.

00:37:10.860 --> 00:37:16.540
Fantastic. Oh, wow. That's awesome. All right. Well, would it surprise you if I had some extra things?

00:37:16.540 --> 00:37:17.980
It would surprise me if you didn't.

00:37:17.980 --> 00:37:23.980
All right. First of all, I want to say congratulations to Will McGugan.

00:37:23.980 --> 00:37:29.100
We have gone the entire show without mentioning rich or textual. Can you imagine?

00:37:29.100 --> 00:37:34.700
But no, only cause I knew you were going to talk about this. Otherwise I would have thrown it in.

00:37:34.700 --> 00:37:40.780
Yeah. So Will last year, a while ago, I don't know the exact number of months back,

00:37:40.780 --> 00:37:46.300
but he was planning to take a year off of work and just focus on rich and textual. It was getting so

00:37:46.300 --> 00:37:50.780
much traction. He's like, I'm just going to, you know, live off my savings and a small amount of

00:37:50.780 --> 00:37:57.420
money from the GitHub sponsorships and really see what I can do trying that. Well, it turns out he has

00:37:57.420 --> 00:38:04.380
plans to build some really cool stuff and has actually all based around rich and textual in particular.

00:38:04.380 --> 00:38:11.740
And he has raised a first round of funding and started a company called textualize.io.

00:38:11.740 --> 00:38:12.780
How cool is that?

00:38:12.780 --> 00:38:15.580
Well, we don't know because we don't know what it's going to do.

00:38:15.580 --> 00:38:21.100
All you do is if you go there, it's like a command prompt. You just enter your email address. I guess

00:38:21.100 --> 00:38:25.420
you enter something happens. Let's find out what happens. Yes, I'm confirmed. Basically,

00:38:25.420 --> 00:38:29.740
just get notified about when textualize comes out of stealth mode. But congrats to Will. That's

00:38:29.740 --> 00:38:34.860
fantastic. Another one we've spoken about tenacity. Remember that, Brian? Yeah. So tenacity is cool.

00:38:34.860 --> 00:38:40.700
You can say here's a function that may run into trouble if you just put at, you know, tenacity.retry

00:38:40.700 --> 00:38:45.500
on it and it crashes. It'll just try it again until it succeeds. That's probably a bad idea in production.

00:38:45.500 --> 00:38:51.020
So you might want to put something like stop after this or do a little delay between them or do both.

00:38:51.020 --> 00:38:56.220
I was having a race condition. We're trying to track when people are attempting to hack,

00:38:56.220 --> 00:39:01.980
talk Python, the training site, the Python byte site and all that. And it turns out when they're

00:39:01.980 --> 00:39:05.900
trying to attack your site, they're not even nice about it. They hit you with a botnet of all sorts

00:39:05.900 --> 00:39:10.220
of stuff. And like lots of stuff happens at once. And there's this race condition that was causing

00:39:10.220 --> 00:39:15.660
trouble. So I put retry, a tenacity.retry. Boom, solved it perfectly. So I just wanted to say I

00:39:15.660 --> 00:39:18.780
finally got a chance to use this to solve some problems, which was pretty cool.

00:39:18.780 --> 00:39:23.100
That's really cool. The other one that's similar to this, which I've used, and I think,

00:39:23.100 --> 00:39:28.300
I don't know if you've used Brian, but it's called pytest Flaky. And it's awesome because

00:39:28.300 --> 00:39:33.740
I was working with this time series data historian. I had a bunch of integration tests in my last job,

00:39:33.740 --> 00:39:39.020
but you know, network stuff, it would drop out occasionally. And so you can do very similar

00:39:39.020 --> 00:39:45.820
type things and wrap your test in an @flaky decorator and do similar type stuff and, you know,

00:39:45.820 --> 00:39:49.020
give it three tries or something before you make it fail.

00:39:49.020 --> 00:39:53.420
Yeah, exactly. That's cool. That's what mine, I think mine does three tries and it's like randomly

00:39:53.420 --> 00:39:57.420
a couple of second delay or something. Remember that part, Brian, where we talked about,

00:39:57.420 --> 00:40:00.540
it's really cool if people are in the audience while we talk about stuff and then get a little feedback.

00:40:00.540 --> 00:40:03.340
So Will McGooghan says, "Hey, thanks guys. Can't wait to tell you about it." Yeah,

00:40:03.340 --> 00:40:05.100
congrats, Will. That's awesome. Glad to see you out there.

00:40:05.100 --> 00:40:11.420
All right. A couple of other things. Did you know that GitHub has a whole new project experience?

00:40:11.420 --> 00:40:15.020
That's pretty awesome. Have you seen this? I haven't. I haven't seen this.

00:40:15.020 --> 00:40:19.500
So you know how it's like this Kanban board, Kanban board, where you have like columns,

00:40:19.500 --> 00:40:24.700
you can move your issues between them. So just last week, they came out with this thing called

00:40:24.700 --> 00:40:30.860
a beta projects where it still can be that, or it can be like an Excel sort of view where you have

00:40:30.860 --> 00:40:35.260
little drop down combo boxes. Like I want to move this one in this column by going through that mode

00:40:35.260 --> 00:40:41.820
or as a board, or you can categorize based on some specification, like show me all the stuff that's

00:40:41.820 --> 00:40:47.740
in progress and then give me that as an Excel sheet and all these different views you have for automation.

00:40:47.740 --> 00:40:52.940
And then like there's APIs and all sorts of neat stuff in there. So if you've been using GitHub

00:40:52.940 --> 00:40:57.500
projects to do stuff, you know, you can check this out. It looks like you could move a lot of,

00:40:57.500 --> 00:41:01.260
a lot more work towards that on the project management side of software they used to.

00:41:01.260 --> 00:41:07.020
This is really neat. Yeah. In my previous job, I was using Azure DevOps. I was always wondering

00:41:07.020 --> 00:41:10.460
when some of those features might move to GitHub. I don't know if that's what happened here, but

00:41:10.460 --> 00:41:16.380
being able to have this type of project management in there for this type of things, it's really,

00:41:16.380 --> 00:41:20.860
really great. Yeah. Super cool. Yeah. One of the things I love about stuff like this is because

00:41:21.500 --> 00:41:28.460
even, I mean, yes, a lot of companies do their project management on or projects on in GitHub or

00:41:28.460 --> 00:41:36.380
places like that, but also open source projects often have their often have the same needs of project

00:41:36.380 --> 00:41:44.220
management as, as private commercial projects. So, yeah. Yeah. I personally, I only have a few open source

00:41:44.220 --> 00:41:50.540
projects that are kind of personal and no one would probably want to use them, but even just keeping

00:41:50.540 --> 00:41:57.340
notes about to-dos and future stuff and it would be really nice. Yeah. Just for future you, if nothing

00:41:57.340 --> 00:42:01.980
else, right? Yeah. Awesome. Okay. So this is cool. Now the last, yeah, this last thing I want to talk

00:42:01.980 --> 00:42:11.580
about is Markdown. So, Roger Turrell turned me on to this. there's this new Markdown editor,

00:42:11.580 --> 00:42:19.100
it's cross platform. Yes. Cross platform called Typora. And we all spend so much time in Markdown

00:42:19.100 --> 00:42:25.180
that just, wow, this thing is incredible. It's not super expensive and it looks like a standard Markdown editor.

00:42:25.180 --> 00:42:31.260
So you write Markdown and it gives you a whizzy wig, you know, what you see is what you get style of

00:42:31.260 --> 00:42:37.260
programming, which is not totally unexpected. Right. But what is super cool is the way in which you

00:42:37.260 --> 00:42:42.700
interact with it. And actually I am going to show you real quick. So you can, you can see it and then

00:42:42.700 --> 00:42:47.420
you can tell people like, what do you think about this? here, I think that's it. I'm back.

00:42:47.420 --> 00:42:48.060
Waiting.

00:42:48.060 --> 00:42:52.940
There. Okay. Yeah. So here, here's, here's Mark, here's a Markdown file for my course, just the practices

00:42:52.940 --> 00:42:57.580
and whatever you can say, you know what? I would like to view that in code style. Right. Well,

00:42:57.580 --> 00:43:00.460
that's kind of cool. We want to edit this. You click here and it becomes,

00:43:00.460 --> 00:43:06.220
Ooh, comes Markdown becomes Markdown. That's, but this is a boring file. So let's see about,

00:43:06.220 --> 00:43:09.980
it has a whole file system that navigates like through your other Markdown stuff,

00:43:09.980 --> 00:43:14.620
correctly. So like here, chapter eight, it's a good one. So we go over to chapter eight on this,

00:43:14.620 --> 00:43:18.780
and now you can see some more stuff. Like you can go to set these headings and whatnot. But if you go to

00:43:18.780 --> 00:43:23.420
images, like you can set a caption and then you could even change the image,

00:43:23.420 --> 00:43:28.300
like right here, if it were a PNG, it's not, but so put it back as JPEG and then it comes back.

00:43:28.300 --> 00:43:34.940
You can come down and write a code fence. use the right symbol and you can say def, a,

00:43:34.940 --> 00:43:41.020
right, whatever. And then you pick a language. Isn't that, isn't that dope? Oh, this is so good.

00:43:41.020 --> 00:43:46.140
So if, if you end up writing a lot of Markdown and if you need to get back, you just,

00:43:46.140 --> 00:43:50.540
go back and switch back to raw Markdown and then go back to this fancy style. I think this is really

00:43:50.540 --> 00:43:58.060
a cool way to work on Markdown. I'm actually working on a book with Roger and, it's got tons of

00:43:58.060 --> 00:44:03.740
Markdown and it's been a real joy to actually use this thing on it. So yeah. Does it have VI mode?

00:44:03.740 --> 00:44:08.940
VI mode? Probably not. I don't know about that, but it has themes. Like it has, it has,

00:44:08.940 --> 00:44:13.100
like you can do like a, like a night mode or I could do like a newspaper mode or, you know,

00:44:13.100 --> 00:44:18.860
take your pick. It's, it's pretty cool. The weirdo grad student in me is upset that this isn't LaTeX.

00:44:18.860 --> 00:44:25.420
It has, it has built in LaTeX. It has like, you can do, yeah, you can do like inline LaTeX and you

00:44:25.420 --> 00:44:31.100
can, there's a bunch of settings you can set for the LaTeX. It's got a whole, a whole math section

00:44:31.100 --> 00:44:35.740
in there. Oh, that's sweet. Okay. Yeah. Let's see. So am I the only person that went all the way

00:44:35.740 --> 00:44:40.780
through college pronouncing it LaTeX? I did too, but I just learned that the cool way of saying LaTeX.

00:44:40.780 --> 00:44:46.620
LaTeX. Yeah. Yeah. It's French. No, I don't know. No. Yeah. It has, it has support for like

00:44:46.620 --> 00:44:51.900
chemistry settings, like inline LaTeX and math and all sides of good stuff. So yeah, it's, it's,

00:44:51.900 --> 00:44:56.540
I'm telling you, this thing's pretty slick. So, all right. Well, I got to do my screen share back

00:44:56.540 --> 00:45:01.980
because so you all can see the joke because the joke is very good and we're going to cover it.

00:45:01.980 --> 00:45:05.180
Where's the joke? But it's at the end. It's at the end. So if people don't want to listen to the joke,

00:45:05.180 --> 00:45:10.540
they don't have to. Brian, I blew it. You did? I blew it. I blew it. Before I move off,

00:45:10.540 --> 00:45:14.860
the Markdown thing though, Anthony Shaw says editorial for iPhone and iPad is really nice too.

00:45:14.860 --> 00:45:22.780
Cool. So, but let's do, let's do the joke. So I blew it because I was saving this all year. I saw

00:45:22.780 --> 00:45:28.380
this like last March and I'm like, this is going to be so good for Christmas. Yeah. And then we kind of

00:45:28.380 --> 00:45:32.540
like had already recorded the episode. We're not going to do it. We'll just take a break over. So we

00:45:32.540 --> 00:45:36.460
didn't have a chance to do it. So let's do it now. People are going to have to go back just a

00:45:36.460 --> 00:45:40.300
little tiny bit for this one. Are you ready? Yes. Matt, you ready?

00:45:40.300 --> 00:45:48.700
Yeah. So this goes, this sort of a data database developer type thing here. And it's on a, I don't

00:45:48.700 --> 00:45:56.300
know why it's on a printout. Anyway, it's called SQL clause as in SQL clause. So it's, he's making a

00:45:56.300 --> 00:46:02.300
database. He's sorting it twice. Select star from contract contacts where behavior equals nice. SQL

00:46:02.300 --> 00:46:10.060
clause is coming. Nice. It would have been so good for Christmas, but we can't keep it another year. I got to

00:46:10.060 --> 00:46:15.260
get it out of here. You're going to sing it. SQL clause is coming to town. Yep, exactly.

00:46:15.260 --> 00:46:20.940
Okay. I want to share a joke that I don't have a picture for. All right. Do it. But,

00:46:20.940 --> 00:46:26.940
but my daughter made this up last week. I think she made it up, but it's just been cracking me up for,

00:46:26.940 --> 00:46:32.940
and I've been telling it to everybody. So it's a short one. Imagine you walk into a room and there's a

00:46:32.940 --> 00:46:37.500
line of people all lined up on one side. That's it. That's the punchline.

00:46:38.220 --> 00:46:48.060
I love it. Nice. We've got my, we had my, my cookie candle last time. Nice. My, I can't

00:46:48.060 --> 00:46:53.580
all these cookies. We've got a dad joke of the day channel in our Slack at work. And it's,

00:46:53.580 --> 00:47:02.300
it makes me oof every time. Nice. Nice. Okay. All right. Nice to see everybody. Thanks,

00:47:02.300 --> 00:47:06.540
Matt, for joining the show. Thank you for having me. Good to see you, Michael, again, as always. Yeah.

00:47:06.540 --> 00:47:11.100
Good to see you. Thank you. Thank you. Thanks for listening to Python Bytes. Follow the show on

00:47:11.100 --> 00:47:17.820
Twitter via @pythonbytes. That's Python Bytes as in B-Y-T-E-S. Get the full show notes over at

00:47:17.820 --> 00:47:23.500
pythonbytes.fm. If you have a news item we should cover, just visit pythonbytes.fm and click submit

00:47:23.500 --> 00:47:27.580
in the nav bar. We're always on the lookout for sharing something cool. If you want to join us for

00:47:27.580 --> 00:47:33.180
the live recording, just visit the website and click live stream to get notified of when our next episode

00:47:33.180 --> 00:47:39.660
goes live. That's usually happening at noon Pacific on Wednesdays over at YouTube. On behalf of myself

00:47:39.660 --> 00:47:44.460
and Brian Okken, this is Michael Kennedy. Thank you for listening and sharing this podcast with your

00:47:44.460 --> 00:47:45.660
friends and colleagues.