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


Transcript #317: Most loved and most dreaded dev tools of 2022

Return to episode page view on github
Recorded on Tuesday, Jan 3, 2023.

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

00:05 This is Episode 317, recorded January 3rd, 2023, and I am Brian Okken.

00:11 >> Hello, I'm Michael Kennedy.

00:12 >> Welcome to 2023. How exciting.

00:15 >> It is very exciting.

00:16 It's a lot like 2022, but I think maybe a little more optimism. We'll see.

00:20 >> Yeah, but I've had one extra shower since 2022.

00:24 Do you remember 2022?

00:25 Just feels like a few days ago.

00:27 >> Honestly, it really flew by.

00:29 Yeah.

00:29 I mean, we, we, we stayed inside for like two years and then like, Hey, well, look, we get to go outside.

00:33 Oh, time flies when you're not just stuck inside.

00:36 I even actually rode a bicycle the other day.

00:38 and then Oregon said we're going to rain for two weeks.

00:41 So of course, of course it did.

00:43 Yeah.

00:43 well, let's kick it off.

00:45 What do you got for us first?

00:46 All right.

00:47 Let's talk about the stack overflow, 2022 developer survey.

00:52 Now this is one of the better surveys that gives you a pulse on the developer community.

00:59 It's, you know, we do the PSF survey every year.

01:01 And that one I think is really well done.

01:03 This one's interesting because it's not just Python, obviously.

01:06 It's all of Stack Overflow people.

01:09 >> Yeah.

01:09 >> And it's really, really long.

01:11 Notice the scroll bar.

01:12 So I'm going to try to go through these and just hit on some of the high points for us.

01:19 All right. So they did that as well for us at the top here.

01:22 They kind of summarize some little things you can call out in the jump to other sections.

01:25 saying learning to code online increased by 10% year over year.

01:30 However, respondents older than 45 years are most likely to have learned from books, whereas the youngins, they're more likely to use some kind of online course or YouTube video or something along those lines.

01:45 Does that surprise you?

01:46 >> No.

01:47 >> Yeah, me either. So last year, they said we saw Git rise as a fundamental tool of software development.

01:55 So like if you are a software developer, you basically just need to know Git.

01:59 Surprisingly this year, they said that's Docker this year increasing from 55% usage to 69% usage.

02:06 I kind of feel like the hype and the heyday of Docker was actually a couple of years ago and I hear a little bit less, maybe it's just less hype, but it's just more like, yeah, we're just using it.

02:17 But I don't know that that was surprising and interesting to me.

02:21 I'm using it more in places where I didn't use to.

02:24 - Like what? - Build chains for just to keep them consistent.

02:29 We're just, and it isn't even a cloud thing.

02:31 It's just having, being able to have a consistent build system no matter what machine you're on.

02:38 - Yeah, that makes a lot of sense.

02:40 - CI systems are utilizing Docker more.

02:43 - Sure. I've heard of even people using Docker to manage and employ.

02:48 Is that how you would phrase it?

02:50 little apps to Raspberry Pis for like home automation and stuff.

02:54 - Really, sure they're--

02:55 (laughing)

02:56 - I'm sure there would be more of that if you could actually get a Raspberry Pi, but you know, this is more of a theoretical.

03:00 Those who already have the Raspberry Pi.

03:02 The most, one of my favorite sections of this is the most loved, most dreaded, and most wanted.

03:09 - Yeah.

03:10 - Because it really tells you, you know, how do people feel about how things are now, and how do they feel about where they're going, right?

03:17 What would they do if they were unencumbered by their boss saying, "Nope, we're using this particular database," or, "Nope, it's all Angular and you're on the team that does Angular, so I don't care what you want, you're doing Angular." So Rust is on its seventh year as the most loved language.

03:35 >> Seven years? Is it even seven years old?

03:38 >> I know. That's my thought as well.

03:40 >> Okay.

03:41 >> Eighty-seven percent of developers say they want to continue using it.

03:45 Wow. I mean, yeah, anyway, that's pretty interesting.

03:48 But it also Python and Rust are basically exactly tied as the most wanted programming language. That's cool.

03:57 >> I can see that.

03:58 >> Yeah, absolutely. Phoenix.

04:01 Phoenix is some web framework I've never heard of, that is apparently the most popular.

04:05 AngularJS, it continues into its third year of being the most dreaded.

04:10 All right, what else? Go ahead.

04:12 Oh, just react.

04:14 Yeah, is most wanted, but who knows?

04:16 Yeah, exactly.

04:17 So some of these questions and some of these phrasings and analyses are super, super good, and others are really bad.

04:24 So I'll try to highlight some of these.

04:26 So let me jump down here.

04:28 Well, I don't really care about the education stuff.

04:31 I mean, it tells you education profile.

04:34 It tells you things like, yeah, there's an insane number of guys versus women.

04:40 >> No, that's fine. I just thought it was funny that you said I don't care about education.

04:44 >> Teacher, leave the kids alone.

04:49 All right. It's fine, but people can check it out if they care about it.

04:54 There's stuff about the demographics, like age and gender.

04:58 That is pretty interesting.

04:59 I wish some of these numbers were better.

05:01 >> Yeah. That's embarrassing.

05:03 >> Yeah, it totally is.

05:05 But that's also not news.

05:08 Yeah, some of the most popular technologies here.

05:11 Now, I know Brian, I might just be getting older and grumpy, but when I look at this, there's like it's almost all these responses are broken into two segments, professional developers and learning to code people.

05:23 The default is to take all those together, and I guess that's the biggest picture, but I don't know.

05:29 When I ever look at this, I'm just like, professional developers, tell me about this.

05:32 >> Yeah.

