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


Transcript #161: Sloppy Python can mean fast answers!

Return to episode page view on github
Recorded on Friday, Dec 13, 2019.

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

00:04 your earbuds. This is episode 161, recorded December 12th, 2019. I'm Michael Kennedy,

00:10 and Brian Okken is not here today. Instead, we have a very special guest, Anthony Herbert.

00:15 Welcome, Anthony.

00:15 It's nice to be here. Thanks for having me.

00:17 Yeah, it's great to have you here. You're doing all sorts of cool stuff in the Python space,

00:20 and I'm looking forward to sharing some of the week's news with you.

00:23 Also want to say thank you to DigitalOcean. They're sponsored this episode, as they have

00:27 many, many of them. So check them out at pythonbytes.fm/digitalocean and get a $50

00:32 credit for new users. Anthony, people might know you from your website Pretty Printed. You do a lot

00:38 of stuff with Flask and things like that, right?

00:40 Yeah.

00:41 Yeah, cool. So people have checked that out. That's the same Anthony. And you're here with a bit of a

00:47 contrarian story on getting stuff solved, right? And I actually really subscribe to this idea as well

00:54 about using crappy code when it makes sense. Tell us about it.

00:56 This is from a talk by Larry Hastings. It's called Solve Your Problem with Sloppy Python.

01:01 And in this talk, he basically advocates solving personal problems with sloppy Python, not problems

01:07 that you would have at work, because that would be a huge issue. So in the talk, he gives three or

01:12 four examples of how he solves problems that he has encountered in his everyday life. And three of the

01:19 four have to do with string manipulation. So renaming files. And I think that's something that

01:24 everyone has had to deal with at some point. I know I have to deal with it all the time.

01:29 And another example is a script that he uses to install all the packages after reinstalling an

01:35 operating system. So instead of going through and trying to install each package individually,

01:39 what he does is he just writes a script and it installs everything that he uses. So Sublime,

01:44 Chrome, and even the latest versions of Python.

01:48 And as an example of some of the sloppy code that he has, when he goes to install the latest versions

01:52 of Python, all he does is he goes to python.org and he scrapes the latest version of Python there.

01:58 So he gets the version number, then he can go and download the source for that, build the source.

02:03 And then he has the latest version of Python installed without him having to actually do anything.

02:08 Yeah, I didn't catch that he actually was using that to build from source. That's pretty funny. Yeah,

02:13 but he's doing a lot of cool stuff. And I like this message. Like I said, I kind of subscribe to it.

02:17 It's there are times that you should put tons of energy into structuring beautiful code that's very

02:22 maintainable and very abstracted. And like you mentioned, Anthony, when you were doing this

02:27 on a team, if you create crappy code, your team members are not going to like you. They're like,

02:32 oh man, I don't want to go work on that part of the code. Because, you know,

02:35 it's always like there's like two features and three bugs. It seems to be the ratio or something

02:40 like that. Right. But there's all these little things that, you know, like you don't need to do

02:44 a lot of error handling. You're just going to run it. And it's just, it just needs to do this thing.

02:48 And you're the one person looking at it. And if it doesn't work, it's going to be obvious. You'll

02:52 get a big stack trace or trace back, something like that. Right. What the reason I like it is it allows

02:58 people to say, instead of spending a lot of work on building something fancy to solve my problem,

03:02 I can spend 10 minutes and solve it for the rest of my life. Right? Right.

03:06 Do you have situations in your world where you do that?

03:08 I have to move files around all the time. And what tends to happen is like I start to do it and

03:14 I feel a bit stubborn at times. So I just continue doing it manually. And then when I'm done,

03:19 I realize, you know, oh, I could have written a script for that. So what this talk basically

03:23 reminds me to do is think about automating at first and do as much as I can in code and then

03:28 minimize the manual parts. Like there was something I did recently where I had to cut

03:33 out pieces of audio files, like starting at a certain time step and ending at a time stamp.

