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:04 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:14 It is very exciting. 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. Do you remember 2022? It just feels like a few days ago.

00:26 It honestly, it really flew by. Yeah.

00:30 I mean, we stayed inside for like two years and they're like, hey, look, we're going 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 Nice.

00:39 And then Oregon said we're going to rain for two weeks.

00:41 Of course. Of course it did.

00:43 Yeah. Well, let's kick it off. What do you got for us first?

00:46 All right. 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 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:08 Yeah.

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

01:11 Notice the scroll bar.

01:13 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.

01:20 So they did that as well for us at the top here.

01:22 They kind of summarized some little things you can call out in the jump to other sections saying,

01:26 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,

01:35 whereas the youngins are more likely to use some kind of online course or, you know, YouTube video or something along those lines.

01:45 Does that surprise you?

01:46 No.

01:47 Yeah, me either.

01:49 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 And I kind of feel like the hype and the heyday of Docker was actually a couple of years ago.

02:12 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 used to.

02:24 Like what?

02:25 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:39 CI systems are utilizing Docker more.

02:43 Sure.

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

02:48 Is that how you would phrase it?

02:49 Little apps to Raspberry Pis for like home automation and stuff.

02:54 Really?

02:54 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:09 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?

03:17 Right.

03:17 What, what would they do if they were unencumbered by, you know, their boss saying, nope, we're using this particular database or nope, it's all Angular.

03:26 And you're on the team that does Angular, so I don't care what you want, you're doing Angular, you know?

03:30 And so Rust is on its seventh year as the most loved language.

03:35 Seven years?

03:36 Is it even seven years old?

03:38 I know.

03:39 I know.

03:39 That's my thought as well.

03:40 Okay.

03:41 Seven percent of developers saying they want to continue using it.

03:45 Wow.

03:45 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.

03:56 That's cool.

03:57 I can see that.

03:58 Yeah, absolutely.

03:59 Phoenix.

04:00 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:09 All right.

04:10 What else?

04:11 Go ahead.

04:11 Oh, just React.

04:13 Yeah.

04:14 It's 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,

04:23 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 Education.

04:32 Education profile.

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

04:39 No, that's fine.

04:40 I just thought it was funny that you said I don't care about education.

04:43 No, I don't.

04:47 Teacher, you know, leave the kids alone.

04:49 All right.

04:49 So no, like it's fine, but it's, you know, people can check it out if they care about it,

04:54 right?

04:54 Like 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 Like, yeah, it totally is.

05:04 Right.

05:05 But, you know, that's also not news.

05:07 So, 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,

05:16 there's like, it's almost all these responses are broken into two segments, professional

05:20 developers and learning to code people.

05:22 And the default is to take all those together.

05:26 And I guess that's the biggest picture.

05:28 But I don't know.

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

05:32 Like, you know, if some, if you're on your third week of a coding tutorial and that tutorial

05:38 says use this, like how, how much does that really speak to the state of the community?

05:43 I don't think it, you know.

05:44 Agreed.

05:45 So I'm checking, like when I think about these, I'm just going to check professional

05:49 developer.

05:49 And if you want the same numbers, you can do so as well.

05:51 So where are we?

05:52 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:04 Let's see what the question exactly is.

06:05 Which programming languages have you done extensive development work in over the year, over the

06:12 last year?

06:12 Okay.

06:13 I, I don't know how quite how to solve this problem, but there's a ton of Python people

06:17 who did JavaScript work.

06:18 Yeah.

06:19 There is a ton of C++ people who did SQL, right?

06:24 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

06:32 write SQL and not use something else.

06:36 Right.

06:36 So that's, it's weird to have SQL even in there.

06:40 Yeah, I know.

06:40 Well, HTML and CSS, right.

06:43 Is, is like a little bit weirder as well.

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

06:50 like, you know, something like that.

06:52 Right.

06:52 I feel like it's, it's, it's kind of like favorite movie.

06:55 Like 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 Exactly.

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

07:07 JavaScript is should represent.

