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


« Return to show page

Transcript for Episode #222:
Autocomplete with type annotations for AWS and boto3

Recorded on Wednesday, Feb 24, 2021.

00:00 Hello, and welcome to Python bytes where we deliver Python news and headlines directly to your earbuds. This is Episode 222. Recorded February 24 2021. I'm Michael Kennedy. And I'm Brian rocket. And I'm Greg Herrera.

00:14 And welcome, welcome. We have a special guest, thank you Welcome part of the talk Python team. And now part of the Python bytes podcast. It's great to have you here. Happy to be here. Thank you. Yeah, it's great. Also, making us happy is in many users throughout the world is linode. linode, is sponsoring this episode. And you can get $100 credit for your next project at Python by sight FM slash the node, check them out, it really helps support the show. So Greg, you want to tell people really quickly about yourself before we dive into the topics? Yeah, before I joined the team at Python bytes, I had run a data analytics consulting firm where we built data warehouses and did data science type things. It was called business business intelligence at the time. And as I was learning, we we started running into a lot of open source users in particular Python. And so I dove into the Python ecosystem when I sold that company to get up to speed on how things are going to be done in the in the future. It's awesome. One of those Wayne Gretzky moments, right? Yes, exactly. Cool. Well, awesome. It's great to have you here. So I want to jump right into our first topic. We have a lot of things to cover today. So I'll try to not not delay too long. But I've got to tell you, I'm a big fan of AWS s3, big fan of some of the services of AWS in general, right, don't run the main stuff over there. But many of the things many of the services and API's I use that said, I feel like the s3 or the Boto API, the Boto three API rather, is, is one of the worst programming interfaces I've ever used in my life. I mean, it is, is so frustratingly bad. The way you work with it is you go through and you say, I'd like to talk to Amazon. And then you say, I would like to get a service. And instead of creating a class, or a sub module, or something like that, there'll be very natural in Python, what you do is you go to a function, say, give me the service, and you give it a string, like I want, quote, s3, or I want, quote, etc, to or quote some other thing, and you get a generic object back, you have no idea what you got back what you can do to it, you start passing stuff over to it, sometimes it takes keyword arguments, but sometimes you just put dictionaries, which are one of the values of a keyword, there's just all this weirdness around it. So every time I interact with them, like I'm just probably doing this wrong, I have no idea of even what type I'm working with. Because it's like this Bizarro API that, like levels of indirection, it's because it's generated at runtime, or at least dynamically, right? There's not static Python that is it like looks at the service you're asking for. And then like, dynamic up thing, I feel like there's a lot of work over there that could be done to just you know, put a proper wrapper at a minimum on top of those types of things. That said, wouldn't it be nice if your editor knew better than AWS is willing to help you with? So we've got this really cool library that I want to talk about this was sent over by Michael Lerner. And the idea is you can add type annotations as an add on to the Boto library. So then you get full on autocomplete. So let me give you a little example here, for those who are in the live stream. You can see it but those are not, you can just like I'll just describe it. So for example, if I want to talk to s3, like I said, I say Boto three client wote s3, as opposed to quote EC two and what comes back is a base client figure it out, it can do things that can get a waiter in a paginator, and that it has the possibility to see exceptions about it. And that's it. Right? That's all you know, and this is the API you get when you're working with things like pi charm and VS code and my PI and other type annotation, validators right, linters and whatnot, you they get nothing. So if you go and use this Boto library, this Boto type annotations, there's no runtime behavior, it just reads I think they're PII files. I can't remember what the final letter is. But it's like these, like a c++ header file. It just says these things have these these fields but no implementation. They actually come from the photo library. So we just go and import from Boto three type annotations dot s3 import client and we say s3 colon client equals this weird factory thing, boom, all of a sudden, you get all the features of s3, you can say s3 dot and it says Create bucket get object create multi part upload. Hey, guess what? Here's all the parameters that are super hard to find in the documentation. Thank you, Michael, for sending this over. I already rewrote one of my apps to use this. It's glorious. Nice. What do you guys think? So does it did you said you rewrote the app? Does it really change? No, I Well, let me rephrase that. I wanted to make a change in the way one of my apps that was extremely s3 heavy and basically shuffles a bunch of stuff around and like on using s3 and some other stuff and I wanted to change