03:37 And I had to do that for about 30 files. And it took me a couple of hours to do this. And

03:42 Audacity has the ability to be controlled by a Python script. So perhaps I could have written

03:46 a script to do that for me automatically instead of sitting in my computer and messing with audio

03:50 files for a couple of hours.

03:51 Yeah. And you know, you can do that for a few hours, but eventually at some point you're like,

03:55 this is really hard. And in my own world, I've had a lot of these experiences where I'm to the point

04:01 where I'm like, maybe I should hire someone to do this. And then like, wait, wait, wait, I bet I could

04:05 do this in Python, you know, and then two hours later it's automated. I'm like, why was I ever thinking

04:09 that? What a fool. So I threw out some examples onto the show notes of stuff that I was doing as well.

04:14 So there's a bunch of little things that just make my life so much easier. If I export

04:19 course sale data, I use Stripe, I got to get it out of their format as an Excel

04:24 CSV. And then I got to convert it to something else that I process and filter and so on. And I was

04:29 doing that by hand for years. And I, why am I always going into the sheet, deleting these columns,

04:35 copying this stuff over there. And I just wrote a Python script. Now it's one line of command line

04:40 call, it runs a Python script, and it transforms my stuff into something I can just paste into

04:46 the right, you know, sheet, a Google sheet, sort of calculation place. Another one is like,

04:51 I always have like titles and stuff that I want to make into file names or folder names,

04:57 you know, think the title of this show or the name of a lecture, a video lecture in a course,

05:03 I want to take the title and make the file name that. So I wrote this thing called URLify. And it was

05:08 like 20 lines of code because I was sick of lowercase and putting dashes for spaces, taking away the dots,

05:13 you know, taking away the punctuation. And I put that in as a gist, people can have it, I do tons of reporting

05:17 this way, the deployment on my server, I turn that into the script that I can use with Python,

05:22 sort of does a bunch of stuff with actually AS, async and await in there, which is pretty cool.

05:28 Importing information from video files, because I don't want to go there and copy like, it's this long,

05:33 and its name is this. So now I can just point it at a directory and it'll just rip that out of there.

05:37 Same thing for like duration of audio files. There's all these cool little things that were

05:42 nagging me that I had to do all the time. And I'm just like, you know what, this is getting some Python

05:46 on it. Yeah, sounds good. Absolutely. So I mentioned async and await. And the place where async and await

05:52 seems to have the most power, right, is around, well, network stuff. So it's either on the server side,

05:59 where you have a framework, that is some kind of web server that can scale out better,

06:04 because the web methods are async and await, or a client, something like requests,

06:08 more like HTTPX or something like that, that supports an async way to talk to a bunch of different

06:13 services or websites. So the next thing I want to cover is this little write up by Florimund Manca.

06:20 And it's the introduction to ASGI, the emergence of async Python web frameworks. We've probably all heard

06:28 of WSGI or WSGI, right? That powers Flask, and powers things like Pyramid and Django and so on. That's the web

06:35 service gateway interface. And it's, you've got a request, give me the answer. And that just doesn't work when you

06:42 want to allow multiple requests all run at the same time, right? If I'm going to have a bunch of async stuff, I got to let

06:47 some pause and let some new ones come in and all that kind of stuff. So one of the areas where I think there's a ton of

06:54 growth, and I'd like to get your opinion on this, Anthony, is around these new Python web frameworks that used to seem

07:00 really clear. Like, yeah, there's Flask, Django, Pyramid, a few others. And now there's a new one every week. I don't

07:05 even know what to keep track of anymore. How do you feel?

07:07 Yeah, and I don't know what to keep track of either. Like, I don't even know where to start. So I haven't,

07:12 haven't really looked into any of them closely. Some people on my channel have been telling me to look into

07:17 Sanic.

07:18 Yeah, Sanic's got a lot of traction. Yeah.

