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


Transcript #230: PyMars? Yes! FLoC? No!

Return to episode page view on github
Recorded on Wednesday, Apr 21, 2021.

00:00 Hey, all Michael here. Thank you so much for listening to this episode. Before we jump right

00:04 into it, I just want to make a quick announcement. I'm sure you've noticed that we've talked about

00:08 certain people being on the live stream or the live chat. And I want to make sure you know how

00:12 to get to that if you're interested in being part of the show. So if you just go to pythonbytes.fm

00:17 up in the menu, there's a live stream link, click on that, it'll take you over to our YouTube

00:22 channel where you can subscribe and get notified about upcoming live streams. Most people just

00:27 listen to the audio and that's fantastic, but it's really cool to be able to interact with

00:31 some of the audience to get that broader perspective. So hopefully we can see you on

00:35 the live stream recording sometime. Either way, so happy to have you here. Enjoy the show.

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

00:45 This is episode 230 recorded April 21st, one day before Earth Day, I guess Earth Day Eve, Brian,

00:52 2021. I'm Michael Kennedy. I'm Brian Okken. Hi, and I'm Peter Kazarnoff.

00:57 Hey, Peter. Welcome to the show. So good to have you here.

00:59 Yeah, thanks so much for having me. So I work as an instructor at Portland Comini College and I teach

01:05 engineering. And I also blog at Python for undergrad engineers. And I'm a book author too. So if you're

01:14 interested in like that NumPy, Jupyter, kind of Matplotlib sort of stuff, that's the kind of stuff that I'm

01:21 into.

01:22 Yeah, fantastic. You do like engineering work at the local university, right?

01:26 Yeah, at the local community college. And that includes teaching Python in our engineering

01:31 programming class.

01:32 Yeah, awesome. Well, you've spoken at the Python, Portland Python meetup. You've been on Talk Python

01:39 to me. Now you're on Python Bytes. You're making the rounds.

01:41 Awesome. I'm excited to be here. Thanks for having me.

01:44 Yeah, you bet. Well, Brian, are you feeling calm today?

01:47 Yes.

01:48 Feeling a little chill?

01:49 Keep calm and program in Python, right?

01:51 Right.

01:52 Yeah. So this was suggested by Renz Demondahl, something like that. Cool name. This is a site,

02:01 but we've covered some of Vincent's stuff before. This is a site by Vincent Wormerdam called

02:07 comcode.io. And what he's got is he's got a whole bunch of, basically a whole bunch of tutorial

02:14 videos on software topics. But what I, and there are little tutorials to go with them. I checked

02:20 out the, there's a whole bunch of stuff. There's a pie test, there's rich data set and others.

02:25 I was checking out data set this morning and I got kind of hooked and I watched like the entire

02:30 series because it took like 20 minutes or something like that to like watch all of them. It was pretty

02:35 quick. And, and I kind of like the minimalist, it's kind of the minimalist style. It's a, it seems

02:42 to be a balance of like, not just overview and not a deep dive, but somewhere in between.

02:49 And it's kind of a nice place to be for, and I was like kind of blown away at how much he did with

02:55 data set just really quickly. So the data set one, I started with a CSV file with a bunch of data in it,

03:02 turned that into a SQLite database with a tool that he pip installed, use data set to open that. And that

03:11 opens a server on your own computer. And then you use that to explore the data and then used a plugin to

03:17 visualize the data with plots and charts and stuff. And then showed us how to like, actually just use

03:23 raw, see, see what the exploration is in raw SQL and see what that looks like. And then, and then

03:32 take that, take it. But one of the things is it's a, it's like a little service. So you could share that

03:39 on your, in your internal network with somebody else, to look at it. But, the question of

03:45 it's raw SQL should really let raw SQL be run. And he said, yeah, it's fine because, what data set

03:51 does is open up the, SQL database in a read only mode. So you can't write anything. So you're safe

03:57 there. You can't delete anything or anything. Yeah. And this is interesting in that it's like really

04:01 intended to be a hundred percent shared data. And like you said, it's read only. So little bobby tables

04:07 won't be a problem. Exactly. But, and then, then there's a couple of buttons that are like Jason or CSV,

04:13 but they actually open up, they just open up queries and you can use those, as a, an API,

04:21 into the data and you essentially have just with the data set have had, have a API that you can use

04:28 directly for some, something else then. And then he's like, okay, well, with this is good enough.

04:33 Could you stick it out on the cloud? And apparently data set has a tool to do that. And you can just go

04:38 ahead and create a Docker around it with a couple of commands and stick it on a, stick it on a cloud

04:44 service. I was just blown away at how much you can do with data set and just watching somebody play

04:49 with it is good. And like I said, it's not a complete data set tutorial. It's just a

04:54 scratch in the surface a little bit more than scratch in the surface, seeing what kicking the

04:58 tires sort of video. So it's neat. Yeah. Cool. Yeah. It seems really neat. And there's a ton of

05:04 small little tools and things you can go explore there. So yeah, nice, nice, nice. All right.

05:09 Peter, what do you think about this? Well, I loved it. I think this is a great resource, for

05:14 students too, cause they're all free. And the one I really liked was the one on SimPy,

05:19 which is doing symbolic math, with Python. And that's kind of a confusing topic because there's

05:26 like a difference between using the regular square root function that'll give you a float as an output

05:30 compared to like the SimPy function, that is a symbolic math representation of, a square root.

05:39 And, I was, I was hoping maybe it would be so like the ASMR videos that there would be very calming

05:46 music, while you were doing it. but, there wasn't, the instruction though is really

05:53 calming and really, really good. So I'd love to share this with students.

