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


Transcript #361: Proper way to comment your code!

Return to episode page view on github
Recorded on Tuesday, Nov 21, 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 361, recorded November 21st, and I am Brian Okken.

00:10 And I am Michael Kennedy.

00:11 And this episode is brought to you by Scout APM. Thank you, Scout.

00:15 Listen to their portion later in the episode.

00:18 If you'd like to connect to the show or with one of us, we're all on Phostedon, on Mastodon.

00:24 So we're at mkennedy, at Brian Okken, and at Python Bytes.

00:28 And if you'd like to join the show and watch it live or comment in the chat while we're recording,

00:34 check us out at pythonbytes.fm/live and be part of the audience.

00:40 Yeah, it's fun to have people be part of the audience.

00:42 Not required, certainly.

00:43 Not intended to be required, but fun to have them there.

00:46 Yeah.

00:46 What do you got for us first?

00:47 Oh, well, very excited to be back together on the eve of Turkey Day.

00:52 The Turkey Eve.

00:53 So happy Turkey Eve by the eve of Turkey Eve.

00:57 Eve, Eve.

00:57 It's the eve squared.

00:59 Yeah.

01:00 I don't know how this multiplies together.

01:01 Let's start talking about something snarky, aka Brett Cannon.

01:07 So Brett Cannon did a nice write-up here about different keyboards.

01:12 And Brian, I know you're a fan of ergonomic keyboards.

01:16 I am definitely a fan of the ergonomic keyboards, having had serious RSI issues at one point in my career.

01:24 And basically, if I type on a laptop keyboard for a week, I'd have to quit.

01:29 I mean, quit my job.

01:30 I'd be done.

01:31 It's like that bad, right?

01:32 I'm not making it up.

01:34 Like, the carpal tunnel stuff is real.

01:36 But with the right keyboard, I can literally type 10 hours a day, no problem at all.

01:42 So choosing a keyboard is something I wish I'd paid more attention to when I was younger, but is super, super important.

01:48 And Brett had his nice write-up on it.

01:50 So that's what I'm going to cover today.

01:51 Cool.

01:52 So basically, he says, look, here's what I care about.

01:54 I have a bunch of different concerns, right?

01:58 So, you know, for him, it was more his back that was causing him problems.

02:02 But he was looking to get a fully split keyboard.

02:06 He went from something kind of like my keyboard, which I'll give a shout-out to in a second,

02:10 to a completely split, which means the keyboard, the left, the part your left hand touches

02:15 and the part your right hand touches are not attached, at least not physically,

02:18 maybe through a wire just so they communicate.

02:21 So, well, okay, how do we go?

02:22 It talks about all the considerations, all the things that he cares about,

02:25 and then goes through like a nice long list of things, right?

02:30 Yeah.

02:30 What has he used before?

02:31 The requirements are fully, must be fully split because he's using ergonomic one that's not fully split now.

02:38 And like, this is his goal.

02:39 It must tent, as in it must, like from the two edges, the middle must raise up and down.

02:45 So like, like if you rotate your hands, I don't know, like this.

02:49 Yeah.

02:50 Without moving your arms at all, you just like left or right, like a clock, that kind of rotation.

02:55 Want some portability.

02:57 Interestingly, aesthetically pleasing to his wife because it has to be visible and somewhat programmable.

03:03 Okay.

03:04 So I don't want to go through his whole article.

03:06 I just want to kind of give a shout out to a bunch of different keyboards and you'll get your thoughts as well.

03:10 Okay.

03:11 Okay.

03:12 First of all, he says, Hey, look, I'm using, I think he was using, or at least was considering and like put it into the category of the Microsoft Surface ergonomic keyboard.

03:21 That's a fine looking little keyboard right there.

03:22 Yeah.

03:23 It's like a full size keyboard or a hundred percent keyboard where it has the numbers and all of that.

03:29 The numpad thing in addition to the numbers on the top, of course, it's fixed tinted, I guess you would call it, right?

03:35 It's got a really good curve to it, but the curve you can't adjust.

03:37 You can like lean it.

03:39 So the starting point where like your arms start to touch is higher than the other one if you want and so on.

03:45 But I actually got this when it first came out, maybe something's changed.

03:50 But when this first came out, I'm like, oh, this looks great.

