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


Transcript #131: Python 3 has issues (over on GitHub)

Return to episode page view on github
Recorded on Wednesday, May 15, 2019.

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

00:04 This is episode 131, recorded May 15th, 2019. I'm Michael Kennedy.

00:09 And I'm Brian Okken.

00:09 Hey, Brian, how are you doing?

00:10 I am good. How are you?

00:12 I still have a little bit of a conference hangover.

00:15 Two conferences in a row and then some parties definitely took it out of me. How about you?

00:20 Oh, yeah. You went to build afterwards. How was that?

00:22 It was good. I did a bunch of podcasting, met some other folks.

00:25 I got to see what a different type of conference than Python looked like.

00:29 And yeah, it's pretty different.

00:30 Okay. So anybody out there from build listening, you can invite me next year. That'd be just fine.

00:35 Yeah, absolutely. Absolutely. So yeah, it was fun. It was fun to be there.

00:40 And it's but it's good to be back home from all the conferencing.

00:42 Yeah, it is. So let's get back into Python.

00:45 Let's get into it. So before we do, though, I want to say thank you to DigitalOcean.

00:48 Check them out at pythonbytes.fm/DigitalOcean. More about that later.

00:52 I feel like we kind of have a little bit of a PEP roundup for this episode, Brian.

00:57 We got at least three peps. Yeah, we got at least three peps making an appearance. Maybe four.

01:01 Okay, well, the ball is rolling now with the new steering council in place. And they're kicking butt and taking names. And it's great.

01:11 So we'll start off with, I just saw this today. Pep 581 is accepted. And that is the GitHub issues for CPython. So CPython has traditionally had its own, I think it was its own custom made defect tracking system or something.

01:28 It hasn't switched yet, but it will be switching to GitHub issues. We'll link to the PEP and also it has discussion of pros and cons, but it has been accepted.

01:38 But the follow on PEP is 588. And I'll quote Barry Warsaw here. It's the migration will be a large effort with much planning, development and testing. And we welcome volunteers who wish to help make it a reality.

01:50 I look forward to your contributions on PEP 588 and the actual work of migrating issues to GitHub. So 588 is, okay, now that we've decided to do it, how are we going to do it? How are we going to do the migration?

02:02 And once they figure that out, they'll probably need some help to do it.

02:05 That's cool. And you know, you spoke to Barry on our episode, our live episode at PyCon, about becoming a core developer and ways you can help.

02:14 And here it sounds like another way you can contribute to CPython without actually writing C code potentially.

02:21 Yeah, I'm not afraid of C code, but I know, I mean, especially in the Python community, there's some people that aren't involved with C code.

02:27 So there's other places, ways to help. And this is one, yeah.

02:30 Yeah, it's one thing to write C code. It's another to write on the core of CPython itself, right? I mean, that's like, it's a super highly polished piece of software and any change you make has like massive ramifications.

02:44 So, right, I can see how it depends on it. No pressure.

02:47 You're going to take down the Instagram influencers if you mess this up. So don't.

02:52 Yeah.

02:53 Maybe some science and other important things as well. I think this is good. You know, Brett Cannon was key in getting,

03:00 CPython, the source code over to GitHub originally. And I feel like this is well overdue, right? Like, having the issues there means you can reference them in check-ins. It means that you get that integration for pull requests and all sorts of stuff. It just makes a lot of sense to do this.

03:16 Yeah. And I have no idea what the migration path looks like.

03:20 Yeah, I was wondering, like, are they going to copy every single issue across? Or is it this a chance to kind of like clean house?

03:28 I go, well, if this bug comes back, it's important enough to worry about. If it doesn't, maybe it's not.

03:34 I've been on projects like that, that we've gone to a different bug tracking system where we just said, well, we'll just leave the other one around. And if anybody really cares about moving them over, we will. But sometimes cleaning up is a good thing.

03:48 Yeah, I totally agree. So how about cleaning up some code?

03:51 Yes, let's clean up code.

03:52 So I'm a big fan of design patterns in general, the solid principles, all these things. I really enjoy, like, thinking about how that influences code.

04:00 And one of the things that makes me crazy when I read code is, like, ultra-nested, indented, conditional stuff.

04:08 And when I see it, I feel like people write code like that because they don't believe there's another way.

04:15 It's just like, well, this code is complicated, so it's, like, indented, you know, 16 spaces or whatever it happens to be indented as, right?