05:56 Yeah. Very cool. Very cool. Nice. All right. On to the next one. This one comes to us from

06:03 Brian's skin pointed out that here's a cool thing that I don't believe we've spoken about yet. So

06:09 Brian, thank you for telling us about natural sort or Nat sort. Have you guys heard of this one?

06:15 No, I've never seen this before. So one of the things that can be frustrating is if you sort with

06:22 something that is really strings, but it has some other meaning like version numbers. Like if I have a,

06:27 a bunch of strings and they'll have version numbers. And I say, sort that of course it's going to go,

06:32 you know, like two dot zero, then 12, then 100, you know, or maybe 100, then 12. Like it's the way

06:40 it sorts will just be, I guess, lexographically. It would be nice if I could just go to certain

06:45 things and say, sort it. And it automatically kind of understood, oh, there's, there's separators and

06:51 there's like meaning between these. And if they're numbers, you know, look at the number part and then

06:56 sort based on the size of the number, not the, whether it starts with a one or a two,

07:01 but if it's a two or a 10, right? And so that's what this simple little library does is it's simple,

07:08 natural sorting in Python. So one cool example, this one actually might be interesting for you,

07:13 Peter, for your students is if I had this, a list of strings, like quote, two feet, seven inches,

07:20 one foot, five inches, five feet, two inches, and so on. If I sort it is just going to go one foot,

07:27 10 feet, two feet, two feet, seven feet, right? You know, the lexographical version, but if you natural

07:32 sort, it does exactly what humans would do. One foot, five inches, two foot, seven inches, two foot,

07:39 11 inches, seven feet, six inches, and so on. So that's pretty cool, right? You can just go and

07:43 basically use NAT sorted instead of sorted, right? The sorted built in, just NAT sorted. And you could

07:50 also import NAT sorted as sorted if you wanted to go off the hook and just, you know, kind of globally

07:55 replace that on a file there. So there's different things that you can do, you know, not just that one.

08:00 You can sort versions, you can sort file paths, real numbers, like scientific numbers, you know,

08:06 1.72 times 10 to the 20th or whatever, that kind of stuff. You do locale aware sorting, like

08:14 basically case incentive sorting. You can customize it, you can sort custom types, but then if you select

08:21 a key out of the, like say a class or an object, a bunch of the instances of that class, then that key

08:28 would then be naturally sorted as if, as this thing does. So here's an example with versions,

08:32 like version dash one dot nine, version dash two, version dash one 11. And of course it sorts the way

08:39 humans would sort it, right? One nine, one 10, one 11, then two O and so on. That's pretty cool.

08:44 You can get a sorted directories. Now, some of these come from not the same NAT sorted, but like,

08:51 for example, there's an OS sorted and there's for the real numbers, there's an real sorted and so on.

08:58 there's ways to customize it. There's ways to build like custom sorters. Like I create an

09:03 algorithm, which is like real or and locale and ignoring case and all of these things, right?

09:09 Like throw them all together with like the, or bitwise or operator and so on. Yeah. And I think

09:15 that pretty much covers it, but it's, it's pretty neat. it has like some cool debugging stuff.

09:21 Z docs is asking if it, NAT sort handles non ASCII Unicode. I think so. there is,

09:30 talk about that actually working with bytes directly, but I think it's works on strings

09:36 itself. So I don't know why it would necessarily be different. I mean, unless you try to treat the

09:41 Unicode as binary, then that might be something else, but yeah, thanks for that. One other thing

09:46 that's interesting, just looking through here, I'm like, okay, this is neat. kind of cool.

09:49 Here's how you customize it. Oh, wait, there's this thing called fast numbers. Most efficient,

09:55 the most efficient sorting can be done if you install the fast numbers package, which apparently,

10:00 you know, it has nothing to do with this, right? But it's something that it uses. And what fast numbers

10:05 does is it allows you to have different behaviors for like float and end and stuff parsing strings into

10:12 floats and integers. And apparently it does it faster as well. So for example, instead of saying

10:17 float of a string, that is a floating point number, you can say fast float of that. And of course you

10:22 could go crazy and import as wipe that out. Right. but you can do things kind of like the dictionary

10:27 that get, so you can say fast float, try to parse this, but instead of throwing a value error, whatever

10:33 type of exception it is, you can say the default that I'm going to get, if I can't parse it as zero

10:37 for bad input or, you know, what number will I treat as not a number and all sorts of interesting stuff.

10:43 So if you're doing parsing of numbers, fast numbers is kind of cool.

10:46 Yeah. I got to check this out. I do that all the time.

10:49 Yeah. Yeah. That's, that's cool. So I think this is just, you know, that's not the main topic,

10:55 but I do think it's a neat one there. So anyway, yeah, people who do sorting of strings and stuff,

11:00 they should check it out. And Zdocs is talking about like sorting, like a umlaut over a,

11:05 I don't know the name of the little circle above a vowel, but there's the locale aware sorting.

11:12 And so you can give it, you can give it like the Swedish locale. and I, I bet it does sort

11:20 it. Okay. But I don't know for sure. I haven't, I haven't actually tested the Swedish locale,

11:24 but you know, that's, it does seem to have like something that addresses that.

11:27 Nice. Nice. Yeah. For me, the use case, is always the one versus zero one. So if I've got

11:34 something that's 10 and something that's one, the way that that automatically gets sorted. And then,

11:39 I don't always like putting the zeros in front. so this seems really useful.

11:43 Right. You don't have to left pad it type of thing.

11:46 Yeah, absolutely. Well, how about Mars Peter?

11:50 So how about Mars? So this is something I'm super excited about, the Mars perseverance rover