03:52 I'm going to give this a try as an alternative to the one that I use.

03:54 And you know what?

03:55 Unbelievably, even though it's Bluetooth, it doesn't work on macOS at all.

04:01 So if you want to use this and you're using Windows, it looks pretty cool.

04:05 If you're not using Windows, it's kind of more like paperweight than it is a keyboard.

04:10 Maybe something about this has changed.

04:13 But I mean, I took it when Microsoft had Microsoft stores like Apple stores.

04:17 I took it back and I said, guys, I bought this.

04:20 I can't seem to make it work on my MacBook.

04:22 Can you?

04:23 And they're like, oh, yeah, sure.

04:23 Of course it does.

04:24 I'm like, all right.

04:25 Let's here we go.

04:26 Let's see.

04:26 No, no, they couldn't get it to work either.

04:28 See, I thought I've tried one.

04:30 I thought I tried one on a Mac a couple of years ago.

04:34 Possible.

04:34 Possible.

04:36 I use the Microsoft Sculpt ergonomic, which is not the Microsoft Sculpt Surface ergonomic.

04:42 Oh, this is the one I tried.

04:44 And that works everywhere.

04:44 Yes, that works everywhere.

04:45 That works everywhere.

04:46 And it's smaller and it's lighter.

04:48 And I think it's actually better across the board having had both.

04:50 This one is fine.

04:51 The Surface one.

04:53 No, no, no.

04:54 This one doesn't work.

04:55 Okay.

04:56 So another one, he said, like, some people really like the Apple Magic Keyboard, which

05:02 is like more art, less functionality.

05:05 You know, it's very standard for Apple hardware, you know, save them, put the Macs and iPhone

05:10 stuff aside.

05:10 But like the accessories, it's like, can we just make it beautiful?

05:13 I don't care if it's the most uncomfortable thing you've ever touched, like the Magic Mouse

05:17 or anything.

05:17 This is like, I want Carpal Tunnel next week.

05:20 I don't have it now.

05:21 How can I get it?

05:22 Let's try this.

05:23 So I don't necessarily recommend that.

05:25 And then it starts going through like the real ergonomic ones that people might consider,

05:29 starting with the Advantage 2 keyboard from Kinesis.

05:33 And this is one of the weirder, more different ones.

05:37 This is what I got.

05:38 This is what I've been using for decades.

05:40 Okay.

05:40 Describe this for people.

05:41 It's just.

05:42 It's because it's unusual.

05:43 Well, it seems unusual.

05:45 Not in a bad way.

05:46 But it's a split keyboard where you've got like basically divots where your fingers

05:52 go because your fingers are like, you know, they're not flat like a keyboard.

05:56 They're curved around.

05:57 So this.

05:57 It's like if somebody dug a hole for the keys.

05:59 Yeah.

05:59 It matches the way your fingers move.

06:02 And then because when programming, we do things like hit escape and all sorts of other stuff

06:07 and enter and backspace and home and all that stuff all the time.

06:11 Those, instead of having your pinkies do that work, they put those keys in the middle.

06:16 So your thumbs can do it.

06:17 Yeah.

06:18 And I really love that.

06:20 And one of the first things I do is because I'm a VI user or Vim user is I map one of those

06:25 middle ones to escape because yeah, I want to address it.

06:28 It's programmable too.

06:29 So it's nice.

06:30 Yeah.

06:31 That's one of the big, as you started to explore it, it's one of the big areas is like,

06:34 what does your thumbs do versus, you know, not just space bar, but your thumbs become

06:39 way more active.

06:40 Yeah.

06:40 And by programmable, I don't mean that you have to like write a program for it.

06:44 I mean, it's you could just, there's like a key sequence.

06:47 You can say, I want to remap this key to this other place.

06:50 And it's, it's pretty easy.

06:51 Yeah, absolutely.

06:52 All right.

06:53 So that was one that was on the list of considerations.

06:56 We'll see how many more of these you've, you've experienced.

06:58 So we have the moon lander Mark one.

07:00 I've wanted to try that.

07:01 It looks great.

07:02 It's, it's nice and lit up.

07:04 It's, it's quite cool.

07:05 It's looks like it almost has like a track, those little nipple things that come on the

07:10 think pads.

