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


Transcript #298: "Unstoppable" Python

Return to episode page view on github
Recorded on Tuesday, Aug 23, 2022.

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

00:05 This is episode 298, just too short of 300 coming in fast, recorded August 23rd, 2022. I'm Michael Kennedy. And I'm Brian Okken. Wow, close to 300. That's amazing. Yeah. Yeah, that's, that's what is that coming up on six years here pretty soon? That's insane. That's amazing. Well, 52 times.

00:26 Yeah, I don't know.

00:28 Pretty awesome.

00:30 Got some fun folks we see in the audience who are out here frequently.

00:34 Will McGugan is here. Will is going to be a guest on the next episode. So if you want to hear from Will, be sure to at least listen to the next episode if you don't come to the live one.

00:42 Yeah, that would be fantastic.

00:44 Also, before we get going on the topics, I just want to say thank you to Microsoft for Startups Founders Hub for sponsoring this and so so many of the episodes this year.

00:54 Super great to have their support.

00:56 - Very cool.

00:57 - It's uncommon, Brian, to have such great supporters, wouldn't you say?

01:01 - It is uncommon.

01:02 Nice segue, I like it.

01:05 So I'd like to talk about uncommon uses of Python in commonly used libraries.

01:10 Actually, this is just a pretty cool article.

01:12 It's by Eugene Yan, and he goes through a handful of things.

01:17 I'm just gonna pull out one, but it goes through using super classes and a whole bunch of things.

01:21 The idea was to learn how to build more maintainable and usable Python libraries.

01:26 He's been reading some of the most widely used Python packages and learning some things along the way, which is an awesome way to learn is to read other code.

01:35 >> I agree.

01:36 I think it's fantastic.

01:37 >> Yeah.

01:38 So he goes through super and a handful of other things.

01:42 When to use a mixin.

01:43 I don't know if I'd use that.

01:45 Anyway, the thing I want to pull out is using relative imports all the time.

01:50 This is something I picked up not too long ago, but it really isn't talked about much.

01:56 The idea is that if you do an import, like import something or from some library import, if you put a dot in front of it at the beginning, is the first dot, then it looks in your path, your current search, the directory of the file that it's in.

02:17 In the example, he has a base.py from scikit-learn, and it says from.utils.validation import something.

02:29 These are, because it says.utils, it'll look for utils in the current directory and not somewhere else, because there's probably a utils somewhere else also looking for the search path.

02:42 This is neat. You can do multiple dots also.

02:46 I don't ever, I don't think I ever do that.

02:48 I do the current directory and down or the current project and down.

02:51 So this is--

02:53 - But dot dot will get you up one and then down a different path or something like that, right?

02:57 - It will.

02:58 So if you do dot dot something and you don't do slashes, you don't, it's not a direct, a path.

03:03 It's kind of like a path, but it's not.

03:05 Like dot is the current directory, dot dot is like one up and you can do three, but wow.

03:11 I think there's something wrong with your project if you're doing that.

03:14 But maybe not, maybe not.

03:17 There's a couple of links in there for further reading.

03:19 There's a Guido's decision on relative imports, which is part of the PEP 328 write-up.

03:27 And actually this PEP 328 write-up is this little bit about Guido's decision where he's talked about the leading dot or leading two dots.

03:36 There's a really good, easy way to get a handle on how to use this.

03:39 And I use this a lot now and try to put it in projects projects at work and personal projects as well.

03:47 The dot thing is cool and yeah, it doesn't talk about much, so I like it.

03:51 >> Yeah, it's fantastic. It only works in packages and not just a pile of module files, right?

03:58 >> Oh, yeah. You have to have Dunder and Net files within the directory.

04:03 That's, I guess, one of the things that I wish we had another name for because in Python, we talk about a package or a sub-package.

04:10 This could be just a directory with Python files in it, that has dunder init and that makes it a package in Python.

04:19 - Some definition, yeah.