11:57 the rover, landed on Mars in February, but just a couple of days, before

12:05 this recording on March 19th, the Mars helicopter, which is called Ingenuity,

12:13 lifted off for the first time. And so this was the first power controlled flight on another planet,

12:19 which is so cool. and you can go to the NASA website and take a look at the Mars helicopter,

12:26 like lifting off for the first time. It's kind of got two counter rotating rotors and a little

12:33 solar panel, up at the top and a little antenna up at the top. and the cool thing about this

12:42 is that, some of the software, that's running the Mars helicopter, is, built with Python.

12:49 it's also totally open source. so, on GitHub, there's, this package for something called F prime and NASA writes it F, apostrophe and,

13:04 F prime is the flight control software, that the Mars helicopter uses. and if you look at

13:12 the GitHub repo, you'll notice in the installation instructions, that, you have to make sure

13:18 that you have Python three and pip installed, in order to, install F prime, the Mars helicopter

13:26 software. so I just think that that's super, super neat, that, Python's being used as part of the,

13:33 Mars mission and that, open source, to make this F prime, flight software, was used, in order to make this happen. so Brian, you excited about space?

13:36 and, and, Mars rover. Yeah. And also one of the things that happened with this is, so GitHub put a bunch of, achievement awards on it. A whole bunch of people's GitHub accounts to anybody that contributed to a project that was used by F prime.

13:56 and, and it may have been other packages too, but at the very least with this. And so a bunch of us got these, like, you know, you contributed to the Mars helicopter Mars mission thing. So yeah, I felt cool about being an Arctic code vault contributor. And now that's, that's just out of this world, man. It's awesome.

14:25 Yeah. Yeah. Yeah. I love in that post, how they, showed like a screen capture for Marietta, one of the core devs, and showed like her little shield. so I thought that that was awesome. Yeah. Yeah. That's really cool. Yeah. Sam Morley also called that out that she got a badge for contributing to the helicopter.

14:44 Yeah. And, apparently I, I got one for contributing to pie test, which is cool. So I didn't know pie test was used by this, but that's neat.

14:54 No kidding. You have one of these badges.

14:56 Yeah. Let me pull it up.

14:58 Oh my gosh.

14:59 Oh, that is so awesome.

15:00 that is super cool. Yeah. And while you're pulling it up, Zedoc says super amazing, great work by NASA. Crazy that Python is considered stable enough to be used by them. I totally agree.

15:10 Oh, where is it?

15:11 There it is.

15:11 Oh my gosh, you have the badge.

15:13 Dude, I am so jealous.

15:16 It's pretty cool.

15:18 Yeah, that's really cool. So one of the things I was going to, talk about is some extra, extra, extra stuff, but,

15:24 two of those have to do a little bit with like what we're talking about now. So I'll mention them in the moment.

15:28 So, I rem mentions on Twitter that, points out for us.

15:35 there's this quote from Dustin Ingram who runs the IPI along with some other folks and says Python packaging sucks and sort of quotes,

15:42 but now it sucks on multiple planets, which is pretty awesome.

15:45 And then it goes off on this long, like this, he goes for a long thread of like how it's being used,

15:49 what it's being used with.

15:51 And I linked to this in the show notes.

15:52 There's like a ton of stuff you can follow along there.

15:55 And then also, a lot work points to an article over here that talks about this badge that you were referring to,

16:02 Brian, and the various people were getting it and the repositories that qualified for it.

16:07 So Linux F prime CPython, Voto three, Voto core, see what else jumps out at me.

16:12 That's Python, a map plot, lib, numpy, open CV, Python, Python date util requests.

16:20 Yeah.

16:20 So Kenneth writes saying how humble he was to see that S three transfer,

16:24 which I use.

16:25 I mean, the list is like, this is a list on GitHub, but this is actually like a list of many of the big hitters of Python.

16:31 And it talks just about, I mean, it hints at how important Python is for this whole mission is awesome.

16:37 Yeah, that's great.

16:38 Cool.

16:38 Yeah.

16:39 Yeah, absolutely.

16:40 Absolutely.

16:40 Super cool.

16:41 All right.

16:42 I guess real quick before we move on to the next thing, just point out that this episode is brought to you by us.

16:48 So if you want to support us, check out the things that we're doing, like check out the Talk Python Training courses,

16:53 check out Python, Brian's high test book and things like that.

16:57 And, yeah, Anthony Lister gives you a little shout out there.

17:01 Well done, Brian.

17:02 You're basically, you're basically, basically an astronaut.

17:05 You know what I mean?

17:07 well, it's, and it's, I got, I'm almost embarrassed though, because I, I like,

17:12 I contributed one test to a defect report, a defect report, and then wrote the test to,

17:18 to show the, the defect.

17:19 That was my contribution to py test, but yeah.

17:22 All right.

17:23 That's okay.

17:24 It's all good.

17:24 Cool.

17:25 All right.

17:26 Take us back to earth.

17:28 well, let's, so we, there's a lot of cool projects, in Python.

17:34 One of the cool projects is FastAPI, and that's built on pydantic and pydantic is used by itself for lots of stuff.

17:41 And anyway, why am I talking about this?

17:44 Well, one at school, but we've talked about it before, but this topic was,

17:47 we've been following it anyway, but it, I gotta give a shout out to the,

17:51 the person's name that, that mentioned it to us.

17:54 Somebody named angry dwarf said we should cover it.

17:57 And I just love that he had his, his name in his email was angry dwarf.

18:01 So cool.

18:02 Thanks angry dwarf.

18:02 anyway, it's been a bit of an emotional rollercoaster, but the punchline is pydantic FastAPI and typer will work just fine in 310.