07:08 Yeah.

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

07:11 Aggregated.

07:11 so I don't know.

07:12 It's, these are a little bit weird, but I'll just go to the top.

07:15 Yeah, back end.

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

07:20 Right, right.

07:21 Or maybe you're using Node on the back end, but then other than that.

07:24 So, JavaScript, number one, HTML, top programming language.

07:28 Okay.

07:28 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, your, your, VM, garbage collected JavaScript, Java and C# back there.

07:42 And then it starts to fall, 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.

07:49 And APL.

07:50 Oh my gosh.

07:50 APL.

07:51 APL is, is, something.

07:53 All right.

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

07:57 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:08 Like MySQL was higher and now Postgres is passing it.

08:12 But, you know, that's kind of, going up, here.

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

08:18 We'll also see that in like the loved versus dreaded section.

08:22 Yeah.

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

08:28 Indeed.

08:28 Yeah.

08:29 All right.

08:30 So cloud platforms, you know, AWS, I'm going to surprise you that AWS has over half of the entire market.

08:37 No.

08:37 No.

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

08:41 So.

08:41 Yeah, exactly.

08:42 web technologies.

08:44 Here's another one.

08:45 no, not this.

08:47 This one's kind of, kind of okay.

08:48 But like, for example, they've got Node.js, but they don't have Python, right?

08:54 So, I don't know.

08:55 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 Which is, I don't know.

09:07 Anyway, it's a little bit of a challenging one.

09:09 But Node and React are quite high up there.

09:12 Look at this artifact, this living fossil right here, Brian.

09:17 What's number three?

09:18 jQuery.

09:19 jQuery.

09:20 You know it.

09:21 Dollar document ready.

09:23 Let's go.

09:23 All right.

09:25 I learned jQuery a long time ago.

09:26 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.

09:31 It's gonna, I'm just gonna put one handler in here and not worry about it.

09:34 FastAPIs on the list.

09:35 Yeah, FastAPIs on the list.

09:37 Django and Flask are 14.6%.

09:40 Both.

09:41 FastAPIs, 6% and going up.

09:44 FastAPIs 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:53 It's the most loved.

09:55 Okay.

09:56 It's the most wanted.

09:57 I'm not, I looked at it, I'm not sure I agree with that, but it's a web framework built on

10:04 the Elixir language.

10:05 So, there you have it.

10:07 And we'll see.

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

10:14 Other frameworks and libraries.

10:15 This one is pretty weird in terms of like 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.

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

10:26 Exactly.

10:26 So, .NET is the equivalent of Python.

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

10:32 It's the equivalent of Ruby, right?

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

10:36 And it's the thing that all the other stuff in that ecosystem runs on, right?

10:41 ASP.NET or whatever.

10:43 And 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 Pandas?

10:50 There's no Python here, right?

10:52 And there's no Go and there's no, no.

10:54 I don't know.

10:55 Like, it's 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.

11:06 And then Spring for Java, React Native for mobile with JavaScript, Flutter.

11:11 And, but then back to a bunch of Python libraries.

11:15 Yeah.

11:15 Like you learn PyTorch.

11:17 Yeah.

11:18 So, Python actually ranks pretty high in the other frameworks and libraries you might be using.

11:22 All right.

11:22 Let's just, let's jump to the loved, dreaded, wanted section.

11:27 And then that's probably enough.

11:28 People can check out the rest.

11:29 All right.

11:30 So, they've got this sort of, you know, like what is driving the market?

11:35 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:47 So, Rust, 86% love.

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

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

11:57 If you made, if you took, I don't know, JavaScript people and told them they had to do Rust, they might not like it.

12:02 But Rust people seem to really like Rust.

12:04 Elixir.

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

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

12:16 And you can see it goes down from there.

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

12:23 Well, I agree.

12:24 I feel like there's a lot of people who end up, so, for example, if you look at just the third that says they don't like it,

12:31 that's 11 times as many people using Elixir.

12:34 And that's two times all the people using Rust.