04:22 - Yeah, we also talk about the package repository in PyPI.

04:26 It's the Python package index.

04:28 Those are not just directories with dunder inits.

04:31 They're packaged up with a whole bunch of other metadata and stuff like that.

04:34 So there's two things that we call packages, but yeah, they have to have dunder inits in them for this to work.

04:39 So anyway.

04:40 - Yeah, Brandon in the audience asked, So are we arguing for relative imports?

04:47 For the current directory, I am.

04:48 I think that within a project, if you're-- like internal stuff.

04:53 I mean, if it's part of the external API of the project, I will always go through the external API to get at something.

05:02 But there's a whole-- there's a lot of times where you're just developing a bunch of Python the modules together and they're internally, they're going to talk to other sub-components and that isn't necessarily part of the external API and this is the best way to get at it.

05:17 >> Yeah. All right. Sounds good.

05:19 Next up, let's go to the Skyplane.

05:22 This one comes to us from, let me make sure I give the proper credit.

05:28 This one comes to us from RMRF, the SUDUR.

05:33 Thank you for sending this in. Really appreciate it.

05:35 The project is called Skyplane, 114 times faster cloud transfers.

05:40 At first I was like, what does that mean exactly?

05:43 Like, what's the baseline for this?

05:45 I'll say so probably what they're basing that on in a minute.

05:49 This is interesting for two reasons.

05:51 It's interesting because it's a tool that I think many Python developers would find useful, especially those folks doing a lot of work in the cloud.

06:00 It is also useful or interesting because it is itself a Python project.

06:06 Okay.

06:07 So if you want to contribute to it or understand it or extend it or work it and do other things, that's totally possible.

06:14 It's worked on by a pretty big group of folks.

06:16 The idea is it gives you blazing fast bulk transfers, file transfers between any cloud.

06:23 Any, it needs a little like star or an asterisk by it that says any means any of the big three.

06:29 Cloud providers, okay.

06:31 Whereas, you know, this is like AWS, it's Azure, and it's Google GCP.

06:38 So those three.

06:40 However, what I'm not clear on is whether you can point it at the S3 compatible places.

06:47 Like Linode and DigitalOcean also have cloud storage that are S3-like, but I'm pretty sure it won't work based on the way I'm about to tell you what's going to happen next, okay?

06:57 So if you go over there's an architecture section and if you look in there they've got this sky retreat 2022 where Paris Jane introduces skyplane and the folks there is about a 15 minute video but you really gotta watch just two minutes of it to get the Zen.

07:13 So they laid out a scenario this is I believe in their world they're doing data science and so what they need is they need the data very near to them and there's a woman in the middle east.

07:25 using some AWS S3 and point there.

07:29 And she has 80 gigs of data.

07:31 And Paras is on the East Coast of the US and wants closer access to that data for their other work that they're doing.

07:38 So there's a way with the AWS CLI to just copy from Bahrain or wherever it is over to Virginia.

07:46 And they run that and it says, after running for a while, it says, estimated time to completion, one hour.

07:52 Is that good or bad?

07:54 It's a lot of data, right?

07:55 Eight gigs.

07:56 Halfway around the world, it's miraculous that this is possible.

07:59 But is that good or not?

08:01 So then they say, well, let's try it with Skyplane.

08:03 They were getting like 20 megabit, I think.

08:05 They run it with Skyplane.

08:06 They're getting 30 gigabit transfers from the Middle East.

08:11 And it took 30 seconds instead of an hour.

08:13 That's quite a bit faster.

08:15 No arguing with that.

08:16 That is pretty awesome.

08:17 Exactly.

08:18 And so instead of going across the open internet, It was transferring basically over like dedicated fiber for just AWS data center connects or something like that, right?

08:28 But what it does is it will spin up a virtual machine or many virtual machines in the different data centers.

08:36 So I think what happened here, not 100% sure, but I think it fired up some VMs in Virginia, copied it from S3 in Bahrain directly through the internal data center transfer and then pushed it into nearly local S3 storage.

