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


Transcript #132: Algorithms as objects

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

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

00:05 This is episode 132, recorded May 22, 2019.

00:10 I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And this episode is brought to you by DigitalOcean.

00:14 Check them out at pythonbytes.fm/digitalocean.

00:16 More about that later.

00:17 Brian, how you been?

00:19 I'm good, but I'm giggling right now because I've been looking up jokes, but we'll get to those later.

00:22 Yeah, I always look forward to the jokes, and I think a lot of people out there seem to appreciate them.

00:26 So yeah, we won't disappoint this time.

00:28 We got more lined up as always.

00:30 Yeah, okay.

00:31 I mean, like in the past, you maybe used to have to come up with these, but we have the internet.

00:35 Yeah, I know.

00:36 It's beautiful.

00:37 It's easy to be a dad now.

00:39 That's right.

00:39 All right, you want to kick us off with a little embedded Python?

00:42 Yeah, I was really excited to watch this.

00:44 So I did meet, so this is the first one I've got up is the history of CircuitPython.

00:49 And this was actually on the PSF blog.

00:52 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, which I met Scott at PyCon and I knew he was involved with CircuitPython, but I guess I didn't realize he was, he's the CircuitPython guy.

01:11 So what happened was, and I always kind of wondered 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?

01:24 Are they frenemies?

01:25 are that one is a specialization of the other, what are they?

01:27 So what happened was Adafruit thought MicroPython was a pretty cool thing and hired Scott to port it to their, I guess their SAMD21 chip that's used on many of the boards.

01:39 So he did it, 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. There's a lot of differences. But Scott said it's a friendly fork. So they he works closely with the MicroPython people too and they share code back and forth.

01:57 So there's no no hard feelings there but it's focused on the Adafruit boards.

02:02 But it's also MicroPython is also focused really just on embedded stuff whereas CircuitPython is focused on beginners and one of Scott's quotes is "our goal is to focus on the first five minutes someone has ever coded." That's a strong lofty goal.

02:20 But watching some of their demos with the CircuitPython, it isn't surprising to me.

02:25 They just hook it up and a few minutes later, they've got stuff running.

02:29 It's kind of incredible.

02:30 Yeah, that's really awesome.

02:31 And that is a very impressive goal to say we're focused on the first five to ten minutes of somebody programming because, yeah, that's an early point in the life cycle.

02:41 But I guess you got to start somewhere.

02:44 I do think these embedded devices really do bring some realism to programming for people who may be programming just in the more theoretical way.

02:53 It didn't necessarily connect, so it's great.

02:56 One of the things I didn't know about was with--

02:58 one of the things that CircuitPython does is it outputs--

03:02 all the print statements go automatically to the serial output.

03:05 So if you hook up your serial output to a connected display, you don't even have to have any other device.

03:11 you can just see your prints and stuff.

03:13 So that's kind of neat.

03:14 That's awesome.

03:15 And Nina Zakarenko actually showed how to use this.

03:18 And like, I think it was Visual Studio Code, she had that serial output connected.

03:24 So just within Visual Studio Code, like the devices output would just like stream at the bottom.

03:29 That's so cool.

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

03:39 So there's some breaking, a couple of breaking things, but it looks kind of neat.

03:43 Yeah, that's super.

03:43 And apparently they're not on the zero for philosophy.

03:47 Yeah, no, that's good.

03:49 Maybe you read it reverse for zero for like zero, zero four.

03:53 I don't know.

03:53 Anyway, if you must, but no, that's cool.

03:57 It's, it's great that there's new version of that out at it.

03:59 I really think they're doing a lot of cool stuff.

04:01 The Adafruit folks are doing a lot of cool things.

04:04 And some of those devices I think were given out at PyCon this year as well, which is pretty neat.

04:08 Yeah.

04:09 So we've talked about Python being popular, right?

04:12 Yes.

04:13 Yeah, absolutely.

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

04:23 This is a programming index.