18:12 And they'll work in 311 and they'll always work.

18:15 They're going to work forever.

18:16 I mean, I don't know that for sure, but that's my, that's my guess.

18:20 So why am I saying that people should calm down and it's going to be fine?

18:24 Because people were freaking out last week.

18:26 So, people were freaking out that maybe fast, FastAPI and pydantic weren't going to work in 310.

18:32 including the creator of pydantic, not just random people on the internet,

18:37 like involved in the projects.

18:39 Yeah.

18:39 Yeah.

18:39 They were like, this is, this is going to be not good.

18:42 Okay.

18:43 So this starts, okay.

18:45 I'll dump, jump into a little bit of the details.

18:48 there was a, there's a PEP 563 that was titled postponed evaluation of annotations.

18:55 and there was a little bit in there and this, this went into Python 3.7 and this said,

19:02 in Python in, it went into three, seven, but there was a clause in there that said,

19:07 in Python 3.10, the functions and variable annotations will no longer be evaluated at definition time.

19:15 They'll be lazy evaluated later.

19:17 and, or something like that.

19:20 I didn't read it that closely, but that's the bit that, that makes people scared about 3.10 and 3.10 is coming out like really pretty soon.

19:28 So, does that mean that Pidentic and, in FastAPI, they kind of rely on this and they're not,

19:36 are they not going to work in 3.10?

19:37 and it turns out there was some corner cases.

19:40 There was, at least that's my understanding of it.

19:43 Sebastian Ramirez who did FastAPI, he wrote, there's been some incorrect conclusions that FastAPI and Pidentic can't be used with 3.10.

19:55 Let's be clear that up.

19:57 The worst case scenario, which hasn't been decided is that some corner cases would not work and require small refactors.

20:05 So the, and then he goes on to show the refactors.

20:08 So the refactors really are just, there, that if you define your types within a function,

20:16 they can't, you won't be able to do that.

20:18 You got to pull the types out of the function and put it, at a top level or something like that.

20:24 And even if you're stressed about this, you can try it out by saying, in the code you have,

20:29 you can, say from, from Dunder future import annotations, and that will show you what the future implementation is.

20:37 So you can try it out and see if there's any problem.

20:39 But then we got, and I don't have a link to this, but we had a, a notice from,

20:45 who is it from?

20:47 I'm missing the name.

20:48 Anyway, I've noticed just the other day that basically said they're not going to do it for 310.

20:53 So basically they're putting the brakes on 563, the, the, the switch over in 310,

20:59 for 310, they're going to push that to 311 so that they all have time to figure out what to do about it and how to figure it out.

21:07 So they got another year, to figure out what's, or approximately we, as users,

21:13 I have another year to, to not worry about it.

21:15 But, I, but the steering council, they know what they're doing.

21:19 They're aware of this.

21:21 They're aware of this issue.

21:22 they're aware of the, that everybody loves FastAPI and Pydantic and things that are built on that.

21:29 So, there's going to be a solution and I think people should just trust the people involved that things are going to be okay.

21:36 So anyway.

21:38 Yeah, it's, there's a really, what's the right word?

21:45 Energetic, energetic, conversation over on the, Identic issue tracker.

21:51 And it just closed a little bit.

21:54 just a little bit, you know, last six days just recently closed, which is good,

21:58 but it was basically important.

22:01 Pep five, six, three, and six, four, nine in the future of Pydantic.

22:05 And I just had salmon Samuel Colvin, who is the creator and maintainer of Pydantic on talk Python.

22:12 That episode should be out this week, actually.

22:13 But on there, he talked about how some things looked very bad for how things work,

22:19 but then they've, they've talked it through and it looks like some of the changes are not going to be super significant.

22:23 Basically the problem was a lot of the type annotation evaluation is no longer concrete types,

22:29 like a Python type.

22:31 and say, give me your type.

22:32 What are you?

22:33 It was converting those to strings so that they could be evaluated more quickly.

22:37 But then in doing so, if I have a string called customer, that's very different than having the actual customer class that I can then use for type information.

22:46 So then how does Pydantic go back and find the customer class, like throughout all the things,

22:51 what if there's two of them and so on.

22:53 So that was the concern.

22:55 And it sounds like it's, things are looking better.

22:57 So that's all good.

22:57 So Brian, what's kind of the take home message of this?

23:01 Well, one of the things, I don't know.

23:04 My take home message is the people involved, like Samuel and Sebastian and the steering council,

23:11 they're talking with each other.

23:13 They know what's going on.

23:15 And occasionally stress happens as to what's going to, you know, I don't know how to fix this,

23:20 but they, they're, they're talking with it.

23:23 I'm going to try as a, as a bystander, I'm not going to jump on the bandwagon and try to like,

23:29 one of the things that, that came out was people, some people started sending a bunch of emails and jumping on the threads and

23:35 you have to fix this.

23:35 You have to fix this.

23:36 And that doesn't help.

23:38 It just adds noise and adds work to the steering council.

23:41 So making, I think it's fine to make sure that it's addressed, but it's going to be addressed.

23:47 And I don't know.

23:48 I, I actually was one of the people cause I, I use FastAPI.

23:52 I use typer.

23:53 And I was like, do I need to be worried about this?

23:56 And, and especially somebody using it, just take a deep breath and realize that something as large as FastAPI or

24:04 pydantic is somebody's going to figure out how to fix it.

24:07 hopefully.

24:09 I mean, it's possible that something might break.

24:11 I mean, that is the dynamic language.

24:13 I just don't, there's, there's enough people paying attention that, I don't know.