04:23 Like, it doesn't have to be this way most of the time.

04:26 So I just wanted to, like, call out a super easy-to-implement design pattern called guard clauses or guarding clauses.

04:33 Okay.

04:33 Okay, so this is, if you have, like, nested stuff.

04:37 I have two little examples, like a bad one and a good one here in our show notes, and people can check that out.

04:44 And it's, like, a little checkout for a user.

04:46 So a user, they've got a shopping cart.

04:48 They've got some items in there.

04:49 Some of them are available.

04:50 Some of them aren't.

04:51 Some of them are selected to be express-shipped.

04:54 Some of them are not and things like that.

04:56 And so it's got, like, if user is not none, go through their carts.

05:01 If the item is available, add it.

05:03 In addition to that, if the item is selected to be express-shipped, add it.

05:07 And that's, like, just, what is that, a 30 degrees down, 45 degrees down line of code, right?

05:13 It's not vertical.

05:14 It's, like, you know, at an angle, probably 45, right?

05:16 Yeah.

05:17 And every one of these is asserting a positive thing.

05:19 The thing I want, if the user is good, I want to go through them.

05:23 If the thing is available, I want to do this, right?

05:25 And so on and so on.

05:26 Guarding clauses basically check for the negative and bail out as soon as possible.

05:30 So you could rewrite that and go, if the user is none, return empty stuff for their stuff.

05:34 If it's not available, just skip through the loop with a continue and so on.

05:37 And it's much simpler.

05:38 And it's not just about visual code.

05:41 It's not just, like, easier to read, but it's easier to reason about.

05:45 Like, if you get into one of these super nested conditional structures, then it's really hard

05:50 to think about, like, okay, I want this case and that case.

05:53 Like, where does that go?

05:54 Do I need another branch in this if?

05:56 And so on.

05:57 I feel like it's much easier to maintain and add to with these guarding clauses.

06:00 And in the example you're showing, and we're going to have in the show notes, the better

06:04 one actually ends up being more lines of code.

06:07 However, you're visually going to skip over the top part because you're like, oh, I'm just

06:12 making sure that things are the right.

06:14 And then in the middle, I've got highlighted just, like, three lines of code where the actual

06:19 work is.

06:19 And highlighting where the real work is instead of dispersing the real work across lots of if

06:26 clauses.

06:26 I think that's a great idea.

06:27 Yeah, thanks.

06:28 I super love it.

06:29 I'm linking to Martin Fowler's original little article on it, which is like C or JavaScript

06:33 or something.

06:33 But it's, you know, it's if statements.

06:35 It's basically the same idea.

06:36 As well as to one on, from a Go, a Medium article about line of sight programming, talking

06:43 about, like, you can just, you know, see right down the line.

06:45 Anyway, it's all pretty cool.

06:47 I definitely, definitely think how those can be used.

06:50 I find it to make it a lot nicer, a lot easier to maintain this code.

06:54 It'll also reduce the cyclomatic complexity of your code.

06:57 Yes.

06:57 Yes, it will.

06:58 And that also probably, you know, that's cool because it'll make Anthony Shaw happy in his

07:03 Wiley.

07:04 But it also means, like, it's less cognitive overhead to maintain, right?

07:10 You can say, okay, I cleared out the stuff that's not good.

07:12 Now we're in the good spot.

07:13 It's not indented.

07:14 It's not a lot going on.

07:15 You're right.

07:16 It's so simple that I don't, you know, if you're not using it, just check it out.

07:20 It's great.

07:21 Good reminder.

07:21 Speaking of if you're not using it.

07:23 Yeah.

07:23 So the, so Python 3 is a thing.

07:26 We've talked about it a few times in the past.

07:28 There's probably a lot more people.

07:30 Well, I don't know.

07:31 There's probably more people, some people now still converting to Python 3 or starting to

07:36 get used to it.

07:37 The easy hurdles are just to start not using the stuff you can't anymore and some of the

07:43 string changes and whatever.

07:44 But here's an article we ran across called Things You're Probably Not Using in Python 3,

07:49 but Should.

07:50 So there's a lot of new items in Python 3, but this article goes through a handful.

07:56 So there's some obvious, I think obvious, of course, items like fstrings, pathlib, and maybe

08:02 data classes.

08:03 I'm using them a lot, but, you know, maybe.