12:37 So I think it's a little bit, you know, a scale thing, right?

12:40 Like, there's a bunch of people who were working in one technology and then they were told, you're going to do Python.

12:45 And some of them wanted that change and some of them probably like, but I like C++ or I like whatever I'm doing.

12:51 And, you know, they're unhappy to be in that situation.

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

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

13:02 Anyway, there's that.

13:04 And 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.

13:12 Nice.

13:13 Yeah.

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

13:16 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 You 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:38 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 No, not too much of a change.

13:48 All right.

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.

13:57 Like, which one is this?

14:00 This database one's probably fair.

14:01 So there's this giant, I don't know what section is this.

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

14:09 Okay.

14:09 So it has this wheel.

14:12 And as you move around the wheel, it'll show you, for example, 5,000 people who worked with

14:18 Postgres want to work with SQLite.

14:20 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

14:35 technology to that technology.

14:36 Like if you go up here to the language one and you go to pros and you click on C#, it's

14:42 pretty interesting because like the C# people, they want to go to TypeScript or Python

14:46 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 Yeah.

14:58 You can sort of check out these flows and stuff.

15:00 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:09 HypeScript?

15:10 It doesn't fit on the screen.

15:11 That's all.

15:12 Oh, okay.

15:12 It's HypeScript.

15:13 Hype.

15:14 Yeah.

15:15 There's just YPE script.

15:16 HypeScript with, yeah, it's just a scaling.

15:19 Nice.

15:20 Yeah.

15:20 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.

15:27 Yeah.

15:28 That is true.

15:29 Yeah.

15:29 I don't know much.

15:30 I think that MySQL has a problem that people used it a long time ago, and maybe it's different now, but I mean, that's what I'm basing it.

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

15:43 Yeah.

15:44 Same.

15:44 All right.

15:45 What you got for us next?

15:46 Well, I wanted to talk about Peppy, or I don't know.

15:51 It's P-E-P-Y.tech.

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

15:59 So we've talked about something similar.

16:03 What we've talked about before is PyPI download stats or pypistats.org.

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

16:12 So Peppy 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,

16:27 but then you can also look at downloads per Python 2 versus 3, and then major and minor versions of Python.

16:37 And so that's kind of interesting.

16:39 Okay.

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

16:49 So what I like is Peppy doesn't do that.

16:53 So Peppy's same stats are same for pytest.

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

16:59 So let's do the default.

17:00 I have it all customized right now.

17:03 So let's drop those off.

17:05 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 And it also has a daily, weekly, monthly chart so that you can kind of see trends going on, which is nice.

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

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

17:51 I think that works.

17:53 Yeah.

17:53 There you go.

17:54 And then it does all of the downloads.

17:56 And 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 kind of 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:15 And this split up of, I'm not looking at Python version.

18:20 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.

18:28 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.

18:46 So why not?

18:47 Anyway, so just a different take on download stats.

18:51 Plus, it includes some cool badges that if you want to grab your, like add this to your repo to say how many downloads per week or per month.

19:00 Kind of neat.

19:00 Yeah, that's really cool.

19:03 If you, you know, if you're open, if you're maintaining some open source package and you're like, and it depends on something like this, like pytest, you just, you can quickly look at that and make a call.

19:14 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:21 Adopt this feature that won't allow older versions of, you know, 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 that?

19:31 3.3 and before.

19:33 Yeah.

19:33 Well, like on pytest-check, I've got a feature that I'm going to deprecate.

19:38 And it's only been in since like the last version.

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

19:44 But so I wanted to take a look how many people are using the most recent version.

19:48 And actually, so most of the people are, or quite a few people are using the most recent version.

19:53 But it isn't most.

19:55 It's, if I do like a total of every version, it's definitely not most people using the most recent one.

20:02 But I don't know.

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

20:06 Anyway, interesting.

20:08 Take a look on it.

20:09 And I appreciate it.

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

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

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

20:21 Peppy.

20:22 Peppy.

20:22 Tech.

20:23 Yeah.

20:23 Very nice.

