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, the recorded November 21st, and I'm Brian Okken.

00:10 >> I'm Michael Kennedy.

00:12 >> This episode is brought to you by Scout APM.

00:14 Thank you, Scout. 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 Mastodon.

00:25 We're@mkennedy@brianocken@pythonbytes.

00:29 If you'd like to join the show and watch it live or comment in the chat while we're recording, 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, not intended to be required, but fun to have them there.

00:46 >> Yeah. What do you got for us first?

00:48 >> Well, very excited to be back together on the eve of Turkey Day, the Turkey Eve.

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

00:57 >> Eve squared.

00:59 >> Yeah.

01:00 >> Two eve, I don't know how this multiplies together.

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

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

01:12 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 Basically, if I type on a laptop keyboard for a week, I have to quit.

01:29 I'm going to quit my job, I'd be done.

01:31 It's that bad, right?

01:32 I'm not making it up, 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 it's super, super important.

01:49 Brett had his nice write-up on it, so that's what I'm going to cover today.

01:51 >> Cool.

01:51 >> So basically, he says, "Look, here's what I care about.

01:54 I have a bunch of different concerns." So for him, it was more his back that was causing him problems, but he was looking to get a fully split keyboard.

02:06 He went from something like my keyboard, which I'll give a shout out to in a second, to a completely split, which means the keyboard, the part your left hand touches and the part your right hand touches are not attached, at least not physically, maybe through a wire just so they communicate.

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

02:23 Talks about all the considerations, all the things that he cares about, and then goes through a nice long list of things.

02:30 What is he used before?

02:32 The requirements are must be fully split because he's using ergonomic one that's not fully split now, and this is his goal.

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

02:45 So if you rotate your hands, I don't know, like this, without moving your arms at all, you just left or right like a clock, that kind of rotation, wants some portability, interestingly, aesthetically pleasing to his wife because it has to be visible and somewhat programmable.

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

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

03:11 >> Okay.

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

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

03:23 >> Yeah.

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

03:28 The numpad thing in addition to the numbers on the top, of course.

03:32 It's fixed, tented, I guess you would call it.

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

03:38 You can lean it.

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

03:46 But I actually got this when it first came out.

03:49 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." You know what? Unbelievably, even though it's Bluetooth, it doesn't work on macOS at all.

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

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

04:11 Maybe something about this has changed.

04:13 But I mean, I took it when Microsoft had Microsoft stores like Apple stores, I took it back and I said, "Guys, I bought this.

04:20 I can't seem to make it work on my MacBook. Can you?" They're like, "Oh, yeah, sure. Of course it does." I'm like, "All right. Here we go. Let's see." 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. I use the Microsoft Sculpt Ergonomic, which is not the Microsoft Sculpt Surface Ergonomic.

04:42 >> This is the one I tried.

04:44 >> That works everywhere. Yes, that works everywhere.

04:46 That works everywhere and it's smaller and it's lighter, and I think it's actually better across the board having had both.

04:51 This one is fine. The Surface one, this one doesn't work.

04:56 So another one he said, some people really like the Apple Magic Keyboard, which is more art, less functionality.

05:05 It's very standard for Apple hardware, save them, put the Macs and iPhone stuff aside.

05:10 But 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 or anything.

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

05:21 I don't have it now. How can I get it? Let's try this.

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

05:25 Then it starts going through the real ergonomic ones that people might consider.

05:29 Starting with the Advantage 2 Keyboard from Kinesis.

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

05:37 >> This is what I got. This is what I've been using for decades.

05:40 >> Describe this for people.

05:41 >> 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 basically divots where your fingers go because your fingers are like, they're not flat like a keyboard, they're curved around.

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

05:59 >> Yeah, it matches the way your fingers move.

06:02 Then because when programming, we do things like hit escape and all sorts of other stuff, and enter and backspace and home and all that stuff all the time.

06:12 Instead of having your pinkies do that work, they put those keys in the middle so your thumbs can do it.

06:18 I really love that. One of the first things I do is because I'm a VI user or Vim user is I map one of those middle ones to escape.

06:26 Because it's programmable too, so it's nice.

06:30 >> Yeah, that's one of the big, as you started to explore it, it's one of the big areas is like, what does your thumbs do versus not just space bar, but your thumbs become way more active.