05:00 But before I change it, I'm like, let me fancy it up with all these types. And then it'll tell me whether I'm doing it right or wrong and whatnot. So now if I have a function, I can say it takes an s3 client, and my PI will say, No, no, no, you gave that an s3, service locator or whatever the heck, there's like, all these different things you can sort of get that will do similar, but not the same stuff. So yeah, anyway, fantastic, fantastic addition, because this really should be coming from Boto three, I just don't feel, you know, maybe it was a little bit harsh on them at the beginning. But the reason I it's like one of these things where you, you write a function, you just say, well take star, star star, kW org, then you don't bother to write the documentation. You're like, well, how in the world am I supposed to know what to do with this? Like, there's, it could so easily helped me? And it's just like, not right. Like, those could be keyword arguments with default values or whatever. So, like, I feel like, you know, a company's large Amazon, they could probably justify writing like typed wrappers around these things that really help people and help my PI and all these other like validation tools. But until then, Boto three type annotations, also, yes.

06:08 Oh, and Nadine also threw out really quick before we move on to next item, Brian, that boater types can literally well not literally say,

06:16 Yes, I agree, Dean. It's like, oh, sorry, die, like, take down that ECG machine. I didn't mean that. I wanted something else. I want to delete the bucket. Sorry. Anyway. Awesome. Interesting, literally. Translate transfers. Yeah, actually, yeah.

06:32 So, uh, yeah, so I want to cover code reviews. Right, you're such a romantic.

06:38 So this was suggested by me Loesch, I think, and written by Michael Lynch. And it's an article called

06:47 How to make your code reviewer fall in love with you, and just oh, my gosh, it's got great content, but the title yuck.

06:55 You're not a romantic.

06:59 Just like my co workers, but you know, anyway, even in the in the article, it says it says even your reviewer will literally fall in love with you, oh, they won't literally fall in love with you, they might figuratively appreciate your code review. But it could be an HR issue.

07:22 Anyway, but I do want to cover there's, there's some really great tips in here, because actually, being nice to your being nice to your reviewers will help you immensely. And one of the things he covers is just value your reviewers time. And there's and I just put it a code review in this morning just to try this out, try some of these techniques. And it only takes like an extra 30 seconds, maybe a minute to do it right. And, and it saves everybody on your team time. So it's worth worth it. So let's count recover a few of these. One of them is a don't just check for mistakes. Imagine that you're reading the code review for the first time. So you need to be the reviewer of your code first. So that's, that's actually really important. And I I encourage that with everybody on my team, because there's times where that just, you know, it just doesn't. There's stuff in there. That's not it doesn't make sense. And why is that? Why is that related to the thing? I guess we will get there. Okay, well, you can also you know, if you're in a rush, what you say can come across feeling unkind, or inconsiderate? And you're like I didn't really mean to be in consider, I just like I've got four of these and I have 20 minutes, I just got to get it, you know, but that's not how it's received, you know, it may be received really differently. So you know, from that perspective, right? Yeah, and even if even if the code review itself only takes somebody a few minutes to review your code change, it's interrupted their their day by a half an hour, at least. So respect that entire time. One of the next suggestions is a write clear change log description. So ready to end. in it. He describes us a little bit. One of the things is, it's not just what you changed, but it's what your change achieves and why you made the change. That's the Why is always way more important than what you did. I can look at the code change, I should be able to look at the code change and now know what you changed. So don't describe that too much in the in the list at the top next narrowly that I want to talk about narrowly scope your changes, so they get skipped down. Here's what I did this week. Yeah, have a look. Yeah.

09:29 Now, it's easy to do that, like I haven't checked in for a while. So here's what I did. Yeah, it actually this is something that I even caught myself doing yesterday, I noticed that a test really kind of needed refactor because I needed to add a test to a test module. And there was there was there was the way the entire test module was arranged. I could rearrange the the fixtures so that it would run like three times faster. If I change the setup in common setup and stuff like that.