20:24 Good find.

20:24 I like it.

20:25 All right.

20:25 Off to our sponsor for the week.

20:27 Yes.

20:28 Thank you, Microsoft, for sponsoring this episode.

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

20:37 Starting a business is hard.

20:38 But by some estimates, over 90% of startups will go out of business in the first year.

20:42 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.

20:52 Microsoft for 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.

21:21 So 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:07 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/foundershub 2022 or click the link in your show notes.

22:21 Indeed.

22:21 Thank you, Microsoft for Startups.

22:23 Let's move over here.

22:26 So this next one comes to us from several folks recommending it.

22:31 And 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.

22:36 This is really interesting.

22:36 So I'll sort of take their lead and say, this does look pretty interesting.

22:40 So Jeff Hutchins and Abdulaziz Al-Skwasim sent this in.

22:46 Thank you both for sending.

22:47 And this is the CodeOn Python compiler.

22:50 Have you heard about this, Brian?

22:51 Just from people submitting it.

22:54 Yeah.

22:55 And people talk about Python performance all the time.

22:59 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:08 But sometimes, it really does matter.

23:11 And you need your code to go faster, right?

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

23:25 So here's one more thing to put into that category of options called CodeOn from ExaLoop.

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

23:37 And LLVM is one of the compilers that gets used all the time, of course, for a bunch of different things.

23:45 And they claim that it is on the order of 10 to 100 times or more faster than regular Python for single-core performance.

23:53 And because it really compiles to some native code.

23:57 They say also, by the way, sometimes better than C++ in terms of performance.

24:01 But it also, because it compiles to some native representation, it doesn't involve the GIL, so you also get better scaling.

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

24:18 And I think what they've decided is like, you know, let's just go and just do straight Python, right?

24:24 And if you go to exaLoop.io, they've got a couple of sort of selling points here.

24:30 Performance, I see, 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.

24:41 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 add, you know, Python type ints.

24:48 Yeah.

24:48 But no.

24:49 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 optimization.

25:06 And domain specific optimizations and outcomes.

25:10 Pretty interesting.

25:11 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 WebAssembly and GPU targeted code.

25:21 That's cool.

25:21 Think about that.

25:22 You want to write some code?

25:23 This Python code does matrix stuff.

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

25:32 It'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 going to have a list of fruits, just three strings, banana, apple, and lime, and some prices.

25:47 In the dictionary, banana has a price, apple has a price.

25:50 And it says we're going to write standard for fruit in fruits.

25:53 F string, print out the price of the fruit.

25:56 And then it's going to 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.

26:05 And then, boom, no problem.

26:06 Compile that to native code if you want.

26:08 Okay.

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

26:11 Yeah, it's a bunch of...

26:13 Yeah, go ahead.

26:14 The question is, which Python?

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

26:19 Is it 3.10, 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 And possibly lots of people are fine with not exactly knowing which version of the syntax.

26:36 Yeah, it didn't say.

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

26:41 It was initially dissolved to solve computing challenges in genomics, which it's 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.

27:00 Let me, I'll hit, tell it to go.

27:01 There's a video.

27:02 I'll tell it to stop.

27:02 I don't know.

27:03 Where they show it running as a kernel in Jupyter Notebooks.

27:09 Oh, wow.

27:10 Just doing standard Python stuff with kind of mass intensive things and then pulling in matplotlib and showing the various things you get with matplotlib.

27:20 So, yeah, it looks pretty good.

27:21 So, 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:28 It looks really good.

27:30 It's on GitHub.

27:32 And so, 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:41 Okay.

27:42 From MariaDB Corp.

27:43 Yeah.

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

27:47 I don't know.

27:47 You can read the source, but it's hard.

27:51 I don't know.

27:52 That's what I said.

27:52 Is it source open or is it not?

27:54 Yeah.

27:54 And so, all this stuff is good.

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

28:04 You go a little further, it says ExalupinU.

28:07 This is free for non-production use.

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

28:13 Don't know.

28:14 Contact us.