05:33 >> If you're on your third week of a coding tutorial and that tutorial says use this, like how much does that really speak to the state of the community?

05:43 I don't think it's-

05:44 >> Agreed.

05:45 >> So I'm checking.

05:46 When I think about these, I'm just going to check professional developer and if you want the same numbers, you can do so as well.

05:51 So where are we? We are on programming languages, scripting and markup.

05:56 JavaScript is definitely the most popular here.

05:59 This is one of those areas where I don't, I think you need to phrase it a little bit different.

06:03 Let's see what the question exactly is.

06:06 Which programming languages have you done extensive development work in over the year, over the last year? Okay. I don't know how quite how to solve this problem, but there's a ton of Python people who did JavaScript work.

06:19 Yeah.

06:19 There is a ton of C++ people who did SQL, right? There's also Python people who did SQL.

06:25 So SQL ranks above Python, but there's very few people whose job it is as a developer to write SQL and not use something else.

06:36 >> That's weird to have SQL even in there.

06:40 >> Yeah, I know. Well, HTML and CSS is a little bit weirder as well.

06:45 I feel like it should say, what is your primary programming language or something like that.

06:52 >> It's like favorite movie.

06:55 What's your favorite movie but not Princess Bride?

06:58 Other than that, what's your favorite movie?

07:00 >> Yes, exactly.

07:01 So like there's people who do Node.js and JavaScript, and that is what I think this top bar where JavaScript is should represent.

07:08 But it's that plus everyone else, right, aggregated.

07:12 So I don't know, these are a little bit weird, but I'll just go to the top.

07:15 - Yeah, back end.

07:16 So like unless you're primarily just a front end developer, what back end languages?

07:20 - Right, right, or maybe you're using Node on the back end, but then other than that.

07:24 So JavaScript, number one.

07:26 HTML, top programming language, okay.

07:29 SQL, third most, and then Python, and then TypeScript.

07:31 So, you know, like a bunch of interesting ones.

07:34 And then you've got your VM, garbage collected JavaScript, Java and C# back there.

07:42 And then it starts to fall off pretty quick after that.

07:45 Down at the very bottom, let's see the very bottom one is Crystal.

07:48 Okay, and APL, oh my gosh, APL.

07:52 APL is something.

07:54 All right, another one that's worth talking about is databases.

07:58 So we've got Postgres, MySQL, SQLite, SQL Server, MongoDB as the top five.

08:04 So it's pretty clear that Postgres has the momentum.

08:09 Like MySQL was higher and now Postgres is passing it, but that's kind of going up here.

08:15 So this is which environments have you done extensive work in?

08:19 We'll also see that in like beloved versus dreaded section.

08:22 - Yeah.

08:23 (laughing)

08:24 - And by the way, on the audience, Marco says, "I've already aged myself with that Pink Floyd reference, indeed.

08:29 All right, so cloud platforms, AWS.

08:34 I don't want to surprise you that AWS has over half of the entire market.

08:37 >>No. >>No.

08:38 >>But only, it's only a smidge over half, it's 55, so.

08:41 >>Yeah, exactly.

08:43 Web technologies, here's another one.

08:45 This one's kind of okay, but for example, they've got Node.js, but they don't have Python, right?

08:54 So I don't know, it's a little bit funky.

08:56 Like they've Node and Express and Express runs on Node, whereas they have Flask and Django, but they don't have the thing that Django and Flask run on.

09:06 I just, I don't know. Anyway, it's a little bit of a challenging one, but Node and React are quite high up there.

09:12 Look at this artifact, this living fossil right here, Brian. What's number three?

09:19 >> jQuery.

09:20 >> jQuery, you know it.

09:21 Dollar document ready, let's go. All right.

09:25 - I learned jQuery a long time ago.

09:27 - Yeah, I still use a little bit of jQuery if there's some site that's already using it.

09:30 I'm like, yeah, whatever, I'm just gonna put one handler in here and not worry about it.

09:34 - FastAPI's on the list.

09:35 - Yeah, FastAPI's on the list.

09:38 Django and Flask are 14.6%, both.

09:41 FastAPI is 6% and going up.

09:44 FastAPI just actually had a Ruby on Rails, which is pretty interesting.

09:48 - Wait, so Phoenix is down at 2%, 2.13%, but I thought it was like--

09:54 >> It's the most loved.

09:56 >> Okay.

09:56 >> It's the most wanted. I looked at it, I'm not sure I agree with that, but it's a web framework built on the Elixir language.

10:06 So there you have it. We'll see.

10:08 So yeah, another one here that's worth pointing out, I'm not going to go over too many more.

10:14 Other frameworks and libraries.

10:15 This one is pretty weird in terms of the partition.

10:20 This is what I had in mind when I'm like, there's something really weird about this.

10:23 >> So .NET and NumPy in the same bucket.

10:26 >> Exactly. So .NET is the equivalent of Python.

10:30 It's the equivalent of C++.

10:32 It's the equivalent of Ruby.

10:34 It's like a huge and broad.

10:37 It's the thing that all the other stuff in that ecosystem runs on, ASP.NET or whatever.

10:43 So they say, what other language do you work with?

10:45 Do you work with other libraries?

10:47 Do you work with .NET or do you work with NumPy?

10:49 Or do you work with Panda?

10:50 There's no Python here, and there's no go and there's no no, I don't know.

10:55 Like it just it's I feel like this just fully is like out of place here.

11:00 So if you just go past that the top two are NumPy and Pandas, which by quite a good margin and then Spring for Java, React, Native for mobile with JavaScript, Flutter and but then back to a bunch of Python libraries.

11:15 >> Yeah, like Concern, PyTorch.