07:12 Like where there's like a, it's not a ball, but it's like a stick.

07:15 That's like a, like a joystick for the mouse almost.

07:17 Yeah.

07:17 Yeah.

07:18 This one looks pretty interesting.

07:19 It's lit up.

07:20 You can, I think program it, but this one's quite cool.

07:23 It's fully split and it's got these little bars for the tenting.

07:27 So you, you can adjust like how, you know, side to side it's like bent, which is pretty

07:33 neat.

07:33 I think, what do you think about this one?

07:34 I'd, I'd like to use that, but one of the interesting bits is the middle keys are,

07:39 they're just blank.

07:40 Cause you can map whatever you want to them, but I, and a bunch of other blank ones.

07:44 I'd rather have some replacement ones to, because I'm really not going to remember how I mapped

07:49 them.

07:49 just got to Sharpie them.

07:51 Sharpie thing.

07:52 I guess.

07:53 Yeah.

07:56 And no kidding.

07:57 No kidding.

07:57 yeah.

07:58 But yeah.

07:59 The other thing that I really, that, I think about a lot is like these keys look

08:03 like they have a long up and down, like key throw, like the travel of the key seems high

08:08 and the travel of the keys on the, the sculpt ergonomic one is incredibly small, like probably

08:14 less than on a Mac book.

08:15 And so like you could just barely move your fingers and you're typing.

08:18 And some of these, it's like the mechanical style of like, you know, lots of hand movement,

08:22 I'm not a fan of it, but that's.

08:24 I like mechanical.

08:25 Yeah.

08:26 But in theory I do.

08:28 All right.

08:29 Another one is the Kinesis gaming.

08:31 Since you're a fan of Kinesis, have you looked at this thing?

08:34 No, it's flat.

08:35 You can, no, you can tilt it.

08:37 No, but it doesn't have the divots.

08:39 Oh, I see.

08:40 I see.

08:40 I see.

08:40 Gotcha.

08:41 I know what you mean.

08:41 It has no holes dug for the keys.

08:43 Yeah.

08:43 Yeah.

08:44 This is pretty interesting.

08:45 You can like tint it a lot, but it is kind of just like a, if you want the least weird keyboard,

08:50 but you want to separate it.

08:51 Right.

08:52 So you can get like the right orientation of your wrists and stuff without causing trouble.

08:56 This is pretty good.

08:57 We've got the Digma Rays, which is also.

09:00 I've heard of this one.

09:02 Quite interesting one.

09:02 Yeah.

09:03 It's, it's similar to the gaming one.

09:05 I think it's a little bit neater.

09:07 It looks like it has like pretty far key throw, but it clicks together and then it clicks

09:10 apart.

09:11 So that's kind of something you might, people might care about.

09:13 Nice magnets to mess up your phone when you, that you sat next to it.

09:17 Exactly.

09:18 There's the Ergo Docks easy, which is another one.

09:23 Lots of adjustability on like how it's oriented and things, which is kind of cool.

09:27 Very thumb friendly, but no, no markings, right?

09:30 For the programmability.

09:31 So you're going to have to need a white Sharpie for this one.

09:33 Yeah.

09:34 Yeah.

09:35 Yeah.

09:36 Hacking keyboard was a Barry Warsaw recommended this one, which it comes with a built in track

09:41 ball looking thing in the middle for one of your thumbs.

09:44 Nice.

09:45 Yeah.

09:46 Okay.

09:47 And notice also it has the Cordy.

09:48 See as Hop, it says Cordy like for a display.

09:50 So you can switch it into different modes like Dvorak.

09:52 Okay.

09:53 Like Liz out in the audience says, I'm a fan of Dvorak.

09:55 Yeah.

09:56 Pretty cool.

09:57 Yeah.

09:58 And then we have the Advantage 360 keyboard.

09:59 That's on my want list.

10:01 Wow.

10:02 How's this different than the one that you saw you have already?

10:04 Well, it's, it's split.

10:06 So it's, it's, it's completely split.

10:08 Oh, like it's a fully, fully split one.

10:10 And it, yeah.

10:11 The Advantage 2 is actually connected together, but this one's split and it spread apart.

10:17 Got it.

10:18 Content.

10:19 Definitely looks like a content.