06:40 >> Yeah. By programmable, I don't mean that you have to write a program for it.

06:44 I mean, there's a key sequence you can say, I want to remap this key to this other place and it's pretty easy.

06:51 >> Yeah, absolutely. 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 experienced.

06:58 So we have the Moonlander Mark 1.

07:00 >> I've wanted to try that. It looks great.

07:02 It's nice and lit up.

07:04 It's quite cool.

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

07:12 I could use like a, it's not a ball, but it's like a stick that's like a joystick for the mouse almost.

07:17 >> Yeah.

07:17 >> Yeah, this one looks pretty interesting.

07:19 It's lit up. 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 tinting.

07:27 So you can adjust like how side to side it's like bent, which is pretty neat, I think. What do you think about this one?

07:35 >> I'd like to use that.

07:36 But one of the interesting bits is the middle keys are, they're just blank because you can map whatever you want to them.

07:42 But a bunch of other blank ones, I'd rather have some replacement ones because I'm really not going to remember how I mapped them.

07:49 >> Just got to sharpie them.

07:51 >> Sharpie them.

07:52 >> I guess.

07:54 >> Yeah, no kidding.

07:58 >> Yeah.

07:59 >> Yeah. The other thing that I think about a lot is like, these keys look like they have a long up and down like key throw.

08:06 Like the travel of the key seems high and the travel of the keys on the Sculpt ergonomic one is incredibly small, like probably less than on a MacBook.

08:15 So you could just barely move your fingers when you're typing.

08:18 Some of these, it's like the mechanical style of like lots of hand movement.

08:22 Not a fan of it, but that's more than I can handle.

08:25 >> I like mechanical. Yeah.

08:26 >> In theory, I do.

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 >> No, you can tilt it.

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

08:39 >> Oh, I see. I see. Got you.

08:41 I know what you mean. It has no holes dug for the keys.

08:43 >> Yeah.

08:44 >> Yeah. This is pretty interesting.

08:45 You can tilt it a lot, but it is just like if you want the least weird keyboard, but you want to separate it.

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

08:56 This is pretty good. We've got the Dygma Raise which is also-

09:01 >> I've never heard of this one.

09:02 >> Quite an interesting one. Yeah.

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

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

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

09:11 So that's something people might care about.

09:13 >> Nice magnets to mess up your phone with that you set next to it.

09:17 >> Exactly. There's the Ergo Docks Easy, which is another one.

09:22 Lots of adjustability on how it's oriented in things, which is cool.

09:26 Very thumb friendly, but no marking drive for the programmability.

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

09:33 >> Yeah.

09:34 >> Yeah.

09:34 >> Looks fun.

09:35 >> The ultimate hacking keyboard was Barry Warsaw recommended this one, which it comes with a built-in trackball looking thing in the middle for one of your thumbs.

09:44 >> Nice.

09:45 >> Yeah.

09:45 >> Okay.

09:46 >> Notice also it has the QWERTY.

09:48 See this hop, it says QWERTY for a display.

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

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

09:56 >> Pretty cool. Yeah. We have the Advantage 360 keyboard.

10:00 >> That's on my want list.

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

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

10:06 So it's completely split.

10:08 >> It's a fully split one.

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

10:17 >> Got it.

10:18 >> And it can tent.

10:19 >> Yes. It definitely looks like a content.

10:21 The one that he actually went more I believe went for is the Dygma Defy so you can define your limits with this one, which looks pretty genius as well.

10:30 It's so animated you can hardly see a picture of it, but links for all these in the show notes.

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

10:37 Look at how many options your thumb gets to play with there.

10:39 >> Oh, I like it. Yeah.

10:40 >> Yeah. So apparently this one takes a little while to get.

10:44 But anyway, I wanted to go through this because I know there's a lot of people out there who might.

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

10:52 Next month he'll order another one, I'm sure.

10:55 >> I know. I know exactly how it feels.

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

11:04 Don't just think, well, it's weird, so I'm not going to try it.

11:08 Honestly, it's worth not doing something that's just square that is your laptop.

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

11:16 >> Exactly.

11:17 >> Ten hours sitting.

11:17 >> We'll get a chair that just every so often, the chair just springs you over in the back and flings you out.