28:15 I don't know either.

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

28:18 Let's just put it there.

28:20 That's what my dad always said.

28:22 If you got to ask, you can't afford it.

28:24 Exactly.

28:25 Which, I don't know.

28:27 I'm not against them charging for it.

28:29 I understand that this is probably an insane amount of work to put together.

28:32 If that's their model, that's their prerogative and it's fine.

28:36 I don't think everything has to be given away free.

28:39 There's tons of work that goes into a lot of stuff.

28:41 And sometimes charging for it is the right answer.

28:43 But just tell people what it costs.

28:45 You know, don't make them email you.

28:47 That is really not good.

28:49 So, Robert mentioned, Robert Robinson, maybe it's a sliding scale.

28:54 And it's like, it depends on who's asking.

28:56 You know, Microsoft calls up and asks.

28:59 It's a different price.

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

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

29:06 Well, here's the price.

29:07 But, you know, put some common cases in there.

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

29:13 Here's what it costs.

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

29:17 Well, here, like, then maybe you need to, like, there should be at least a little bit of a,

29:21 here's the realm of where you start, right?

29:24 A lot of things have, you know, here's the base price.

29:27 Here's the pro price.

29:28 Here's the enterprise price.

29:30 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.

29:36 I don't know.

29:37 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.

29:46 And I wish there was, like, more detail.

29:48 Whenever anybody does that.

29:49 Because I've been in situations a lot where I'm just some dude writing a script in a company.

29:55 And the company's big.

29:56 But I just want to get this thing to work.

29:58 And it's just a small piece of my build chain or something.

30:01 I'm not going to get okay to do a corporate license for something just to save me five minutes a day.

30:08 Yeah.

30:09 Maybe you're not selling it, right?

30:10 Yeah.

30:11 For example.

30:11 Yeah.

30:12 That's another thing.

30:13 Is it part of the thing I'm selling?

30:15 Or is it just part of my work to get something else done?

30:19 Yep.

30:19 Indeed.

30:20 So anyway, pluses and minuses.

30:23 But it's an interesting contribution.

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

30:33 And ran across this article called Eight Levels of Using Type Hints in Python.

30:39 And it's from Yong Cho.

30:42 And first off, I love the graphic.

30:44 This is an Unsplash graphic.

30:46 But I'm kind of a fan of it.

30:49 It looks like posters, like band posters or something like that on something.

30:56 And half of them are peeled off.

30:58 So cool image.

31:01 Anyway.

31:01 Yeah.

31:01 Complete side note.

31:04 So I was attracted to this because this eight stage.

31:08 I kind of thought of it as like eight stages of using type hints.

31:11 Because that's kind of how I started using type hints.

31:15 And it almost got the order the same.

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

31:19 So the first one is, did I skip over it?

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

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

31:31 You just say, well, I've got my age as an int.

31:35 And it defaults to 29.

31:37 Just to kind of tell people what you're thinking about.

31:40 And while you're, you know, my hosts are a tuple.

31:45 And they default to an empty tuple or something.

31:48 So this is pretty much how I started as well.

31:51 And I started mostly because I started using type data classes.

31:55 And this is what they look like when you're declaring the contents of a data class.

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

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

32:09 Actually, I've never used this.

32:11 Have you ever used final?

32:12 I've wanted to use it.

32:15 But it's so not exactly enforced type of thing.

32:20 It's like, I would love to have a constant in Python.

32:26 But doing it through typing means the only time it's going to be validated or checked

32:30 is if I run mypy or something.

32:32 And most of the time, I'm not.

32:33 So it's like, well, okay, whatever.

32:36 I'm not saying.

32:36 Yeah.

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

32:43 But yeah, I wouldn't have put this number two.

32:46 But minor gripe.

32:47 It's kind of a cool feature.

32:48 It is a cool feature, though.

32:49 Yeah.

32:49 I don't knock its existence.

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

32:54 Yeah.

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

33:00 Like it shows here a couple different ways.

33:03 The union of an int and a float or the bar of int and float.