08:54 And you can do the same thing from AWS East Coast to Azure West Coast, right?

08:59 You would fire up a VM, I think, in that scenario, in both of the data centers, and those VMs would talk directly over the high-speed data center network.

09:07 Instead of the S3 one, we'll copy it down to your machine, and then you push it back out of your machine to the new destination.

09:13 - Yeah.

09:13 - So it basically manages data center to data center traffic.

09:17 - That's pretty cool.

09:18 Makes sense. - It's pretty cool.

09:19 - Yeah, yeah, yeah, and it's like all the CLI, it's like one CLI command, and that's creating the various virtual machines, provisioning them, setting up the encryption, doing all the stuff, and then it shuts back down.

09:31 So, and as far as security goes, what you do is you basically install the AWS CLI or the Azure CLI, and you just log in to those local CLIs, and it uses those behind the scenes to do the setup of like create the VM, and then SSH over to it, the work or something like that. So it has a lot of integrity checking. So it does like checksums and verifies the files are there. The file sizes are the same and all that kind of stuff. It does end to end encryption sort of. So the VM as it gets it out of cloud storage encrypts it and then sends it over the network. And then when it has to decrypt it to drop it back into the other place, but it also on top of that goes over TLS. However, some Some people might be storing encrypted data in the cloud because they don't trust that it is not going to get looked at.

10:20 So even the stuff in S3 or wherever Azure Blob Storage could be encrypted, in which case you can turn all this off and it'll go a lot faster because it's already encrypted end to end.

10:30 It'll set up like virtual private networks if it's within a data center.

10:34 And there's a bunch of cool things that are kind of nice that you don't have to worry about.

10:38 Anyway, this is the sky plane.

10:40 So if you're transferring data between different clouds or even different data centers within a single cloud, it looks like it'll do a lot of nice work for you.

10:48 Now it's believable it is faster.

10:51 I'm curious if it's cheaper also.

10:53 Any comment?

10:54 Oh, that's a really good point.

10:56 Actually, if you go and say AWS to Azure or vice versa, I think it's the same price.

11:02 But if you're going Azure to Azure, it probably is cheaper because I don't know if they really charge you for the S3 CLI if you say do a transfer, you're still like flowing through.

11:11 But you know, the within data center transfer is cheaper than outside it out of the yeah, exactly.

11:18 Cool.

11:19 So maybe I don't know.

11:20 They didn't talk about it, but possibly.

11:22 Yeah.

11:23 Well, that's awesome.

11:24 That's what I got for you.

11:25 Yeah.

11:26 Skyplane.

11:27 You know what else is awesome?

11:28 Speaking of Azure.

11:29 Microsoft for startups.

11:30 Yeah.

11:31 Yeah, absolutely.

11:32 They are, like I said, big supporters of the show, big fans of the show.

11:36 And this episode, like many of them, is brought to you by Microsoft for Startups Founders Hub.

11:40 If you have a startup and you intend to have some kind of cloud computing resources or you've dreamed of going to something like a Y Combinator type of accelerator, this is a really great way to get some of the benefits of that.

11:55 So with Microsoft for Startups Founders Hub, they give you a bunch of resources for running your startup in the cloud, in Azure, but also many other cloud resources, like a bunch of GitHub credits for automation and actions, as well as access to places like OpenAI.

12:14 But another thing I think is really important is having access to mentors and people who have been there and have the right connections, right?

12:22 Like, I think honestly, that might be the hardest thing about doing a startup, because as developers, we can build it, often we can build it, But then it's, well, how do you build the right thing?

12:32 How do you, in terms of customer fit, how do you get access to the right networks so that you can find people for investing or get better maybe coaching for like sales and marketing?

12:45 All those things are incredibly hard, especially if your expertise is in software.