11:17 >> Yeah. So Python actually ranks pretty high in the other frameworks and libraries.

11:21 you might be using.

11:22 All right, let's just, let's jump to the loved, dreaded, wanted section, and then that's probably enough.

11:28 People can check out the rest.

11:29 All right, so they've got this sort of, you know, like what is driving the market greed versus fear type of thing.

11:38 And so they put each technology up and it's got a, how much love versus how much hate does this technology get in a single bar, which is the graphics here are pretty nice.

11:48 So rust, 86% love.

11:51 So people who use Rust really like Rust, and they don't strongly dislike it.

11:56 It's probably a self-selecting group, right?

11:58 If you took JavaScript people and told them they had to do Rust, they might not like it, but Rust people seem to really like Rust.

12:04 Elixir, I've never done anything with Elixir, but it's also really high.

12:09 Clojure TypeScript and Python is there about two-thirds loved, one-third dreaded, I suppose, or not loved.

12:17 You can see it goes down from there.

12:18 >> Yeah, I want to talk to those 32 percent of the people and say, what is it that you don't like?

12:23 >> Well, I agree.

12:25 I feel like there's a lot of people who end up, for example, if you look at just the third that says they don't like it, that's 11 times as many people using Elixir, and that's two times as all the people using Rust.

12:37 So I think it's a little bit a scale thing.

12:41 There's a bunch of people who were working in one technology, and then they were told you're going to do Python, and some of them wanted that change, and some of them probably are like, but I like C++ or I like whatever I'm doing and they're unhappy to be in that situation.

12:54 So I imagine there's some of that going on here.

12:56 >> Yeah.

12:57 >> There's less people being moved into Elixir projects unless they really want to, because it's a pretty small group.

13:02 Anyway, there's that.

13:04 Then if you switch to the wanted though, Python and Rust tie for number one in most wanted, along with TypeScript is showing very notable there.

13:12 >> Yeah, nice.

13:13 >> Yeah. Last one, we'll say databases, I suppose.

13:17 Postgres, most loved, least dreaded.

13:20 Redis, again, one of the things like, does this really belong on this list?

13:25 Redis is cool.

13:26 It's mostly for caching and message queues, not really as a standalone independent database.

13:31 So can it really be the most wanted database?

13:33 Technically, I know can make it work that way, but it's not really built for it.

13:37 So I don't know.

13:39 Anyway, Redis is number two, whether it belongs there or not.

13:41 And then MongoDB and SQLite and so on.

13:43 In terms of wanted, Postgres and Mongo.

13:46 >> Nice.

13:46 >> Not too much of a change.

13:48 I think that's pretty much it.

13:50 I'll give just a quick shout out to some graphics that are down here that people can play with.

13:54 If you really want to go explore, Brian, check this out. Which one is this?

13:59 This database one is probably fair.

14:02 There's this giant, I don't know what section is this.

14:05 It is work with versus want to work with.

14:10 It has this wheel.

14:13 As you move around the wheel, It'll show you, for example, 5,000 people who worked with Postgres want to work with SQLite.

14:21 8,000 people who work with MongoDB want to stay with it.

14:24 Whereas 7,000 people who work with MySQL want to move to MongoDB.

14:29 And similarly, there's like, it shows you all these interesting trends and flows from this technology to that technology.

14:36 Like if you go up here to the language one, you go to pros, and you click on C#, it's pretty interesting because like, The C# people, they want to go to TypeScript or Python or JavaScript or HTML, but they don't want to go to Java.

14:49 Like, there's no arc over to Java, right?

14:51 Because these are basically the same technology with slight different trade-offs.

14:54 So if you wanted to be in Java, you would just be in Java, I feel like.

14:57 Which you can sort of check out these flows and stuff.

15:00 So anyway, I think that's more than enough on this survey, but people should go check it out.

15:04 There's a lot of data here and a lot of things to learn.

15:07 - So does that say HypeScript?

15:10 - It doesn't fit on the screen, that's all.

15:12 >> Okay.

15:12 >> It's HypeScript. Yeah, there's just YPE script, TypeScript with, it's just scaling.

15:19 >> Nice. Okay.

15:21 >> Before we move on real quick, John out in the audience says, "It's interesting that MySQL and MariaDB are perceived so differently." Yeah, that is true.

15:29 >> Yeah, I don't know much. I think that MySQL has a problem that people used it a long time ago, and maybe it's different now, but that's what I'm basing it.

15:39 My experience with MySQL is like all over 10 years ago.

15:43 >> Yeah, same. All right.

15:45 What you got for us next?

15:46 >> Well, I wanted to talk about Pepy.

15:50 It's a pepy.tech.

15:53 I found out about this from the person that wrote it, Petru Reres.

16:00 We've talked about something similar.

16:03 What we've talked about before is is pypi-downloadstats or pypistats.org.

16:10 And so I was like, well, what's different?

16:12 So Pepe does download stats for packages.

16:16 So what we're showing here is the stats for pytest.

16:20 And what the pypi-stats does is it shows you a breakdown of, like, you've got the overall packages, but then you can also look at downloads per Python 2 versus 3, and then major and minor versions of Python.

16:37 That's interesting.

16:39 >> Okay.

16:40 >> But actually now, after we're so much far past the two versus three split, I'm not even supporting two anymore.

16:49 What I like is Pepe doesn't do that.

16:53 Pepe is the same stats or same for pytest.

16:56 What it's looking at is it grabs the top handful.

16:59 Let's do the default.

17:01 I have it all customized right now.

17:03 So let's drop those off.

17:06 By default, it shows us the last few versions of pytest plus all of the downloads for the last major one.

17:17 So all the 7x downloads.

17:19 And so the numbers are a little different because we're not showing everything.