11:22 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, "Hey, you should stand up." >> I know. It's usually great, except for when you're in an airplane.

11:33 You should get up and walk around like, "You know what? I'm in the middle seat.

11:36 I don't think I'm going to right now." Thanks, Apple Watch. Maybe I feel even more stuck where I am.

11:41 Well, that's it for my first item. What you got?

11:43 >> Okay. Well, I want to talk about a command line interface tool.

11:48 I just a couple of things.

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

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 I tried a few. I went back and tried Click, I tried ArgParse.

12:10 I'm sorry, I forget who recommended this.

12:14 There's a new thing called Appeal, A-P-E-A-L, and it's by Larry Hastings.

12:20 I'm like, "It's probably pretty cool." It's got a great logo, like old retro, I don't know, like the '60s or something like that.

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

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

12:35 For instance, a Hello World, you just import it, create an app, and do app command around it.

12:41 It just picks up that, say, your Hello function has a name to it.

12:47 The name is going to be an argument that you have to pass in.

12:50 That's neat. Then I'm like, "Okay, well, how about more complex things?" Well, things like optional stuff, like default values.

12:59 Let's say I pass in a file name, like fgrep, you're going to pass in a file name, but it's optional.

13:06 You just say equals none, you just do type hints.

13:09 You're just saying that this is the command, but or that fgrep is the command, but that it takes a pattern.

13:16 An optional file name, and you tell it it's optional by just saying equals none.

13:21 Using type hints more, I know that Typer was using type hints, but Typer still has a lot of boilerplate that you have to do.

13:30 This is a very minimal API to get things done, and I'm pretty excited to try it.

13:37 Also, look at the contributors.

13:40 There's only five contributors, but it's Larry Hastings, Hugo, Brett Cannon, Henik, and I don't know, Peter, but wow, already.

13:51 >> Yeah.

13:51 >> Pretty cool.

13:51 >> Yeah, that's pretty cool. It looks very interesting.

13:54 >> Anyway.

13:54 >> Nice and simple.

13:55 >> Nice and simple for command line interfaces.

13:58 Worth a look.

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

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

14:06 Thank you, Scout APM, for sponsoring this episode.

14:09 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:26 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 codes 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, and probably be backed by the jokes. That'd be cool.

14:56 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:07 Thank you, Scout APM, for supporting Python Bytes.

15:09 >> Indeed. Thank you, Scout.

15:11 Very cool product.

15:12 >> Service.

15:13 >> 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:21 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:27 Yeah. So this one comes to us from, one second.

15:32 I ran Rivelus, and this is a project, it's 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:51 It's Badge.

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

15:55 >> Yeah. Wow.

15:57 >> Yeah. So if we go down a little bit, you can see some examples like here is a visualization of a Python AST that looks a little bit like an advanced molecule based on Benzene, but a bunch of stuff coming off of it, I guess, like a hexagonal thing in the middle.

16:13 It's cool. Then here's a relationship of some repositories and dependencies on GitHub.

16:21 Very cool. Here's web page links visualize.

16:24 Those are all nice visualizations, right?

16:26 >> Yeah. That's beautiful.

16:28 Looks like Dandelion fluff all connected together.

16:31 >> Yeah. You can almost blow on it and take out a whole segment of the Internet.

16:35 >> Yeah.

16:36 >> 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.

16:47 I suppose you could even use recursion with yield from and all sorts of things to go through hierarchical data models and whatnot.

16:56 So you just write a function called, here he calls it edge, it doesn't have to be called edge.

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

17:04 Then you just say graph.materialize, create a model, create this function, boom, and then you get those pictures.

17:10 >> That's pretty cool.

17:11 >> Yeah?

17:11 >> Yeah.

17:12 >> It is. It's pretty cool.

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

17:20 Mike Fiedler says, "Graphs not charts, important distinction there indeed." Yeah. So if you're doing graph type of work, even cyclical graph seem to be supported, as you can see for a benzene example, not really benzene, AST example.

17:34 So people can check that out.

17:36 I think this is pretty neat.

17:38 >> Benzene, you're such a nerd.

17:40 >> I know. I love chemistry.

17:42 >> That's pretty cool.

17:43 >> Indeed. So short and sweet, but there it is.

17:47 >> Yeah. Okay. Last topic I want to talk about.