04:25 Talks about how popular languages are.

04:28 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 swallowing it whole" according to DOB.

04:46 So that's pretty interesting.

04:48 There used to be like kind of a debate, do I use R, do I use Python?

04:51 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:59 So it might be interesting to check out if you're thinking, should I learn R, should I learn Python?

05:04 R has a lot of interesting advantages over Python, but it seems like Python is 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 very popular with a lot of people, but I didn't even hear about it until maybe a year ago.

05:20 - For sure.

05:21 Yeah, it's definitely focused on a more of a niche space.

05:24 So the article speculates, sort of not super effectively, why they think that is.

05:30 Like, they ask the 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:40 And there's this idea I really like to talk about with Python being a full spectrum programming language.

05:48 And what I mean by that is 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:57 There's a single file, and you can say print parentheses quote, Hello World, right, and that's it.

06:03 You don't need to think about generators or all the other stuff that rich programming languages have.

06:10 Think C#, Java, C++, right?

06:12 You've gotta do all this ceremony to get going.

06:16 But the value of those other languages is you can go build video games or operating systems or whatever, right?

06:25 And you can do much of that kind of stuff, not operating systems necessarily, But like you can build real apps, professional apps in Python, 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:44 And I think that that's actually why Python is winning in this 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:55 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:17 Whereas R has very focused, 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've 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." 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:55 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, Chroot, C-H-R-O-O-T.

08:03 Chroot.

08:04 Chroot, yeah.

08:05 Chroot.

08:06 Anyway, Chroot Jail, which was a way to isolate a root process and its children from the rest of the OS.

08:15 But there was a bunch of problems with, there wasn't really meant for security.

08:19 I'm not going to read the whole thing, but it builds up because of this is open source, FreeBSD improved on it, then Linux vServer, and then Oracle Solaris had some stuff, OpenVZ, and then Google chimed in with something called cgroups, and then a group called Linux containers did LXC, and then it kind of built up, Cloud Foundry got involved, and then in 2013, Docker, and then Google's still doing more stuff with making things easier.

08:49 all this stuff builds up on itself.

08:51 I really like that bit of a history lesson of how things built on itself.

08:55 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, and what all those things mean.

09:06 Also the difference between an operating system container system and an app container.

09:12 Docker is a little bit of a mix of both.

09:16 Also, it's kind of containers and platforms.

09:20 Just why there's so many things around is kind of described in this.

09:24 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:39 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," right?

09:48 But absolutely not, all right?

09:49 They were building on LXC and all these other things, and eventually they sort of moved off that.

09:55 But yeah, they were just making containers more accessible and easier for folks and popularizing it.

10:02 I think these containers are super powerful and super interesting.

10:05 To me, I don't know, 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:26 And I've thought about how using containers might make sense, but at the same time, you have like lightweight VMs.

10:32 I just fire up and like, they're dedicated to a single purpose.

10:35 So I don't know.

10:37 It's, it's always a bit of a trade-off of like adding more complexity.

10:40 In one place.

10:42 I feel like it's a little bit of a whack-a-mole problem.

10:45 I can have more simplicity in some places, but I've pushed it to another.

10:49 So for example, people talk about containers often being a great way to simplify development environments for junior developers.

10:58 Okay? - Yeah.

10:59 - So I'm gonna work at a new company, our app infrastructure is super complicated, so what they do is they say, well, here's three containers, one runs a database, one runs the web front end, one runs the caching tier, whatever the heck it is.

11:12 And I'm just run those and I'll just develop in that regardless of what my machine setup like.

11:17 Well, that's on one hand like simpler, 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, it's super interesting.

11:43 I'd certainly see them being really valuable for like zero downtime deployments and other kinds of stuff, 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 wanna spin up a new build server or something like that.

11:57 And we have it written down of how to build a build server.

12:01 Even though it's on a virtual machine, we gotta install a bunch of stuff and it's a half a day to get it up and running.