17:23 So right off the bat, I kind of like that I'm just caring about the last few versions.

17:28 That's kind of nice.

17:29 It also has a daily, weekly, monthly chart so that you can see trends going on, which is nice.

17:38 I didn't realize at first is that you can select different statistics.

17:46 If I wanted to see everything on all versions, I can just go ahead and type a star there.

17:52 I think that works.

17:53 >> Yeah.

17:54 >> There you go.

17:54 >> Then it does all of the downloads.

17:57 Then also when I just dropped that, I don't know if you noticed, but it shows all the different download stats already.

18:04 So you can get a glimpse of what you're going to find right off the bat.

18:08 Now, going down through the chart, we've got both a chart and a table for when they grab the data.

18:16 This split up of, I'm not looking at Python version, I'm looking at version for the package that I care about, or possibly my package.

18:26 So I did this recently for pytest check, and I was thinking about it for pytest of like which version should I support?

18:33 And clearly like most, like tons of people have switched up to, most people have switched to 7x already.

18:40 So yeah, I think it's perfectly fair game to not support 6x pytest anymore, so why not?

18:48 Anyway, so just a different take on download stats, plus it includes some cool badges that if you want to grab your, like, add this to your, to your repo to say how many downloads per week or per month.

18:59 Kind of neat.

19:01 >> Yeah, that's really cool.

19:03 If you, you know, if you're open, if you're maintaining some open source package, you know, like, and it depends on something like this, like pytest, you just, you can quickly look at that and make a call like, well, how, how important is it for me to support this old version?

19:18 Or how ready am I to move to the new thing?

19:22 adopt this feature that won't allow older versions of Python or whatever it is you're looking at, right?

19:28 Like, should we add types?

19:29 Well, that might not work on, like, where is it?

19:31 3.3 and before?

19:33 Well, that's probably fine.

19:34 - Well, like, on pytest-check, I've got a feature that I'm gonna deprecate, and it's only been in since, like, the last version.

19:41 I just didn't think through the API enough, I think.

19:45 But, so I wanted to take a look, how many people are using the most recent version, and actually, so most of the people are, Quite a few people are using the most recent version.

19:53 But it isn't most, it's if I do a total of every version, it's definitely not most people using the most recent one, but I don't know.

20:04 And of those, I have no idea if they're using the feature or not.

20:07 Anyway, interesting to take a look on it.

20:09 And I appreciate it.

20:10 And it's an open-source project as well.

20:13 And some of these graphs have been updated by a contributor.

20:17 So it's kind of nice to have it while live and well on open source.

20:21 - Peppy, peppy.tech.

20:23 - Yeah. - Very nice.

20:24 Good find, I like it.

20:25 All right, off to our sponsor for the week.

20:28 - Yes, thank you Microsoft for sponsoring this episode.

20:33 This episode is brought to you by Microsoft for Startups Founders Hub.

20:37 Starting a business is hard, but by some estimates, over 90% of startups will go out of business in the first year, ouch.

20:43 With this in mind, Microsoft for Startups set out to understand what startups need to be successful and create a digital platform to help overcome those challenges, and Startups Founders Hub was born.

20:55 Microsoft for Startups Founders Hub provides all founders at any stage with free resources to help solve startup challenges.

21:02 The platform provides technology benefits, access to expert guidance and skilling resources, mentorship, and network connections, and much more.

21:11 Unlike others in the industry, Microsoft for Startups Founders Hub does not require startups to be investor-backed or third-party validated to participate.

21:20 It is truly open to all. What do you get?

21:22 You can speed up development with free access to GitHub and the Microsoft Cloud with the ability to unlock credits over time.

21:30 To help with your startup and to help innovate, Founders Hub is partnering with innovative companies like OpenAI, a global leader in AI research and development to provide exclusive benefits and discounts.

21:41 Through Founders Hub, becoming a founder is no longer about who you know.

21:45 You'll have access to their mentorship network, giving you access to a pool of hundreds of mentors across a range of disciplines, across areas like idea validation, fundraising, management, and coaching, sales and marketing, as well as specific technical stress points.

22:00 You'll be able to book a one-on-one meeting with the mentors, many of whom are former founders themselves.

22:08 Make your ideas a reality today with the critical support you'll get from Microsoft for Startups Founders Hub.

22:13 To join the program, visit pythonbytes.fm/foundershub2022, or click the link in your show notes.

22:21 >> Indeed. Thank you, Microsoft for Startups.

22:23 Let's move over here.

22:26 This next one comes to us from several folks recommended it.

22:32 To be honest, I'm not sure if I would cover it if there wasn't a bunch of people said, "Hey, you should cover this. This is really interesting." I'll take their lead and say, "This does look pretty interesting." So Jeff Hutchins and Abdul Aziz Al-Khwassim sent this in.

22:46 Thank you both for sending it in.

22:48 And this is the Codon Python compiler.

22:50 Have you heard about this, Brian?

22:52 Just from people submitting it.

22:55 Yeah, and people talk about Python performance all the time.

23:00 Sometimes I would say most of the time it doesn't really matter to you.

23:03 Most of the time you're spending way more time waiting on a network, waiting on an API call, waiting on a database.

23:09 But sometimes it really does matter and you need your code to go faster, right?

23:13 So, you know, traditional options have included things like Numba or Cython or even PyPy, P-Y-P-Y for the JIT compiled version of Python.

23:26 So here's one more thing to put into that category of options called Codon from Exaloop.

23:32 And it's a high performance, zero overhead extensible Python compiler using LLVM.