17:51 Do you know who David Lord is?

17:52 >> I have heard of him. Does he do stuff with the web? I think he does.

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

18:01 He works on a project called Pallets.

18:04 He's also a PSF fellow.

18:06 As of just recently, he finally has a blog.

18:10 Yay, David. Anyway.

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

18:16 It started this month.

18:18 But he wrote this great article.

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

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

18:28 It's not like maintainers really need to know what all they're doing, but I think people that use open-source projects need to know what all maintainers do.

18:37 This list is pretty big.

18:39 >> Yeah. Why is it my feature already added for free?

18:42 >> Yeah.

18:42 >> No effort for 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 I really love this message.

18:57 Partly, is looking through this list and saying, if there's a project I want to work on or I'd like to have move faster, what could I help?

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

19:11 You might not know that stuff though, so maybe improve the test coverage.

19:15 I like that one.

19:16 Maybe help update the docs.

19:22 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 Here it is, turning questions and answers into documentation improvements.

19:34 When you get questions on Mastodon or an e-mail or something saying, "Hey, how do I do this?" That's a great place to put it in the documentation, but that is work, that's extra things that need done.

19:45 It'd be great to even reach out to a maintainer and say, "Hey, is there any parts of the documentation that you'd like help with or something like that?" I love this and I'm overwhelmed.

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

20:01 >> If you look at Flask and GitHub, there's a little bit of attention on that project.

20:07 65,000 stars, 16,000 forks, that's a high level of maintainer business, right?

20:14 >> Yeah. There's a lot going on there.

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

20:22 There's a good projects.

20:24 >> Yeah. Very cool. It's almost like a reverse lookup of how can I contribute to open source?

20:30 >> Yeah. I think we covered non-code contributors.

20:38 This is all technical work.

20:40 It's not non-technical, it's a technical work to answer questions and filter PRs and things like that.

20:48 All great things to help out with.

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

20:54 Do you have anything extra for us?

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

20:59 You 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:11 >> Starting this week.

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

21:16 I know they wait up for it.

21:18 Over at TalkBython training, we have a different deal this year than we had last year, and there's two cool aspects of it.

21:25 I just wanted to give a quick shout out and let people know, hey, if you're looking to take a course, now would be an affordable time to do so, and there's a good cost.

21:34 What I'm doing this year is I took five of our most popular courses or most anticipated courses that maybe are not even 100 percent done, but are almost done, and put them out as early access.

21:44 We have Visual Studio Code for the Python developers coming out, which is a really awesome course.

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

21:54 It's good to do this and that, and what am I doing?

21:55 How do I make it do that?

21:57 This is an early access by Brian Clark and Cecil Philip, 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, so still lots to get there.

22:06 Async MongoDB with Beanie and Pydantic, up and running with Git, like a more visual, more beginner-friendly way to get going with Git.

22:14 Effective PyCharm because I love PyCharm, and our beginner course.

22:19 All those are 50 percent off for the week.

22:21 That's our Black Friday.

22:22 >> Nice.

22:23 >> The other part is, we are taking 10 percent of the revenue and donating it to the Hidden Genius Projects, which trains and mentors black male youth in technology, creation, entrepreneurship, leadership.

22:37 Basically, a lot of kids who are in places where they might not see a lot of hope or don't think tech applies to them, and they run even up to 15 months long.

22:46 Not an accelerator, that's not exactly fast, but mentorship journeys for them.

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

22:56 That's the other half.

22:57 >> That's pretty cool.

22:58 >> Yeah.

22:58 >> Nice.

22:59 >> Thanks. Two more.

23:02 Python 3.13 Alpha is out, and boy, how do you want to push your luck?

23:09 Friday, October 13th.

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

23:16 No, 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 in the new version, we just got 3.12, but it's now time to move on and start adding features to the Alpha. What do you think?

23:28 >> I think that's great.

23:33 I was reminded of a couple of years ago, one of my kids said that they heard somebody at school say, "Did you know that this year, Halloween is going to be on Friday the 13th?" >> Maybe a little bit backwards.

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

23:51 >> This is actually a little bit old, but I just realized I was on my list to talk about and I skipped it.

23:56 But Python 3.13 is already underway.

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

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

