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

#298: "Unstoppable" Python

Published Wed, Aug 24, 2022, recorded Tue, Aug 23, 2022
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by Microsoft for Startups Founders Hub.

Brian #1: Uncommon Uses of Python in Commonly Used Libraries

  • by Eugene Yan
  • Specifically, Using relative imports
  • Example from sklearn’s base.py from .utils.validation import check_X_y from .utils.validation import check_array
  • “Relative imports ensure we search the current package (and import from it) before searching the rest of the PYTHONPATH. “
  • For relative imports, we have to use the from .something import thing form.
  • We cannot use import .something since later on in the code .something isn’t valid.
  • There’s a good discussion of relative imports in pep 328

Michael #2: Skyplane Cloud Transfers

  • Skyplane is a tool for blazingly fast bulk data transfers in the cloud.
  • Skyplane manages parallelism, data partitioning, and network paths to optimize data transfers, and can also spin up VM instances to increase transfer throughput.
  • You can use Skyplane to transfer data:
    • Between buckets within a cloud provider
    • Between object stores across multiple cloud providers
    • (experimental) Between local storage and cloud object stores
  • Skyplane takes several steps to ensure the correctness of transfers: Checksums, verify files exist and match sizes.
  • Data transfers in Skyplane are encrypted end-to-end.
  • Security: Encrypted while in transit and over TLS + config options

Brian #3: 7 things I've learned building a modern TUI framework

  • by Will McGugan
  • Specifically, DictViews are amazing. They have set operations.
  • Example of using items() to get views, then ^ for symmetric difference (done at the C level):

        # Get widgets which are new or changed
        print(render_map.items() ^ new_render_map.items())
    
  • Lots of other great topics in the article

    • lru_cache is fast
    • Unicode art in addition to text in doc strings
    • The fractions module
    • and a cool embedded video demo of some of the new css stuff in Textual
  • Python’s object allocator ascii art

Michael #4: ‘Unstoppable’ Python

  • Python popularity still soaring: ‘Unstoppable’ Python once again ranked No. 1 in the August updates of both the Tiobe and Pypl indexes of programming language popularity.
  • Python first took the top spot in the index last October, becoming the only language besides Java and C to hold the No. 1 position.
  • “Python seems to be unstoppable,” said the Tiobe commentary accompanying the August index.
  • In the alternative Pypl Popularity of Programming Language index, which assesses language popularity based on Google searches of programming language tutorials, Python is way out front.

Extras

Brian:

  • Matplotlib stylesheets can make your chart look awesome with one line of code.

Michael:

Joke: Rakes and AWS

Episode Transcript

Collapse transcript

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

00:04 your earbuds. This is episode 298, just too short of 300 coming in fast, recorded August 23rd,

00:12 2022. I'm Michael Kennedy. And I'm Brian Okken. Wow, close to 300. That's amazing.

00:17 Yeah. Yeah. That's, what is that, coming up on six years here pretty soon? That's insane.

00:23 That's amazing. Well, 52 times. Yeah, I don't know. Yeah. So pretty awesome.

00:29 And got some fun folks we see in the audience who are out here frequently. Will McGugan is here.

00:35 Will is going to be a guest on the next episode. So if you want to hear from Will, be sure to

00:39 at least listen to the next episode if you don't come to the live one.

00:42 Yeah. Also, before we, yeah, it'd be fantastic. Also, before we get going on the topics,

00:47 I just want to say thank you to Microsoft for Startups Founders Hub for sponsoring this and so

00:52 many of the episodes this year. Super great to have their support. Very cool. It's uncommon, Brian, to

00:58 have such great supporters, wouldn't you say? It is uncommon. Nice segue. I like it. So I'd like to

01:06 talk about uncommon uses of Python in commonly used libraries. Actually, this is just a pretty cool

01:12 article. It's by Eugene Yan. And he goes through a handful of things. I'm just going to pull out one,

01:18 but it goes through using super classes and a whole bunch of things. The idea was to learn how to build

01:24 more maintainable and usable Python libraries. He's been reading some of the most widely used Python packages

01:29 and learning some things along the way, which is an awesome way to learn is to read other code.

01:35 I agree. I think it's fantastic.

01:37 Yeah. So he's good. He goes through super and a handful of other things. When do you use a mix in?