07:20 That was the first one I heard about a couple of years ago.

07:22 And it's still going pretty strong.

07:23 I haven't looked into it yet. And it seems interesting. Like I've done a little bit of

07:27 Node stuff in the past. And I know this is bringing Node-like functionality to Python. So I want to look

07:32 into it, but I haven't looked into it deeply yet. And I noticed that Django, they just released 3.0,

07:39 and they have support for ASCI. I don't think it's completely functional yet, but the beginnings of

07:45 it are there. So I should definitely look into it more.

07:46 Yeah, for sure. The foundations are there. And if you're a Flask person like you are,

07:50 probably the best thing to actually start with might be Quart.

07:53 So I don't know if you've heard of Quart, but Quart is a 100% compatible, even with the extensions,

08:00 plugins and stuff for Flask API, but it also allows for async and await on the view methods.

08:07 So basically, the way you convert from Flask to Quart is you replace the word Flask with the word Quart.

08:11 If it's lowercase Flask, it's lowercase Quart. If it's uppercase Flask, it's uppercase Quart. And that's it. And then you have async methods. You do have to run it on something like UVicorn.

08:19 But yeah, that's probably the path of least resistance, but it also doesn't take advantage of necessarily the best new features, right?

08:26 That seems easy. I can try that.

08:27 Flask to Quart.

08:28 Yeah, you could definitely try that. The thing is, when I first did that, and I tested it out, I'm like, all right, let's see how much faster this is. And I made the mistake of just running it as it traditionally had been. And it was running on a WSGI server. So it couldn't do any of the async stuff. I'm like, it's just the same.

08:43 What a sham. This is not working at all. Like, oh, maybe I need a different server to enable this. Yes, that is what was missing. So yeah, it's pretty cool. And the thing is, the slower the external systems that you depend upon are, the better your performance is going to increase, right?

08:59 So if your database responds in 10 milliseconds, you can handle more requests if you switch it to async and await. But you're kind of doing more work in that 10 millisecond window.

09:08 But if you're talking to a database that takes two seconds, or web services that take two seconds, all of a sudden, you have a whole two seconds of what was blocked up web server to now go do kick off a whole bunch more waiting or something like that, right? So it's pretty cool.

09:21 I'll look into that more.

09:22 Yeah, nice. So they give a few reasons why you might care about this. So they say speed, obviously, they're doing some tests. And they say things like, well, they're getting 60 to 70,000 requests per second. Whereas like synchronous flask and Django do like 10 to 20,000.

09:37 Right? I mean, performance is always one of those things that's very hard to measure. And if you had a very slow flask gap, like I was describing, you would get a much bigger percentage boost and so on. So pretty cool.

09:50 Yeah, so they link to a couple of different tools you might use UVicorn, which is a like G unicorn, but based on UV loop, which is the C implementation of asyncio event loop.

10:03 And plugged into G unicorn, that's a good foundational production server. And then Starlette seems to be one of the best async frameworks, like you mentioned Sanic, and I talked about court. Starlette seems to be the foundation. It's like the foundation of FastAPI and some other ones. And it's its own framework. So it's pretty good.

10:21 There's a bunch of other things that are interesting, like HTTPX, as a replacement for requests, where you have async there, ORM, which is an asynchronous ORM, because if you don't have an async database call, then what are you waiting on usually?

10:34 So a bunch of cool little things to bring together. And if you're getting interested in this async and await plus web frameworks, check out this article here. It's pretty nice.

10:42 Speaking of nice, let me tell you all about Digilotion. They're making Kubernetes easier with their container registry and one click apps. So when you create a Docker image, Docker containers, you've got to have a Docker file that says, here's exactly how to construct my Docker container.

11:01 Maybe it has some files it copies in and all that kind of stuff. But you probably don't want to put that onto some public place like Docker Hub. You might, but you may well be really reticent to do that.