24:07 >> Yeah, we can go to that. New features will come.

24:10 Alpha 1 is not the end of features.

24:12 That's when we get to the beta, so that's quite a ways off.

24:14 >> Yeah.

24:15 >> More to come. Yeah. 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 I think JetBrains is, yeah, again.

24:26 The Python Developer Survey for 2023 is now open for the taking, as in take your time, please go there, fill it out, submit your thoughts, and then in, I don't know what, a couple of months, six months, hopefully quicker than that, we'll get results.

24:43 Now, we can go talk about it.

24:44 But the way we can talk about it is that people take it, right, Brian?

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

24:50 I'm wanting to think about it.

24:52 >> I am as well. It'd be awesome if it came out while it was still in 2023, so we don't have to 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, that kind of talk.

25:04 Hugo also says, "Alpha 3.13, sorry, Python 3.13 Alpha 2 is due out today." I just snuck in under the, this is super outdated news, Michael, deadline.

25:15 >> What gives, man?

25:18 >> All right. That's it for my extras.

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

25:23 This morning, I met with the JetBrains and PyCharm team and did a webinar about do you do enough testing, pytest to the rescue, and it was really fun.

25:33 It was Paul Everett and Helen Scott, and we had a lot of fun this morning.

25:38 We had like 200 people show up, which was great.

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

25:44 >> That's awesome.

25:45 >> It was fun, so check that out.

25:47 >> People are wondering if they actually do do enough testing and so they came to check it out.

25:51 >> Well, and the-

25:52 >> It's always fun when you're with Paul and those guys as well.

25:55 >> Yeah. The focus of this, I got some technical stuff, especially with the parameterized IDs.

26:01 Sorry about the nerdiness.

26:02 But the point was trying to get people to realize how easy it is to get starting.

26:08 I'd like to 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:18 It's going to be 16 chapters.

26:21 I've got 11 published already.

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

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

26:31 Of course, it's all for sale.

26:34 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:40 >> Yeah, it might be. I suspect people would be interested in it.

26:43 >> Okay. I'll probably set up that.

26:46 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 there.

26:54 >> Yeah, I'll put the link in the show notes when you get it set.

26:55 >> Nice. All right. Well, that's all of my extras.

26:59 >> All right. Brian, you know it's important to comment your code.

27:02 People tell you this, right?

27:04 >> Yeah, as long as the comments are right.

27:06 >> Yeah. Well, that's part of it.

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

27:15 It could just not attract.

27:17 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:24 >> Okay. Here's an image that says, this is the proper way to comment your code.

27:30 Let me see how I can do. I did study math.

27:32 So the function is called calculate circle area given, and the parameters are radius, okay?

27:37 >> Okay.

27:37 >> It does what you would expect.

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

27:43 It says, "In mathematical fields where circles weave, with pi's grace, a mystic number we conceive, radiance orbs in their geometric trance circles area, make dance 3.14159 are constant true in pi's embrace.

28:00 The circle secrets do.

28:02 Where radius meets its boundless quest, area blooms in geometries bequest." Then it does colon calculate circle area.

28:10 It's nice, right?

28:12 >> Yeah. I love also that it's four lines of code and eight lines of comment.

28:20 >> Exactly.

28:21 >> That's never going to be wrong, right?

28:24 I think that's our takeaway.

28:28 >> Yes.

28:28 >> As long as your comments are just loosely related to the code below it, it's probably not going to be wrong ever. So you're good.

28:35 >> You just want to call this function for the joy of the description.

28:39 Peter Beans points out, indeed, this is where AI might help you write some code.

28:45 >> Oh, gosh.

28:47 >> Dear copilot thing, write me a poem about this function.

28:53 >> That's awesome.

28:55 >> I think it can totally do it.

28:56 >> That's a great use of AI in ChatGPT.

29:00 Try it now before the entire system explodes and implodes on itself.

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

29:09 >> Yeah.

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

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

29:16 With that, Brian, I bid you happy poem and haiku writing for your code.

29:22 >> I'm more of a limerick man.

29:24 >> Okay. Fair. We can make that happen.

29:27 >> Thanks a lot and thanks everybody for listening.

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

29:35 We love you. Talk to you later. Bye.

29:37 >> Yep. See you all later. Bye.

Back to show page