01:43 I don't know if I'd use that. Anyway, the thing I want to pull out is using relative imports all the

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

01:56 So the idea is that if you do an import, like import something or from some library import,

02:05 if you don't, if you put a dot in front of at the beginning is the first dot, then it looks in your,

02:11 in your path, your current search, the directory of the, the, the file that it's in. So in the example,

02:18 he has a base by a base dot pie from scikit learn and it, it uses, it says from dot utils dot validation

02:28 import something. And, and these are, because it says dot utils, it'll look for utils in the

02:35 current directory and not somewhere else because there's probably a utils like somewhere else also,

02:40 looking for the search path. so this is neat. You can do multiple, you can move, do multiple

02:45 dots also. I don't ever, I don't think I ever do that. I do the current directory and down

02:50 or the current project and down. So, this is, we'll get you up, up one and then down a different

02:56 path or something like that, right? It will. So if you do dot dot something and you don't do slashes,

03:00 you don't, it's not a direct, a pat, it's kind of like a path, but it's not, like dot is the

03:06 current directory. Dot dot is like one up and you can do three, but wow. I think there's something

03:12 wrong with your project if you're doing that. but, maybe not, maybe not. There's,

03:17 a couple of links in there for further reading. There's a Guido's decision on relative imports,

03:22 which is part of the, part of the, the PEP 328 writeup. And actually the, this PEP 328 writeup

03:29 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. And, I, I use this a lot

03:42 now and try to put it in, projects, you know, projects at work and project personal projects

03:47 as well. So, 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. Yeah. So you have to have Dunder and net files within the directory. And that's,

04:03 I guess one of the things that I wish we had another name for, because in Python,

04:07 we talk about a package or a sub package. These are, this could be just a directory with Python

04:14 files in it that has Dunder in it and the, and that, that makes it a package in Python,

04:20 but we also definitely, yeah. Yeah. We also talk about the package repository and PyPI. It's the Python

04:26 package index. Those are not just directories with Dunder and nets. They're packaged up with a whole

04:32 bunch of other meditated and stuff like that. So there's two things that we call packages, but

04:36 yeah, they have to have Dunder and nets in them for this to work. So anyway.

04:40 Yeah. Brent, Brandon on the audience asked, so are we arguing for relative imports?

04:44 I, for the current, for the current directory, I am, I think that, within a project, if you're,

04:51 like internal stuff, you're not, I mean, if it's a, if it's part of the external API of the project,

04:57 I, I will always go through the external API to get at something, but there's a whole,

05:02 there's a lot of times where you're just developing a bunch of Python modules together. and they're

05:09 internally, they're going to talk to other sub components and that isn't necessarily part of

05:14 the external API. And this is the best way to get at it. So yeah. Yeah. All right. Sounds good.

05:19 Next up, let's go to the sky plane. So this one comes to us, from, let me make sure I give the

05:27 proper credit. This one comes to us from RMRF, the Sudur. Thank you for sending this in. Really

05:34 appreciate it. The project is called sky plane, 114 times faster cloud transfers. At first I was like,

05:41 what does that mean exactly? Like what's the baseline for this? I'll say. So, probably what

05:47 they're basing that on in a minute. This is interesting for two reasons. It's interesting

05:52 because it's a tool that I think many Python developers would find useful, especially those

05:59 folks doing a lot of work in the cloud. It is also useful or interesting because it is itself a Python

06:05 project. Okay. So if you want to contribute to it or understand it or extend it or work it and do other

06:12 things, that's totally possible. It's worked on by a pretty big group of folks. The idea is

06:17 it gives you blazing fast bulk transfers, file transfers between any cloud, any, it needs a

06:24 little like star or an asterisk by it that says any means any of the big three cloud providers. Okay.

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

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

06:47 Linode and digital ocean also have cloud storage that are S3 like, but I'm pretty sure it won't work

06:55 based on the way I'm about to tell you what's going to happen next. Okay. Okay. So if you go over,

06:59 there's an architecture section. And if you look in there, they've got this sky retreat 2022,

07:04 where Paris Jane introduces sky plane. And to the folks, there's about a 15 minute video,

07:10 but you really got to watch just two minutes of it to get the Zen. So they laid on a scenario. This is,

07:16 I believe in their world, they're doing data science. And so what they need is they need the

07:21 data very near to them. And there's a woman in the middle East, using some AWS, S3 and point