24:17 That's probably a long winded takeaway.

24:19 It's probably, it's like a repeat of what I just said, but anyway, so if you're using FastAPI right now,

24:26 there's not a whole lot to be worried about.

24:28 Nothing to be worried at all.

24:30 and if you are worried about it at all, you can use this, future import thing to try out your code to see what it'll be like in the

24:37 change.

24:38 And even if it, even if that breaks, they'll probably fix it by three 11.

24:42 Yep.

24:43 And then, yeah, Nick Harvey threw out that you can test this from future under future right

24:47 now.

24:47 So that's cool.

24:48 Yep.

24:48 Cool.

24:49 All right, Brian, I tried, I tried to keep it down to just a couple of things,

24:53 but then they started piling up in my extra section to where I don't know,

24:56 we wouldn't be getting through it in a reasonable amount of time.

24:58 So welcome to another section of extra, extra, extra, extra here all about it,

25:04 but minus one extra, because I already told you about the one with the package list and so on.

25:09 All right.

25:10 So let me take you through a couple of things first, here.

25:13 Did you know we're live streaming right now, by the way, on by them bites.

25:17 Dot.

25:18 FM.

25:18 Hello.

25:19 by them bites.

25:20 Dot.

25:21 FM.

25:21 I say that cause there's a huge banner on the site.

25:23 I pulled up.

25:23 We had something, that would let us get some real time analytics and sort of know where people

25:28 coming from, you know, advertisers, some ask sometimes ask for that.

25:31 But what I've noticed is a lot of the new browsers, a lot of the good ones anyway,

25:35 are very much blocking those things.

25:38 Right.

25:39 So for example, Firefox automatically blocks our analytics.

25:42 Anyway, brave automatically blocks our analytics anyway.

25:45 So we're not getting a lot of information back and we're getting, I don't know.

25:49 My theory is about 40% of the traffic is being measured, which gives you some stuff like what countries people are coming from and

25:55 whatnot.

25:55 But I decided, you know what?

25:56 We already have our ads.

25:58 Like in our ads, we do no tracking, no retargeting, no cookie setting and so on.

26:03 So why don't we just do that with our analytics?

26:04 Like we don't, how much do we really need that?

26:06 Anyway, we got downloads and so on.

26:08 So if you go over here and you click on the little shield, we now have a perfect privacy score on Python bytes.

26:14 Oh, very cool.

26:15 Check this out.

26:16 Tracking content, none detected, no social media, no cross site, no fingerprinters,

26:21 no crypto miners, nothing.

26:22 And same by the way, for Talk Python Training and talk Python itself.

26:27 And so on, no known trackers to Firefox were detected on this page.

26:31 Cool.

26:31 Huh?

26:32 Yeah.

26:32 I didn't know about that little badge thing.

26:35 Yeah.

26:35 You get, it's like a security score.

26:37 Like how much is blocked?

26:37 How bad is it?

26:38 And so on.

26:40 But because so many of them are blocking them by default, I'm like, you know,

26:43 like, let's just take this stuff off.

26:44 Right.

26:44 It's somewhat useful, but not that useful.

26:46 Related to that.

26:47 Have you heard of this flock federated learning of cohorts?

26:50 Have either of you heard of this?

26:51 No, no, I'm worried that joke is coming though.

26:55 No, this is, this is just Orwellian business right here.

26:59 Like it, it has this eye looking at you.

27:01 So there's an article on Ars Technica.

27:04 Everybody hates flock.

27:06 Google's tracking plan for Chrome ads.

27:08 The EFF has a beautiful article that you really should read.

27:13 If you at all care about the future of the web, the future of tracking the future of privacy called Google's flock is a

27:19 terrible idea from the EFF.

27:21 And they've got some pretty insane quotes in there.

27:25 For example, one of them from the EFF is Google's pitch to privacy advocates.

27:30 I'll tell you what flock is in just a second, but Google's pitch to privacy advocates is a world with flock.

27:36 Is that the world with flock will be better than a world that we have today

27:39 where data brokers and ad tech giants can track and profile with impunity.

27:44 But that framing is based on a false premise that we have to choose between old

27:49 tracking and new tracking.

27:50 It's not either, or we can reinvent the world where we're not being tracked in every way and

27:56 sliced and diced and, and so on.

27:58 And I totally concur with that statement.

28:01 So yeah, check this thing out.

28:03 This Google's flock is a terrible idea.

28:04 The idea is instead of having third party cookies, which, so if I go to CNN.com,

28:09 you know, we could try that.

28:11 It probably won't show up here because I, I have it blocked at like a higher level.

28:15 So now it's not showing up here.

28:16 How many things get blocked.

28:17 But anyway, if you would go there, very likely they would set a cookie from say,

28:21 double click that you saw this ad, not this ad that you saw this article.

28:25 Then you go over to, I don't know, your dentist or, or your psychologist or whatever.

28:32 And then they also can have this thing.

28:34 So they actually were just reading this article basically, right?

28:37 Like they can, they can profile what type of person you are.

28:39 very, very fine grained through these cookies.

28:41 So flock, you know, basically Google said they're going to get rid of these cookies because as I

28:45 already pointed out, everyone's blocking these third party cookies, Firefox,

28:48 brave VPNs and so on.

28:51 So what do you do to keep the ad retargeting happy?

28:54 And the, like the super analysis of what everyone's doing happy.

28:58 You come up with a new idea.

28:59 The idea is your browser is going to use machine learning to put you into

29:03 these cohorts.

29:03 Like, are you a young female lesbian?

29:07 Are you a divorcee?

29:09 woman in her forties?

29:11 Like what group are you in?