10:20 And the one that he actually went more, I believe went for is the Digma Defy.

10:25 So you can defy your limits with this one, which looks pretty genius.

10:29 Well, it's kind of so intimate.

10:30 So intimate.

10:31 You can hardly see a picture of it, but links up for all these in the show notes.

10:34 But this one, like this one is thumb heavy.

10:36 Brian, look at how many options your thumb gets to play with there.

10:39 Oh, I like it.

10:40 Yeah.

10:40 Yeah.

10:41 Yeah.

10:41 Yeah.

10:41 So apparently this one takes a little while to get, but anyway, I wanted to go through

10:45 this because I know there's a lot of people out there who might.

10:47 Even if he decided on this one, this is the one he decided on now.

10:52 Next month, you'll order another one.

10:54 I'm sure.

10:54 I know.

10:56 I know exactly, exactly how it feels.

10:59 But no, I think honestly, someone who's like had hand issues, don't skip on keyboards.

11:04 Don't just think, well, it's weird.

11:06 So I'm not going to try it.

11:07 Like honestly, it's worth not doing something that's just square.

11:12 That is your laptop.

11:12 Yeah.

11:13 Also stand up and walk around to shake yourself out once in a while.

11:16 Exactly.

11:17 10 hours sitting.

11:17 We'll get a chair that just every so often, like the chair just springs you over in the

11:21 back and flings you out.

11:22 And so it encourages you to get up before that happens.

11:24 It's actually one of the things I like about the Apple Watch.

11:26 It says like, hey, you should stand up.

11:28 I know.

11:29 It's usually great, except for when you're like in an airplane.

11:33 It's like, you should get up and walk around like, you know what?

11:35 I'm in the middle seat.

11:36 I don't think I'm going to right now.

11:37 Yeah.

11:37 Thanks, Apple Watch.

11:39 Make me feel even more stuck where I am.

11:41 All right.

11:42 Well, that's it for my first item.

11:43 What you got?

11:43 Okay.

11:44 Well, I want to talk about a command line interface tool.

11:48 So I just, a couple of things.

11:50 I just wrote a blog post about testing command line interfaces, particularly arg parse.

11:55 I should put a link in that and the extras.

11:57 But also, I was covering that when I was recording the pytest course, talking about testing command line interfaces.

12:06 So I tried a few.

12:07 I went back and tried click.

12:08 I tried arg parse.

12:09 And somebody, I'm sorry, I forget who recommended this.

12:13 There's a new thing called Appeal.

12:17 A-P-P-E-A-L.

12:18 And it's by Larry Hastings.

12:20 And I'm like, oh, it's probably pretty cool.

12:23 And it's got a great logo, like old retro.

12:25 I don't know, like the 60s or something like that.

12:29 Anyway, so one of the things about it is it's just really small.

12:33 It doesn't have a whole bunch of boilerplate.

12:34 So for instance, a hello world, you just import it, create an app, and do app command around it.

12:41 And it just picks up that, like, say your hello function has a name to it.

12:46 So the name is going to be an argument that you have to pass in.

12:49 So that's neat.

12:51 And then I'm like, okay, well, how about more complex things?

12:54 Well, things like optional stuff, like default values.

12:59 Like, let's say I'm going to pass in a file name, like fgrep.

13:02 You're going to pass in a file name.

13:04 But it's optional.

13:06 So you just say equals none.

13:07 You just do type hints.

13:08 So you're just saying that this is the command, or that fgrep is the command, but that it takes a pattern and an optional file name.

13:17 And you tell it it's optional by just saying equals none.

13:20 So using type hints more.

13:22 I know that, like, typer was using type hints, but it still has, typer still has kind of a lot of boilerplate that you have to do.

13:30 And so this is a very minimal API to get things done.

13:35 And I'm pretty excited to try it.

13:37 Also, look at the contributors.

13:38 So there's only five contributors, but it's Larry Hastings, Hugo, Brett Cannon, Hinnick, and I don't know Peter, but wow, already.

13:50 Yeah.

13:51 Pretty cool.

13:51 Yeah, that's pretty cool.

13:52 Looks very interesting.

13:53 So anyway.

13:54 Nice and simple.

13:55 Nice and simple for command line interfaces.

13:57 Worth a look.