10:00 really wanted to do that. But that's not what I really needed to do, what I really needed to do was just add a test. So I added the test and that code review went through this morning. And then today, I'm going to do a cleanup of trying to make things faster. So separating them is important. Also, another thing is separating, functional and non functional changes. So you're like, in this case, you're gonna, you're adding a test to a module you got like,

10:26 you notice that the formatting is just a nightmare. Just write that down on your to do list, either do that merge, first, clean it up, and then merge it, and then add your change, or add your change and then clean it up to them into merge requests, there'll be a lot easier for Google to figure out, break up large change lists, if you've got, if you've been working for a while, maybe you should merge them and a few times, fewer, you know, in pieces, if it's if it's like 1000 lines of code and 80 files, that's too big, it's just way too big. And then there's, there's actually quite a few chunks in there that talk about basically being a nice person. So respond gracious, I'm just gonna pick out one respond graciously to critiques and that's the hardest one for me. If somebody picks apart your code, they're not attacking you. They're talking about the code, and they want to own the code also. So think about those as as, as as the reviewer wanting to make the code theirs as well as yours and try to respond well. And don't get too defensive about it. Because fights in code reviews are not fun. Yeah. And often there's a power differential, right? A senior person is reviewing Junior person's type of work. So that's always Yeah, yeah, for sure. Greg is someone who's relative to say, Brian and me a little bit newer at

11:46 Python. What are your thoughts on this code review stuff? I mean, I, I know you don't necessarily write a lot of code in teams that gets reviewed. But you see this as helpful. stressful? Yeah, yeah. It's, it's important important to do that. If you have the interpersonal part of it, right. Like the both they they trust each other. The, you know, the reviewer in the review, he is going to go a lot more smoothly. It's It's, it's, we're in this together a shared fate. And, and it'll go as opposed to a conflict. It's going to it's going to be much easier. Yeah. For sure. Brian, quick comment from Magnus, I believe a code review should really review the current code, not just the diff line. So the whole code comes out better after review. Yeah, yeah, definitely. It depends on how big it is. Right? Like maybe like that little sub module or, or something. Right? It could be massive. But yeah, yeah. And actually, this is, this is one of the times where I kind of put on the brakes and just say, You're right, we do need to fix that. And then put it on the to do list, but it shouldn't stop emerge just because things are Yeah. Brian, does your team. Do internal prs? Just make changes? No, everything goes through PR. Yeah, I vary, right. Sometimes I do some All right, Greg, you're you're up next on? Yeah. Yeah, thank you. Were thinking of repos, and merges and prs and all that stuff. We thank Hector Munoz for sending this suggestion in it. It started with a response to a blog on tide lift by tightlipped about hate if I'm making a decision on on which library to use. How can I gauge the maturity of that library? So yeah, that's a question I get all the time from people like, Hey, I'm new to Python, I want to know which library I should use, how do I know if the library is a good choice or a bad choice? And so there's a lot of different metrics you might use, but maybe they're hard to find, right? Exactly. So Lawrence Malloy made made this library repo dash available, so that you can you can track the metrics about, you know, get that give a clear indication of the health of the project, you got your open issues over any timeframe, this, this actually captures it, you know, with within the time range that the user specifies. So how many items were open? How many issues are open? How many closed in that timeframe is still open? And it'll give you a much better feel for the level of maturity and activity? Yeah, this is

14:17 like how long issues have been sitting there open, or total number of open issues over time that like, how fast should it being closed versus being opened versus an assigned? Yeah, all those kinds of things are really important. Another one, probably in here somewhere I just haven't seen it yet is the number of hours that are open, like a real red flag to me as I go to a project and there's, you know, significant number of prs that are both open and maybe even not responded to and they've been there for like six months. You're like, okay, whoever's working on this, they've kind of lost the love for it. Yeah, yeah. Yeah. Yeah. tied it together. It's it's a might be the signal of where you need code reviews if you're if you're stuck somewhere. Yeah, that's right. I mean, that's basically what a PR is. is like a