29:12 And then every advertiser that you visit can basically receive like, Oh,

29:16 what, what kind of person?

29:17 Oh, this is a divorcee who's coming.

29:19 Even if they've never been to your site or anything, right?

29:22 They, they, you sort of get your flock advertised to you, your, your group.

29:27 It's not private data, but it's pretty private.

29:30 It's, it's like this group.

29:32 It means a lot.

29:32 Anyway, I thought that this was a pretty big deal on the web and people should check

29:36 it out.

29:36 So I put that out there for, for you all to consider.

29:39 What do you all think?

29:40 Like tracking is a terrible idea and it's mean too.

29:42 I don't have the link to it, but I was reading an article recently about how somebody had,

29:47 I don't know, they, they were expecting a baby.

29:50 So they were looking up all sorts of baby stuff.

29:53 And then they lost the baby with the miscarriage and they still got tracked

29:58 for that.

29:58 And so they get, they get stuff.

30:00 And then somebody, a couple of stores figured out what their address was and figured out when

30:06 the due date probably was.

30:07 And then they get like, they keep getting these things like your child's probably about four now.

30:12 Maybe they need a bike.

30:14 And they're just, that's terrible.

30:16 Yeah.

30:16 So.

30:18 Yeah.

30:18 Yeah.

30:18 But here's, here's part of the thing.

30:20 Like all this is not so good, right?

30:21 Like, I mean, they're both not good, but how do you clear your flock?

30:25 Right?

30:25 Like I can hit command shift, delete and clear my history, my cookies.

30:29 How do you clear out your flock?

30:31 Like you're just, no, you're just a divorcee and it's recomputed every week.

30:34 So like it goes, like you could actually track like the stages of somebody's life,

30:39 the different groups.

30:39 They bet it's, it's super bad news.

30:41 So anyway, I think this, we don't need it at all.

30:43 I mean, we don't, yeah, we don't need it at all.

30:45 People did advertising in magazines and newspapers for a really long time with no

30:50 tracking.

30:51 Yep.

30:51 Yep.

30:52 And as I've already pointed out, so do we not in newspapers, but nonetheless,

30:55 yeah.

30:57 So anyway, people should check this out.

30:59 That's worth pointing out.

31:00 And then also kind of related to that.

31:02 I recently started using Nord VPN and it's not an ad.

31:05 I know they sponsor a lot of podcasts, but it's not that I just started using it.

31:09 It's super cool.

31:10 You can set this up to automatically, like when you log in, just join your VPN.

31:14 Like I go to Seattle right now.

31:16 And it also, it does all that cookie blocking and all those different kinds of things,

31:23 like automatically at the network level.

31:25 So now for example, I, it automatically does that.

31:27 When I turn on my iPhone, it's just always on the VPN.

31:29 And if I fire up an app that doesn't allow ad blocking, that app is already blocking ads because the ads are blocked at the network level.

31:35 So for example, I've used like flipboard or like Apple news, like the ads are blocked.

31:39 Beautiful.

31:40 So anyway, that's worth throwing out there.

31:42 And yeah, that's, that's all my extras, but kind of a privacy intensive one,

31:46 but I thought they'd all kind of go together.

31:48 Well, so I ended up making that a thing.

31:50 And then Alexander, Simonov says, I believe that a human classifier trackers will backfire.

31:57 Yeah.

31:58 I think there's a lot, I agree with you, Alexander.

32:00 And I think there's a lot of negative effects.

32:02 Like for example, you can tag target and disadvantage marginalized groups.

32:07 And Google actually talks about like when they detect that enough marginalized groups have been harmed,

32:12 they'll recompute the flock.

32:14 It's like enough.

32:16 Yes.

32:17 Yeah, exactly.

32:18 It's, it's really Orwellian.

32:20 I'm not, you know, trying to be hyperbolic when I say that like actually is.

32:24 So, people should check that out and just be aware.

32:27 And, yeah.

32:29 Peter, you want to talk about your last item here?

32:31 Jupyter book.

32:32 Yeah.

32:33 I'd love to talk about Jupyter book.

32:35 So there are a lot of static site generators, for Python as well as for other languages.

32:42 So this is like a good party game.

32:44 How many static site generators can you list?

32:47 like Sphinx, Pelican, MK docs.

32:51 Do you have any other ones off the top of your head, Michael?

32:53 Oh, I think probably is ghost one.

32:55 I think ghost might be one.

32:57 like Hugo, all of, all of those.

33:01 but I do a lot of my work in Jupyter notebooks.

33:05 when I'm working with students, a lot of our notes are in Jupyter notebooks.

33:10 And, this, package called Jupyter dash book is a Python package that allows you to take Jupyter notebooks and build static sites out of them.

33:22 and primarily it's designed so that you can, yeah, you can build free online books,

33:30 based on Jupyter notebooks, but also, markdown files.

33:35 so I've got like a little book going.

33:38 You could almost put like a little scientific website that has some like analysis and various things.

33:43 You could kind of put that together as a series of notebooks and publish it,

33:46 right?

33:46 Yeah, yeah.

33:48 and you can even do it with interactivity too.

33:51 So this is part of the executable books project.

33:55 And kind of the idea is that you'll be able to, interact with things like plots if you make them with,

34:02 bouquet or altar.

34:03 and the code output that you see in the Jupyter notebook that actually came from the code that was written in the Jupyter notebook.

34:12 and I think that's pretty neat, like as well.

34:15 and on the, docs, there's like this way that you can automatically deploy your book to GitHub pages for free,

34:25 which I think is really nice.

34:27 And then, there's also a, get hook so that you can, hook into, GitHub and then automatically every time that you push,