08:05 fstrings and pathlib, definitely everybody should be using those.

08:09 Those are awesome.

08:09 I'm warming to type hinting a little bit more.

08:12 I think it's feeling more natural.

08:14 You know, I'm not really a zealot about it.

08:17 But when I start trying to see myself start typing a comment to say what kind of stuff should

08:23 go into a function or what should be in a variable, I'm like, oh, I could just put a type hint

08:27 on there.

08:28 Exactly.

08:29 Yeah.

08:30 Exactly.

08:30 Yeah.

08:30 Comments are deodorant, right?

08:32 They go on to bad code to make it smell better.

08:34 But maybe you should just make it better by putting some type hint.

08:37 Maybe type hint.

08:38 Yeah.

08:38 So especially when it's, I'm only intending it for like the reader.

08:43 I'm not using some testing tools around that.

08:45 But there's some stuff that I knew about that I just kind of forgot.

08:49 So I'm glad that I'm going to list three that he listed.

08:53 Enumerations with the new enum package and enum and auto methods and classes.

08:59 Yeah.

09:00 I love enums.

09:01 They're really great.

09:01 I don't use them enough, but yeah, they're super enough.

09:04 I want to use them a little bit more after this reminder.

09:07 Also, LRU cache is built in.

09:10 It's a decorator in func tools that you can use really easy memoization.

09:16 So if anybody's not familiar with LRU cache or memoization, the gist of it is, is you just

09:22 throw this decorator on a function.

09:23 If it's really functional programming type stuff where you pass in some value and you get at

09:30 and that has no behavioral side effects and it just returns some other, some value that's

09:35 a one-to-one correlation between input and output.

09:38 And it's called a lot.

09:41 You can use memoization with LRU cache to speed it up and it just remembers the old stuff.

09:46 Yeah.

09:46 It just says like, if I see this argument come in, say you have a number in your example,

09:50 like if the number 72 comes in and the answer was 7,000, the next time it's called, it just

09:56 goes, that argument's 72.

09:57 We know it's not changed.

09:59 The answer is going to be 7,000.

10:00 Anytime you have a function that basically is deterministic, you give it the same input,

10:05 it gives you the same output.

10:06 This is a super good option.

10:08 Yeah.

10:08 Especially if it's something that's like time consuming, it has to do some data crunching

10:12 or something.

10:13 Yep.

10:13 The last one I'm going to highlight that I totally forgot about is extended iterable unpacking.

10:19 And this one you kind of have to see to get it, but basically you can, when you like, for

10:25 instance, if you're unpacking a list with a three element list, you can assign it to three

10:29 variables.

10:29 We know that.

10:30 But if you have more than three, you can put a star on one of those things and it'll catch

10:36 all of the rest.

10:37 And that's cool.

10:39 There's lots of places that I could use that that I forgot about.

10:42 You know, you can even do the star in the middle, right?

10:45 You've got like head, star, body, and tail for five things.

10:48 And the body is three things.

10:50 Pretty awesome.

10:50 Yeah.

10:51 When I look at this and I think about it, you know, obviously there's a lot of people

10:54 moving to modern Python and using it in their code, right?

10:59 But just like you could come from C and write non-Pythonic Python, you could move to Python

11:06 3 and write non-Python 3-ic?

11:08 I don't know.

11:09 Like you could write code that's not idiomatic to Python 3, right?

11:12 You still do everything in the Python 2 style, not taking advantage of any of these things,

11:18 right?

11:18 Like F-strings, pathlibs, type hinting, async and await, you know, like you said, enums.

11:23 You could like do none of that and still be quote using Python 3.

11:26 So I think it's cool.

11:29 A cool reminder and example of things you could do to be more idiomatically Python 3.

11:32 Yeah.

11:33 Actually, when I was thinking about that, the author of this even says some of his old articles

11:37 are written essentially for Python 2.

11:39 And I think that's a great place for people if they're new to, they want to start doing

11:44 technical blogging and they don't really have some ideas on what to do.

11:48 You could go look at some common and popular articles that are written in Python 2 style and

11:54 kind of make them your own and do a similar article.

11:57 Don't copy it, but do a similar article with Python 3 syntax and you'll probably get some

12:02 hits.

12:03 Yeah, for sure.

12:04 Or even if you really love that resource you're reading, you could send them a note like,

12:08 hey, I'd love to upgrade these three articles to Python 3.