07:28 there. And she has 30, 80 gigs of data. And Paris is on the East coast of the U S and wants closer

07:36 access to that data for their other work that they're doing. So there's a way with the AWS CLI

07:42 to just copy from Bahrain or wherever it is over to Virginia. And they run that. And it says the,

07:48 after running for a while, it says estimated time to completion one hour, right? I don't know. Is that

07:53 good or bad? Like it's, it's a lot of data, right? 80 gigs halfway around the world. It's miraculous that

07:59 this is possible, but is that good or not? So then they say, well, let's try it with sky plane.

08:03 They were getting like 20 megabit. I think they run it with sky plane. They're getting

08:07 30 gigabit transfers from the middle East. And it took 30 seconds instead of an hour.

08:13 That's quite a bit faster.

08:14 That is pretty awesome.

08:16 Yeah, exactly. And so instead of going across the open internet, it's, it was transferring basically

08:23 over like dedicated fiber for just AWS data center connects or something like that. Right. But what

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

08:35 So I think what happens here, not a hundred percent sure, but I think it fired up some VMs in

08:41 Virginia, copied it from S3 in Bahrain directly through the internal data system data center transfer,

08:50 and then pushed it into like nearly local S3 storage. And you can do the same thing from like AWS

08:56 East coast to Azure West coast, right? You would fire up a VM. I think in that scenario,

09:02 in both of the data centers and those VMs would talk directly over the high speed data center

09:06 network instead of like the S3 one, we'll copy it down to your machine and then you push it back

09:10 out of your machine to the new destination. Yeah.

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

09:16 That's pretty cool. Makes sense.

09:18 It's pretty cool. It has, yeah, yeah, yeah. And it's like all the CLI, it's like one CLI command

09:23 and that's creating the various virtual machines, provisioning them, setting up the encryption,

09:28 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,

09:37 the Azure CLI, and you just log into those local CIs and CLIs, and it uses those behind the scenes

09:44 to do the setup of like create the VM and then SSH over to it, do the work or something like that.

09:49 So it has a lot of integrity checking. So it does like checksums and verifies the files are there.

09:56 The file sizes are the same and all that kind of stuff. It does end-to-end encryption sort of.

10:02 So the VM, as it gets it out of cloud storage, encrypts it and then sends it over to the network.

10:07 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.

10:13 However, some people might be storing encrypted data in the cloud because they don't trust that it couldn't,

10:19 you know, it's 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

10:27 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 with, 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,

10:46 it looks like it'll do a lot of nice work for you.

10:47 Now, it's believable that it's faster.

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

10:53 Any comment?

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

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

11:01 But if you're going Azure to Azure, it probably is cheaper because I don't know what they really charge you for the S3 CLI

11:08 if you say do a transfer.

11:10 You're still like flowing through.

11:11 But, you know, the within data center transfer is cheaper than outside.

11:15 Taking it out.

11:16 Out of the, yeah, exactly.

11:17 Oh, cool.

11:18 So maybe, I don't know.

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

11:22 Yeah.

11:22 Wow, that's awesome.

11:23 Anyway, that's what I got for you.

11:24 Yeah, sky plane.

11:25 Nice.

11:25 You know what else is awesome?

11:27 Speaking of Azure.

11:28 Microsoft for startups, yeah.

11:30 Yeah, absolutely.

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

11:35 And this episode, like many of them, is brought to you by Microsoft for startups,

11:39 Founders Hub.

11:40 If you have a startup and you intend to have some kind of cloud computing resources,

11:46 or you've dreamed of going to something like a Y Combinator type of accelerator,

11:51 this is a really great way to get some of the benefits of that.

11:55 So with Microsoft for startup, Founders Hub, they give you a bunch of resources for running

12:02 your startup in the cloud in Azure, but also many other cloud resources, like a bunch of

12:08 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

12:19 been there and have the right connections.

12:22 Right?

12:22 Like, I think honestly, that might be the hardest thing about doing a startup because as developers,

12:27 we can build it.

12:28 Often we can build it.

12:29 But then it's, well, how do you build the right thing?

12:32 How do you, you know, in terms of customer fit, how do you get access to the right networks?

12:37 So 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, your expertise is in software.

12:49 So through Microsoft for startup, Founders Hub, you get access to their entire mentorship network,