23:38 LLVM is, you know, the compilers that it's used all the time, of course, for a bunch of different things. And they claim that it is on the order of 10 to 100 times or more faster than regular Python for single core performance. And because it really compiles to some native code, let's say also, by the way, sometimes better than C++ in terms of performance, but it also because it compiles to some native representation, it doesn't involved with the gills so you also get better scaling.

24:09 It comes out of this, I think genetics project called SEC, bioinformatics rather, which is this language for bioinformatics.

24:18 I think what they've decided is like, let's just go and just do straight Python.

24:24 If you go to xloop.io, they've got a couple of selling points here.

24:30 Performance SE is a Python.

24:32 It adopts Python syntax and is fully interoperable with Python.

24:36 and they've got this little flow graphic type thing.

24:40 Shows your Python code, and if you look, it's not even type annotated, which kind of surprised me, Brian.

24:45 I figured they would at least require you to add Python type ints.

24:49 But no.

24:50 It says you take Python syntax and semantics, and you feed it in.

24:53 It builds up an abstract syntax tree.

24:56 It does some kind of type inference to figure out what the types are, like ints.

25:01 Comes up with an intermediate representation, And then applies a bunch of JIT style optimizations and domain specific optimizations and outcomes.

25:10 Pretty interesting native code, as I said, but also, where does this show?

25:14 I guess it doesn't have a better picture because it's cut off here.

25:16 Outcomes native code, but also web assembly and GPU targeted code.

25:21 So think about that.

25:22 You want to write some code?

25:23 Say this Python code does matrix stuff.

25:26 I want it to run on my NVIDIA GPU, you know, dash dash GPU or whatever the thing you do to make it come out with that.

25:32 That's pretty, pretty wild.

25:34 Or put it on the web with WebAssembly.

25:36 - It sounds great.

25:38 - It does sound great.

25:39 So they've got some examples.

25:41 It says we're gonna have a list of fruits, just three strings, banana, apple, and lime, and some prices in a dictionary.

25:48 Banana has a price, apple has a price.

25:50 And it says we're gonna write standard for fruit in fruits, F string print out the price of the fruit, and then it's gonna put a bunch of stuff in the cart by doing list multiplication and addition, like you would expect.

26:02 call the sum with a comprehension and print it out, and then boom, no problem, compile that to native code if you want.

26:08 >> Okay.

26:09 >> It's as if you know Python, there's nothing to learn.

26:12 >> The question is, which Python?

26:16 It says Python syntax, but which Python syntax?

26:19 Is it 310, 3.9, 3.11?

26:22 >> It's not clear other than 3.6 or above because of the f-strings.

26:27 The only giveaway I see here.

26:30 >> Possibly lots of people are fine with not exactly knowing which version of the syntax?

26:36 >> Yeah. I didn't say.

26:38 I mean, maybe if you go into the docs, it'll exactly say right, but not in the little landing page.

26:42 It was initially dissolved to solve computing challenges in genomics, which is so focused on.

26:47 Also, it's got a bunch of stuff focused on finance and GPUs for CUDA programming, as well as WebAssembly, which is pretty dope.

26:56 >> Yeah.

26:57 >> Also, if you scroll down a little bit, There's a little video, I'll hit "Tell it to go." There's a video, I'll tell it to stop, I don't know, where they show it running as a kernel in Jupyter Notebooks.

27:09 >> Oh, wow.

27:09 >> Just doing standard Python stuff with mass intensive things, and then pulling in Matplotlib and showing the various things you get with Matplotlib.

27:20 Yeah, it looks pretty good. What do you think?

27:23 >> I think even if it, I'd like to know what version of Python it's compatible with, But other than that, it looks fun.

27:29 >> It looks really good. It's on GitHub.

27:32 It is technically at least source open.

27:36 What is the license here?

27:37 The license is a business source license.

27:40 What the heck is a business source license?

27:42 From MariaDB Corp.

27:44 Yeah, I'm going to have to figure out what the business source license is.

27:47 I don't know how I'm going to do it.

27:49 >> You can read the source, but I don't know.

27:51 >> That's why I said, is it source open or is it not?

27:54 >> Yeah.

27:55 So all this stuff is good.

27:57 And the reason I'm hesitant to recommend it, but I think these benefits are really big and people can use it, then great.

28:05 You go a little further, it says, ExaLoop and you, this is free for non-production use.

28:09 If you wanna use it for things that are commercial, then do you know what it costs?

28:14 - Don't know, contact us.

28:15 - I don't know either.

28:16 If you gotta ask, it's too much for you.

28:18 (laughing)

28:19 Let's just put it there.

28:21 - That's what my dad always said, if you gotta ask, you can't afford it.

28:25 - Exactly, which I don't know, I'm not against them charging for it, I understand that this is probably an insane amount of work to put together, and if that's their model, that's their prerogative, and it's fine, I don't think everything has to be given away free, there's tons of work that goes into a lot of stuff, and sometimes charging for it is the right answer, but just tell people what it costs.

28:46 You know, don't make 'em email you, that is really not good.

28:49 - Well, so Robert mentioned, Robert Robinson, Maybe it's a sliding scale and it's like, it depends on who's asking, you know, Microsoft calls up and asks, it's a different price than.

29:02 - I'm sure it is a different price.

29:03 And I'm sure that's, oh, do you want to run that on all of Azure?

29:06 Well, here's the price, but you know, put some common cases in there.

29:10 And are you a data scientist and you want to use it for an API?

29:14 Here's what it costs.

29:15 Are you trying to host it as a server?

29:17 Well, here, like, then maybe need to, like, there should be at least a little bit of a, here's the realm of where you start, right?

29:25 A lot of things have, you know, here's the base price, here's the pro price, here's the enterprise price, and here's the contact us if that doesn't fit you, right?