15:00 Waiting on a code review more or less? Yeah, yep. Yeah. Awesome. All right. Well, this is really cool. And I think it'll, it'll help people who create repos or create projects, make sure that their repo is getting in sort of the health of what they're doing. But then also, for people who are new or new to a project, they can quickly look at it and go, red flags or, you know, green flags, which is Yeah, yeah, certainly, if you're doing the things that are making your product, you're you're it's all part of transparency. This is this is where we're the real deal over here. And on this team. Yeah, they even have a little categorization bar chart of the types of issues that are open, like feature request versus good first issue vs. Bugs and so on. That's cool. What do you think? Well, I guess I don't know if you covered this already, but I'm a little lost. Um, is this a service or is it something I add to my repo? I think it's something you run, you point it at a repo and you run it. Okay. That's my understand. I don't total Yeah, I haven't used it. But I believe so. Yeah, yeah. So it's a command at Seelye. Okay, thing you just pointed out, like some some GitHub repo and you say, Tell me how they're doing. What I want to depend on this thing? Yes or no? No, I think that's cool. Like it? Yeah, you know, what else is cool sponsors, sponsors like this going, thank you. Thank you. And linode is very cool, because not only are they sponsoring the show, but they're giving everyone a bunch of credit $100 credit for just using our link. And you know, you want to build something on Kubernetes, you want to build some virtual servers or something like that you go through, you can simplify your infrastructure and put your cloud bills in half full nodes, Linux, virtual machines, develop, deploy, and scale your modern applications faster and easier. And whether you're working on a personal project, or some of those larger workloads, really should be thinking about something affordable and usable, and just focused on the job like linode. So as I said, you'll get $100 free credit. So be sure to use the link in your podcast player, you got data centers around the world, as the same pricing, no matter where you are buying up film where your customers are, and you want to create your stuff there. And that's pay the same price. You also get 20 473 65 human support. Oh my gosh, I'm working on another some something else with someone else? And this would be so appreciated right now. But if it was, Oh, no, they helped me out. But oh my gosh, don't get me on a rant about other things anyway, do you can choose shared or dedicated compute and scale the price with your need and so on and use your $100 credit even on s3 compatible storage? How about that you could, you know, use Boto, Boto three and the type annotations change where it's going to point it over there. So yeah, if it runs alone, or if it runs on Linux, it runs in linode. So use Python bisetta femslash node, like the Create free account button to get started. So Brian, I'm not covering two topics this week, like no, no, no, no, because no, because I have so many, I can't even possibly deal with it. So it's all about extra, extra, extra, extra hear all about it. Okay, the first one may know what a CV is. If it applies to your software, you don't like that. So this sounds more scary than I believe it is. But let me just do a quick little statement here. A reading from nist.gov. Python three up through 391, which was the latest version of Python until five days ago, has a buffer overflow and pi c argh Ripper D types, which may lead to remote code execution. remote code execution sounds bad that sounds like the internet, taking my things in my data and other bad stuff. When you're accepting a floating point number. Oh, wait a minute, a floating point number. Like I might get a JSON API, somebody post some data. And here's my floating point number. But this one hacks my Python web app with remote code execution. That sounds bad, right? Yeah, yeah. Now, it turns out the way it has to be used, like, it's a very narrow thing. It shouldn't send people's like hair on fire running like I, I've got to update the server, right? But you should still probably update this. So what do I do? I've logged into the various servers, Linux servers, a boon to latest version of Ubuntu that I want. And I say, oh, my goodness, heard about this, please? date, you know, do an apt update. there better be update for Python three? Oh, no, no, there's no update for Python three. In fact, it's still running 385 where this was fixed in 388 or something like that. And a weeks gone by and there's still no update for Python on Ubuntu by default. Now, what I can do is I can go to this like place it seems semi official, but not really official called dead snakes and add that as a package manager endpoint for apt but I don't really want to do that either. That sounds like maybe even worse.