12:10 Could I help you?

12:11 Oh, yeah.

12:11 That would be much nicer.

12:12 Do that.

12:13 Yeah.

12:16 Well, they both have their own merits, right?

12:17 Yeah.

12:18 Speaking of merits, let me tell you about DigitalOcean.

12:19 DigitalOcean is powering all of our things, which is awesome.

12:22 And we talked about GitHub at the beginning.

12:25 One of the big things GitHub is doing is GitHub Actions.

12:28 So kind of automated workflow for things that happen, you know, check-ins and other stuff

12:34 on GitHub.

12:35 And DigitalOcean has a GitHub Actions for DigitalOcean that you can install and plug in there.

12:42 So you can take your workflow that's happening on GitHub and automatically use that to do

12:47 things like create a new virtual machine or push a new version to a Kubernetes, managed

12:53 Kubernetes cluster based on a push or something like that, right?

12:58 Or maybe snapshot it when an issue is filed.

13:00 Who knows?

13:00 But all sorts of cool stuff you can do with GitHub Actions and DigitalOcean mixed together

13:05 with that.

13:05 So check that out at pythonbytes.fm/DigitalOcean.

13:10 Get $100 free credit for new users.

13:11 Definitely can recommend them.

13:13 They're doing good stuff.

13:14 So how about some fun, Brian?

13:16 Yeah, we got a couple of fun ones.

13:18 Yeah, yeah.

13:18 Let's play a few games here.

13:20 It's awesome that these came up just right by each other.

13:23 So I want to talk about this thing called the Python Arcade Library, which is at arcade.academy,

13:31 which I didn't even know .academy was a top-level domain.

13:34 But apparently, apparently it is.

13:37 That's pretty awesome.

13:38 So this is a library for easily building 2D games in Python that run at like 60 frames

13:46 a second on OpenGL.

13:47 Oh, neat.

13:48 That's pretty cool, right?

13:49 So it's really about like this is by a guy.

13:52 I believe his name is Paul.

13:53 Paul, hopefully I'm getting that right.

13:55 He built this to help teach.

13:58 He teaches at a college.

13:59 And it helps teach his students a more visual way to learn programming.

14:03 So it's not to teach game development.

14:04 It's to teach programming.

14:05 But because it's got a visual aspect and not just like a terminal version, you can see what

14:12 you're creating more easily and see it working.

14:14 So that's pretty cool.

14:15 You can create like Minesweeper games, Hangman games, and in particular, platformer games,

14:19 right?

14:20 So if you wanted to recreate Lemmings or he wanted to do like Joust or whatever, like you

14:25 could totally use this for that.

14:26 Ooh, neat.

14:27 Yeah, and you can check out the sample games made with that.

14:30 So there's like a tower defense game.

14:33 I'm a sucker for tower defense.

14:34 There's like a little Angry Bird thing made.

14:37 There's all sorts of fun stuff.

14:38 There's tons of examples here.

14:39 I think mostly because these are students who are taking the class but then submitting their

14:44 projects.

14:45 Oh, that's a great idea.

14:46 Yeah, nice, right?

14:47 Yeah.

14:48 Yeah, and I like these 2D games.

14:50 I do too.

14:52 Yeah, and it also includes things like physics, which is nice because it's one thing to get

14:56 the graphics on the screen.

14:57 But hit detection, physics, sound, all these other things are super hard.

15:01 And I believe sound is still like a little bit of an iffy feature here.

15:04 I hear that that's tough in Python.

15:06 So maybe that's like a cool C extension somebody should write.

15:10 I don't know.

15:10 But anyway, it's all based on OpenGL.

15:12 And it looks pretty cool.

15:14 So definitely want to recommend that people check that out.

15:17 Yeah.

15:17 And you guys, similar one.

15:19 How about that?

15:20 Yeah.

15:20 So I wanted to highlight an article called Teaching a Kid to Code with Pygame Zero, written by Matt

15:26 Lehman.

15:26 So this is just this guy with his kids.

15:30 He likes to play video games with his kid.

15:32 And I thought, you know, I should try to teach him how to code.

15:36 And they tried, his son did like a version of Scratch.

15:40 But the worry is that Scratch is really far removed from actual coding.

15:45 And the skills you build might not be transferable really easily.

15:49 So I went ahead and decided to try Pygame Zero using the Mew editor.