29:33 But to say it costs money and we won't tell you what it costs, I don't know, it just sounds not great.

29:39 - And I hope people, so the free non-production, non-commercial versus commercial, that's still a fuzzy line and I wish there was more detail whenever anybody does that because I've been in situations a lot where I'm just some dude writing a script in a company and the company's big, but I just wanna get this thing to work and it's just a small piece of my build chain or something.

30:02 I'm not gonna get okayed to do a corporate license for something just to save me five minutes a day.

30:08 Yeah.

30:09 - And maybe you're not selling it, right?

30:11 - Yeah.

30:11 - For example.

30:12 - Yeah, that's another thing.

30:13 Is it part of the thing I'm selling or is it just part of my work to get something else done?

30:19 >> Indeed. So anyway, pluses and minuses, but it's an interesting contribution and thanks folks for sending that in.

30:27 >> Definitely.

30:28 >> Indeed.

30:28 >> Well, so I want to talk about type hints a little bit.

30:31 I've been thinking about type hints a lot and ran across this article called Eight Levels of Using Type Hints in Python.

30:40 It's from Yang Cho.

30:42 First off, I love the graphic.

30:45 This is an unsplash graphic, but I'm a fan of it.

30:49 It looks like posters, like movie, or like band posters or something like that on something, and then half of them are peeled off.

30:58 So cool image.

31:01 Anyway, complete side note.

31:04 I was attracted to this because this eight stage, I thought of it as like eight stages of using type hints, because that's how I started using type hints, and it almost got the order the same.

31:17 So let's go through these orders.

31:19 So the first one is...

31:21 Did I skip over it?

31:23 The first was type hints for basic data types.

31:26 So basically, and like, you kind of do this if you're using data classes at all.

31:32 You just say, "Well, I've got my age as an int, and it defaults to 29." Just to kind of tell people what you're thinking about.

31:40 And while you're, you know, my hosts are a tuple, and they default to an empty tuple or something.

31:48 So this is pretty much how I started as well, and I started mostly because I started using data classes, and this is what they look like when you're declaring the contents of a data class.

32:00 And then, so where do you go from there?

32:04 The next stage is defining a constant using final type.

32:10 Actually, I've never used this. Have you ever used final?

32:13 >> I've wanted to use it, but it's so not exactly enforced type of thing.

32:20 >> Right. Python doesn't enforce it.

32:23 >> I would love to have a constant in Python, but doing it through typing means the only time it's going to be validated or checked is if I run mypy or something, and most of the time I'm not.

32:34 It's like, well, okay, whatever.

32:36 >> Yeah. I'm actually increasing the amount of times I'm using mypy or other type checking things.

32:44 But yeah, I wouldn't have put this number two, but minor gripe. It's a cool feature.

32:48 >> It is a cool feature though. Yeah. I don't knock it's existence.

32:52 I just wish it was more supported in the language.

32:55 >> Yeah. The third is adding multiple type hints to one variable.

33:01 It shows here a couple of different ways, the union of an int and a float or the bar of int and float.

33:09 The number one way I use this, I mean, I use things like this also, like it could be an int or a float, but I mostly use it for int or none, or something or none because I've got a default value of none.

33:25 I wish there was another way to do it.

33:28 I don't know, it's convenient anyway, but let's say I've got a parameter to a function, and internally I assign it, It defaults to none if nobody passes anything in.

33:40 But I also don't really want somebody to pass none in, you know?

33:44 So I wish there was a, like, the default is none, but users can't pass in none or something like that.

33:51 Yeah.

33:52 But anyway, it works. And in the end, it helps with testing anyway to be able to pass in all the types.

33:59 But so, yeah, and I've totally switched to the bar thing.

34:04 I think it was 3.10 that added that. Do you remember?

34:06 I think it was 310.

34:08 >> I think it was 310.

34:09 >> It says right here.

34:10 >> It says there.

34:11 >> Anything I'm writing, I support 310 and above because I like the bar.

34:17 The next thing is using general type ints, which also I think now we're starting to increase the stage of understanding of how type ints can help you.

34:28 The notion like in the example, they use iterable from typing import iterable.

34:36 So you say that I'm accepting something like numbers, and it takes an iterable.

34:41 I love this use.

34:44 It takes a little bit more of advanced use, so you get a little more comfortable with type hints.

34:49 To be able to say, I'm going to do iteration like for in and nums.

34:53 Doesn't really matter what it is, if it's a list or a tuple or something else, as long as I can iterate over it, it's good.

35:01 The other thing is probably, I'm not sure why they didn't put is optional, but along the same is iterable.

35:09 I'm going to often say it's iterable, but the type inside is an int or something like that.

35:16 But anyway.

35:17 >> Right.

35:18 >> The fifth one is.

35:19 >> Bracket int or something like that.

35:21 >> Yeah.

35:21 >> Or bracket strings, what you get out.

35:23 >> The fifth is type ints for functions, and I probably would have put this as number two, because I started using this right away.

35:32 to say, because that's one of the things that's hard when I came to Python from C++ is knowing, like, where do I put the return value?

35:43 Like, the return type is, you know, maybe it's multiple return types, which I don't really want it to be, but it's nice to be able to see what the return type is and type ints add that with type ints for functions.

35:56 Or you read a function, you know, like, I want to call that, but what do I do?

36:01 I have to read the function and try to understand it or can I just read the definition?

36:06 I think this is one of the main uses.

36:08 And it's also nice to be able to see right there with a union type is not a possibility.

36:15 Do I have to deal with nothing coming back as something is possible.

36:20 Number six is alias for type hints and I kind of love this.

36:24 I haven't been using this much, but I'm going to start using it more.