14:00 Okay.

14:00 Do you know what else is worth a look?

14:01 Mm-hmm.

14:03 I would like to tell everybody about Scout APM.

14:05 So thank you, Scout APM, for sponsoring this episode.

14:08 Are you tired of spending hours trying to find the root cause of issues impacting performance?

14:13 Then you owe it to yourself to check out our sponsor this week, Scout APM.

14:17 Scout APM is a leading Python application performance monitoring tool that helps you identify and solve performance abnormalities faster and easier.

14:25 Scout APM ties bottlenecks such as memory leaks, slow database queries, background jobs, the dreaded N plus one queries problem common with ORMs, and more, directly to source code so you can spend less time debugging and more time building.

14:40 You'll love Scout because it's built for developers by developers.

14:43 Scout makes it easy to get up and deliver insights in less than four minutes.

14:48 Seriously, you could pause this episode, set up Scout, and be back at it without missing a beat.

14:53 And probably be backed by the jokes.

14:55 So that'd be cool.

14:55 Start your free trial and get instant insights today.

14:59 Visit pythonbytes.fm/scout.

15:03 Please use this link because it truly supports the show.

15:06 Thank you, Scout APM, for supporting Python Bytes.

15:09 Indeed.

15:10 Thank you, Scout.

15:11 Very cool product.

15:12 Service.

15:12 I'm going to shine a little light on something that hasn't got a ton of light on it yet, Brian.

15:18 Okay.

15:18 Something called Graphinate.

15:20 That is the verb of to make a thing a graph, I guess.

15:24 It is also a noun, the name of this project.

15:26 Yeah.

15:27 So this one comes to us from, one second.

15:32 I ran Rivalis.

15:34 And this is a project.

15:35 It's Graphinate.

15:36 Graphinate is a Python library that aims to simplify the creation of graphed data structures from just pure data sources.

15:45 So probably the best way to get a sense of this is just look at some examples.

15:49 So we go down.

15:50 It's Badge.

15:52 It's GetHub ReadMe Badge game is strong, by the way.

15:55 Yeah.

15:56 Wow.

15:57 Yeah.

15:57 So if we go down a little bit, you can see some examples.

16:00 Like here is a visualization of a Python AST that looks a little bit like an advanced molecule based on benzene, but like a bunch of stuff coming off of it, I guess.

16:12 Like a hexagonal thing in the middle.

16:13 It's kind of cool.

16:14 And then here is a relationship of some repositories and dependencies on GitHub.

16:21 Very cool.

16:21 Here's webpage links visualize.

16:24 Ooh.

16:25 Those are all nice visualizations, right?

16:26 Yeah.

16:27 That's beautiful.

16:28 It looks like Dandelion fluff all connected together.

16:31 Yeah.

16:32 You can almost blow on it and like take out a whole segment of the internet.

16:34 Yeah.

16:35 And so the way to make this happen, if you go back up here, is you write a generator that defines the edges.

16:44 So however you might iterate over your data source, I suppose you could even use like recursion with yield from and all sorts of things to like go through hierarchical data models and whatnot.

16:55 So you just write a function called, here he calls it edge.

16:59 It doesn't have to be called edge.

17:00 You just give it a decorator called edge and whatever.

17:03 And then you just say graph.materialize, create a model, create this function, boom.

17:08 And then you get those pictures.

17:09 That's pretty cool.

17:10 Yeah.

17:11 Yeah.

17:11 It is.

17:12 It is pretty cool.

17:13 So anyway, I thought there must be a lot of people that want to have these graph databases.

17:19 And Mike Fiedler says graphs, not charts.

17:22 Important distinction there indeed.

17:24 Yeah.

17:25 So if you're doing graph type of work, even cyclical graphs seem to be supported as you can see for a benzene example.

17:32 Not really benzene, AST example.

17:34 So yeah, people can check that out.

17:36 I think this is pretty neat.

17:38 Benzene.

17:38 You're such a nerd.

17:40 I know.

17:41 I love chemistry.

17:41 That's pretty cool.

17:43 Indeed.

17:44 So short and sweet, but there it is.

17:46 Yeah.

17:47 Okay.

17:47 Last topic.

17:49 I want to talk about, do you know who David Lord is?