19:33 So that sends me down. Item number two of my, my extra extra, extra extra. And that is building Python from source.

19:44 Because I really don't want to be running the old Python in production, even if it is unlikely, you know, unlikely yourself over dead snakes. Okay. I well know what I originally wanted to do. Maybe yes, but originally what I wanted to do was

20:00 Use pi and v is pi and V lets you install all sorts of different versions, right? Yeah, yeah. Well, the only one available that was three, nine was 391, which was the one with a bug still. And then locally, I use homebrew on my machine. And it just updated yesterday, I think it was, but it was a little bit behind, but it that's updated. So yeah, I guess I do. Anyway, so I've found a cool article that walks you through all the building the stuff. And then the thing that makes me willing to try this and trust this, but also related to the next extra extra extra is you can go instead of doing make install, which is the compile stuff takes a while. But then magic Python comes out the other side, you'd say make alt install, and what it'll do is it'll install the version of Python under like a version name. So I can type Python three dot nine, and get Python 392 with no vulnerabilities. But if I just type Python or Python three, it's just the system one, so that one didn't seem too dangerous. Yeah. And then I just create a virtual environment for my stuff that runs on the server, Python 399, dash m, v and v three that and then off it goes. And it's just running this, this one from here. So pretty good. That worked out quite well. So anyway, I've been doing that for a week and the world hasn't crashed or blown up or anything. So apparently, this works good one has Yeah, one heads up, though, is like I have a bunch of machines that are all the same version of Linux, they all seem to have different dependencies and ways of dealing with this. Like one said, Oh, the SSL module is not installed as a system library, like apt install lib, SSL typing another one it had that but it didn't have some other thing, some other aspect that I forgot, but like they all seem to have different stuff. They also got to add in. So that was a little bit wonky in the beginning, but it's all good now. All right, that's extra number two, extra number three, really probably should have preceded that, because to make all that work, I wanted to make sure that I had it just right. And so I wanted to do this on a boon to 2010 2004 LTS, and yet, I cannot run Docker, which is exactly the place where you would do this sort of thing to test it out. I couldn't do Docker on my apple and one Oh, no. Okay. Now doctor says it runs doctor says you can run Apple Docker prototype when you're in one, but I've installed it and all it does is sit there and say starting starting starting starting starting indefinitely, and it will never run. I've uninstalled it. I've done different versions of it. Like it just won't run. People are listening to it. Oh, what you got to do is you probably installed parallels or this other thing and it caused this problem. And he could fix it this way. Like no problem isn't there because I didn't install any of the things I can't change. So long story short, I go ahead. No, I was just laughing. Yeah. And so what I ended up doing is I saw a really cool trick, right? Not trick technique. I put this in the show notes. You can just say, basically two lines on the command line prompt or to Docker to say, you know what, if you want to just do Docker stuff, don't do it here, do it over there. And so I have my Intel MacBook Pro that is running a boon to in a virtual machine. So I just turned that on and I just said Docker context, create that thing over there. And then Docker context us and after that every Docker command without thinking about it, remember, it just automatically runs over on that machine. I know it's working. Because my Mac one, my Mac in one Mini is super quiet. You'd never hear it or anything. But when I work with Docker, I can hear the thing grinding away over in the corner so that I know it's working. Alright, and really quick. I know I'm running low on time. The last one is people have heard me when john about depended upon and how it's such a pain. And I'm sure they're thinking like, oh, Michael, why are you winching about this? Why are you like just complaining? You know, it can't be that bad. Yeah. So look, what is on the screen here depended on merge conflict with itself, like so. These are the things I have to do on Monday morning, I have to login and it says there's a merge conflict, dependable output, cryptography equal equal 346. When it had unchanged for months, cryptography equal equal three dot four dot three. It's like, though it's one line. It's it's conflicting with itself like, this is crazy this. So anyway, this is not a big deal. But people are like, why does Michael keep complaining about dependent button merges? Like, because I have to go like the one line it changes merges with itself like this is not productive. All right. Oh, no, we're not looking at that one yet. That's for later. All right. I guess that's it. Oh, final shout out though. Put this in the link in the show notes. Anthony shot along with one of his co workers whose name I'm sorry, I forgot built a GitHub bot that will automatically merge all those things for you for specifically for dependent bot. So I'll cover that more later when he writes it up. But he did it like little shout out about it. Twitter. So we'll link to that since it's related. Yeah, that was a lot of extra. Yeah, I got a shirt one. It's an extra tool also. So it's also about Docker. So yeah, this is quite related. Nice. Follow on. So Josh peak suggested and I'm not sure what he was listening to, but he did or just wondering if we'd heard about it. That if one of the things people talk about with testing is whether or not they should mock or stub act activities to the database. And even if, and then I you know, I've talked with a lot of people about that. And even if you've got a database that that has in memory setups, so you