15:55 And I guess Pygame Zero is already pre-installed in Mew, as is a Python interpreter.

16:03 I didn't know that.

16:05 That's cool.

16:05 Yeah, that's great.

16:06 And so a quote from somewhere.

16:09 Pygame Zero is intended for use in education so that teachers can teach basic programming

16:14 without needing to explain the Pygame API or write an event loop.

16:19 He worked with his son and they came up with a 29 line of code, including blank spaces.

16:26 Little game.

16:27 Doesn't really do much.

16:28 But it teaches a lot.

16:30 So he said that his son learned about naming things and variables and mutability.

16:35 Fiddling with constants to see how those will affect the screen size and stuff like that.

16:39 Writing functions that have side effects and interacting with mouse events.

16:44 So he learned quite a bit with just this little bit of code.

16:47 And it's actually Python.

16:49 So that's kind of neat.

16:50 And then one of the things I really like, because I do want to start, I haven't worked with my kids with coding yet,

16:56 but the article also includes some tips on how to behave as the adult when you're working with kids with coding.

17:02 This is good.

17:03 Yeah, it's truly tricky to set up the right balance of it's interesting, but like quickly becomes too hard or it's easy enough to get kids started.

17:13 But it's, you know, they have expectations of something they can do with their iPhone as a game.

17:18 And what you build does not necessarily match, right?

17:21 Yeah, and I'm, I like the tips at the end because I'm one of those kind of people that would just say,

17:26 okay, you just sit on the side and I'll do it and you watch.

17:29 It's not really teaching.

17:30 Yeah, true, true, true.

17:32 It's cool though.

17:33 I think these are both really fun options for teaching kids programming and building a little game.

17:39 Because, you know, not everybody cares about building games, but a lot of people who do,

17:42 like a lot of people's introduction to programming was they wanted to build a game.

17:47 Programming was just what was required to make that happen, right?

17:50 And you can go do something else like a useful utility that somebody might need.

17:54 But I mean, how many like six-year-olds really need a useful utility written in Python?

17:59 Yeah, true, true, true.

18:00 Anyway.

18:00 Cool.

18:02 While we're talking about games, like if kids are not quite ready for a game,

18:06 but they're ready to do adventurous stuff, I guess, I want to throw a shout out to CodeCombat.com.

18:13 That's a super cool place.

18:14 It has a free version where you basically go into these dungeons and you solve the dungeon by writing Python programs.

18:21 Oh, neat.

18:21 And the editor has like autocomplete like nobody's business.

18:25 It's super, super nice.

18:26 So you have to like have your hero move around.

18:28 You say like hero.attack and select like an enemy.

18:31 You type the letter A, it'll autocomplete hero.attack.

18:34 I mean, it's like really, really beginner friendly.

18:37 So definitely, you know, that's maybe a first step.

18:40 And then like one of these two that we just spoke about would be really good as well.

18:43 Oh, I'll try that.

18:44 Yeah, I was doing that one with my daughter and she was super into it.

18:46 She got like 50 levels in or something.

18:48 50 little dungeons.

18:49 Cool.

18:50 So, all right.

18:51 So last one, let's round it up with something a little more serious.

18:54 So, we talked before about whether or not the GIL will become obsolete with the introduction of PEP 554.

19:03 And this was on episode 128, which is cool.

19:06 So, Anthony Shaw wrote a cool article called Has the Python Gil been Slain?

19:11 That really digs deeply into that idea that we were touching on back then.

19:15 So, the answer is kind of, maybe.

19:18 I don't know.

19:19 Probably.

19:20 But for a limited case.

19:22 So, we've got a multi-threading in Python, which is pretty easy, but it's not actually concurrent because of the GIL.

19:28 We have multi-processing, which is harder to exchange data and stuff.

19:33 It carries a lot of overhead, but does escape the GIL because it's all these separate processes.

19:37 Right?

19:38 So, PEP 554 introduces this idea of sub-interpreters.

19:42 Remember that from back then, right?

19:44 Yeah.

19:44 And we speculated that maybe the ability to have multiple sub-interpreters would remove the problem of the GIL.

19:52 Because the GIL is not a process thing.

19:54 It's an interpreter thing.

19:55 It's a global interpreter lock.

19:56 So, if we just take and run our threads on multiple sub-interpreters, there would be no GIL.

20:02 Things would go potentially faster at least some of the time, right?