34:41 your book gets republished.

34:43 so every time you change that notebook and you push up to GitHub, now your book gets republished with all of your new content.

34:51 and I think that that's really, really neat.

34:54 It allows you to make like revisions and publish, super easily.

34:57 so the, the, that's cool.

34:59 And you could probably, you could probably put it on a specific branch, right?

35:03 So if you like, you make all your changes and then you're like ready to push out the next,

35:07 version of, of the book, you could like push to the main deploy branch or whatever.

35:12 Yeah.

35:13 Yeah.

35:13 I mean, in, your GitHub action, you could set whichever branch you want is the one that kicks off,

35:19 the action that builds, your book.

35:22 one thing I'm kind of interested in is could we make a GitHub action that

35:26 would kick off a build of the PDF of your book.

35:29 And then you could have like a releases, page where it would be like the,

35:34 PDF if people wanted to print it out or, you know, kind of had more of a hard copy of it.

35:39 I think that's pretty cool.

35:41 And like the book gallery, that they have, they've got some awesome titles that they have listed,

35:48 like geographic data science with Python.

35:52 That sounds interesting.

35:53 Quantitative economics with Python, the UW, data visualization curriculums from the university of Washington,

36:01 how to use a lot of Python, plotting tools.

36:05 Oh yeah.

36:05 This looks super like it came out of Jupyter, but it's a, it's a legit website.

36:09 It has a read the docs type of feel.

36:11 Yeah.

36:12 Yeah, definitely.

36:13 And up in the right-hand corner of these, you've got these, buttons that you could,

36:19 like download a PDF or download the notebook.

36:22 You can launch a bender instance so that you could like run, that Jupyter notebook.

36:28 and, you can have a default button that'll automatically take you to GitHub where that,

36:34 notebook is hosted.

36:35 so it's, it's pretty slick, I think.

36:38 Yeah, this is super cool.

36:39 Ryan, it's a book author.

36:40 What do you think?

36:41 Well, it's one of the things that confused me when I was thinking about this is what,

36:46 and it did with Jupyter, Jupyter notebook in the first place is, what does a book mean if it's not a book?

36:52 there's, I mean, this, this, idea of a book is, is it's not a book anymore.

36:58 It's a something else.

36:59 I never, I never really got it.

37:01 Why Jupyter notebooks went to the, the, I don't get the tie in between book and book,

37:06 but maybe somebody can explain it to me.

37:08 Yeah.

37:10 I mean, it's sort of blurring that like release line, that it's officially version one of the book and version two of the

37:17 book.

37:18 If you do it, every single push is a new version.

37:20 then it's sort of like just rolling like CICD book release, which, which I think is kind of neat.

37:27 but in my area, teaching engineering, textbook costs are huge.

37:33 textbooks can cost hundreds of dollars for college students.

37:37 So if there's a way that we can, make a lot of, open education resources books,

37:42 I think that that would be great, for college students.

37:46 I really liked the design of having like the table of contents on the left of the book.

37:51 And then on the right, there's the, the contents of the individual page.

37:55 so you can jump to it.

37:56 That's a really cool idea.

37:58 I actually, I was joking a little bit.

38:00 I really think that would be cool if maybe it already does this, but if there was a way to,

38:04 turn one of these into a, into an ebook, or a PDF, from, from this.

38:13 Where's the Kindle version of this?

38:15 Yeah, exactly.

38:16 Yeah.

38:16 And I mean, I'm not even joking.

38:18 I think a lot of, a lot of these sorts of things would be great to be able to throw onto a

38:23 Kindle to be able to walk around and read.

38:25 So.

38:26 Yeah.

38:27 Yeah.

38:27 You can definitely output PDFs and LaTeX documents, with it, but I don't know about,

38:34 like Kindle ebook, format.

38:37 maybe somebody can like write that in and, give them a contribution.

38:41 That'd be cool.

38:42 Yeah.

38:43 Yeah.

38:43 Yeah, for sure.

38:44 Sam Morley says having free interactive coding textbooks would be a real

38:48 game changer for a lot of people, particularly somebody find, figures out how to make this,

38:52 portable to mobile devices.

38:54 Yeah, for sure.

38:55 All right.

38:56 A couple other comments, also from Sam.

38:59 he says, congrats, Brian, about your, your badge.

39:02 It's nice to know that NASA does test their software.

39:05 I bet they test the heck out of that software.

39:07 Yeah.

39:07 Before you send it up, it's got to get tested maybe to a fault.

39:12 I don't know, but it's got to get really, really tested.

39:15 And then also just, well, I'm in the comments, James Abel.

39:19 Hey, James says, and Michael be presenting at the Python meetup tonight.

39:23 Yeah.

39:23 I didn't necessarily think to cover this cause it's so close to, you know,

39:26 it's like six hours from when I'll be presenting, but, yeah, I will be doing,

39:30 on memory, deep dive, sort of live coding type of thing over there, the Python meetup in San Francisco,

39:36 you know, virtually because that's the world we live in, but yeah.

39:39 Nice.

39:40 very cool.

39:40 Yeah.

39:41 And then John Sheehan says, it's a short hop from LaTeX to EPUB with Pandoc.

39:46 Oh, yeah.

39:47 yeah.

39:48 Yeah.

39:49 You may all be right there, right there.

39:51 All right.

39:52 Well, I did my extra section already, Brian, you got anything else you want to do a quick shout out to?

39:55 Yeah.

39:56 Speaking of virtual, Python, the Pycon ZA, the South African Pycon is coming up.

40:04 shout out to them.

40:05 there, I don't, I don't have a link to them up here, but, it's a conference that's going to be on the 7th and 8th of October.