12:49 So through Microsoft for Startup Founders Hub, you get access to their entire mentorship network, access a pool of hundreds of mentors across a bunch of disciplines like idea validation, fundraising, management, coaching, sales, and marketing, and a bunch of technical areas as well.

13:04 So you'll be able to book a one-on-one meetings with these mentors, many of whom are founders themselves.

13:10 You'll make your idea a reality today with the critical support you'll get from Microsoft for Startups Founders Hub.

13:15 To join the program, there are very few restrictions.

13:18 You don't have to be third-party validated.

13:20 You don't have to necessarily have funding.

13:22 You just visit pythonbytes.fm/foundershub2022, link's in your show notes.

13:27 You apply for free, you get accepted, you get all these benefits, and it seems like a great program.

13:32 >> Yeah, I'm excited to see what comes out of this.

13:34 >> Yeah, absolutely.

13:36 All right, what do you got for us here, Brian?

13:39 >> Well, it wouldn't be complete if we didn't talk about Will McGugan a little bit.

13:47 [LAUGH]

13:48 >> Yeah, absolutely, hey Will.

13:50 >> So there's an article that is from the textualize.io blog.

13:56 And it's seven things I learned about building a modern TUI framework.

14:01 And this is pretty interesting because I think that, I mean, Will, more than anybody else, has really thought about, like, okay, I want to have something to be really responsive and really good to work with on the command line, which is, it's been there for a long time, we just haven't developed it much.

14:18 So there's a whole bunch of cool learnings that he talks about, like terminals are fast, and they're faster than we realize.

14:24 But there's a whole bunch of like things that you can that are different about terminals and other places like Flickr and tearing and stuff and how to deal with that.

14:34 There's a whole bunch of learnings in here.

14:36 The thing that like popped out is something that everybody can use that I wanted to talk about was a little blip that he talked about that is dict views are amazing.

14:46 So the thing he talks about here is that, so maybe I don't know if everybody knows the term dict views or views into a dictionary, but things like if you have a dictionary and you ask for the keys, or you ask for items, that is a view, it's called a view into a dictionary, and they are super fast.

15:08 One of the things he points out is that they act like sets also, and you can use set operators.

15:17 Like here's the little carrot symbol, and I can't remember, I'll have to look it up.

15:21 The carrot symbol is a symmetric difference.

15:24 Basically, what's just, give me a set of the stuff that's different about the two different sets, or two dictionaries.

15:31 And you can do this in code, but he's doing it using views because those operators are happening with C code.

15:41 Python has optimized those, So they work super fast and they're way faster than anything you could write in Python.

15:49 So this just taking the items of two dictionaries and using set operations on them, and then you can go back to dictionaries if you want.

15:58 You don't have to use that, but super cool.

16:00 I didn't know that about dictionaries and views.

16:04 So nice.

16:05 >> Obviously, use.items and.keys all the time.

16:09 Didn't know they had this name, and I didn't know you could do set operations on them.

16:14 Quite cool.

16:15 >> Right. Yeah, super neat.

16:17 Then he covers a whole bunch of other stuff like LRU caching and how fast that is.

16:23 One of the things that I thought was great, where he talks about Unicode in art.

16:28 Unicode art in docstrings of just like a picture, it says a picture gives you a thousand words or whatever.

16:36 But he gives an example here for talking about splitting the screen into sub regions.

16:43 And yeah, there's no way to, I mean, describing it in text is good, but this little picture goes, you can just mentally go, "Oh yeah, I get it." If you give it a cut X and a cut Y, you end up with four regions, obviously.

16:55 But it isn't obvious just looking at the API, but with a little picture, you're like, "Oh yeah, that's cool." So he's got a little, for people listening, he's got a picture showing just spatially what it would look like using ASCII characters.

17:10 >> Neat.

17:11 >> Yeah, I love it. I love when people put art like that in there.

17:15 I'm looking for where it is.

17:17 I guess I'm going to have to look this up.

17:19 But in CPython, there's actually this huge diagram in the malloc, in the memory management section.