12:08 And having that just saved off.

12:10 - Yeah, that's a perfect example of Docker, right?

12:12 'Cause you can build the container images to just do that setup and you just say, you know, Docker build and boom, you're ready.

12:18 - Yeah. - 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:26 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 got to run it somewhere and usually just running it directly is not what you want.

12:39 You want to run it somewhere with like, 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:50 Just visit pythonbyte.fm/digitalocean and get $50 credit for new users.

12:56 Yeah, so all sorts of cool stuff over there.

12:58 You can provision your servers and optimize it and get it going, 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/digitalocean.

13:13 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, and that's design patterns.

13:19 Okay.

13:20 So design patterns.

13:21 We talked a little bit about that previously, one of the shows just recently, but this time I want to focus on maybe a topic that is reversed from a lot of the advice that you hear a lot of times you hear people say, hey, Python developers, stop using classes and stop using objects.

13:39 Just write modules and functions, right?

13:41 - Yeah, sometimes.

13:42 - Yeah, sometimes, and that's totally reasonable.

13:44 A lot of times people come from C# or Java where everything is an object, everything has to be in a class, and so they think, well, I have to do that in Python, and if you've got a static variable in a class, that's just kind of like a module level variable in a function, like there's no real value to breaking that apart.

14:01 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 usually we think of algorithms as a single function with an input and 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 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:37 You end up with these functions that like lack readability and because of that, they lack maintainability.

14:42 Nobody wants to touch it because it's probably important.

14:46 It's an algorithm, right?

14:47 And if it's wrong, it's probably hard to tell if it's wrong.

14:50 So you don't wanna break it.

14:52 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:06 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:22 Have you heard of this idea, Brian?

15:23 - 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 the code works, right?

15:29 Like it would pass the test, so it's fine.

15:31 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, it's too long or it's too deeply nested.

15:41 Like we just 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, so you should just write good code and not do that.

15:57 So that's an example.

15:59 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, passing a lot of states.

16:12 All these things are indicators that maybe an object would be much better for wrapping up your algorithm.

16:19 So it's really, I think, got a lot of concrete advice here.

16:22 This actually looks pretty interesting.

16:24 It's super interesting.

16:25 And it's full of examples.

16:27 It's a really long article with lots of concrete examples of here's an algorithm, 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, just functions will do.

16:50 He encountered some pushback, but rarely does he encounter like prolonged pushback after people see the results, they're like, no, actually, this is pretty cool.

16:59 - I'm just chuckling, and one of the topics he has here is, I've got 99 problems, give me two more.

17:05 (laughing)

17:07 - Yeah, it's a good article.

17:08 Definitely check it out if people are interested.

17:10 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:15 What are you into, like, really small versions of pytest, or what is this?

17:18 - I got into this because I've been using Python for testing purposes for since like 2002 or something like that.

17:27 They 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. I was arrogant and thought, "Oh, this would be trivial." Because the basic algorithm isn't really doing much. But Oliver Bestwalter, 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?" And so he, of course, he's a brilliant person. He went out and just did it.

18:01 So he released a thing called Picopytest.

18:04 It doesn't have a certain rewriting and it doesn't have like fixtures or any of the fun stuff, but it's a generally usable test framework that you could run some tests with, written in 25 lines of code.

18:16 And you know, like the first five are just import statements or space, and one of them is a method.

18:22 So I think you could probably get it down to 19 if you were willing to go a little crazy on it. That's wild.

18:28 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:42 I don't know what those things do, 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:51 One of the things I like about this, one of the reasons why I'm highlighting it is a lot of people think of test frameworks as this thing, they don't really know, it's a black box that does stuff.

19:00 And I think this is a good way to highlight, it's not, 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_, and finding some functions inside those to call, and then just catching exceptions and logging failures.

19:20 It's not that complicated, so it's pretty cool.

19:23 - That's super cool, 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, it loads up the functions, it calls it, it does this basic thing and that's it.