33:08 And the number one way I use this, I mean, I use things like this also.

33:14 Like it could be an int or a float.

33:16 But I mostly use it for like int or none or something or none because I've got a default

33:23 value of none.

33:24 And I kind of wish there was another way to do it.

33:28 Because when you have a, I don't know, it's kind of convenient anyway.

33:31 But like let's say I've got a parameter to a function and it defaults when I internally

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

33:50 like that.

33:51 Yeah.

33:52 But anyway, it works.

33:54 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 310 that added that.

34:06 Do you remember?

34:06 I think it was 310.

34:07 I think it was 310.

34:08 Yeah.

34:09 It says right here.

34:09 It even says there.

34:10 Yeah.

34:10 Uh-huh.

34:10 Yeah.

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

34:16 The next thing is using general type hints, which also this is, yeah, I think now we're starting

34:23 to increase the stage of understanding of how type hints can help you.

34:28 And the notion, like in the example, they use iterable as, you know, from typing import

34:35 iterable.

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

34:41 I love this use.

34:43 And I, you know, it takes a little bit more of advanced use.

34:46 You get a little more comfortable with type hints.

34:48 And to be able to say, I'm going to do iteration like 4in and nums, it doesn't really matter what

34:54 it is, if it's a list or a tuple or something else, as long as I can iterate over it, it's

35:00 good.

35:00 So, and the other thing is probably, and I'm not sure why they didn't put, is optional, but

35:07 along the same as iterable, I like, I'm going to often say it's iterable, but the type inside

35:13 is an int or something like that.

35:16 But anyway.

35:17 Right.

35:18 The fifth one is a little bracket int or something like a whole bracket string so you know what

35:22 you get out.

35:23 Yeah.

35:23 The fifth is a type hints for functions.

35:26 And I probably would have put this as like number two because I started using this right

35:30 away of, yeah, to say, because it's, that's one of the things that's hard with when I came

35:38 to Python from C++ is knowing like, where do I put the return value?

35:43 Like the return type is, is, you know, maybe, maybe it's multiple return types, which I don't

35:49 really want it to be.

35:50 But, but it's nice to be able to see what the return type is and type hints add that

35:54 with, with type hints for functions.

35:56 Right.

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

36:00 Yeah.

36:01 Do I have to read the function and try to understand it?

36:04 Or can I just read the definition?

36:05 Right.

36:06 I think this is one of the main uses, right?

36:08 Yeah.

36:08 Yeah.

36:08 Yeah.

36:08 And it's also nice to be able to see right there with a union type is, 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.

36:22 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 with in Python 310.

36:31 So before Python 310, you had to do like from typing import type alias and have this weird

36:37 syntax thing around it.

36:39 But it's not really that weird.

36:41 It's a, but the, after 310, you just sort of declare a thing.

36:45 It says like post type posts type is a dict that goes from it to string.

36:50 That's great.

36:50 And then you can use that as a type hint or other places.

36:54 So that's interesting.

36:55 That's news to me.

36:56 Yeah.

36:56 That's really interesting.

36:57 So definitely, I'll definitely start using that.

36:59 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

37:07 it's the self type.

37:08 And this is very helpful if you have a class, a class that has objects that refer to other

37:15 objects of the same type.

37:16 I don't know how you did that before then.

37:19 I guess I wasn't caring about it, but.

37:21 You had to do as a hack or you put it into quotes.

37:24 So the example from this article is a class called list node, and it's going to be past the

37:29 previous node, right?

37:30 So what is the type of that?

37:32 Well, it should be a list node.

37:33 Yeah.

37:33 Python is in the process of building up the list node class.

37:37 So it doesn't yet know what it is.

37:38 But you're trying to define a function that has that.

37:41 So there's this weird patch 22 thing.

37:43 Yeah.

37:43 Chicken and egg thing.

37:44 So what you put is you would put list node in quotes.

37:47 That's the old version.

37:48 And of course, it was just a string.

37:50 But then it's like, well, but it's a string that says that.