17:28 >> Oh, really?

17:29 >> It's like this. It shows you all the different data structures and concepts that are used to manage memory like the pools, the blocks and the arenas and all that stuff in a huge diagram in Code Comets.

17:43 It's perfect.

17:43 >> Nice. He gives a shout out to just one tool that's around.

17:49 He must use it, called Monodraw.

17:51 It's a Mac tool.

17:52 There are drawing tools that you can use to generate ASCII art or Unicode art as it were.

17:58 >> Yeah.

17:59 >> Yeah.

17:59 >> Nice.

18:00 >> Maybe I'll be able to find it here.

18:02 Let's see. I'd love to share it with everyone if I can find it.

18:06 >> Oh, yes. Here we go.

18:07 I'll put the link in here.

18:09 You're ready for this, Brian?

18:10 >> Yeah. You can show it.

18:11 >> Yeah. I had to find it.

18:13 Hold on. There we go. Look at this.

18:14 >> Oh, yeah.

18:15 >> Here's the object allocator in Python.

18:18 It shows here's the object specific ones, the int dick, and then there's object specific, and then you can see these tiers.

18:24 Then there's the Python object allocator, the raw memory, and even goes down to, here's the OS and the physical memory.

18:30 Then I think maybe further down, we might be able to find some of the stuff about arenas or whatever. But isn't that nuts?

18:36 >> Yeah, but also it's awesome because you can visually, now you can read the text and it makes more sense instead of just having-

18:42 >> Yeah, it has a short description and then a proper picture of, here's what's happening. Yeah, absolutely.

18:48 >> Very good.

18:49 >> Cool. Yeah, that's a great example and great recommendation.

18:52 Sometimes a little bit of ASCII art like this, it really does help.

18:57 >> It goes a long ways. Yeah.

18:58 >> Yeah, it sure does.

18:59 >> Whole bunch of other great tips in Will's article, so I encourage people to check it out.

19:04 Right on. Another thing that goes a long way is Python.

19:07 There's an InfoWorld article that refers to Python as unstoppable.

19:13 The title is Python popularity is still soaring, but the subtitle is Unstoppable Python, once again, ranked number one in the August updates for both the TOB and PYPL indexes.

19:24 I don't know if that's PIPL or I don't know how to say this, but another secondary programming language index.

19:31 Yeah. How cool is that?

19:33 Very cool. Also a really nice rocket image.

19:35 I was going to say this is, it characterizes the other programming languages, hot air balloons, and Python as a rocket.

19:42 Yeah.

19:43 So yeah, some interesting things to take away from here.

19:48 Let's see, that Python first took the top spot just last October.

19:54 So that was actually big news, right?

19:56 Yeah.

19:56 Now, that makes it the only language besides C and Java to ever hold the number one position from the TOV index.

20:04 And not only is it still number one, but it's actually gained a couple of percentage points on the current rankings year over year.

20:10 So for example, come down here, you can see it's actually up 3.56%.

20:16 I think that's year over, yeah, that's year over year.

20:19 - Nice.

20:20 - Which is pretty awesome.

20:21 Also, even though C-- - But C and Java have gained also.

20:24 So other, I guess we're whittling down, taking away from some languages.

20:28 I think it's taking from the lower languages down here, right?

20:31 Like objective C or here we go.

20:33 What a surprise you that Pearl and Fortran have lost.

20:36 by the way, also that it has the ratings.

20:40 I don't know if that's quite what you would consider market share, but Python is at 15%.

20:44 You know, C is at 14%.

20:46 things that, sometimes get compared like R is less than 1%.

20:50 Ruby is less than 1%.

20:52 Those are a pretty interesting, persons.

20:55 Yeah.

20:55 They're also not really general purpose languages.

20:58 I mean, R isn't at least.

21:00 Yeah, that's for sure.

21:02 Let's see. Yeah, the TOB commentary accompanying the index was, Python seems to be unstoppable.