11:11 So Digilotion introduced a new managed service, the Digital Ocean Container Registry. And it's in early access now, but you can check it out. It's simple, private, secure and fast. And you don't have to put your Docker file definitions up there somewhere where you would rather not put them.

11:29 So check them out at python.bytes.fm slash digitalocean. You just get a $50 credit to get started. So what's this next one you got here, Anthony?

11:37 So this is a blog called Python Insights. And it's from someone named Tim Martin. And in this blog, he just talks about the internals of Python. So how Python works behind the scenes. Because oftentimes when we write Python, we don't really think about what's happening when it actually gets executed.

11:53 So on the first page, for example, he has posts like how context variables work, how the import statement works, and how even Python is converted to bytecode.

12:03 And one post that I saw that was pretty interesting was called dictionaries preserve order. So when I first learned Python, some years ago, one of the things that I learned about dictionaries is there's no ordering to them.

12:15 Because, you know, they're just hash tables, you put things in, and there's no guarantee on what order they'll come back when you go to look at the entire dictionary.

12:22 Well, apparently, since Python 3.6 or 3.7, there is ordering now. So the order in which you insert things into the dictionary is the order that is always going to be there.

12:32 So every time you look at the dictionary, you're going to see the things in the order that you inserted them. And this is something that I would never have suspected.

12:39 But they changed the implementation of how the memory of dictionaries work in Python. And this is something that he looked into. So he goes to explain how all that works, how hash tables work in general, and why the ordering is there now in 3.7.

12:53 Yeah, nice. There's a bunch of just cool little insights, like take that idea and just dive into it and explain it. It seems like a good place, especially if you're getting started and you want to dig into those ideas.

13:02 Yeah, the more you know about how it works, I think the better off you'll be.

13:05 Yeah, it's kind of cool they finally decided to make dictionaries ordered, right? It lets them be used in a few more places where maybe you actually need ordering and you're like, well, I could use a list and that'll have the order, but it'll be slow to get the items out. But maybe that's the tradeoff we have to make. And now you don't have to.

13:20 Right, right. And I noticed in 3.8, they add a reverse function as well. Dictionaries can work with reverse. So if you want to reverse your dictionary for whatever reason, you can.

13:28 Yeah, that's really taking the order seriously. So this next one, since you're a big web developer, I think will be interesting to you. And you're into Flask. This one is called Assembly. Have you heard of it?

13:39 I have not.

13:39 Well, when somebody recommended it, Louise Honda sent this over and said, oh, you should check out Assembly. My first thought was like, Assembly language. Like, I'm really not interested in Assembly language.

13:49 But you know, you said it's a web framework. So let me check this out. And it turns out that this is like an API on top of Flask. So it has its own API. But deep down, it's really Flask, right? And the idea is, this person who wrote this project said, I would like to build my web application using the concept of object oriented relationships.

14:11 So for example, if you want to have just bare routes, so like maybe a, just a slash for your homepage, you want to slash about for your about slash contact for slash contact or something like that.

14:25 All you do is you create a class called index. And then you have functions, one called index, one called home and call them about and it automatically sets up all the routing. And at first, it sounds like, ah, you know, okay, how much is this really buying me in terms of, and that right, I could put app dot route and put that in there, you know, maybe use a module to structure things that way.

14:45 But as you look through this more and more, there's just like all of these features. So I put a link in here, it says decisions made for you plus features. And I'll just go through this. And Anthony, you tell me like how these ideas hit you all in this one framework. So it has smart routing, which I just described. It has class names as part of the URL. So if I have a class called user account, the URL will be of all the stuff in there will start be prefixed with user dash account.

15:13 Class methods can also be accessed in the same way, right? It'll put dashes and whatnot. It has a RESTful API, it automatically figures out the view to render. So in the templates folder, if you have an index class, in there, you make a folder. In that folder, you create, you know, I said there's a slash about, you put in an about.html, and you'll automatically find that and render that as part of the template by just returning a dictionary. So I like that. Although you can edit it with route. It also has built in markdown support.