20:00 You can configure it to be in memory during your testing and stuff. It's still a different configuration. So one of the suggestions that we've gotten from a lot of a lot of people is stick your database in a Docker container, and then test it. So and then Josh Peake suggested this library called test containers dash Python. And this is like, I mean, this thing really is, you've got you just install this thing. And you can so it covers what Selenium grid containers, standalone containers, MySQL database containers, MySQL, Maria, db, Neo, 4g, Oracle, db, Postgres, my Microsoft SQL Server, even Wow. And then just normal Docker containers. Yeah. And also, how even does MongoDB even though it's not listed, I saw some of the examples that had Mongo as well. Oh, that's great. I was, I was curious about that. So after you install this thing, you can just it provides context managers, it probably has other stuff, too. I didn't read all of it. But this is just really not that much code to create a Docker container that you can throw your connect and fill your dummy data in or whatever. I love it. It's like, I want to, I want to use Docker to help test stuff in isolation, but I don't want to know about Docker or be able to use Docker or care about Docker. Right? Right. So what are the no Python, what it gives you is it gives you a sequel alchemy friendly URL, that you can just

20:00 just connect to connect my sequel alchemy or whatever. But you just get this URL out. So if you have if you're configuring your where your databases through URL, that you can throw that in whatever configuration environmental variable or whatever, and test as you run with that, and that's, that's so cool. Yeah, just with MySQL container, give it some connection string you want or some, like host address or whatever, as MySQL and then you just off you go, right, just the Docker thing exists while the context is open. Yeah, they didn't specifically see any documentation in here talking about pi tests. But if anybody's curious, I'm sure it'll work with that. Because even if you have to write your own fixture, you can you can return the context manager items in a fixture. So that'll work. Yeah, yeah, super cool. You know, I was that's exactly what I was thinking when you're talking about is a PI test fixture that maybe loads it and then builds up with test data and then hands it off to the test or something like that. Yeah, yeah. Greg, what do you think I like it asked me right. Hey, I got a quick quick follow up from the last one Magnus on the live stream asks will use in pedantic mitigate the floating point overflow bug, using Titanic definitely makes exchanging JSON data really nice and does some validation, but I suspect it probably doesn't. That said, you know, people really wish I could find this conversation, there was a conversation with Dustin Ingram. And I think Brett cannon talking about this and how it's really not that severe, because I believe you got to take the input and directly hand it off at the C layer and Python like passing it to float parenthese in Python, I don't think is enough to trigger it, you've got to like go down into something like NumPy, or something super low level, though, it's not as dangerous. But you know, there's a lot of things that you see later, so who knows what's going on down there. So that's why I build it from source for the moment. Anyway, I should also throw out there really quick. I was also just frustrated that the latest version I can get is three, eight, which is over a year old. And I was like, why am I on a year old version of Python when I could just take an hour and be on the new version of Python. There's more to it than just the bug. All right. I guess Greg will throw it back to you for this last one. Don't have a great Yeah, yeah, thank you. The context on this was I had been in in data science in pretty much the proprietary world. So proprietary software using SQL Server and Tableau and Cognos and those different tools. We started noticing were Bay Area based company, we started noticing that customers were leaving that proprietary world and going to Python. And that's that actually is one of the things that led me to, to myself to start going in and understanding the industry. And in just in the time that I've been with talk Python, which is just shy of short of a year now. I'm seeing a relentless march towards more and more adoption in the Python ecosystem for businesses that had traditionally always relied on proprietary software. And, and it's it's reaching top of mind to a level that I didn't expect that it was going to happen so fast. You know, you followed the Geoffrey Moore the adoption, you know, the early adopters and then hitting Main Street. This one is moving really fast. We're seeing like some of the largest corporations in the world moving looking at by Python as a means of looking at moving away from Excel even and, oh, yeah, it's it's just it's reaching top of mind because more and more decision makers are hearing from their technology teams that they can deliver the solutions at unpressed