21:08 It's hard to find a field of programming in which Python is not used extensively nowadays except for safety critical embedded systems.

21:16 That's pretty cool.

21:18 Let's see, Rust is now number 22, closing in on the top 20, and Carbon, have you been tracking Carbon?

21:24 No.

21:24 This is, I believe it's Google who is behind Carbon.

21:28 Yeah.

21:28 It's a language that's intended to be, to supplant C++, but be very C++-like.

21:34 An experimental successor to C++ strives for the C++ performance and compatibility while avoiding its technical debt and extreme difficulty to improve.

21:43 (laughter)

21:46 Ouch.

21:47 Yeah.

21:48 Yeah.

21:49 Not saying extreme difficulty to use, but like, it's just, it's where it is.

21:53 You know what I mean?

21:54 >> Yeah.

21:54 >> Yeah. It's like a language on top of a language on top of 50 years.

21:59 Anyway, so Carbon has entered the index at a number, a position 192.

22:06 They've got some work to do.

22:07 >> Yeah.

22:07 >> But it's still interesting.

22:08 >> Something to watch.

22:09 >> Yeah. You look at the other programming index, again, no idea how to say it, BYPL, the popularity of programming language is what the acronym stands for.

22:19 It's an index created by analyzing how often tutorials are language tutorials are searched on Google.

22:26 So that's one metric.

22:28 Python is like massively ahead of second place Java, third place JavaScript, and then it drops quick, quick, quick down from there.

22:36 Like for example, Ruby, 1% people are interested in tutorials, how to do it versus almost 30% for Python.

22:43 Yeah. Anyway, that's just another, another factor that was part of this InfoWorld article.

22:49 So I'm one of the live streams not too long ago, somebody said, "Oh, I heard that there's not a whole lot of jobs or interest in Python.

22:56 Maybe what else should I learn?" But you know what? I'm not so sure you're getting great advice if that's where you're thinking.

23:03 >> Okay.

23:04 >> Popular is not everything, but it's an important part of like, can I have a job?

23:08 Can I find developers doing this?

23:09 Will there be a library for my thing X I want to talk to with it and so on?

23:13 >> I love Python obviously.

23:16 But it's hard to answer those.

23:19 For a job, which languages should I, whether languages should I learn?

23:23 I don't want to answer that.

23:25 It depends on what you're trying to get into.

23:27 But just as a roundabout developer, I think it is important to learn more than one language.

23:33 I wouldn't want somebody to just stop with Python and say, "Oh, I'm good." >> No. Yeah. Well, and you also, if you want to build mobile apps, you might want to look elsewhere.

23:42 Well, except I might have something in an extra section for you on that.

23:47 >> Okay. Cool.

23:48 >> But did I switch the order?

23:49 Did I jump in front of you?

23:51 I think I may have.

23:52 I don't think so.

23:53 You got one more thing to go.

23:54 No.

23:55 Tell us about some magic.

23:56 Oh, no, this is part one of my extras.

23:58 So, oh, this is when your extras.

23:59 Okay, well, let's that's it then.

24:00 Jump into your extras.

24:01 All right.

24:02 I didn't want to cover this.

24:03 Really quick, really quick comment just from I think this is kind of amusing from S.E.

24:08 Steve in the audience.

24:09 Extreme difficulty to use is just a side benefit of C++.

24:12 Yeah, I mean, yeah.

24:14 Yeah.

24:15 Think about all the jobs people get to keep without much effort over time.

24:19 - Over time, like you still use C++.

24:22 - If there was a lot of competition for C++ developers, I don't know what I would do.

24:28 I'm enjoying the lack of competition.

24:31 Yeah.

24:32 (laughing)

24:33 - Exactly.

24:33 - I just ran across this, the magic of my Matplotlib style sheets article, and I just wanted to bring it up for people that might wanna to try it out.

24:43 So I've used Matplotlib style sheets before, and they're just great.