12:54 access a pool of hundreds of mentors across a bunch of disciplines like idea validation,

12:58 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

13:09 themselves.

13:09 You'll make your idea a reality today with the critical support you'll get from Microsoft for

13:14 startups, Founders Hub.

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

13:17 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/foundershub 2022.

13:25 Link in your show notes.

13:27 You apply for free.

13:28 You get accepted.

13:28 You get all these benefits.

13:30 And it seems like a great program.

13:32 Yeah.

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

13:34 Yeah, absolutely.

13:35 All right.

13:36 What's, what do you got for us here, Brian?

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

13:47 Absolutely.

13:49 Hey, Will.

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

13:56 And it's seven things I've 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

14:06 went, has really thought about like, okay, I want to, I want to have something be really

14:11 responsive and really good to work with on the command line, which is, it's been there for

14:15 a long time.

14:16 We just haven't developed it much.

14:17 So there's a whole bunch of cool learnings that he talks about.

14:21 Like terminals are fast and, and they're faster than we realize, but there's a whole bunch of

14:26 like things that you can, that are different about terminals and other places like flicker

14:31 and tearing and stuff and how to deal with that.

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

14:35 The thing that like popped out as something that everybody can use that I wanted to talk

14:41 about was a little blip that he talked about that is dicta views are amazing.

14:46 So the, the, the thing he talks about here is that so maybe, I don't know if everybody knows

14:53 the term dicta views or views into a dictionary, but things like if you ask for, if you have a

14:59 dictionary and you ask for the keys or you ask for items, that is a view.

15:03 It's called a view into, into a dictionary and they are super fast.

15:07 And one of the things he points out is that they act like they act like sets also.

15:14 And you can use the, you can use set operators.

15:17 Like here's the little carrot symbol and was, I can't remember.

15:20 I'll have to look it up.

15:21 The carrot symbol is a symmetric difference.

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

15:28 different sets or two dictionaries.

15:30 And the, you can do this in code, but he's doing it using, using views because those,

15:37 those operators are happening with, with C code.

15:41 Python has optimized those.

15:43 So they, they work super fast and they're way faster than anything you could write in

15:48 Python.

15:49 So this just taking the items of two dictionaries and using a set operations on them.

15:55 And then you can go back to dictionaries if you want, you don't have to use that, but

15:59 super cool.

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

16:04 So yeah, nice.

16:05 Obviously use dot items and dot 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:14 Right.

16:15 Yeah.

16:15 Super neat.

16:17 Then he, he, he goes, covers a whole bunch of other stuff like LRU caching and the, how

16:22 fast that is.

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

16:30 doc strings of just like a picture says, says, you know, a picture gives you a thousand words

16:35 or whatever.

16:36 But, he, he, he gives an example here for talking about splitting, the screen

16:42 into sub regions.

16:43 And yeah, there's no way to, I mean, describing it in text is good, but this little picture

16:49 goes, you can just mentally go, Oh yeah, I get it.

16:51 If you give it a cut X and a cut Y, you end up with four regions, obviously, but it isn't

16:56 obvious just looking at the API.

16:58 but with, with a little picture, you're like, Oh yeah, that's cool.

17:02 So he's got a little, for people listening, he's got a picture showing, just a spatially

17:07 what, what it would look like using ASCII characters.

17:10 So neat.

17:11 Yeah.

17:11 I love it.

17:12 I love when people put art like that in there.

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

17:17 I'd have to, I guess I'm going to have to look this up, but in CPython, there's actually

17:22 this huge diagram in the malloc in the, the minute of the memory management section.

17:28 that shows you it's like this, it shows you all the different, data structures

17:33 and concepts that are used to manage memory, like the, the pools, the blocks and the arenas

17:39 and all that stuff in like a huge diagram in code comments.

17:43 It's perfect.

17:43 Nice.

17:44 And he gives a, shout out to just one, tool that's around.

17:48 He must use it called Monodraw.

17:50 It's a Mac tool, but so there are drawing tools that you can use to generate, ASCII

17:55 art.

17:55 So, or our Unicode art, as it were.

17:58 Yeah.

17:58 Yeah.

17:59 Yeah.

17:59 Nice.

18:00 Oh, maybe, maybe I'll, I'll be able to find it here.

18:02 Let's see.

18:03 I'd love to share it with everyone if I can find it.