20:00 So then it price performance. And that's how you were talking this realm like we should talk Gartner. Right? So there was a Gartner study about why companies are moving to open source, it was really interesting because a lot of people say, Well, you got to move to open source because it doesn't cost money. So it helps the bottom line. And so many of the companies that were interviewed by Gartner were like, it has nothing to do with price. I mean, yeah, price, it, that's a benefit we'll take not paying less, that's fine. Yeah, this is about higher quality, higher visibility, and so on. And I think that's a real interesting parent advantage in the community. Right. And in the, in the case of, of Excel, you're hitting up against limitations in Excel, you know, the size limitations, most notably, and now you're able to handle it with it happens to be open source the solution, but you really with the pain was the limitations, and not be able to do without it. There's gonna also be maintenance too, because we, I mean, sometimes ever hear Perl referred to as a write only language, but

20:00 it's got some regular expressions. Yeah, it's got nothing over trying to edit somebody else's spreadsheet full of macros, right? Oh, yeah. Yeah. Put some VBA in there. It's the kiss of death for sure. Yeah, that's like, those are like goto statements. It's insane. Yeah. And so what we're seeing is, you know, even though it feels like there's heavy adoption, it's still relatively small inroad compared to what we're gonna see in the future. It's like us, water rapidly, collecting behind a weak dam. And we've seen that happen in the industry before. I think that's a really great thing to highlight. Greg, I talked with Mahmoud Hashemi, who at the time was at PayPal, about Python, soft Python for enterprise software development, as I think this is the fourth episode of talk. Python was certainly right at the beginning in 2015. Remember that one? Yeah. Thanks. And it was like a big question like, Well, does it make sense? should people be using Python for these companies stuff? Does that make it like now? It just seems, yeah, it was just like, so obvious. There's one thing I was actually gonna cover this, and I'll cover it again, in more depth, because I had so many extras already. So I made room. But one of the interesting things that Google came on to sponsor the PSF at they say, they probably don't say this is like a friendly one. But there was another article, this is just the sort of press release from the PSF. But they came on and they're they're now sponsoring the PSF as a visionary sponsor, which I think is over 300,000 in terms of how much there's they're also sponsoring a core developer, particularly for things around like security and pi pi, and whatnot. So a lot of interesting stuff. I'll come back to that later. But, uh, and another show. Yeah. Seems worth giving a little shout out about that. And then quick comment, Greg, from Mexico. I read article about the re the reinsurance industry also moving from Excel to Python. Yeah, I can imagine. Awesome. Thank you, Magnus. Yeah. All right. I guess that's it for items. Hi, Brian. How about some extras? Well, I know that you've been using, you've been using Firefox for a while, right. I did notice over on your stream that looks a little Firefox over there. What happened, man? Yeah, so the thing that convinced me is this announcement, they they just released Firefox 86. And it's got this enhanced cookie protection. And I don't understand the gist of it. But mostly it's, it seems like they just said, you know, whatever site you're on, they can you because you know sometimes I've heard people say I turn off cookies, well, like, sites don't work without some of them just don't, yeah, you want to log in? Well, you're gonna need a cookie. Yeah, so um, or just saving stuff I don't, there's times where I just don't, there's nothing private there. I don't want to log in every time. But I don't want you to share it with other people either. So this, this, this enhancement is just keep the site's cookies to themselves. So they have like a cookie jar or a storage area for cookies, that's individual to each site. And you can save as many as you want for your site. And then the other site gets the other one. And there's the the the obviously you were saying login stuff I used, you know, different login providers, there is an exception for that. So you can you can use login providers, and it allows that but these are, these are non tracking cookie uses. So yeah, I'm super excited about this as well. Basically, if you were to go to cnn.com, and then you're good to go, I'm not sure about this, right, but likely, then you were to go to the verge. And then you're going to go to chewy.com and buy something for your pet. Like very likely they're using some ad network that's put a cookie that knows you did that sequence of events and oh, by the way, you're logged in as so and so over on that one. So and all the other sites we now know that so and so is really interested in chew toys for a medium sized dog, but a puppy, not a not a fulcrum. Right You know, and that's it gets to the point where people think, Oh, well, all these things are listening to us on our phone, but they just like track us so insanely deeply. And so the idea is yellow, that third party thing, let it set a cookie but when they get to chewy.com from cnn.com