24:49 So you could just say like, so let's say you've got a current plot and by default, it's just, it's not bad.

24:56 It's just, it is what it is.

24:58 And then if you just drop in one line of code, use styles, plot style use, and then you drop a style sheet name, there's a whole bunch of built-in ones you can use.

25:07 It just looks nicer.

25:08 It's got like--

25:09 - I love it.

25:10 It's so unsettled, but it looks so much better.

25:12 - Yeah.

25:13 But I didn't know that it's pretty easy to write your own.

25:16 I didn't, I mean, I figured maybe style sheets were complicated.

25:20 So the rest of this article just talks about really how to write your own style sheet.

25:25 So if anybody's interested in customizing the style sheet for their group or something, might be a good thing to just have, you know, be able to roll your own style sheet.

25:37 So here you go. - Yeah, fantastic.

25:38 - One of the things that the 10 year old in me enjoyed that the, if you want the lines to end in a square instead of a rounded line, you give it a solid cap style of butt.

25:52 It makes it chop off the end, so that's funny.

25:57 >> That is funny.

25:59 This is not one of my extras, but I might as well add it as a follow on here is, XKCD plots have landed in Matplotlib.

26:10 I'm sure this is probably accomplished the same way, but look at that.

26:15 Aren't these fantastic?

26:17 >> I use these at work because they're just, especially I like it if I've just made up the data or my sample size is small.

26:27 I don't want anybody to take it as a research project.

26:31 It's just I'm showing something informally.

26:35 >> Right. Sometimes there's a whole ton of value to present it not quite polished.

26:41 >> Yeah.

26:41 >> There's an app I use called, Let's see, why does it not want to make a new, Balsamiq, it doesn't let me type in, oh well, it's called Balsamiq and it'll generate wireframes of like web browsers and buttons or to do mobile apps or whatever, and it intentionally has this shape, like it looks very XKCD like.

27:01 Like, okay, this is not the answer, this is not the final thing, it's just to give you an idea of like here's the layout and so on.

27:07 >> Yeah. I think it's Balsamiq with a Q, if people are looking for it.

27:11 >> Yes, it's funky, small, That's spelled funky.

27:13 I think what happened is my keyboard's battery died.

27:17 So anyway, that's why I can't type anymore.

27:18 I'm not on a laptop, so when the battery dies, that's it.

27:21 But that's fine, because I already got all the stuff I want to talk about anyway.

27:25 We talked about I wouldn't try to learn Python to write mobile apps.

27:28 And I still stand by that.

27:30 But we discussed way back on episode--

27:33 which one was it?

27:34 On 295 a couple weeks ago, we talked about Flit.

27:37 And Flit lets you write Flutter apps in Python.

27:41 It is super neat.

27:42 - Yeah.

27:43 - Where, just look at an example or whatever, pull up the tutorial, but like the code that you write, I mean, if you've ever done Flutter, it feels very much like that.

27:53 What you write is Python and it's glorious.

27:56 Anyway, the extra that I wanna talk about is, I had Theodore Fitzner, who is the creator of Flet on Talk Python last week, and if people wanna hear what he had to say about it in our conversation, they should check that out.

28:10 - Nice. - Yeah.

28:11 All right, that's it for my extras, I believe.

28:14 You ready for a joke?

28:15 - I am, but I just, I wanna like pause and just say, I think that's one of the cool things about how we've done Python Bytes and Talk Python and Test and Code of if we do these small segments within Python Bytes, but if we wanna just also do like a deep dive, we've got the other podcasts to do a deep dive into something, it's good.

28:37 - Absolutely.

28:38 It's super nice and kind of on purpose, right?

28:40 We kind of decided this one so we could just quick talk a bunch of fun stuff and then the other one, if you really want to spend an hour on something, that's what it's for.

28:48 So hopefully people listen to both, or all three rather.

28:50 - All three?

28:51 (laughs)

28:52 Yeah, exactly.

28:53 - Yeah, yeah, yeah.