19:41 It's really nice.

19:42 - Yeah.

19:43 - Very, very cool.

19:44 That is definitely, 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 and it took me like two months to write my first version of my test framework, so awesome.

19:55 - Yeah, super cool, super cool.

19:56 All right, last one I wanna 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." 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:15 And I agree, 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 don't know, some inner loop within an inner loop, you know, within another nested loop or something like, that's a little bit too slow.

20:36 you could probably write like a function in Cython that does that inner loop and make it way, way faster.

20:44 Super cool.

20:45 - That's what we hear a lot about Python is you can take some slow parts in and then rewrite it in C if you need to.

20:52 But you don't have to with Cython, right?

20:53 - Exactly, you don't have, that's the thing.

20:55 You don't have to rewrite, you could rewrite it in C or in Rust or whatever, or you could just call Cython against it and make it, you know, it basically transpiles Python into C and then compiles the C over to machine instructions. Now depending on how you write your code it may still interact with the Python interpreter in the Python GIL or it might not and that could actually significantly determine the performance benefits you get right so you can it'll work with like an untyped item but then it does it as a I think is a pie object pointer whereas if you tell it this is an actual integer it'll work with it as like a C int type of thing or something to that effect, right?

21:34 So you get all sorts of benefits that are ways to overcome shortcomings of Python.

21:39 Say for example, we talked about execution speed, but there's also a keyword in Cython that says, that's called no-gil.

21:47 So you can just create a context block in Python effectively, say with no-gil colon, 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, it's like a compiler error for the Cython compiler, is that you don't interact with any Python objects.

22:15 So you basically got to cast them into Cython native objects that can be represented in C, and then there's no reason for the gil because the purpose of the gil is to interact with reference counting reference counting to make sure that that works in Python's object garbage collector.

22:31 But if you're not working with Python objects, you don't need the gill.

22:34 So it's a really great way to free up speed and whatnot.

22:38 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, 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 could just use Cython and make your Python run somewhat like C.

23:00 Pretty cool.

23:01 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, I didn't like super inspect every code example, but I didn't see them using Python's type annotations.

23:14 Right.

23:15 So they're using like the C def to define types and like special Cython ways to define types.

23:21 But the more modern versions of Cython, you can just say, like, value colon int equals something like the standard Python way of saying what a type is for type checking.

23:32 And that'll actually also be understood and used by Cython for native types.

23:36 Okay, that's a question I had was, can you use native Python types?

23:41 The answer used to be no, but now the answer is yes.

23:43 Right.

23:44 So, yeah, so it's super cool.

23:46 All right, well, if you think you need your Python code to go a little faster, check out this article, check out Cython and it's pretty awesome.

23:52 Just a good reminder, I guess.

23:54 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 Henik wrote an article called "The Price of the Hallway Track." It's just a reminder to everybody.

24:04 We do hear about using, going to things like PyCon and other conferences and not actually 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 to do that.

24:18 It's also, even if you intend to watch it later, it's disheartening for people to speak to an 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 ones that from people that are lesser known people, and that sound interesting to you, and at least go to a few talks.

24:38 And I think that's a good advice.

24:39 I'm gonna try to do that next year.

24:41 - Yeah, cool.

24:41 And what else?

24:42 - The second one is, who put Python in my Windows 10 May 19 update?

24:47 by Steve Dower. We did talk about this in the previous episode, but it is officially out and people are noticing it.

24:55 Yeah, and Steve gave us a shout out to the Python Bytes episode we did together right there in the first paragraph. So thanks for that, Steve. This is massive. This is Windows 10 is shipping with Python 3 and that version of Python 3 is auto updating. Like how cool is that?

25:10 Okay.

25:11 Within a major version.

25:12 Yeah, but it ships within a little stub. So you don't get Python right away. You get a a little thing that pops open.

25:16 If you type Python, it pops open in the app store to download it.