15:42 So if you have a markdown file, it'll process it and convert it to HTML.

15:46 Okay, that's nice.

15:47 Yeah, that's cool, right? It has built in support for passwords, and it uses bcrypt, which is an awesome thing to do it. It has session based support, you can use Redis, AWS S3, SQLite, Postgres, all these things as back end support for that.

16:00 It has Active Alchemy, which is a different take on SQLAlchemy. So SQLAlchemy uses unit of work where you start the unit of work, you do a bunch of stuff, and then you commit it. And this one is more Active Record, so each thing gets a change, but it's still SQLAlchemy underneath.

16:16 I'll keep going, because these are cool, like cross-site request forgery on all posts automatically, idiomatic HTTP errors, storage can be like S3, mail support, arrow for time, caching, pagination, assets, signals for dispatching messages to other parts of your app, and a bunch of other stuff.

16:34 So that's a lot of things to add on top of Basic Flask.

16:37 Yeah, it is. All those extra features sound great. The main part that I noticed was, you know, using a class to organize your routes. And, you know, that's a little strange to me. I'm used to just writing functions that are part of Blueprints, because I think that works so well, that I haven't thought of a reason to switch that up.

16:56 But I'll definitely look into it, because I'm sure there's a reason why this was done. Like, I don't like to dismiss things right away, because, you know, I don't understand it. Like, if they spent the time to build this library, then there's a good reason. So I'll look into it, and I'll see what the advantages are of using a class for this.

17:10 Sure. My two impressions, like, to me, the things that seem like two advantages, there's some other stuff that I didn't mention about RESTful APIs and whatnot. But the two big ones seem to be automatic URL generation and grouping.

17:24 So if I have got like a blog class, and then a, you know, latest post, like that latest method, it automatically says that slash blog slash latest, and I don't have to think about that. I think that is one part that's interesting. Stuff that's grouped in that class is clearly grouped in a URL hierarchy. And then the other is the automatic discovery and rendering of the template, right? If your template structure looks like the shape of your classes, then it'll just find the template without you saying flask render template and give the template name.

17:53 I don't know if that's enough to win people over. But I think that that's what they're going for.

17:56 Okay. Yeah. And I always name my templates the same as the function. So that would definitely help.

18:00 Yeah, I try to do that too. But this thing just says, and we're going to use that to figure out what to render and whatnot. So it's pretty new. And I think this is one of the challenges. There's all these cool and exciting ideas.

18:11 But it's just getting started. And you don't know which one is going to survive, right? Like, you've been doing a lot with flask. And you're like, well, maybe I should look at Sanic. But maybe Sanic won't be here in two months. So maybe I shouldn't look at Sanic. What else should I look at? There's just so much churn, which is beautiful, because there's all these things coming. But at the same time, it means it's really kind of hard to pick a horse in the race.

18:29 Yeah, flask has a huge problem with this. Like flask itself is fine. But so many extensions, you know, they're, they get popular, then there are no more maintainers after just a few months. So you have to find a new library if you want to get the latest.

18:43 Yeah. All right. This next thing you have is pretty interesting. Some physical hardware, huh?

18:49 Yeah. So this is an article by Lennon. It's called building a standalone GPS logger with CircuitPython using Adafruit and particle hardware.

18:57 So I've never done anything with hardware because it seems kind of mysterious to me. So reading this post was interesting because it kind of showed how straightforward it is.

19:07 Like, obviously, you have to figure out what components you need to build something. But in terms of writing the code to control all this with CircuitPython, which is a version of Python for microcontrollers, it's pretty straightforward.

19:17 It reminds me of, you know, taking data from an API and just writing it somewhere. So to like a database. So in this case, you know, you have the GPS logger.