17:52 I have heard of him.

17:53 Does he do stuff with the web?

17:54 I think he does.

17:55 Yeah.

17:55 So David Lord is, he's the lead maintainer of Flask, Jinja, Click, and a bunch of others.

18:01 He works on a project called Palettes.

18:03 He's also a PSF fellow.

18:05 And as of like just recently, he finally has a blog.

18:10 Yay, David.

18:11 Anyway.

18:13 So thanks, David, for starting a blog.

18:16 Started this month.

18:17 But he wrote this great article.

18:20 I thought it's just sort of a brain dump.

18:23 It's called a disorganized list of maintainer tasks.

18:27 And it's not like maintainers really need to know what all they're doing.

18:31 But I think people that use open source projects need to know what all maintainers do.

18:37 And this list is pretty big.

18:39 Yeah, like why isn't my feature already added for free with no effort from me?

18:43 That's what I wanted to highlight is next time when you want to ask, when is the next release?

18:48 Instead, look at the project and see where you can start getting involved.

18:52 The more help maintainers have, the more they can get done.

18:55 And I really love this message.

18:56 Partly is looking through this list and saying, huh, if there's a project I want to work on,

19:02 or I'd like to have move faster, what could I help?

19:05 Like you could help automate the release process, document the manual process for releases.

19:11 You might not know that stuff, though.

19:12 So maybe improve the test coverage.

19:14 I like that one.

19:16 Maybe help update the docs.

19:21 So a lot of these things I didn't think about, but they definitely are time consuming.

19:27 One of them, I'm not going to be able to find it right away.

19:29 Oh, here it is.

19:30 Turning questions and answers into documentation improvements.

19:33 So when you get questions on Mastodon or an email or something saying, hey, how do I do this?

19:39 That's a great place to put it in the documentation, but that is work.

19:44 That's extra things that need done.

19:45 So it'd be great to even reach out to a maintainer and say, hey, is there any parts of the documentation

19:51 that you'd like help with or something like that?

19:53 So I kind of love this and I'm kind of overwhelmed.

19:57 My list is not this big, but wow, David, thanks for all your work.

20:01 So if you look at Flask and GitHub, there's a little bit of attention on that project, right?

20:06 Like 65,000 stars, 16,000 forks.

20:10 That's a high level of maintainer business, right?

20:14 Yeah.

20:14 Yep.

20:15 Yeah.

20:16 There's a lot going on there.

20:17 And Click.

20:18 I've been kind of using Click more also.

20:21 So there's a good projects.

20:23 That's right.

20:24 Yeah.

20:24 So very cool.

20:25 It's almost like a reverse lookup of how can I contribute to open source?

20:29 Yeah.

20:30 And I actually, this is not, I think we covered like non-code contributors.

20:37 This is all technical work.

20:40 It's not non-technical.

20:42 It's technical work to like answer questions and filter PRs and things like that.

20:47 Yeah.

20:48 All sorts of great things to help out with.

20:51 All right.

20:51 Well, those are our topics for the day.

20:53 Do you have anything extra for us?

20:55 I have, I believe, three extras I want to cover real quick.

20:59 Got a quick glimpse of them there as I was just showing the stars.

21:02 First of all, in the weird world of marketing, it is Black Friday as of Monday.

21:08 As of this, yeah.

21:10 Starting this week.

21:12 Yeah.

21:12 I'm not a big fan of it, but people really appreciate it.

21:16 I know they wait up for it.

21:18 So over at Talk Python Training, we have a different deal this year than we had last year.

21:23 And there's two cool aspects of it.

21:25 So I just want to give a quick shout out and let people know like, hey, if you're looking

21:29 to take a course now would be in affordable time to do so.

21:32 And there's a good cost.

21:33 So what I'm doing this year is I took five of our most popular courses or most anticipated

21:38 courses that maybe are not even 100% done, but are almost done and put them out as early

21:43 access.

21:44 So we have Visual Studio Code for the Python developers coming out, which is a really awesome

21:51 course.

21:52 I'm just like, how do I change my Vs?

21:54 Go to do this and that.

21:54 And what am I doing?

21:55 How do I make it do that?

21:57 So this is an early access by Brian Clark and Cecil Phillip.

22:00 And we'll be out in a little bit, but you can sign up for it now.