18:06 Oh yes.

18:06 Here we go.

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

18:09 You ready for this, Brian?

18:09 Yeah.

18:10 You can show it.

18:11 Yeah.

18:11 Yeah.

18:11 I just got to, I had to find it.

18:13 Hold on.

18:13 There we go.

18:13 Look at this.

18:14 Oh yeah.

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

18:18 And it shows here's the object specific ones, the ant dick.

18:21 And then there's like object specific.

18:23 And then you can see these tiers.

18:24 Then there's the object, the Python object allocator, the raw memory.

18:26 And it even goes down to like, here's the OS and the physical memory.

18:30 And then, I think maybe further down, we might be able to find like some of the stuff

18:34 about arenas or whatever, but isn't that nuts?

18:35 Yeah.

18:36 But also it's awesome because you, I mean, you can visually, now you can read the text

18:40 and it makes more sense instead of just having.

18:42 It has a short description and then a proper picture of here's what's happening.

18:47 Yeah.

18:47 Yeah.

18:47 Absolutely.

18:48 Very good.

18:49 Cool.

18:49 So yeah, yeah.

18:50 That's a great, 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.

18:58 Yeah.

18:58 Yeah.

18:58 It sure does.

18:59 A whole bunch of other great tips in Will's article.

19:02 So, encourage people to check it out.

19:04 Right on.

19:05 Another thing that goes a long way is Python.

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

19:12 The title is Python popularity is still soaring, but the subtitle is unstoppable Python.

19:18 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 PYPL or I don't know how to say this, but, another secondary programming

19:30 language index.

19:31 And, yeah.

19:32 How cool is that?

19:33 Very cool.

19:33 Also a really nice rocket image.

19:35 I was going to say, this is, it, it, it characterizes the other programming languages,

19:40 hot air pollutants in Python as a rocket.

19:42 Yeah.

19:43 So, yeah.

19:44 some interesting things to take away from here.

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

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

19:55 Yeah.

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

20:02 from the TOB index.

20:03 And not only is it still number one, but it's actually gained a couple of percentage points

20:07 on the current rankings, year over year.

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

20:16 I think that's year over.

20:17 Yeah.

20:18 That's year over year.

20:18 Nice.

20:19 which, which is pretty awesome.

20:21 also, but C and Java have gained also.

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

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 the, 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%, you

20:44 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, pretty interesting, comparisons.

20:55 Yeah.

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

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

21:00 So yeah, yeah, yeah, that's for sure.

21:02 Let's see.

21:02 Yeah.

21:03 The, the TOB commentary accompanying the index was Python seems to be unstoppable.

21:07 It's hard to find a field of programming in which Python is not used extensively, extensively

21:12 nowadays, except for safety critical embedded systems.

21:15 So that's, that's pretty cool.

21:17 let's see.

21:18 Rust is now number 22, closing in on the top 20 and carbon.

21:22 Have you been tracking carbon?

21:23 No.

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

21:27 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

21:39 avoiding its technical debt and extreme difficulty to improve.

21:43 Ouch.

21:47 Uh.

21:48 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:53 Yeah.

21:54 Yeah.

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

21:59 Anyway.

21:59 but 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.

22:09 And you look at the other programming index.

22:12 Again, no idea how to say it.

22:14 P Y P L the popularity of programming language is what the acronym stands for.

22:19 It's an index creating, it's created by analyzing how often tutorials are, language

22:25 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.

22:33 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

22:42 Python.

22:42 Hmm.

22:43 Yeah.

22:43 Anyway, that's just another, another, factor that was part of this info world

22:48 article.

22:49 So, you know, I, on one of the live streams, not too long ago, somebody said, Oh, I heard

22:53 that there's not a whole lot of jobs or interest in Python.

22:56 Maybe what else should I learn?

22:57 But you know what?

22:57 I'm not so sure you're getting great advice if, if that's, where, what you're thinking.

23:03 Okay.

23:03 I mean, popular is popular is not everything, but it's an important part of like, can I have

23:08 a job?

23:08 Can I find developers doing this?

23:09 Will there be a library for my thing X?

23:11 I want to talk to you with it.

23:12 And so on.

23:13 I, I love Python obviously.

23:15 but I, it's hard to answer those like for a job, which languages should I, whether languages

23:22 should I learn?

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