19:26 So that's like your API in a sense. You have data coming from that. And you just take that data and you put it somewhere else. So it's really that straightforward.

19:33 Obviously, you have some code to check if the hardware is working properly. But the actual code to do what you want is pretty straightforward.

19:41 So he built this GPS logger because he wanted a way to track his GPS location over time instead of just having like the current location like your phone gives you.

19:50 Right.

19:50 And in a way that doesn't just drain your battery. So he shows you what components he had to purchase and how he put them all together. And then he gives you the code that he wrote to control all this. And I find it quite interesting. It makes me want to think about hardware projects I can attempt.

20:06 Yeah, it doesn't seem that out of reach. Right. And it's not too expensive. One of the things that I think is really challenging about these hardware projects and Adafruit makes it better because they have all these options.

20:16 But I'm like, all right, maybe this microcontroller thing would work and it's $10 and I probably need a battery. I don't even know how to hook the battery to the microcontroller. And then I need the GPS thing. But will that hook on this? Or do I need a board? It's just like all the little parts. I'm like, what even goes together?

20:31 And so one of the cool things is it's like, here are the seven things I used. Right?

20:34 Yeah.

20:35 Yeah, that's cool.

20:35 Yeah. So it makes it approachable. And there are tons of tutorials as well for the beginners who want to get into hardware.

20:42 So I think I'm pretty sure once you learn like the basics of, you know, what works with what, I think you can do similar things to what he's done in this tutorial.

20:50 Yeah, that's cool. So if you wanted to like go skiing and have a little trace of every bit you've done, you could just throw it into your backpack or whatever.

20:58 And just at the end of the day, it goes for like four days or something on its battery. It's got a little SD card, right? Take a little SD card out and you just, you have all your data. You do whatever you want with it.

21:07 Sounds fun.

21:08 Nice. So let me wrap up our main items here with a little article that folks can use to maybe make a case for using Python or learning Python at your organization or for yourself.

21:20 And it's called 10 reasons Python is good to learn and pretty straightforward. So, you know, obviously Python is popular. If you go and throw Python and all the other major languages into Stack Overflow trends, it's ridiculous.

21:34 I did this recently. A couple of years ago, Stack Overflow covered this and talked about, they wrote an article called The Incredible Growth of Python and they predicted Python just blowing past JavaScript and Java and all that and just really going and the others kind of going and flattening off.

21:49 If you go and put those same things into Stack Overflow trends now, Python is even more popular than they predicted and the other ones are going down more than they predicted. It's ridiculous.

21:57 And so the question kind of becomes why. And I think that this article touches on some of them. But before I talk about it really quickly, I just wanted to throw out this idea that I have.

22:07 And it's that Python is a full spectrum language. And this is an idea I'm trying to popularize about why Python is popular.

22:15 So on one hand, maybe, you know, let's think of like a scientist, a biologist or physicist or somebody who's, they don't think of themselves as a programmer. Let's just go with biology.

22:25 But the person has all this data and they can't properly analyze it and say Excel.

22:30 So they got to use some kind of programming sort of quotes thing to work with it.

22:35 One option is they could use MATLAB, but MATLAB is like thousands of dollars, like $800 a year continuously plus all the add-ons.

22:43 And the other thing is you can't build real apps with those kinds of projects, right?

22:48 Like nobody builds YouTube with MATLAB or, you know, Windows with MATLAB. They just, it just doesn't do that.

22:55 On the other hand, you could pick other things that can do those sorts of things like C++ or .NET or whatever.

23:00 And you're hit right from the beginning with all the complexity.

23:03 Like the biologist, instead of just being able to add a reference to a couple of libraries, not even write a function, just write like 10 lines of just straight in the script Python code that solves your problem.

23:14 That would be Python. And say .NET, you've got to have a namespace. You've got to have a static class.

23:19 You've got to have a public static void. You've got to have like all the compiling, like all that stuff.

23:23 You know, it's just, it hits you right from the beginning that's there to build these major apps.

