Transcript #132: Algorithms as objects
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to
00:04 your earbuds. This is episode 132, recorded May 22nd, 2019. I'm Michael Kennedy. And I'm Brian
00:11 Aitken. And this episode is brought to you by DigitalOcean. Check them out at pythonbytes.fm
00:15 slash DigitalOcean. More about that later. Brian, how you been? I'm good, but I'm giggling right now
00:20 because I've been looking up jokes, but we'll get to those later. Yeah, I always look forward to the
00:24 jokes. And I think a lot of people out there seem to appreciate them. So yeah, we won't disappoint
00:28 this time. We got more lined up, as always. Yeah, okay. I mean, like in the past, you maybe used to
00:33 have to come up with these, but we have the internet. Yeah, I know. It's beautiful. It's easy to be a dad
00:38 now. That's right. All right, you want to kick us off with a little embedded Python? Yeah, I was
00:43 really excited to watch this. So I did meet, so this, the first one I've got up is the history of
00:48 CircuitPython. And this was actually on the PSF blog. And I think that a Jesse Jerry Davis put it up.
00:56 But anyway, it's about the history of CircuitPython and Adafruit and Scott Showcroft,
01:02 which I met Scott at PyCon and I knew he was involved with CircuitPython, but I guess I didn't
01:08 realize he was, he's the CircuitPython guy. So what happened was, and I always kind of wondered
01:14 about this, like the relationship between MicroPython and CircuitPython.
01:17 Right. I knew about MicroPython being for embedded devices. And I'm like, oh, there's now CircuitPython.
01:22 Like, are they friends? Are they frenemies? Like, are they, one is a specialization of the other? What
01:27 are they? So what happened was Adafruit thought MicroPython was a pretty cool thing and hired Scott
01:33 to port it to their, I guess their SAMD21 chip that's used on many of the boards. So he did it,
01:40 he's working on it. And it's a, at first it was just a fork, but now it's a fairly big changed fork.
01:47 There's a lot of differences, but Scott said it's a friendly fork. So they, he works closely with the
01:54 MicroPython people too, and they share code back and forth. So there's no, no hard feelings there,
01:59 but it's focused on the Adafruit boards, but it's also, MicroPython is also focused really just on
02:06 embedded stuff. Whereas CircuitPython is focused on beginners. And one of Scott's quotes is,
02:14 our goal is to focus on the first five minutes someone has ever coded. That's a strong lofty
02:19 goal. But watching some of their demos with the CircuitPython, it isn't surprising to me, you know,
02:25 doing, they just hook it up and a few minutes later, they've got stuff running. It's kind of incredible.
02:30 Yeah, that's really awesome. And that is a very, I don't know, impressive goal to say we're
02:34 focused on the first five to 10 minutes of somebody programming, because yeah, that's,
02:39 that's an early point in the life cycle, but I guess you got, you know, it's, it's got to start
02:44 somewhere. And I do think these embedded devices really do bring like some realism to programming
02:49 for people who may be programming just in the more theoretical way, didn't necessarily connect.
02:54 So it's, it's great.
02:56 One of the things I didn't know about was with, one of the things that CircuitPython does is
03:00 it outputs, like all the print statements go automatically to the serial output. So if you could,
03:06 if you hook up your serial output to a connected display, you don't even have to have any other
03:11 device. You can just see your prints and stuff. So that's kind of neat.
03:14 That's awesome. And Nina Zakarenko actually said, showed how to use this. And like, I think it was
03:20 Visual Studio Code. She had that serial output connected. So just within Visual Studio Code,
03:26 like the devices output would just like stream at the bottom.
03:29 That's so cool. And then, we're also including a link to the release notes for, CircuitPython 4.0.0.
03:37 So it's a new major number. So there's some breaking, a couple of breaking things, but it looks kind of neat.
03:43 Yeah, that's super. And apparently they're not on the zero ver, philosophy.
03:47 Yeah, no, that's good.
03:50 Maybe you read it reverse for zero ver, like zero, zero, four. I don't know. Anyway, if you must, but no, that's cool. It's, it's great that there's a new version of that out.
03:59 And it's, I really think they're doing a lot of cool stuff. The Adafruit folks are doing a lot of cool things. And some of those devices, I think were given out at PyCon this year as well, which is pretty neat.
04:09 So, we've talked about Python being popular, right?
04:12 Yes.
04:12 Yeah, absolutely. So this next article that I want to cover is by dice.com doing a little bit of analysis of the TOB index.
04:21 So we've talked about TOB before. This is a programming index talks about how popular languages are.
04:27 And one of the areas of major growth in Python has to do with the data science space and just the scientific computing in general.
04:37 So this article that I want to highlight, the title is R risks Python, R risks Python swallowing it whole, according to TOB.
04:45 So that's pretty interesting. There used to be like kind of a debate. Do I use R? Do I use Python?
04:50 Well, it looks like there's a lot of consolidation and all this growth in Python is somewhat a zero sum game for the other languages.
04:58 So it might be, might be interesting to check out if you're thinking, should I learn R? Should I learn Python?
05:03 R has a lot of interesting advantages over Python, but it seems like Python is kind of, kind of winning the day.
05:10 And so R has tumbled out of the top 20 languages and now is somewhere below that.
05:16 It's a very popular with a lot of people, but I didn't even hear about it until like maybe a year ago.
05:20 For sure. Yeah. It's definitely focused on a, on a more of a niche space.
05:24 So the article speculates sort of not super effectively why they think that is like the acid question, like, well, it seems that Python is winning in data science, but why?
05:37 And so I thought maybe I'd throw my own commentary in here.
05:39 And there's this idea, like, I really like to talk about with Python being a full spectrum programming language.
05:48 And what I mean by that is like, you can get started with the absolute minimum amount of effort.
05:53 There's no compilers, no linkers, there's no header files.
05:56 There's a single file and you can say print, parentheses, quote, hello world.
06:01 Right. And that's it.
06:03 You don't need to think about generators or all the other stuff that like rich programming languages have.
06:10 Like think C#, Java, C++, right?
06:12 You've got to like do all this ceremony to get going.
06:16 But the value of those other languages is like you can go build, you know, video games or operating systems or, you know, whatever.
06:24 Right. And you can do much of that kind of stuff, not operating systems necessarily,
06:28 but like you can build real apps, professional apps in Python.
06:31 And it kind of scales from this ultra beginner part where you can partially understand the language and be effective all the way up to using meta classes and decorators and generators to build, I don't know, Instagram or whatever.
06:43 And I think that that's actually why Python is winning in the space because the data scientists and scientific computing folks are coming in and they're like, I don't want to be like a programmer.
06:52 I want to use programming to solve my problem.
06:54 And Python lets them start that super easy path, but grow into where they eventually find themselves.
07:00 One of the things also is that people that have to reach towards R or some other programming language, that's not their only software issue that they may have.
07:10 And if you can solve it with Python, you learn Python and then you can solve other automation things within your workflow as well.
07:16 Whereas R has very focused.
07:18 I don't know how much you can do with it outside of data science.
07:22 That's for sure.
07:23 That's definitely part of the story.
07:24 Speaking of stories, you got a little history lesson for us, right?
07:27 I've had this on the list for a while, but it took me, I just went back and read it yesterday.
07:32 It's an article by, I think it's Eamon L. Emery called The Missing Introduction to Containerization.
07:39 And so container systems like Docker and stuff like that, lots of people use them.
07:45 And I do want to ramp up learning how to use them more.
07:50 I'm kind of one of those people that need a mental model of how all this stuff works.
07:54 And this is it.
07:56 So it starts with a 1979 release of something called, I don't even know how to pronounce this.
08:02 Chroot?
08:03 T-H-R-O-O-T?
08:05 Chroot?
08:05 Chroot?
08:06 Chroot?
08:06 Anyway.
08:07 Chroot jail, which was a way to isolate a root process and its children from the rest of the OS.
08:14 But there was a bunch of problems with, there wasn't really meant for security.
08:19 And I'm not going to read the whole thing, but it, you know, builds up.
08:22 Because of this is open source, FreeBSD improved on it, then Linux vServer, and then Oracle Solaris had some stuff, OpenVZ.
08:32 And then Google chimed in with something called C Groups.
08:35 And then a group called Linux Containers did LXC.
08:39 And then, you know, it kind of built up.
08:42 Cloud Foundry got involved.
08:43 And then in 2013, Docker.
08:45 And then Google's still doing more stuff with making things easier.
08:49 But all of this stuff builds up on itself.
08:51 And I really like that bit of a history lesson of how things built on itself.
08:55 And then it jumps into talking about the differences, all the different terms you'll find, like a system virtual machine, a process virtual machine, and VPS.
09:05 And what all those things mean.
09:06 Also, kind of the difference between an operating system container system and an app container.
09:12 And Docker is a little bit of a mix of both.
09:16 So, it's kind of containers and platforms.
09:19 Just why there's so many things around is kind of described in this.
09:23 And then that's only like halfway through the article.
09:26 The rest of the article jumps into, I think it's creating a container system from scratch based on some of these lib container things.
09:34 And yeah, I don't want to do that.
09:35 So, but the first half of it, definitely recommend.
09:38 It's a good article.
09:40 Yeah, the history here is really interesting.
09:42 Like, I guess when I first learned about Docker, I thought like, oh, Docker invented containers.
09:47 Right?
09:47 But absolutely not.
09:49 Right?
09:49 They were building on LXC and all these other things.
09:52 And eventually they sort of moved off that.
09:55 But yeah, they were just, you know, making containers more accessible and easier for folks and popularizing it.
10:01 I think these containers are super powerful and super interesting.
10:05 To me, I don't know.
10:06 Do you feel like they're complicated?
10:07 It seems like the system is made to not be, but I know there's a lot of stuff behind the scenes going on.
10:14 And I, you know, to be honest, I haven't played with them much or used them.
10:17 I don't need them for my normal job, but I would like to learn more.
10:21 How about you?
10:22 I definitely like them.
10:23 I'm not doing anything with them right now.
10:25 And I've thought about how using containers might make sense.
10:29 But at the same time, you'll have like lightweight VMs I just fire up and like they're dedicated to a single purpose.
10:35 So I don't know.
10:37 It's always a bit of a trade-off of like adding more complexity in one place.
10:42 I feel like it's a little bit of a whack-a-mole problem.
10:44 I can have more simplicity in some places, but I've like pushed it to another.
10:49 So for example, right, people talk about containers often being a great way to simplify development environments for junior developers.
10:57 Okay?
10:58 Yeah.
10:58 Right?
10:58 So like I'm going to work in a new company.
11:00 Our app infrastructure is super complicated.
11:03 So what they do is they say, well, here's like three containers.
11:07 One runs a database.
11:08 One runs the web front end.
11:09 One runs the caching tier or whatever the heck it is.
11:12 And I'm going to just run those.
11:13 And I'll just develop in that regardless of what my machine setup like.
11:17 Well, that's on one hand like simpler.
11:19 I say maybe Docker Compose up and boom, my little environment's working.
11:23 But now I've got to figure out how does my editor do like remote debugging of Docker containers?
11:29 And how do I like step across calls between containers in my debugger and all this other stuff?
11:35 It's like, okay, so I've moved like setup complexity to like editor complexity or other stuff, right?
11:41 So I don't know.
11:42 It's super interesting.
11:43 I'd certainly see them being really valuable for like zero downtime deployments and other kinds of stuff.
11:47 But yeah, it's interesting.
11:49 In my wacky corner of the universe, the place where I probably would use them is we often want to spin up a new build server or something like that.
11:57 And we have it written down about how to build a build server.
12:00 Even though it's on a virtual machine, we got to install a bunch of stuff.
12:04 And it's a half a day to get it up and running.
12:07 And having that just saved off.
12:10 Yeah, that's a perfect example of Docker, right?
12:12 Because you can build the container images to just do that setup.
12:15 And you just say, you know, Docker build and boom, you're ready.
12:18 Yeah, I like that.
12:19 Speaking of containers and all those good things, let's talk really quick about DigitalOcean, some of the stuff they have to offer.
12:25 So DigitalOcean just this week put their Kubernetes cluster into general availability and added some cool new features.
12:33 So if you're using Docker, you've got to run it somewhere.
12:36 And usually just running it directly is not what you want.
12:39 You want to run it somewhere where you can upgrade versions and do zero downtime deployments and multi-container stuff.
12:45 So Kubernetes is a great place for that.
12:47 So check that out over at DigitalOcean.
12:49 Just visit pythonbytes.fm/DigitalOcean and get $50 credit for new users.
12:55 Yeah, so all sorts of cool stuff over there.
12:58 You can provision your servers and optimize it and get it going.
13:01 Right?
13:02 Really, really nice.
13:03 And one of the things they just added is free integrated monitoring that'll provide like insight across your clusters and your containers and stuff.
13:10 So yeah, check them out.
13:11 Pythonbytes.fm slash DigitalOcean.
13:12 Super, super cool.
13:14 So this next thing I want to cover, Brian, touches on something I've been a fan of for a long time.
13:18 And that's design patterns.
13:19 Okay.
13:20 So design patterns, we talked a little bit about that previously, one of the shows just recently.
13:26 But this time I want to focus on maybe a topic that is reversed from a lot of the advice that you hear.
13:32 A lot of times you hear people say, hey, Python developers, stop using classes and stop using objects.
13:38 Just write modules and functions, right?
13:41 Yeah, sometimes.
13:42 Yeah, sometimes.
13:42 And that's totally reasonable.
13:43 A lot of times people come from C# or Java where it's everything is an object.
13:48 Everything has to be in a class.
13:49 And so they think, well, I have to do that in Python.
13:52 And if you've got a static variable in a class, that's, you know, just kind of like a module level variable in a function.
13:58 Like there's no real value to breaking that apart.
14:00 However, a lot of times there are.
14:03 So there's a cool article that walks you through in super in-depth focused on sort of data science side of this object, no object debate called algorithms as objects.
14:14 So it's usually we think of like algorithms as a single function with an input and an output.
14:18 And algorithm textbooks reinforce this notion, right?
14:21 Like everything fits nice onto a single page.
14:24 But in reality, what you end up with are these like giant monolithic functions that are like full of details with lots of cyclomatic complexity and passing lots of data around and all sorts of stuff.
14:35 And it's not nearly as nice.
14:36 You end up with these functions that like lack readability.
14:39 And because of that, they lack maintainability.
14:42 Nobody wants to touch it because it's probably important.
14:45 It's an algorithm, right?
14:47 And if it's wrong, it's probably hard to tell if it's wrong.
14:49 So you don't want to break it.
14:51 It's just kind of scary, right?
14:54 So they talk about taking these algorithms and turning them into functions.
14:59 And one of the ideas I really like that they're starting with is like, well, should I do this or not?
15:04 How do I know?
15:05 So they talk about this idea of code smells.
15:08 And the idea of code smells comes from Martin Fowler way back in the day, like 1999 or something like that when he wrote his refactoring book.
15:15 And these are aspects of code that are not necessarily broken, but they're just like a little bit off.
15:21 Have you heard of this idea, Brian?
15:22 Yeah, definitely.
15:23 It kind of makes you wrinkle up your nose.
15:25 You're like, ew, something's not good here.
15:27 But, you know, the code works, right?
15:29 Like it would pass a test.
15:29 So it's fine.
15:30 So the code smells, they say, that you should be on the lookout for here are, number one, the function, the algorithm, the one giant function.
15:39 It's too long or it's too deeply nested.
15:41 Like we spoke about guarding clauses last time.
15:44 Does it have banner comments?
15:45 Like a huge comment at the top that describes what it does, how it works, the special cases, right?
15:51 I often say that code comments are deodorant for bad code.
15:55 So you should just write good code and not do that.
15:57 So like that's an example.
15:58 Helper functions that are maybe nested closures inside there, some weird thing like that, or maybe actual helper functions, but they're only used within this larger function.
16:10 Passing a lot of states, all these things are sort of indicators that maybe an object would be much better for wrapping up your algorithm.
16:18 So it's really, I think, got a lot of concrete advice here.
16:22 This actually looks pretty interesting.
16:23 It's super interesting.
16:24 And it's full of examples.
16:26 Like it's a really long article with lots of concrete examples of here's an algorithm.
16:30 We did it this way.
16:31 We refactor that to an object and look how much more understandable it is and how much simpler it is.
16:36 So if this idea resonates with you, definitely check it out.
16:40 And the guy who wrote it said, hey, when I present this idea to my colleagues or other folks, at first they're like, no, we shouldn't be using classes.
16:49 Just functions will do.
16:50 This is, you know, he encounters some pushback, but rarely does he encounter like prolonged pushback after people see the results.
16:57 They're like, no, actually, this is pretty cool.
16:59 I'm just chuckling.
17:00 And one of the topics he has here is, I've got 99 problems.
17:04 Give me two more.
17:05 Yeah, it's a good article.
17:08 Definitely check it out.
17:09 If people are interested, it's very concrete and helpful.
17:11 So, Brian, I know you're into testing and I know you're a fan of pytest.
17:14 What are you into, like really small versions of pytest?
17:17 Or what is this?
17:18 I got into this because I've been using Python for testing purposes for since like a little out of like 2002 or something like that.
17:27 There were often custom made Python frameworks or testing frameworks within our company.
17:32 And then around 2010, I did the same thing and wrote my own.
17:37 But it took me a while to get it down.
17:39 I was arrogant and thought, oh, this would be trivial to because it's the basic algorithm isn't really doing much.
17:45 But Oliver Best Balter, there was a comment somewhere on Twitter that the core of pytest could be written in like a couple dozen lines of code.
17:55 And people were like, what, really?
17:57 And so, of course, he's a brilliant person.
18:00 He went out and just did it.
18:01 So, he released a thing called Picopytest.
18:04 It doesn't have a cert rewriting and it doesn't have like fixtures or any of the fun stuff.
18:09 But it's a generally usable test framework that you could run some tests with written in 25 lines of code.
18:16 Dang.
18:16 And, you know, like the first five are just import statements or space.
18:20 And one of them is a method.
18:21 So, I think you could probably get it down to 19 if you were willing to go a little crazy on it.
18:27 That's wild.
18:27 So, some of the things that it uses are like import lib.
18:31 Some of these things are clearly put in the language for tools like pytest and stuff like import libs, spec from file location, and module from spec.
18:41 I don't know what those things do.
18:43 But it looks like it's a way to sort of gradually load a module and then run parts of it because that's what this code does.
18:50 One of the things I like about this and one of the reasons why I'm highlighting it is a lot of people think of test frameworks as this thing.
18:57 They don't really know.
18:58 It's a black box that does stuff.
19:00 And I think this is a good way to highlight.
19:02 It's not that this Python is very flexible and the heart of a test framework isn't that complicated.
19:09 It's going out and finding files that match like a certain pattern, test underscore, and finding some functions inside those to call.
19:17 And then just catching exceptions and logging failures.
19:20 It's not that complicated.
19:21 So, it's pretty cool.
19:22 That's super cool.
19:23 And I think anybody who cares about testing or maybe is being introduced to testing should read those 25 lines.
19:30 Not necessarily for understanding, but just to get the sense of like, this is what happens when you run tests against your code.
19:36 It finds your model.
19:37 It loads up the functions.
19:38 It calls it.
19:39 It does this basic thing.
19:40 And that's it.
19:41 It's really nice.
19:42 Yeah.
19:42 Very, very cool.
19:43 That is definitely...
19:44 I don't know what the atomic unit of a test framework is, but that's nearly it.
19:48 He popped this out in like two days.
19:49 And it took me like two months to write my first version of my test framework.
19:54 So, awesome.
19:55 Yeah, super cool.
19:56 Super cool.
19:56 All right.
19:57 Last one I want to cover has to do with Cython.
19:59 Not CPython, but Cython.
20:01 It's an article called An Introduction to Cython, the Secret Python Extension with Superpowers.
20:07 And who wouldn't want an extension with superpowers?
20:09 Yeah, exactly.
20:10 They make the statement that they think Cython is one of the best kept secrets of Python.
20:14 And I agree.
20:15 Like, Cython will take almost arbitrary Python code and turn it into C.
20:22 That right there is pretty impressive.
20:24 If you have a, like, you've got some program and you find out like, oh, this part of, I
20:29 don't know, some inner loop within an inner loop, you know, within another nested loop or
20:33 something like that's a little bit too slow.
20:35 You could probably write like a function in Cython that does that inner loop and make it
20:41 way, way faster.
20:43 Super cool.
20:44 That's what we hear a lot about Python is you can take some slow parts in and then rewrite
20:49 it and see if you need to.
20:51 But you don't have to with Cython, right?
20:53 Exactly.
20:54 You don't have, that's the thing.
20:55 You don't have to rewrite.
20:56 You could rewrite it in C or in Rust or whatever, or you could just call Cython against it and
21:02 make it, you know, it basically transpiles the Python into C and then compiles the C over
21:08 to machine instructions.
21:09 Now, depending on how you write your code, it may still interact with the Python interpreter
21:14 and the Python gil or it might not.
21:17 And that could actually significantly determine the performance benefits you get, right?
21:21 So you can, it'll work with like an untyped item, but then it does it as a, I think, as a
21:25 py object pointer.
21:26 Whereas if you tell it this is an actual integer, it'll work with it as like a cint type of thing
21:32 or something to that effect, right?
21:34 So you get all sorts of benefits that'll, or, you know, ways to overcome shortcomings of
21:39 Python.
21:39 Say, for example, we talked about execution speed, but there's also a keyword in Cython that says,
21:46 that's called no gil.
21:47 So you can just create a context block in Python effectively say with no gil colon.
21:52 And then that stuff works without the gil in threads.
21:56 And that's it.
21:57 You're just guaranteeing that that stuff isn't going outside of it or anything.
22:02 What the requirement for using that keyword is, and if it doesn't match these requirements,
22:08 it's like a compiler error for Cython, the Cython compiler, is that you don't interact with
22:14 any Python objects.
22:15 Okay.
22:15 So you basically got to cast them into Cython native objects that can be represented in C.
22:21 And then there's no reason for the gil because the gil's point, the purpose of the gil is
22:25 to interact with the reference counting to make sure that that works in Python's object
22:30 garbage collector.
22:30 But if you're not working with Python objects, you don't need the gil.
22:33 So it's a really great way to free up speed and whatnot.
22:37 They talk about some of the projects written in Cython.
22:41 So spaCy, the natural language processing, UV loop, which is a really fast asyncio event loop,
22:47 significant parts of scikit-learn, numpy, pandas, all that kind of stuff.
22:51 So I think the big value, like you said, is like you could go rewrite it in C, or you
22:56 could just use Cython and make your Python run somewhat like C. Pretty cool.
23:00 I actually want to play with this a little bit because I'm glad you found this article.
23:04 Yeah, the article is super interesting.
23:06 One thing that I've noticed, I mean, I didn't read it.
23:08 I didn't like super inspect every code example, but I didn't see them using Python's type
23:13 annotations.
23:14 Right.
23:14 So they're using like the C def to define types and like special Cython ways to define
23:20 types.
23:20 But the more modern versions of Cython, you can just say like value colon int equals something,
23:27 you know, like the standard Python way of saying what a type is for type checking.
23:31 And that'll actually also be understood and used by Cython for like native types.
23:36 Okay.
23:36 That's the question I had was, can you use native Python types?
23:40 The answer used to be no, but now the answer is yes.
23:43 Right.
23:44 So, yeah.
23:45 So it's super cool.
23:46 All right.
23:46 Well, if you think you need your Python code to go a little faster, check out this article,
23:50 check out Cython.
23:51 And it's pretty awesome.
23:52 Just a good reminder, I guess.
23:53 We both have a few extras.
23:55 How about you kick off that section?
23:56 Sure.
23:57 I didn't really want to highlight this for too long, but he, Nick, wrote an article called
24:01 The Price of the Hallway Track.
24:02 It's just a reminder to everybody.
24:04 I mean, we do hear about using, going to things like PyCon and other conferences and not actually
24:10 going to the talks, but doing hallway stuff.
24:13 He's pointing out that that's kind of lame for all the speakers that work really hard
24:17 to do that.
24:17 It's also, even if you intend to watch it later, it's disheartening for people to speak to an
24:24 empty room or even a mostly empty room.
24:26 And he's just asking, you know, don't fill up your day with talks, but pick some, especially
24:32 ones that from people that are lesser known people and that sound interesting to you and
24:37 at least go to a few talks.
24:38 And I think that's a good advice.
24:39 I'm going to try to do that next year.
24:40 Yeah, cool.
24:41 And what else?
24:41 The second one is, who put Python in my Windows 10, May 19 update by Steve Dower.
24:47 We did talk about this in the previous episode, but it is officially out and people are noticing
24:55 it.
24:55 Yeah.
24:55 And Steve gave us a shout out to the Python Bytes episode we did together right there in
24:59 the first paragraph.
25:00 So thanks for that, Steve.
25:01 This is massive.
25:02 This is Windows 10 is shipping with Python 3 and that version of Python 3 is auto updating.
25:08 Like, how cool is that?
25:09 Okay.
25:10 Within a major version.
25:11 Yeah, but it ships within a little stub.
25:13 So you don't get Python right away.
25:15 You get a little thing that pops open.
25:16 If you type Python, it pops open on the app store to download it.
25:20 It doesn't ship with it because it doesn't need to.
25:22 And still a lot of people, like, you know, a lot of people don't need Python, but that makes
25:27 it easier.
25:27 I guess when I say ships with, I mean from a user's perspective.
25:30 Like, if you tell a user to go through a tutorial and you tell them to type Python 3 and they
25:35 sit down and they type it, rather than getting error, it says, oh, you have to click this button
25:39 for this line to work.
25:40 They click the button and then it works.
25:42 Like that.
25:42 Yeah, exactly.
25:43 I wouldn't ask for more, right?
25:44 That's really cool.
25:45 Yeah.
25:45 How about you?
25:46 Got any extras?
25:47 Yeah.
25:47 I got also something super small, a Pico thing.
25:50 So Matt Trentini sent over a cool project called the Tiny Pico, which is an ESP32-based board.
26:02 So a tiny little board that has first-class support for MicroPython.
26:07 So Brian, if you click on that link, if you check this thing out, it's pretty wild.
26:12 It's a project you can order.
26:14 It's pretty cheap, like $26.
26:16 It's so small.
26:18 It's incredible.
26:19 It's like two-thirds the size.
26:21 So 60% of a AA battery.
26:24 I mean, like maybe, you know, like the middle part of your pinky or something.
26:30 I mean, it's a really small board, like both the width and the height.
26:34 That is crazy.
26:35 But listen to its specs.
26:37 32-bit dual-core processor.
26:39 Full-on Wi-Fi, 8211BGNN, Bluetooth.
26:46 All sorts of stuff.
26:47 Like for $26 at that size.
26:49 It's so cool.
26:50 So I want to give a shout out.
26:52 MicroPython's pre-installed.
26:54 That's cool.
26:55 Isn't that super?
26:56 So if people are looking at embedded stuff and little devices, things, this is really, really cool.
27:01 Yeah.
27:01 Good for your next spy cam project.
27:03 Exactly.
27:04 I got another one from Automation Panda, who we met at PyCon.
27:08 And this is Andy.
27:10 And he wrote a cool PyCon 2019 reflections, which I thought if you haven't been to PyCon, check out this article.
27:17 It's like kind of his diary of like what he did and his experiences.
27:21 It's like his second PyCon he ever went to.
27:23 So it was kind of a fresh take on PyCon, which is great.
27:26 That's cool.
27:27 Yeah.
27:27 Yeah.
27:27 It was fun to meet him there.
27:28 I just want to give a quick shout out to our Patreon page, which we don't do that enough.
27:31 So if people want to support the show, obviously visiting the sponsors helps a lot.
27:35 But you can help support with editing fees and other stuff by doing small contributions.
27:40 So there's a link at the bottom of this episode to say here's the Patreon page.
27:44 So people can check that out.
27:45 And Brian, thanks to you for putting that together.
27:48 And one of the things people get is the show notes emailed directly to their inbox if they do that.
27:53 That is awesome.
27:54 And then I just wanted to let people know I'm doing a free one hour webcast in a couple of weeks.
27:59 And the title of the webcast probably more or less sums it up.
28:03 But it's 10 tools and techniques Python web developers should explore.
28:07 That looks interesting.
28:08 Yeah.
28:08 So it's all sorts of fun stuff.
28:10 Like Docker is one of them.
28:11 Vue.js is another.
28:12 You know, Vue models and other sort of design patterns as well.
28:16 A lot of fun things that people haven't maybe seen there.
28:19 Yeah.
28:19 Let's let you kick it off with our joke section.
28:21 What do you got for us?
28:22 Oh, you're going to give it to me.
28:24 I'll steal one of your jokes.
28:26 Yeah, steal it.
28:26 Okay.
28:27 Okay.
28:27 What do you call eight hobbits?
28:29 A hobbite.
28:31 Oh, that's terrible.
28:33 It's so bad.
28:34 It's so bad.
28:35 It wrapped around to good.
28:36 It's like badness overflowed into the good level.
28:38 What do you call eight hobbits?
28:40 All right.
28:41 So I got another one for you.
28:43 This one may also be bad.
28:44 This is a little more on the science-y, math-y side.
28:46 Not quite programming, but it definitely has a computational bit to it.
28:50 So you know Mandelbrot, Benoit B. Mandelbrot is his full name.
28:54 The guy who came up with the Mandelbrot set and fractals and all that kind of stuff, right?
28:58 Yeah.
28:58 And one of the core principles of fractals is no matter how much you zoom into them, there's
29:03 like always more details and often times there's like super weird reasons that it like repeats.
29:09 Like you zoom way into the little branch of the Mandelbrot set, there's like a baby Mandelbrot set.
29:13 Yeah.
29:13 Okay?
29:14 Yeah.
29:15 So the question is for Benoit B. Mandelbrot, what is his middle name?
29:21 What does the B stand for?
29:22 Well, it stands for Benoit B. Mandelbrot.
29:25 Of course it does.
29:26 Yes.
29:29 Oh, I love it.
29:30 All right.
29:30 Well, I guess we're going to leave it.
29:32 We got to do the other one.
29:33 It's so great.
29:33 All right.
29:34 Go for it.
29:34 Okay.
29:34 So two bites meet.
29:36 The first bite asks, are you ill?
29:38 And the second bite replies, no, just feeling a bit off.
29:42 Totally left shift on that one.
29:46 Yeah, absolutely.
29:47 Beautiful.
29:49 All right.
29:49 Well, thanks as always for being here, Brian.
29:52 It's a lot of fun to talk about these and share them with everyone.
29:54 Yep.
29:54 Bye.
29:54 Yep.
29:55 Bye.
29:55 Thank you for listening to Python Bytes.
29:57 Follow the show on Twitter via at Python Bytes.
29:59 That's Python Bytes as in B-Y-T-E-S.
30:02 And get the full show notes at pythonbytes.fm.
30:05 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.
30:10 We're always on the lookout for sharing something cool.
30:12 On behalf of myself and Brian Okken, this is Michael Kennedy.
30:15 Thank you for listening and sharing this podcast with your friends and colleagues.