36:28 Especially it says in Python 3.10, so before Python 3.10 you had to do like from typing import type alias and have this weird syntax thing around it.

36:38 But it's not really that weird. But after 3.10 you just sort of declare a thing. It says like post type. Post type is a dict that goes from int to string. That's great.

36:51 And then you can use that as a type int in other places.

36:54 That's interesting. That's news to me. Yeah, that's really interesting.

36:57 So definitely, I'll definitely start using that. So I'm glad I read the article for that.

37:01 Type hints for class, for a class itself, which I'm not sure why it was titled this, but basically it's the self type.

37:09 And this is very helpful if you have a class, a class that has objects that refer to other objects of the same type.

37:16 I don't know how you did that before then. I guess I wasn't caring about it.

37:20 But you had to, there was a hack where you put it into quotes. So the example from this article is a class called ListNode, and it's going to be past the previous node, right? So what is the type of that?

37:32 Well, it should be a ListNode. Python is in the process of building up the ListNode class, so it doesn't yet know what it is, but you're trying to define a function that has that.

37:41 So there's this weird patch 22 thing, pick and egg thing.

37:44 So what you put is you would put ListNode in quotes. That's the old version.

37:48 And of course it was just a string, but then it's like, well, but it's a string that says that, so we're going to just guess that that's what you want. It was weird.

37:56 >> Okay. Well, the eighth and final one is to provide literals for variables.

38:02 I haven't done this, but it's nice also, and I didn't know you could do this.

38:06 Just to say, in the example, it's from typing import literal, and then you define a weekend that's a literal that can only be the strings Saturday or Sunday.

38:19 This isn't an enumeration, it's just saying that it can only have these particular values.

38:26 I think I got that right. I don't think it has to be an enumeration.

38:29 >> No.

38:31 >> The example says, well, if you assign that variable to Monday, your type checkers are going to complain because you didn't assign the one of the known ones.

38:42 I probably would use this in conjunction with enums, or maybe I don't have to with enums, I don't know.

38:49 But there's a lot of stuff that is passed around that's kind of like an enum, but it's passed around as just a handful of strings that it can only be one of these strings.

38:57 >> Yeah. Be nice for this to support it.

38:59 Henry on the audience points out that x colon final equals true, also maps to one of these literal checks.

39:06 So is literal of true rather than just a bool.

39:09 So the type checker can make sure it's always true, not true or false.

39:12 So there's an interesting tie together of those as well.

39:15 Robert points out that it sounds like a case of the Mondays.

39:18 - Oh dear.

39:20 And Henry mentions that last time I checked, self was not supported by mypy, but so we'll have to check on that.

39:27 Anybody from mypy listening, - Let us know.

39:30 - Let us know.

39:31 Well, that's it for this.

39:33 I just thought it was a good, and I do think this is a good idea is to not try to jump in the deep end of type hints.

39:41 Try some of the simple stuff first and then you get to caring about it.

39:48 - Yeah, that was a good little discussion around it.

39:51 That was fun.

39:51 - Yeah.

39:52 - All right, got any extras for us you want to throw out there?

39:54 - The only extra I wanted to bring up is the Test and Code hasn't had an episode since like October or something, and it's not dead.

40:02 I just kind of wanted to take the holiday off without telling anybody, and it's coming back.

40:09 So sometime in January, there'll be a Test and Code episode.

40:12 - Oh, excellent, looking forward to it.

40:13 All right, I have a few extras, and one leads to another, which leads to another, as is the nature of all these things.

40:19 So I ran across a couple of articles, let me start that way, that sort of talked about RSS and how RSS is actually kind of important as a foundation of the independent web in ways maybe bigger than I really realized.

40:33 So there's this one called "Back to RSS" and I'll just read a little excerpt from each of them.

40:36 It says, "It's 2023 or 1999 or whatever.

40:40 "Personal sites are back, blogs are back, "RSS is back, and owning your data is becoming real," which is kind of a cool thing.

40:46 And then also there's this one the same day on the Verge called Bring Back Personal Blogging.

40:52 And yeah, anyway, so I ended up writing a Welcome Back RSS article that kind of riffed on those ideas and talked about some more, talked about Reader, which I talked about before and stuff.

41:03 So yeah, anyway, people can go check out that article and it's interesting.

41:07 And as part of the conversation, I learned about Reader, as in reader.readthedocs.io, which is a Python feed reader library.

41:17 So it does things like let you subscribe with Python to RSS and Adam and JSON feeds, mark articles as read and important, filter them, get stats, do all of it.

41:28 Basically, if you wanted the logical internals of an RSS reader, here's a Python library to do that, which is cool.

41:34 >> Now, what we need to do is have a listener take reader and put a textual front end on it.

41:41 >> Yes, actually, that's a pretty interesting idea.

41:43 >> That'd be cool.

41:44 >> This guy over here built a thing called Kustos, which is basically like Instapaper, self-hosted Python web app built on Reader.

41:55 So people can check that out.

41:57 Then Readwise looks really interesting.

41:59 Are you familiar with Readwise?

42:01 >> No.

42:01 >> So it's like an RSS reader, but it also lets you take notes, mark stuff as read for later, even if it doesn't have an RSS feed, and highlight your research as you're to go in through it and save it.

42:15 So think how good that would be for people that say, dude, podcaster, you gotta remember a bunch of stuff about an article.

42:20 Pull that thing back up and it's got your highlights and your notes on it.

42:23 - Oh, I'm liking this.

42:24 I'm gonna have to check it out.

42:26 - Yeah, that's looking pretty good.

42:27 So anyway, all that stuff came from this little article that I wrote, people can check that out.

42:31 - Nice.