23:26 And so I think Python, one of the reasons it's so popular in bringing in people from these sort of edge cases of programming and computation is they can start really easy.

23:35 But then over time, they just add a little more and a little more and all of a sudden, you know, they're like, oh, I just actually use machine learning to study ancient manuscripts with Python.

23:43 But I'm not even a developer. What just happened? You know, what do you think about this idea, Anthony?

23:48 Yeah, I think that's why people like especially people who have absolutely no background in programming.

23:55 Like what I notice is when they look at Python, they feel they can understand it.

23:59 Whereas when they look at something like JavaScript or C or pretty much anything else, like it looks difficult.

24:06 It could be the exact same, accomplish the same thing.

24:09 But Python just looks more approachable.

24:11 You can kind of read it and understand what's going on.

24:14 So people love it for that.

24:15 And I think that's why so many people new to programming go with Python first.

24:19 Right. It draws them into like, oh, hey, I can actually program in Python.

24:22 But then they grow into real programmers doing real cool stuff with like scientific libraries and other things or Flask or whatever.

24:28 And then they're kind of hooked, right?

24:30 Then they're in that space.

24:31 And I think that's part of the secret of Python's growth.

24:33 But let me go through my listicle here nonetheless.

24:36 So the 10 reasons that they claim in this article that Python's good to learn is it's free and open source.

24:42 Obviously nice.

24:43 It's popular, loved, and wanted.

24:45 Hat tip to the Stack Overflow survey where they ask those exact questions.

24:51 Who uses this?

24:52 Who loves the technology they use?

24:54 And who wants to use some technology they're not?

24:56 And Python always ranks high there.

24:57 It has a friendly and devoted community.

24:59 Of course, elegant and concise syntax.

25:01 Not all those semicolons and curly braces and type specifications.

25:05 It's multi-platform for most of the platforms at least.

25:09 Supports multiple programming paradigms.

25:12 Just like no functions straight down the script versus actual functions versus functional programming versus object-oriented programming and so on.

25:22 It has tons of libraries built in and third party.

25:25 It's a general purpose programming library unlike my example with MATLAB.

25:29 You can do stuff in it until you hit the limit that you just can't do anything else.

25:33 And then it also integrates with other languages.

25:35 C, C++.

25:37 It's got tons of integration there.

25:38 It has Rust integration.

25:39 It has .NET integration and a bunch of cool stuff like that.

25:42 So, anyway, there's a bit of a take on why Python is good to learn or why people are adopting it.

25:48 All right.

25:49 Well, Anthony, that does it for our main items.

25:52 We've got a couple of, a little bit of time to just talk about a few extra things.

25:56 Maybe you start first and tell us about what's going on in your world.

25:59 I'm from prettyprinted.com and mostly the YouTube channel.

26:02 So, URLs for YouTube are a little tricky.

26:04 So, if you just go to YouTube and search for Pretty Printed, you'll find my channel.

26:07 And I basically talk about Python web development there.

26:10 I occasionally talk about other topics, but it's mostly Blask and Django that I talk about there.

26:15 And then on my website, I have courses that I have available and I'm also trying to write more.

26:20 So, hopefully, you'll see some articles there soon as well.

26:23 So, that's what I do.

26:25 And if you watch my videos, that would be great.

26:28 Yeah, awesome.

26:28 Yeah, you're doing good work.

26:29 So, I have four quick announcements, maybe three announcements and a follow-up there.

26:33 So, I was just a guest on the .NET Rocks podcast talking about Python for the .NET developer.

26:40 So, if people are into .NET and they want to hear what does the world of Python look like from that perspective,

26:46 maybe you're working at a company that mostly is a .NET shop, but you really love Python, right?

26:52 Check that out.

26:52 You can share that with your co-workers about why they should maybe pay a little more attention.

26:56 So, I got a link to that episode that just came out yesterday.