23:25 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

23:33 language.

23:33 I, I don't think that it would, I wouldn't want somebody to just stop with Python and say,

23:37 Oh, I'm good.

23:37 No, no, no.

23:38 Yeah.

23:38 Yeah.

23:39 Well, and you also, if you want to build mobile apps, you might want to look elsewhere.

23:42 I will.

23:43 Except I might have a, I might have something in an extra section for you on that.

23:47 Okay.

23:47 Cool.

23:48 But did I, 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:52 You've got one more thing to go.

23:53 No.

23:54 Tell us about some magic.

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

23:57 So.

23:58 Oh, this is when you're extras.

23:59 Okay.

23:59 Well, let's, that's it then.

24:00 Yeah.

24:01 Okay.

24:01 Jump into your extras.

24:01 Then let's jump into your extras.

24:02 All right.

24:02 Oh.

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

24:04 Really quick, really quick comment just from, I think this is kind of amusing from SE Steve

24:08 in the audience.

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

24:12 Yeah.

24:13 I mean, yeah.

24:14 Yeah.

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

24:19 Like.

24:20 Exactly.

24:20 I mean, if there was a lot of competition for C++ developers, I don't know what I would

24:28 I would do.

24:28 I'm, I'm enjoying the competition.

24:30 Yeah.

24:31 so.

24:32 Exactly.

24:33 I just ran across this, the magic of my matplotlib style sheets, article, and

24:38 I just wanted to bring it up for people that might, might want to, to try it out.

24:42 So I've, I've used matplotlib, matplotlib style sheets before, and they're just

24:48 great.

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

24:54 it's just, it's not bad.

24:55 It just, it, it is what it is.

24:57 and then if you just drop in one line of code, use styles plot style use, and then

25:04 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, I love it.

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

25:12 Yeah.

25:12 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:19 So the rest of this article just talks about, really how to, how to write your own

25:25 style sheet.

25:25 So, if anybody's interested in, in customizing the style sheet for their, for their group

25:31 or something, might be a good thing to just have, you know, be able to roll your own

25:36 style sheet.

25:36 So here you go.

25:37 Yeah.

25:37 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

25:50 of, but, it makes it chop off the end.

25:55 So that's funny.

25:56 That is funny.

25:58 all right.

26:00 Yeah.

26:01 This is not, this is not one of my extras, but I might as well add it as a follow on here

26:05 is, XKCD plots have landed.

26:08 Yeah.

26:09 And Matt plot live, right?

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

26:15 Isn't this, aren't these fantastic?

26:16 I use these at work because they're just, it, especially, I, I especially like it.

26:22 If, if I've just made up, like made up the data or my sample size is small, I don't want

26:28 anybody to take it as like a research project.

26:31 It's a, it's just, I'm, I'm showing something in informally.

26:35 So.

26:35 Right.

26:36 Right.

26:36 sometimes there's a whole ton of value to present it.

26:40 Not quite polished.

26:41 Yeah.

26:41 There's an app I use called, let's see, what does it not want to make a new vault

26:46 comic?

26:46 Oh, it doesn't let me type in.

26:48 Oh, well, it's called balsamic and it, it will generate wireframes of like web browsers

26:54 and buttons or to do mobile apps or whatever.

26:57 And it intentionally has this shape.

26:59 Like it looks very XKCD like, like, okay, don't, this is not the answer.

27:03 This is not the final thing.

27:04 It's just to give you an idea of like, here's the layout and so on.

27:07 Yeah.

27:07 And it's, I think it's balsamic with a Q, if people are looking for it.

27:11 Yes.

27:11 It's, it's funky, small, it's spelled funky.

27:13 Yeah.

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

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

27:18 I'm not on a laptop.

27:19 So when the battery dies, that's it, but that's fine.

27:22 Cause I already got all the stuff I want to talk about.

27:23 Anyway.

27:24 we talked about, I wouldn't try to learn Python to write mobile apps and I still stand

27:29 by that.

27:29 But we discussed way back on episode, which one was it on 295 a couple of weeks ago, we

27:36 talked about flit and flit lets you write flutter apps in Python.

27:40 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

27:48 you write.

27:49 I mean, if you ever done flutter, it feels very much like that.

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

27:56 Anyway, the, the extra that I want to talk about is I had, theodore Fitzner, who is