20:05 The problem is if you actually try to share data across those sub-interpreters, things get pretty tricky.

20:11 So, Anthony's article really digs into that and talks about how you might use shared memory and IPC,

20:20 which is also another feature coming to multiprocessing.

20:22 But that's also kind of slow and challenging.

20:25 So, he highlights another PEP.

20:27 So, here's our fourth PEP.

20:29 PEP 574, which proposes a new Pickle protocol.

20:33 Is that surprising?

20:34 Yeah, a little bit.

20:36 A little bit.

20:37 Because, like people say, don't use Pickle.

20:38 It has all these vulnerabilities and versioning issues and whatnot, except for it's a nice binary format.

20:43 And if your goal is to just literally exchange data from sub-interpreter to sub-interpreter through shared memory,

20:50 well, then, like, that's fine.

20:52 That's, like, within the runtime of a process.

20:54 It should be okay, right?

20:56 You're not going to hack yourself.

20:57 And if you do, you deserve it.

20:58 Yeah.

20:59 So, this is a special protocol version 5 that has support for allowing memory buffers to be handled separately for the rest of the Pickle stream, basically.

21:07 So, all these things could be combined together to get us a cool, faster, more concurrent Python.

21:14 And he answers the question, when?

21:16 When will maybe these things be here?

21:17 So, Pickle version 5 and shared memory will probably make it to Python 3.8, which will be October of this year, 2019.

21:24 And sub-interpreters may make that, but they might take another version 3.9, which I believe at the time that's going to be 18 months later.

21:34 I think we're still on the 18-month release cycle here.

21:38 Yeah.

21:38 What I really appreciate about this article isn't that there's suddenly stuff that I can use now.

21:43 It's that we have been talking about the sub-interpreters, and I haven't really got my head around really how that affects us.

21:51 And I think this is a good jump in, a good discussion about it.

21:54 So, if you're curious about this, he talks about all the kind of the backstory and kind of where we're going from here.

22:02 The where we're going from here, I think, is still kind of up in the air.

22:05 I would like to see something more around like a shared memory.

22:09 One of the discussions is having shared memory objects that are owned by one sub-interpreter at a time.

22:16 So, you could say, well, I'm creating this data to have another interpreter take it over.

22:21 Right.

22:21 I'm handing it off to you.

22:23 You can have it now.

22:23 Yeah.

22:24 And it would be nice if I didn't have to pickle that.

22:26 If I could just, the data I'm creating is just normal data, but it happens to live in an area that I can hand over to a different process or something.

22:35 Oh, that's interesting.

22:35 Like, basically dereference it in the current garbage collector system and re-reference that information in the other one.

22:42 Yeah.

22:43 Somehow.

22:43 Something like that.

22:44 Yeah.

22:45 Yeah.

22:45 Okay.

22:45 Cool.

22:45 There's, I'm sure, lots of smart people working on the problem.

22:48 But it is neat.

22:49 It's neat to see it going forward.

22:51 Absolutely.

22:51 Plus, there's a really amusing video of a breakdancer where, like, six guys come out.

22:57 None of them are doing anything except for one who's spitting on his head.

23:01 Yeah.

23:02 It's a very, I don't know even how to describe it.

23:05 It's a very different interpretation of how the global interpreter lock kills concurrency through breakdancing.

23:10 Yeah.

23:11 Through breakdancing.

23:12 I knew it all along, man.

23:15 The rap beat was off.

23:16 That's why we can't get this scene to run in parallel.

23:18 Yeah.

23:19 All right.

23:20 Cool.

23:20 Well, that's it for our main topics today.

23:22 What else you got that you just want to quickly chat about?

23:24 A couple things.

23:25 PyCon seems like it just got over, but the videos are already all available.

23:29 And I've already started watching them, including Ant's Complexity with Wiley Talk.

23:36 And the other thing I wanted to bring up is I'm reviewing, I'm not reviewing it, but I bought the new Pragmatic Programmer book, the 20th Anniversary Edition.

23:46 They rewrote it.

23:48 And I'm reading the testing chapter starting there.

23:50 And they bring up pytest.

23:52 And they're using pytest and Hypothesis.

23:54 And that's pretty cool.

23:55 Oh, yeah.

23:56 That's super cool.

23:56 And Hypothesis.

23:57 That's pretty interesting, that one.

23:59 Yeah.

23:59 All right.