42:32 - Another very important thing, there's this Mastodon account called Year Progress, and it just goes along and every day, it just posts a progress bar for how far we are in the daily progress.

42:47 So it's like a little ASCII, you know, TQ, DM style progress bar of the year.

42:54 And it's just notable that we just had 100% progress for the year.

42:59 Now that we're done, it's reset to zero, but it was 100%.

43:02 - Actually, it looks like it doesn't actually do it every day, but it does it when it goes to a new percentage, so it's every few days, or two or three days, right?

43:09 - Yeah, yeah, it looks like it.

43:11 which I guess is probably good.

43:12 I mean, thank you for not doing, like saving 3.6, 2.6 posts, something like that.

43:18 All right.

43:20 - And don't just watch it, wait for it.

43:22 - It's not that exciting, it doesn't actually drop in.

43:26 It has no decimal point, so it's not, it's gotta work in big ASCII blocks, so it does what it does.

43:32 All right, this is something that people might wanna keep an eye out who had automated build running over the winter break and also use PyTorch.

43:42 So one of the thoughts I had, I was just kicking back, we're hanging around.

43:47 I'm like, "I'm going to work on some of these little weird projects.

43:51 I'd like the login page on Talk Python Training just be a little smoother and cleaner.

43:55 Maybe I'll just go play with that.

43:56 I'm not really going to do real work, but it'd be fun to do some web design and just no pressure redesign that a little bit." I thought, "But I'm going to be careful about adding new libraries, updating existing ones like pip-tools, style, update them.

44:11 Because is anybody watching?

44:13 If something bad got in there, would anybody know or they all on break?

44:17 Well, it turns out my paranoid side was on to something.

44:21 Luckily, not anything I was using, but PyTorch discloses malicious dependency chain compromise over the holidays.

44:27 This is bad.

44:29 If you pip installed somehow the PyTorch stuff, I don't know the exact how it links together, but it says PyTorch has identified a malicious dependency with the same name as the frameworks Torch Triton library.

44:42 So that was like somehow shipped or directly linked in PyTorch in a way that I don't fully understand 'cause I don't use it.

44:50 But what happened is on Merry, Merry Christmas, on December 25th, users who installed PyTorch nightly should ensure their systems are not compromised because this Triton torch, what they did is somebody put a malicious version on PyPI and when PyTorch was getting set up, instead of picking its own version, it preferred the PyPI version, which was a virus.

45:15 So anyway, people can check that out.

45:17 It's sub-ideal.

45:19 Since the PyPI index takes precedence, this malicious package was being installed instead of the version from the official repository.

45:26 This enables somebody to register a package to do bad things.

45:30 Anyway, people can read all about that, But if you have PyTorch and you pip installed it over the point of break, read that.

45:36 - Yeah, plus kudos for them for coming up with a great domain name, bleepingcomputer.com.

45:41 - Yes, I know, bleepingcomputer.

45:42 There's a lot of good articles on bleepingcomputer.

45:45 It's in my RSS feed.

45:46 All right, well, that's all I got for extras.

45:49 How about a joke?

45:50 - Yeah, that sounds great.

45:51 - So first of all, let me, I don't wanna kill the punchline before we set the stage.

45:56 Okay, so I pulled up just the picture.

45:58 Can you tell people what this is on the screen, Brian?

46:01 You remember these things?

46:02 - Well, remember, they're still there.

46:04 - Not on my laptop, not on my Mac mini.

46:07 - Okay, it's on the back of like a computer or something, a desktop computer.

46:13 Next to the power cord, there's a toggle switch with a on and off, it's on and off toggle switch.

46:19 - Right, it's like a physical power button directly on the power supply on a desktop computer, right?

46:24 - Yep.

46:25 - Yeah, and Robert got it exactly right.

46:27 So here is the joke.

46:28 they finally made a switch to exit VIM.

46:30 (laughing)

46:33 And they've highlighted that physical power button on the back of the power supply.

46:38 - Nice.

46:39 - You're a VIM lover, so I won't rub it in too much, but that's a pretty effective way to exit VIM.

46:46 - VIM runs in a window, so just close the window.

46:49 Funny thing about power switches, So I used to work with a lot of, so I work with embedded systems and some of them run Windows embedded.

47:03 And embedded systems are supposed to be able to toggle the power off, just like from the power supply.

47:10 And now normal Windows, you're not supposed to do that because you wanna let it shut down gracefully and if the disk is moving at the time, and there's even with Windows embedded, there's some issues or any embedded operating system, There are a possibility you could do some damage to the disk if you power off at exactly the right time.

47:31 But there's supposed to be safeguards in place to take care of it.

47:34 So I'm just in the habit of using these things all the time, of like toggle off and on.

47:39 And if we get like a new batch of people in that are mostly from DevOps or from non-embedded worlds, they're like, "What are you doing?" - You're gonna break it?

47:49 - Yeah, you're gonna break it.

47:50 Like, no, these are good.

47:52 - Yeah.

47:53 (laughing)

47:54 Yeah, my little circuit Python thing.

47:56 It doesn't have a power switch.

47:57 You just disconnect it from power.

47:59 If you want it off.

48:00 That's how it works.

48:02 Well, and one of the reasons, now I'm going in the weeds, but one of the reasons for the, the, the, the need for the ability to just power off is because a lot of times instruments are in a huge rack and you don't go through and power off each individual instrument.

48:14 You just turn the rack off.

48:16 so.

48:17 Wow.

48:17 Interesting.

48:18 Cool.

48:18 Well, it's good to be back in 2023.

48:21 Yeah, it is good to be back.

48:23 So welcome back and, thanks everybody for tuning in.

48:28 Yeah.

48:29 You bet.

48:29 Bye.

Back to show page