28:02 the creator of flit on talk Python last week.

28:05 And if people want to hear what he had to say about it in our conversation, they should check

28:09 that out.

28:10 Nice.

28:10 Yeah.

28:11 All right.

28:11 That's it for my extras.

28:12 I believe it's you, you ready for a joke?

28:15 I am.

28:16 But I just, I want to like pause and just say, well, I think that's one of the cool things

28:20 about how we've done, Python bytes and talk Python and testing code of, if

28:27 we do these small segments within Python bytes, but if we can, if we want to just also do like

28:33 a deep dive, we've got the other podcasts to do a deep dive into something.

28:36 It's good.

28:37 So absolutely.

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

28:40 We kind of designed this one so we could just quick talk about to fun stuff.

28:44 And then the other one, if you really want to spend an hour on something like that's what

28:47 it's for.

28:47 Yeah.

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

28:51 Yeah, exactly.

28:52 Yeah.

28:53 Yeah.

28:53 Yeah.

28:53 Yeah.

28:53 All right.

28:54 Now something funny.

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

29:00 So here's the joke.

29:01 This one has two pictures.

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

29:09 The new person, it shows this like cartoon character walking one step steps on a rake.

29:15 The rake wax up and smashes them in the faces.

29:17 New to AWS.

29:18 Accidental $50,252 monthly bill.

29:22 The experienced one with the rake is like, you know, sometimes skateboarders will jump up

29:26 and they'll like grind down like a stair railing.

29:29 It'll do something amazing.

29:31 Well, it's a kickflip they're showing.

29:32 Yeah.

29:33 Yeah.

29:33 That's right.

29:33 Off the stairs.

29:34 The 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 kickflip with the rake.

29:40 Off the rake.

29:41 And then they land at the bottom, smacks them in the faces.

29:45 Accidental $50,252 bill.

29:49 Yeah.

29:50 Yeah.

29:51 And then down here, there's a funny comment from somebody who, how they forgot to turn

29:56 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, this person here, Jess, Jess, the unstill says, just wait soon enough.

30:11 If you don't pay your EC2 AWS bill, they won't even let you visit your doctor.

30:15 Sometimes things are funny.

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

30:25 So that's, that's one of the interesting.

30:28 Yes, exactly.

30:29 It might be a benefit.

30:30 Yeah.

30:30 It just might be a benefit actually.

30:33 Yeah.

30:34 Quite cool.

30:34 Anyway, I, I thought this was kind of funny, but you also have heard of real stories of

30:39 startups shutting down because they accidentally did get like a $60,000 bill and they're like,

30:44 we can't pay this.

30:44 Well, also just, yeah.

30:46 Or, or somebody just misconfigured it and suddenly they're, they're making like the transfers are

30:52 like, you know, three times larger than they're supposed to be or something like that.

30:56 Yeah, absolutely.

30:57 So 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:04 Now I have a hundred VMs running.

31:05 Yeah.

31:07 Yeah.

31:08 So concrete advice, you can set up billing alerts at different tiers.

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

31:15 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

31:22 cloud provider.

31:23 Like if it goes beyond a reasonable amount of what I normally would like to pay or expect

31:28 to pay.

31:28 Yeah.

31:29 Let me know soon.

31:30 Yeah.

31:31 Not like tomorrow.

31:32 Let me know right away.

31:34 Exactly.

31:35 In fact, can you make my smoke alarm go off?

31:38 Because I really need to get up and get going.

31:40 Yeah.

31:43 So anyway.

31:44 All right.

31:44 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.

31:48 Yep.

31:49 See you later.

31:49 Thanks everyone for listening.

31:50 Oh, really quick.

31:51 One piece of follow up out here from Kim and the audience.

31:54 If a huge AWS bill accidentally happens, I'd rather I can speak to the AWS directly before

32:00 giving in in despair.

32:01 Yeah.

32:02 Indeed.

32:02 Yeah.

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

32:07 On the other top.

32:09 It's worth a try.

32:09 On the drawing topic, Will recommends that, where'd it go?

32:14 AccelerDraw has a similar look.

32:17 So I'll have to check that out too.

32:18 Yeah.

32:18 I haven't heard of that one.

32:19 That's cool.

32:19 All right.

32:20 All right.

32:20 Talk to you later.

32:21 See you all later.


Want to go deeper? Check our projects