26:59 I got a link to that in the show notes.

27:01 And then I also kind of tied together with that, these sort of one precipitated the other,

27:05 is I've just released a new nine-hour course called Python for the .NET developer.

27:10 So, the goal is to help all these .NET people take their skills like they know how to talk to databases using any framework or create websites using ASP.NET,

27:17 like recreate all of that, take those examples and then recreate them in Flask or SQLAlchemy or so on.

27:24 So, that's a really fun course if you're into the .NET space.

27:27 Also, another course, Python for Decision Makers.

27:30 Like, if you're thinking about whether Python makes sense for your organization or your team, check that out as well.

27:35 Links to all those are in the show notes.

27:37 And then finally, a couple episodes ago, I was talking to Brian saying one of the reasons I call my virtual environment folder, V-E-N-V,

27:46 is it doesn't show up in Finder.

27:48 And when I'm cruising through Finder and I get to one of my courses or one of my old projects,

27:52 I want to be able to just look really quickly and say, does this have a virtual environment?

27:55 Or do I need to hop over to the terminal and create one real quick?

27:59 And by default, if it's .ENV, which many times it has been, it's hidden.

28:04 You don't know.

28:04 You've got to go in there and go into the terminal and just find out.

28:08 It's not hard, but it's not like immediately obvious.

28:10 It requires a little step, right?

28:12 So, many people, too many to name.

28:14 I mean, many people sent me this message, which kind of blew my mind.

28:17 It said, if you're in Finder and you want to see hidden files, you hit Command, Shift, Dot,

28:23 and it will refresh with all the hidden files.

28:25 So, you see your .files and your .folders and whatnot.

28:27 Did you know about this, Anthony?

28:28 I did not because I do not use Mac.

28:30 Right.

28:32 So, this is not a problem that you have, right?

28:34 What do you use?

28:34 Windows?

28:35 Yes, Windows.

28:36 And I use the Linux subsystem.

28:38 Nice.

28:38 Yeah.

28:39 And in Windows, this is more of a setting, right?

28:41 You set in the Explorer, File Explorer, you say, I would like to see hidden files or not see hidden files.

28:47 But in Mac, there's no such setting.

28:48 So, apparently, it's a hot key.

28:50 All right.

28:50 Well, that's all my announcements as well.

28:52 We always close this out, Anthony, with a joke.

28:54 So, are you ready for a joke?

28:55 By the way, I also would like to point out that they're not always funny, but we always try.

28:59 Okay.

29:00 I'm ready.

29:00 All right.

29:01 So, here, speaking of different languages and all that, here's a failed pickup line.

29:07 So, this girl's hanging out with her friends at a bar.

29:10 They're just hanging around.

29:11 Some guy's like, wow, I'd really like to meet her.

29:14 Maybe I could come up and say something clever.

29:16 She looks like she might be a programmer.

29:17 Maybe I'll say some computer thing.

29:19 Comes up and he says, you know, maybe he's been watching too much of Jerry Maguire.

29:23 He's like, you're the semicolon to my line of code.

29:27 She responds, get out of your creep.

29:28 I code in Python.

29:29 You know, that might be the reason number 11 to learn Python.

29:34 Yes, exactly.

29:35 You can come up with better pickup lines.

29:36 Exactly.

29:37 You don't have to take that semicolon thing.

29:39 No, it's pretty funny.

29:41 All right.

29:42 Well, Anthony, thank you for filling in for Brian and being here today.

29:45 It was great to spend some time with you and talk about these ideas.

29:48 And thanks for having me here.

29:49 You bet.

29:49 Bye.

29:50 Bye.

29:50 Thank you for listening to Python Bytes.

29:52 Follow the show on Twitter via at Python Bytes.

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

29:57 And get the full show notes at Python Bytes.fm.

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

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

30:07 On behalf of myself and Brian Okken, this is Michael Kennedy.

30:11 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page