22:04 It's like two thirds of the way done.

22:05 So it's still lots to get there.

22:06 Async MongoDB with Beanie and Pydantic up and running with Git, like a more visual, more

22:12 beginner friendly way to get going with Git.

22:14 Effective PyCharm because I love PyCharm.

22:17 And our beginner course, all those are 50% off for the week.

22:21 So that's our Black Friday.

22:22 Nice.

22:23 And the other part is we are taking 10% of the revenue and donating it to the Hidden Genius

22:29 Projects, which trains and mentors black male youth in technology, creation, entrepreneurship,

22:36 leadership.

22:37 Basically, a lot of kids who are in places where they might not see a lot of hope or don't

22:42 think tech applies to them.

22:43 And they run even up to like 15 month long, not an accelerator, that's not exactly fast,

22:49 but like mentorship journeys for them.

22:51 And they've had like 10,000 students and we've done a lot of things at like PyCon and whatnot.

22:55 So that's the other half.

22:57 That's pretty cool.

22:58 Yeah.

22:58 Nice.

22:59 Thanks.

23:00 Okay.

23:00 Two more.

23:01 Python 3.13 Alpha is out.

23:04 And boy, oh boy, how do you want to push your luck?

23:08 Friday, October 13th.

23:11 So Friday the 13th, we're going to release Python 13 Alpha.

23:15 No, I'm sure it's fine.

23:17 I'm sure it's fine.

23:18 But people can check out the new Alpha.

23:20 If you want to start seeing what's coming and the new version.

23:22 I mean, we just got 3.12, but it's now time to move on and start adding features to the Alpha.

23:27 What do you think?

23:29 I think that's, sorry.

23:32 I think that's great.

23:33 I just reminded, I was reminded of a couple years ago, one of my kids said that they heard

23:40 somebody at school say, did you know that this year Halloween's going to be on Friday the 13th?

23:46 Maybe a little bit backwards.

23:48 No, it's not going to be.

23:50 So this is actually a little bit old, but I just realized I was up my list to talk about and I skipped it.

23:56 But the 3.13 is already underway.

23:59 People want to check it out, get going on.

24:02 Yeah, we won't cover the new features that they're playing in, but maybe we can cover that in an upcoming episode.

24:07 Yeah, we can go that, you know, new features will come.

24:10 Alpha one is not the end of features or that's when we get to the beta.

24:13 So that's quite a ways off.

24:14 Yeah.

24:15 More to come.

24:15 Yeah.

24:16 All right.

24:16 Last thing from my extras is the PSF and JetBrains have over the last couple of years done their survey.

24:24 Right.

24:24 I think JetBrains is.

24:25 Yeah.

24:26 Again.

24:26 So the Python developer survey for 2023 is now open for the taking as in take your time.

24:33 Please go there, fill it out, submit your thoughts.

24:36 And then in, I don't know what, a couple of months, six months, hopefully quicker than that, we'll get results.

24:42 Now we can go talk about it.

24:44 Right.

24:44 But the way we can talk about it is if people take it.

24:46 Right, Brian?

24:46 Yes.

24:47 It's pretty cool that it's out already.

24:49 I'm willing to think about it.

24:51 I am as well.

24:53 It'd be awesome if it came out while it was still in 2023.

24:55 So we don't have to like explain.

24:57 I know the results say for 2023 and it's 2024, but it actually applies to the most, you know what I mean?

25:02 That kind of talk.

25:04 And Hugo also says Alpha 313, sorry, Python 313 Alpha 2 is due out today.

25:11 So I just snuck in under the, this is super outdated news, Michael, deadline.

25:15 What gives, man?

25:18 All right.

25:19 That's it for my extras.

25:20 Okay.

25:20 Well, I just have a couple extras.

25:22 I, this morning I met with the JetBrains and PyCharm team and did a webinar about, do you do enough testing, pytest to the rescue?

25:31 And it was really fun.

25:33 It was Paul Everett and Helen Scott.

25:35 And we had, had a lot of fun this morning and we had like 200 people show up, which was great.

25:40 And then it's already had 500 views since three hours ago.

25:44 So nice.

25:45 That's awesome.

25:46 It was fun.

25:46 So check that out.