28:54 - Yeah, all right.

28:54 Now something funny.

28:55 - Now, you know we talked about the cloud stuff and you specifically ask about price.

29:00 So here's the joke.

29:01 This one has two pictures.

29:04 One, somebody who is new to AWS and somebody who is experienced at AWS.

29:10 The new person, it shows this cartoon character walking, one step, steps on a rake, the rake whacks up and smashes him in the face.

29:17 It's new to AWS, accidental $50,252 monthly bill.

29:22 The experienced one with the rake is like, you know how sometimes skateboarders will jump up and they'll grind down a stair railing and they'll do something amazing?

29:31 - Oh, it's a kickflip they're showing, yeah.

29:33 - Yeah, sorry, off the stairs, a kickflip off the stairs.

29:35 And like that often goes good, but not always.

29:37 So here they're doing like an amazing kick flip with the rake.

29:40 - Off a rake.

29:41 - And they land at the bottom, smacks him in the face, says accidental $50,252 bill.

29:49 - Yeah.

29:50 - And then down here, there's a funny comment from somebody who how they forgot to turn off something.

29:57 So they just, but luckily their card expired.

29:59 So they just let their EC2 account expire.

30:02 And you know, Amazon was talking about doing like healthcare stuff and whatnot.

30:05 So this person here, Jess, Jess the Unstill, she says, "Just wait, soon enough, "if you don't pay your EC2 AWS bill, "they won't even let you visit your doctor." (laughing)

30:18 Sometimes things are funny.

30:19 - Interesting idea though to attach your AWS account to a credit card with a low balance.

30:25 So that's one way to--

30:27 - Interesting, yes, exactly, it might be a benefit.

30:30 - Yeah.

30:32 - It just might be a benefit actually.

30:33 >> Yeah, quite cool. Anyway, I thought this was funny.

30:37 But you also have heard of real stories of startups shutting down because they accidentally did get a $60,000 bill, they're like, "We can't pay this." >> Well, also just, yeah, or somebody just misconfigured it and suddenly they're making the transfers are three times larger than they're supposed to be or something like that.

30:56 >> Yeah, absolutely.

30:57 Every time I run this command, it spins up a cool VM to do the test in the Cloud.

31:02 I forgot to shut it down.

31:03 Oops.

31:04 Now I have a hundred VMs, right?

31:06 (laughing)

31:07 - Yeah.

31:08 - Yeah, so concrete advice.

31:10 You can set up billing alerts at different tiers.

31:13 Like once it crosses a hundred dollars, send me a message.

31:16 Once it crosses $200, send me a message.

31:18 Those numbers will differ for people, but I would strongly recommend that you set that up at your cloud provider.

31:23 Like if it goes beyond a reasonable amount of what I normally would like to pay or expect to pay, let me know soon.

31:31 - Yeah, not like tomorrow.

31:33 - Let me know right away. (laughs)

31:35 - Exactly.

31:36 In fact, can you make my smoke alarm go off because I really need to get up and get going.

31:40 (laughs)

31:41 - Yeah.

31:42 So, anyway.

31:44 - All right, well, fantastic to be here with you, Brian.

31:46 - Good to be with you too.

31:47 Talk to you next week.

31:48 - Yep, yep, see you later.

31:49 Thanks everyone for listening.

31:51 Oh, really quick, one piece of follow up out here from Kim in the audience.

31:54 If a huge AWS bill accidentally happens, I'd rather I can speak to the AWS directly before giving in in despair, yeah, indeed.

32:02 >> Yeah, I've heard of success stories where people just talk and they work with them.

32:08 >> It's worth a try.

32:09 >> On the drawing topic, Will recommends that, where did it go?

32:14 Excelidraw has a similar look, so I'll have to check that out too.

32:18 >> Yeah, I haven't heard of that one. That's cool. All right.

32:20 >> All right. Talk to you later.

32:21 >> See you all later. Bye.

Back to show page