23:59 Well, I have a couple quick announcements for you all.

24:02 So, first of all, quick and easy one.

24:03 I've been creating a bunch of different things lately.

24:05 The iOS and Android apps are both out for the Talk Python training stuff.

24:11 But I just released new versions that have a couple of cool new features.

24:14 So, if you have it installed, make sure you update it.

24:16 If you don't have it installed, well, check it out at training.talkpython.fm.

24:21 That's cool.

24:22 So, Brian, I've joined you in the journey that is writing a book.

24:26 Yes.

24:27 You're an author now.

24:28 Yeah.

24:28 Apparently.

24:29 Somehow.

24:31 Somehow.

24:31 I don't feel like I've gotten any official stamp or any letter or a little pamphlet that

24:38 makes me officially an author.

24:39 But, yeah.

24:39 So, we have a book called Effective Pie Charm that's out.

24:42 And it has a digital version.

24:44 It has a print version.

24:45 It has sort of bundled stuff with some of the courses.

24:48 So, I'll link to that in the show notes.

24:50 People can check that out at effectivepicharm.com.

24:52 So, that's pretty cool.

24:54 And then, also, we just released a new course, 100 Days of Web.

24:57 It's pretty neat.

24:58 I've started watching it.

24:59 I like it.

25:00 Yeah.

25:00 Thanks.

25:00 Thanks for checking it out.

25:01 That's awesome.

25:02 So, it's kind of intense.

25:03 It's like 28 little different web projects.

25:06 So, one time you build an API in Flask.

25:08 And one time we build, like, logins with Django.

25:11 And migrations with SQLAlchemy.

25:13 So, all these different things you might want to do all over.

25:16 It's kind of like a super sampling of all the web stuff.

25:18 So, check that out.

25:19 You know, the links in the show notes at Talk Python Training as well.

25:23 All right.

25:24 Well, that's all I got for now.

25:26 Do you got a joke for us?

25:27 I don't.

25:28 But I wanted to bring up something about your course.

25:31 Oh, thank you.

25:31 My first concern was that, like, 100 different web projects might seem overwhelming.

25:36 But it isn't that.

25:37 Like you said, it's 28 projects.

25:39 Is that right?

25:40 28?

25:40 Yeah.

25:40 And there's four of them that are super short.

25:42 So, it's kind of 24.

25:43 Yeah.

25:44 Yeah.

25:44 You get more into it than just some quick thing that you can do in one day.

25:49 I appreciate that pacing.

25:50 Yeah.

25:51 Thanks a bunch.

25:52 Yeah.

25:52 We're trying to find a balance there.

25:53 Because 100 separate projects, too small.

25:56 Yeah.

25:56 One huge project.

25:57 You don't get enough variety of other things.

26:00 So, 24.

26:01 That was the slicing we came up with.

26:03 All right.

26:04 How about this?

26:05 So, there's a programmer going to a coffee shop looking to get out of the cube.

26:10 All right.

26:11 Can't stand being a cube more.

26:12 So, I'm going to get out.

26:13 And there's a waiter that comes over and says, hey, welcome to the restaurant.

26:18 Would you like coffee or tea?

26:20 The programmer says, yes.

26:22 Yes.

26:23 Of course.

26:24 Have you done this?

26:27 No.

26:29 But it sounds like it might be sort of fun.

26:31 Yeah.

26:32 I mean, I haven't done it with coffee or tea.

26:33 But I definitely think that sometimes if somebody gives me an or question, I'll answer with yes.

26:39 Yes.

26:40 Yeah.

26:41 They mean exclusive or, don't they?

26:43 Yeah.

26:43 Yeah.

26:45 Pretty awesome.

26:46 All right.

26:46 Well.

26:46 Thanks a lot.

26:47 You bet.

26:47 Good to chat with you.

26:48 And I'll catch you next time around.

26:50 Okay.

26:50 Bye.

26:50 Bye.

26:51 Thank you for listening to Python Bytes.

26:53 Follow the show on Twitter via at Python Bytes.

26:55 That's Python Bytes as in B-Y-T-E-S.

26:58 And get the full show notes at pythonbytes.fm.

27:01 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

27:05 We're always on the lookout for sharing something cool.

27:08 On behalf of myself and Brian Okken, this is Michael Kennedy.

27:11 Thank you for listening.

27:13 and sharing this podcast with your friends and colleagues.

Back to show page