25:20 It doesn't ship with it 'cause it doesn't need to.

25:22 And still a lot of people, like a lot of people don't need Python, but that makes 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 sit down and they type it, rather than getting error, it says, oh, you have to click this button for this line to work, and they click the button and then it works.

25:42 Like that-- - Yeah, exactly.

25:43 - I wouldn't ask for more, right?

25:45 That's really cool.

25:45 - Yeah, how about you?

25:46 Got any extras?

25:47 - Yeah, I got also something super small, a Pico thing.

25:51 So Matt Trentini sent over a cool project called the Tiny Pico, which is an ESP32 based board.

26:01 So a tiny little board that has first class support for MicroPython.

26:08 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:17 - It's so small.

26:18 - It's incredible.

26:19 It's like two thirds the size, so 60% of a AA battery.

26:25 I mean, maybe 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 of that is crazy.

26:36 But listen to its specs.

26:37 32-bit dual-core processor.

26:41 full on Wi-Fi, 8211 BGNN, Bluetooth, all sorts of stuff, like for 26 bucks at that size.

26:49 It's so cool.

26:51 So, I wanted to give a shout out.

26:53 - 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, good for your next spy cam project.

27:03 - Exactly.

27:05 I got another one from Automation Panda, who we met at PyCon, and this is Andy, 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, it was fun to meet him there.

27:28 I just wanna give a quick shout out to our Patreon page, which we don't do that enough.

27:31 So if people wanna support the show, obviously visiting the sponsors helps a lot, 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, 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.

28:00 And the title of the webcast probably more or less sums it up, but it's 10 Tools and Techniques Python Web Developers Should Explore.

28:07 - That looks interesting.

28:08 - Yeah, so it's all sorts of fun stuff.

28:10 Like Docker is one of them, Vue.js is another.

28:13 You know, Vue models and other sort of design patterns as well, like a lot of fun things that people haven't maybe seen there.

28:19 - Yeah.

28:20 - Let's let you kick it off with our joke section.

28:21 What do you got for us?

28:22 - Oh, you're gonna give it to me?

28:25 I'll steal one of your jokes.

28:26 - Yeah, steal it.

28:27 - Okay, what do you call eight hobbits?

28:29 A hobbite, oh, that's terrible.

28:33 - It's so bad, it's so bad, it wrapped around to good.

28:36 It's like badness overflowed into the good level.

28:39 What do you call it?

28:40 - Okay. - 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, 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, the guy who came up with the Mandelbrot set and fractals and all that kind of stuff, right?

28:58 - Yeah. - And one of the core principles of fractals is no matter how much you zoom into them, there's 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. - Okay.

29:15 So the question is for Benoit B. Mandelbrot, what is his middle name?

29:21 What does the B stand for?

29:23 - Well it stands for Benoit B. Mandelbrot.

29:25 - Of course it does.

29:26 (laughing)

29:29 - Yes. - Oh I love it.

29:30 All right, well, I guess we're gonna leave.

29:32 - We gotta do the other one, it's so great.

29:34 - All right, go for it.

29:35 - Okay, so two bytes meet.

29:36 The first byte asks, "Are you ill?" And the second byte replies, "No, just feeling a bit off." (laughing)

29:44 Ah, totally left shift on that one.

29:47 - Yeah, absolutely.

29:48 Beautiful, all right, well, thanks as always for being here, Brian. - Thank you.

29:52 - It's a lot of fun to talk about these and share them with everyone.

29:54 - Yep, bye. - Yep, bye.

29:55 Thank you for listening to Python Bytes.

29:57 Follow the show on Twitter via @PythonBytes.

29:59 That's Python Bytes as in B-Y-T-E-S.

30:02 get the full show notes at pythonbytes.fm. If you have a news item you want featured, just visit pythonbytes.fm and send it our way. We're always on the lookout for sharing something cool. On behalf of myself and Brian Okken, this is Michael Kennedy. Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page