37:53 So we're going to just guess that that's what you want.

37:55 It was weird.

37:56 Okay.

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

38:01 And I haven't done this, but it's kind of nice also.

38:04 And I didn't know you could do this.

38:06 Just to say, and in the example, it's from typing import literal.

38:10 And then you define like a weekend that's a literal that can only be the strings Saturday

38:17 or Sunday.

38:18 And so this isn't an enumeration.

38:21 It's a it's just saying that it can only have these particular values.

38:26 So I think I got that right.

38:27 I don't think it has to be an enumeration, but no, no.

38:30 So this is in the end.

38:32 So like the example says, well, if you assign that variable to Monday, it's going to your

38:38 your type checkers are going to complain because you didn't assign the one of the known ones.

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

38:48 I don't know.

38:49 But but there's a lot of stuff that is passed around that it's kind of like an enum, but it's

38:54 passed around.

38:54 It's just a handful of strings that.

38:56 It can only be one of these strings.

38:57 So 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

39:04 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 And 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 my pie.

39:24 But so we'll have to check on that.

39:26 Yeah.

39:27 Anybody from my pie listening?

39:28 Let us know.

39:30 Let us know.

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

39:33 I just thought it was a good I and I do think this is a good idea is to to not try to jump

39:39 in the deep end of type hints.

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

39:47 Yeah.

39:48 That was a good little discussion around it.

39:50 That was fun.

39:51 Yeah.

39:51 All right.

39:52 Got any extras for us you want to throw out there?

39:54 The only extra I wanted to bring up is the testing code hasn't had an episode since like

39:59 October or something.

40:00 And it's not dead.

40:02 I just kind of wanted to take the holiday off without telling anybody.

40:07 And it's coming back.

40:09 So sometime in January, there will be a testing code episode.

40:11 Oh, excellent.

40:12 Looking forward to it.

40:13 All right.

40:13 I have a few extras and one leads to another, which leads to another as is the nature of

40:18 all these things.

40:19 So I wrote I ran across a couple of articles.

40:22 Let me start that way.

40:23 that sort of talked about RSS and how RSS is actually kind of important as a foundation

40:28 of the independent web and in ways maybe bigger than like I really realized.

40:32 So there's this one called Back to RSS.

40:34 I'll just read a little excerpt from each of them.

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

40:39 Personal sites are back.

40:41 Blogs are back.

40:41 RSS is back.

40:42 And owning your data is becoming real, which kind of a cool thing.

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

40:51 Blogging.

40:52 And yeah, anyway, so I ended up writing a welcome back RSS article that kind of riffed

40:57 on those ideas and talked about some more, talked about Reader, which I talked about before

41:02 and stuff.

41:03 So yeah, anyway, people can go check out that article.

41:06 And it's interesting.

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

41:14 is a reader is a Python feed reader library.

41:17 So it does things like let you subscribe with Python to RSS and Adam and JSON feed.

41:22 Mark articles as read and important.

41:24 Filter them.

41:25 Get stats.

41:26 Do all of it.

41:27 Like basically, if you wanted the logical internals of an RSS reader, here's a Python

41:33 library to do that, which is cool.

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

41:40 So we have like...

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

41:43 That'd be cool.

41:44 This guy over here built this thing called Kustos, which is basically like Instapaper, a self-hosted

41:53 Python web app built on Reader.

41:55 So people can check that out.

41:57 And then Readwise looks really interesting.

41:59 Are you familiar with Readwise?

42:00 No.

42:01 So it's like an RSS reader, but it also lets you take notes, mark stuff as read for later,

42:09 even if it doesn't have an RSS feed and highlight like your research as you're going through it

42:14 and save it.

42:14 So think how good that would be for people that say, dude, Hogcaster, you got to remember a

42:18 bunch of stuff about an article.

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

42:23 So...

42:23 Oh, I'm liking this.

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

42:25 Yeah, that's looking pretty good.

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

42:30 People can check that out.

42:31 Nice.

42:31 Another very important thing.