25:47 People are wondering if they actually do do enough testing.

25:50 And so they came to check it out.

25:51 Well, and it's always fun when you're with Paul and those guys as well.

25:55 Yeah.

25:55 So the focus of this, I kind of got some technical stuff, especially with the parameterized IDs.

26:00 Sorry about the nerdiness, but the, but the point was trying to get people to, to realize how easy it is to get starting.

26:08 I'd like to get people, get people to not be afraid of it.

26:11 Speaking of pytest, the pytest complete course or the complete pytest course is coming along.

26:17 I have the, it's going to be 16 chapters.

26:21 I've got 11 published already.

26:24 The 12th is already recorded and the 13th should be recorded soon.

26:27 So I'm definitely on track to getting this done this year.

26:30 And it's, of course, it's all for sale.

26:33 And I was going to ask you this after recording, but do you think it'd be a good idea to do a Black Friday sale?

26:39 Yeah, it might be.

26:40 Okay.

26:41 I suspect people would be interested in it.

26:43 Okay.

26:43 I'll probably set up that.

26:46 So if you show up today before I get a chance and it's not there yet, I'll probably by tomorrow, I'll do have the Black Friday sale on.

26:53 Yeah.

26:54 Put the link in the show notes when you get it set.

26:55 Nice.

26:56 All right.

26:56 Well, that's all of my extras.

26:58 All right.

26:59 Brian, do you know it's important to comment your code?

27:02 People tell you this, right?

27:03 Yeah.

27:04 As long as the comments are right.

27:06 Yeah.

27:06 Well, sometimes people, that's part of it.

27:08 Sometimes people can just mess up the comments or, you know, they might be inconsistent or they could just be boring.

27:15 It could just not attract.

27:16 Like you might leave the function with a hollow sense of this was just, there was no joy here.

27:23 You know what I mean?

27:24 Okay.

27:25 Okay.

27:25 So here's a image that says the proper way to comment your code.

27:29 Let me see how I can do.

27:30 I did study math.

27:31 So the function is called calculate circle area given and the parameter is a radius.

27:36 Okay.

27:36 Okay.

27:37 And it does what you would expect.

27:39 But the comment is even more than the function.

27:42 It says in mathematical fields where circles weave with pies, grace, a mystic number.

27:47 We conceive radiance orbs in their geometric trance circles, area poets, rhythmic dance 3.14159 are constant.

27:58 True in pies, embrace the circle secrets do where radius meets its boundless quest area blooms in

28:05 geometries bequest.

28:06 Then it does colon calculate circle area.

28:09 It's nice, right?

28:12 Yeah.

28:12 Yeah.

28:13 I love also the, the, the, the, the, it's four lines of code and eight lines of comment.

28:19 and, and that's never going to be wrong.

28:23 right.

28:24 I mean, that's, I think that's our takeaway is yes.

28:28 As long as your comments are just loosely related to the code below it, it's probably not going

28:33 to be wrong ever.

28:34 So you're good.

28:35 I just want to call this function for the joy of the, yeah.

28:37 The description.

28:38 and Peter beans points out, indeed, this is where AI might help you write some code.

28:45 Oh gosh.

28:47 Dear, dear, copilot thing.

28:49 Write me a poem about this function.

28:52 That's awesome.

28:54 I think I can totally do it.

28:56 That's a great use of, of, AI and ChatGPT and try it now before the entire system

29:03 explodes and implodes on itself.

29:05 Exactly.

29:06 There's some drama in that world right now.

29:09 Yeah.

29:09 Yeah.

29:09 Yeah.

29:09 Yeah.

29:09 Yeah.

29:09 More of a shift, a fresh, like a weird dramatic shift.

29:13 Not anyway, people go check the news.

29:15 And with that, Brian, I, I bid you happy poem and haiku writing for your code.

29:22 Yeah.

29:23 I'm more of a limerick man, but you know.

29:24 Okay.

29:25 Fair.

29:26 We can make that happen.

29:27 All right.

29:28 Thanks a lot.

29:29 And thanks everybody for listening.

29:30 Thank you for showing up and to the, to the live episode and everybody listening later.

29:35 We love you.

29:36 Talk to you later.

29:37 Bye.

29:37 Yep.

29:38 See y'all later.

Back to show page