40:14 it'll be entirely online.

40:16 And, I was just curious cause it sounds like I was curious about the whole virtual

40:21 ness.

40:22 It's a little bit early in the morning, for us, but, they are, so I had a little bit of an exchange,

40:28 email exchange.

40:29 They are going to be able to have, some prerecorded so you can prerecord your talk if you want to.

40:35 So if you're afraid of doing it live in the middle of the night, don't worry about that,

40:40 but they, you can submit anyway.

40:42 And, and they're, they're allowed, but they'd like to have the, the author be live while it's playing so they can answer questions and stuff.

40:50 And that seems fair.

40:50 the second update is last week we covered dead dependency or dead, dead dependency.

40:57 I don't, I don't know how to say that.

40:59 Dead dependencies.

41:00 I don't, I don't know.

41:01 and, so one of the things we said was it's too bad that it doesn't cover,

41:07 it doesn't do pipe project.toml in within a day, it was, it was, supporting it.

41:12 So, the, the, there was an update the next very next day that, it supports,

41:19 both flit and poetry with pipe project.toml.

41:23 and since it's doing pipe project.toml, I'm, I imagine it'd do, set up tools as well.

41:28 if you're doing pipe project.toml set up tools.

41:30 So.

41:31 That's so awesome.

41:32 Well done folks about updating that straight away.

41:34 I mean, isn't it amazing, Brian?

41:36 We'll, we'll talk about random things like this is cool, but, and then like the next day we get,

41:41 so like the dead dependencies folks fixed, you know, added pipe project.toml support.

41:46 I talked about being is it, Oh, it needs a way to have indexes next episode.

41:49 Oh, here.

41:49 They, they heard us and they added indexing features and so on.

41:54 Part of it's the podcast.

41:55 And also part of it is, since I'm doing research for the podcast, I just reach out to people more often and say,

42:02 I'm, I'm, this is a cool project, but it doesn't do this.

42:05 Is there plans to do that?

42:06 And, and you'll, I mean, project owners love to hear back from people.

42:11 And, and, even if I wasn't, I think other people should do that more often.

42:15 Don't just complain about something, ask somebody if it's going to be supported or if you can help out.

42:19 So.

42:19 Yeah, absolutely.

42:21 Peter, anything you want to throw out there?

42:22 And then we'll extra as people tell people how they can find your book or

42:25 something like that.

42:25 Yeah.

42:26 If you search for problem solving with Python, on Amazon, or there's a free open education resources version online too.

42:36 and one little shout out I got is our community college is looking into how to

42:42 integrate artificial intelligence into, to curriculum.

42:45 So if anybody's in the Portland area that does AI stuff, reach out to me.

42:50 and I'd love to talk to you about how we can integrate AI into community

42:54 colleges.

42:55 Oh yeah.

42:55 That'd be really cool.

42:56 Yeah.

42:57 It's a super fun project.

42:58 Awesome.

42:59 It does sound fun.

43:00 You know, ready for a joke.

43:01 This is a team effort here.

43:02 Yeah.

43:03 I'm going to close the other tabs.

43:05 There we go.

43:06 So that's a little large.

43:08 This is again, one of these funny code comments.

43:11 I, I guess I'll go last Brian.

43:13 You want to do, Oh, let's have Peter go do the first one.

43:16 So these are, these are from, comments that were found in real codes supposedly.

43:21 and then they're just kind of funny.

43:24 Peter, you want to do a first comment?

43:25 All right.

43:26 Our first, our first comment is dear future me, please forgive me.

43:31 I can't even begin to express how sorry I am.

43:34 And here we go.

43:38 That's great.

43:39 All right, Brian, this is one that, I don't know.

43:42 It's here to take on the optimist.

43:44 I don't know.

43:44 What would you, I'm not sure how you put this, but it's a exception handling block.

43:47 What do we got?

43:48 okay.

43:49 So yeah, a try block with a catch, sequel exception and a comment.

43:55 That says basically without saying too much, you're screwed royally and totally.

43:59 And then, and then another catch exception, like a raw exception says, if I thought you,

44:07 if you thought you were screwed before, boy, have I got news for you.

44:11 That was my favorite.

44:14 That was so good.

44:15 And I'll just close it out with one of these ones where you just kind of have to

44:20 accept life, I guess.

44:21 And it says, this code is crap.

44:23 This is crap code, but it's 3M.

44:25 And I, I need to get it working.

44:26 Yeah.

44:29 Oh boy.

44:31 Okay.

44:31 I wanted to share one more.

44:33 So, cause I was, I was talking with my coworkers the other day and we were talking,

44:38 somebody met, somebody actually mentioned how, how hard, that we had a problem with cash and validation.

44:44 and it reminded me of that whole joke of, there's only two hard things in computer science,

44:48 cash and validation and naming things.

44:50 and so I went to look it up and then I found this, this other joke.

44:55 there's two hard problems in computer science.

44:59 We only have one joke and it's not funny.

45:02 Oh, that's great.

45:07 I love it.

45:08 I love it.

45:09 All right.

45:09 we'll round it out with, Nick Harvey here says exceptions while handling exceptions are just the best.

45:14 Indeed.

45:15 They are.

45:15 Yes.

45:16 Indeed.

45:16 They are.

45:17 All right.

45:18 Well, Brian, it's great to chat with you and talk by them things as always.

45:22 Good to talk to you.

45:23 Yeah.

45:24 And Peter, thanks for joining us this time.

45:25 Thanks for having me.

45:26 Yeah.

45:27 Great to have you on the show.

45:28 Bye everyone.

Back to show page