20:00 They asked for the cookies. They're like, yeah, sure you can have your third party cookie. But it's a completely unrelated brand new one as if you like, deleted your history and start over, which is beautiful. I'm super excited about this as well. Yeah. And Robert Robinson says that cnn better not try to sell him.

20:00 I'm with you in

20:00 doggy toys from the doggy toy site. news from the new site. Sometimes they're hard to tell apart, but you never know. stay in your lane. stay in your lane. All right. Yeah. So that was the one thing you wanted to cover, right? Yeah, yeah, I did my extra extra, extra extra. So I've already covered that. So I feel like Greg, anything you wanna throw out there before we move on to a joke? No. Can't get in the way of a joke. No, I know. This is good. So sometimes we we find an interesting joke or a funny thing out there. And sometimes we strike gold, right? Like Brian pi jokes. I mean, Pip x install pi joke. Come on. Like Seelye is now full of dad developer jokes. Well, I kind of feel like I got one of those here as well. So there's this place called article called 56. Funny code comments that people actually wrote. Nice. I don't know what the 56. But I feel like we may revisit that. So I want to go through four here. Okay. I linked to the real article in there, but I pulled them out separately. So I'm showing on the screen here. Like I'll read the first one. If we can take turns read there's only four or five here. But the first one is is a big like header at the top of a function. In a comment it says dear maintainer once you're done trying to optimize this routine, and you realize what a terrible mistake that was please increment the following counters a warning to the next.

20:00 total hours wasted here equals 70.

20:00 Is that awesome? Or what?

20:00 Yeah, that's beautiful, isn't it? Yeah, I've had I've had code that wherever like the next, like one out of five developer that gets to it says, Oh, I think we can make this cleaner. And they don't know. They just make it stop working. Then they have to fix it and then goes back. Legos are binding when do the next one? Sure. Sometimes I believe compiler ignores all my comments. That's a comment.

20:00 Sometimes I believe the compiler ignores all your comments like probably all the time.

20:00 Oh, this next one's my favorite. Yeah. All right. That was great. drunk, drunk fix later.

20:00 Totally see that one?

20:00 honesty.

20:00 Also, this one is nice. Probably. This came from Stack Overflow and a partial level of understanding. The common is magic. Do not touch. Yeah, definitely. Yeah. Brian, you want to round us out with this last one? cuz sometimes the best part about comments is if they're accurate or not, is the wrong? Yeah. I've heard people refer to comments as future lies. And this one is, there's a routine called it's a Boolean, returns a Boolean, it's called is available, or it returns false. Just a single statement, return false with a comment that says always returns true.

20:00 I love it. I'm telling you. There's gonna be a lot of good jokes coming from this, this article here. So yeah, pretty good. All right. Well, thank you, Brian. As always, Greg, thank you for being here. Thank you for having me. Yeah, it's definitely great. And thanks, everyone, for listening. I'll see you all later.

Back to show page