42:33 There's this Mastodon account called Year Progress, and it just goes along.

42:39 And every day, it just hosts a progress bar for how far we are in the daily progress.

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

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

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

43:06 to a new percentage.

43:07 So it's every few days or two or three days, right?

43:09 Yeah.

43:09 Yeah.

43:10 It looks like it, which I guess is probably good.

43:12 I mean, thank you for not doing it.

43:14 It's like saving 3.6, 2.6 posts, something like that.

43:18 Yeah.

43:18 All right.

43:19 And don't just watch it.

43:21 Wait for it.

43:23 It's not that exciting.

43:24 It doesn't actually that often.

43:25 It has no decimal point.

43:28 So it's got to work in big ASCII blocks.

43:31 So it does what it does.

43:32 All right.

43:33 This is something that people might want to keep an eye out who had automated builds running

43:39 over the winter break and also used PyTorch.

43:42 So one of the thoughts I had was I was just kind of kicking back.

43:47 We were hanging around.

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

43:50 I'd like the login page on Talk Python training to 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 kind of fun to do some web design and just

44:00 sort of like no pressure, redesign that a little bit.

44:02 And I thought, but I'm going to be careful about adding new libraries, updating existing

44:07 ones like pip-tools style, update them because is anybody watching?

44:13 And if something bad got in there, would anybody know?

44:15 Are they all on break?

44:16 Right.

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

44:20 Luckily, not anything I was using, but PyTorch discloses malicious dependency chain compromise

44:25 over the holidays.

44:26 This is bad.

44:28 If you pip installed somehow the PyTorch stuff, I don't know the exact how it links together,

44:35 but it says PyTorch has identified a malicious dependency with the same name as the frameworks

44:40 Torch Triton library.

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

44:49 understand because I don't use it.

44:50 But what happened is on Merry, Merry Christmas, on December 25th, users who installed PyTorch

44:59 nightly should ensure their systems are not compromised because of this Triton torch.

45:03 What they did is somebody put a malicious version on PyPI.

45:07 And when PyTorch was getting set up, instead of picking its own version, it preferred the

45:12 PyPI version, which was a virus.

45:14 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

45:24 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.

45:31 But if you have PyTorch and you pip installed it over the point of break, read that.

45:36 Yeah.

45:36 Plus, you know, 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:44 It's in my RSS feed.

45:47 All right.

45:48 Well, that's all I got for extras.

45:49 How about a joke?

45:50 Yeah, it sounds great.

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

45:56 Okay.

45:56 So I pulled up just the picture.

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

46:00 You remember these things?

46:01 Well, remember, they're still there.

46:04 Not on my laptop.

46:06 Not on my Mac mini.

46:08 It's on the back of like a computer or something.

46:10 A desktop computer.

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

46:17 It's on and off toggle switch.

46:18 Right.

46:18 It's like a physical power button directly on the power supply on a desktop computer, right?

46:24 Yep.

46:24 Yeah.

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

46:41 So I won't rub it in too much.

46:44 But that's a pretty effective way to exit Vim.

46:45 Vim runs in a window.

46:47 So just close the window.

46:48 You know, whatever.

46:50 The funny thing about power switches.

46:55 So I used to work with a lot of embedded systems.

47:00 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 Yeah.

47:10 Yeah.

47:10 And now normal Windows, you're not supposed to do that because, you know, you want to let it shut down gracefully.

47:17 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.

47:24 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?

47:48 You're going to break it?

47:49 Yeah, you're going to break it.

47:50 Like, no, these are good.

47:51 Yeah.

47:52 That's awesome.

47:54 Yeah, my little circuit Python thing.

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

47:58 You just disconnect it from power 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 need for the ability to just power off is because a lot of times instruments are in a huge rack.

48:11 And you don't go through and power off each individual instrument.

48:14 You just turn the rack off.

48:16 Wow, 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.

48:25 And thanks, everybody, for tuning in.

48:28 Yeah, you bet.

48:29 Bye, all.

Back to show page