Python Bytes - #161 Sloppy Python can mean fast answers!
Episode Date: December 18, 2019Topics covered in this episode: Larry Hastings - Solve Your Problem With Sloppy Python - PyCon 2018 Introduction to ASGI: Emergence of an Async Python Web Ecosystem Python Insights Assembly Buildin...g a Standalone GPS Logger with CircuitPython using @Adafruit and particle hardware 10 reasons python is good to learn Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/161
Transcript
Discussion (0)
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 161, recorded December 12th, 2019.
I'm Michael Kennedy, and Brian Ocken is not here today.
Instead, we have a very special guest, Anthony Herbert. Welcome, Anthony.
It's nice to be here. Thanks for having me.
Yeah, it's great to have you here. You're doing all sorts of cool stuff in the Python space,
and I'm looking forward to sharing some of the week's news with you.
Also, I want to say thank you to DigitalOcean.
They're sponsoring this episode as they have many, many of them.
So check them out at pythonbytes.fm slash DigitalOcean and get a $50 credit for new
users.
Anthony, people might know you from your website, Pretty Printed.
You do a lot of stuff with Flask and things like that, right?
Yeah.
Yeah, cool.
So people have checked that out.
That's the same, Anthony. And you're here with a bit of a contrarian story on getting stuff solved, right? And I actually
really subscribe to this idea as well about using crappy code when it makes sense. Tell us about it.
This is from a talk by Larry Hastings. It's called Solve Your Problem with Sloppy Python.
And in this talk, he basically advocates solving personal problems
with sloppy Python, not problems that you would have at work, because that would be a huge issue.
So in the talk, he gives three or four examples of how he solves problems that he has encountered
in his everyday life. And three of the four have to do with string manipulation. So renaming files.
And I think that's something that everyone has had
to deal with at some point. I know I have to deal with it all the time. And another example is a
script that he uses to install all the packages after reinstalling an operating system. So instead
of going through and trying to install each package individually, what he does is he just
writes a script and installs everything that he uses. So Sublime, Chrome, and even the latest versions of Python.
And as an example of some of the sloppy code that he has, when he goes to install the latest
versions of Python, all he does is he goes to python.org and he scrapes the latest version
of Python there.
So he gets the version number, then he can go and download the source for that, build
the source.
And then he has the latest version of Python installed without him having to actually do
anything.
Yeah, I didn't catch that he actually was using that to build from source.
That's pretty funny.
Yeah, but he's doing a lot of cool stuff.
And I like this message.
Like I said, I kind of subscribe to it.
It's there are times that you should put tons of energy into structuring beautiful code
that's very maintainable and very abstracted.
And like you mentioned, Anthony, when you were doing this on a team, if you create crappy into structuring beautiful code that's very maintainable and very abstracted.
And like you mentioned, Anthony, when you were doing this on a team, if you create crappy code, your team members are not going to like you.
They're going to be like, oh man, I don't want to go work on that part of the code because
it's always like there's two features and three bugs, it seems to be the ratio or something
like that, right?
But there's all these little things that you don't need to do a lot of error handling.
You're just going to run it and it just needs to do this thing
and you're the one person looking at it.
And if it doesn't work, it's going to be obvious.
You'll get a big stack trace or trace back, something like that, right?
The reason I like it is it allows people to say,
instead of spending a lot of work on building something fancy to solve my problem,
I can spend 10 minutes and solve it for the rest of my life, right? Right.
Do you have situations in your world where you do that?
I have to move files around all the time. And what tends to happen is I start to do it,
and I feel a bit stubborn at times. So I just continue doing it manually. And then when I'm
done, I realize, oh, I could have written a script for that. So what this talk basically
reminds me to do is think about automating at first and do as much as I can in code and then minimize the manual parts.
There was something I did recently where I had to cut out pieces of audio files,
like starting at a certain timestamp and ending at a timestamp. And I had to do that for about
30 files. And it took me a couple of hours to do this. And Audacity has the ability to be
controlled by a Python script. So perhaps I could have written a hours to do this. And Audacity has the ability to be controlled by a Python
script. So perhaps I could have written a script to do that for me automatically instead of sitting
in my computer and messing with audio files for a couple of hours. Yeah. And you can do that for a
few hours, but eventually at some point you're like, this is really hard. And in my own world,
I've had a lot of these experiences to the point where I'm like, maybe I should hire someone to do
this. And then I'm like, wait, wait, wait, I bet I could do this in Python. And then two hours later, it's automated. I'm like,
why was I ever thinking that? What a fool. So I threw out some examples onto the show notes of
stuff that I was doing as well. So there's a bunch of little things that just make my life so much
easier. If I export course sale data, I use Stripe, I got to get it out of their format as an Excel
CSV. And then I got to convert it to of their format as an Excel CSV. And then I
got to convert it to something else that I process and filter and so on. And I was doing that by hand
for a year or so. And I why am I always going into the sheet, deleting these columns, copying this
stuff over there. And I just wrote a Python script. Now it's one line of command line call runs a
Python script. And it transforms my stuff into something I can just
paste into the right, you know, sheet, a Google sheet, sort of calculation place. Another one is
like, I always have like titles and stuff that I want to make into file names or folder names,
you know, think the title of this show or the name of a lecture, a video lecture in a course,
I want to take the title and make the file name that. So I wrote this thing called URLify and it was like 20 lines of code because
I was sick of lowercasing, putting dashes for spaces, taking away the dots, you know,
taking away the punctuation. And I put that in as a gist. People can have it. I do tons of
reporting this way. The deployment on my server, I turn that into the script that I can use with
Python. It sort of does a bunch of stuff with actually async and await in there, which is pretty cool. Importing information from video files,
because I don't want to go there and copy like it's this long and its name is this. So now I
can just point it to the directory and it'll just rip that out of there. Or same thing for like
duration of audio files. There's all these cool little things that were nagging me that I had to
do all the time. And I'm just like, you know what?
This is getting some Python on it.
Yeah, sounds good.
Absolutely.
So I mentioned async and await.
And the place where async and await seems to have the most power, right, is around,
well, network stuff.
So it's either on the server side where you have a framework that is some kind of web
server that can scale out better because the
web methods are async and await or a client something like requests more like httpx or
something like that that supports an async way to talk to a bunch of different services or websites
so the next thing i want to cover is this little write-up by flor florimund manka and it's the
introduction to asgi the emergence of async python web frameworks we've probably all
heard of wsgi or whiskey right that powers flask and powers things like pyramid and django and so
on that's the web service gateway interface and it's you've got a request give me the answer and
that just doesn't work when you want to allow multiple requests all right at the same time, right?
If I'm going to have a bunch of async stuff, I got to let 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 growth, and I'd like to get your opinion on this, Anthony,
is around these new Python web frameworks.
It used to seem really clear, like, yeah, there's Flask, Django, Pyramid, a few others.
And now there's a new one every week.
I don't even know what to keep track of anymore.
How do you feel?
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 really looked into any of them closely.
Some people on my channel have been telling me to look into Sanic.
Yeah, Sanic's got a lot of traction, yeah.
That was the first one I heard about a couple of years ago.
And it's still going pretty strong.
I haven't looked into it yet.
And it seems interesting. Like, I've done a couple of years ago. And it's still going pretty strong. I haven't looked into it yet. And it seems interesting.
Like I've done a little bit of Node stuff in the past.
And I know this is bringing Node-like functionality to Python.
So I want to look into it, but I haven't looked into it deeply yet.
And I noticed that Django, they just released 3.0.
And they have support for ASGI.
I don't think it's completely functional yet, but the beginnings of it are
there. So I should definitely look into it more. Yeah, for sure. The foundations are there. And
if you're a Flask person like you are, probably the best thing to actually start with might be
Cort. So I don't know if you've heard of Cort, but Cort is a 100% compatible, even with the
extensions, plugins and stuff for Flask API, but it also allows for async and await on the view methods.
So basically the way you convert from Flask to core is you replace the word Flask with the word
court. If it's lowercase Flask, it's lowercase court. If it's uppercase Flask, it's uppercase
court. And that's it. And then you have async methods. You do have to run it on something like
UVA corn, but yeah, that's probably the path of least resistance, but it also doesn't take
advantage of necessarily the best new features, right? That seems easy. I can try that last a court.
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. 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? 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. 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. I'll look into that more. 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,000 to 70,000 requests per second,
whereas synchronous Flask and Django do 10,000 to 20,000.
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.
Yeah, so they link to a couple of different tools
you might use.
UVicorn, which is like G-unicorn,
but based on UV loop,
which is the C implementation of async IO event loop
and plugged into G-unicorn.
That's a good foundational
production server and then starlet seems to be one of the best async frameworks like you mentioned
sanic and i talked about court starlet seems to be the foundation it's like the foundation of fast
api and some other ones and it's its own framework so it's pretty good 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?
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.
Speaking of nice, let me tell you all about DigitalOcean. 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. 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. So DigitalOcean introduced a new managed service,
the DigitalOcean 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.
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?
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.
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.
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
because 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. 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. 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. 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.
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.
Yeah, the more you know about how it works, I think the better off you'll be. 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 trade-off we have to make.
And now you don't have to. Right, right. And I noticed in 3.8, they add a reverse function as
well. Our dictionaries can work with reverse.
So if you want to reverse your dictionary for whatever reason, you can.
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?
I have not.
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,
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.
So for example, if you want to have just bare routes, so like maybe just a slash for your
homepage, you want to slash about for your about, slash contact for slash contact or
something like that. All you do is you create a class called index. And then you have functions,
one called index, one called home and called it 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
add that right, I could put app dot route and put that in there you know maybe use a module to structure things that way 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 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 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. So if you have a Markdown file, it'll process it and convert it to HTML.
Okay, that's nice.
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 backend support for that.
It has ActiveAlchemy,
which is a different take on SQL alchemy so sequel alchemy
uses unit of work where you start the unit 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 sequel alchemy
underneath i'll keep going though because these are cool like cross-site request forgery on all
posts automatically idiomatic http errors storage can be like 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. So that's a lot of things to add on top of basic Flask.
Yeah, it is. All those extra features sound great. The main part that I noticed was using a class to
organize your routes.
And 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.
But I'll definitely look into it because I'm sure there's a reason why this was done.
I don't like to dismiss things right away because I don't understand it.
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.
Sure.
My two impressions, 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. 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. I don't know if that's enough
to win people over, but I think that that's what they're going for. Okay. Yeah. And I always name
my templates the same as the function. So that would definitely help. 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 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 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 yeah flask has a huge problem with this like flask
itself is fine but so many extensions um you know they're they get popular then there are no more
maintainers after just a few months so oh wow you have to find a new library if you want to get the
latest yeah all right this next thing you you have is pretty interesting. Some physical hardware, huh?
Yeah. So this is an article by Lennon. It's called Building a Standalone GPS Logger with
CircuitPython Using Adafruit and Particle Hardware. 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 reading this post was interesting because it kind of
showed how straightforward it is. 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. 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 the GPS logger 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 obviously you have some
code to check if the hardware is working properly but um the actual code to do
what you want is pretty straightforward so he built this GPS logger because he
wanted a way to track his GPS location over time instead of just having the current location like your phone gives
you. 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. 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, 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?
And so one of the cool things is it's like,
here are the seven things I used, right?
Yeah, that's cool.
Yeah, so it makes it approachable.
And there are tons of tutorials as well for the beginners who want to get into hardware.
So I think I'm pretty sure once you learn
like the basics of what works with what,
I think you can do similar things
to what he's done in this tutorial.
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.
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.
Sounds fun.
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.
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.
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
flattening off. 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. 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. 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. 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. But the person has all this data and they can't properly analyze it in say Excel.
So they got to use some kind of programming sort of a quotes thing to work with it. One option is
they could use MATLAB, but MATLAB is like thousands of dollars, like $800 a year continuously, plus
all the add-ons. And the other thing is you can't build real apps
with those kinds of projects, right? Like nobody builds YouTube with MATLAB or, you know,
Windows with MATLAB. They just, it just doesn't do that. On the other hand, you could pick other
things that can do those sorts of things like C++ or.NET or whatever. And you're hit right from the
beginning with all the complexity, like the the biologists instead of just being able to add a reference to a couple libraries not even write a function just
write like 10 lines of just straight in the script python code that solves your problem that would be
python and say dot net you got to have a namespace you got to have a static class you got to have a
public static void you got to have like all the compile and like all that stuff you know it's just
it hits you right from the beginning that's there to build these major apps and so i think python
one of the reasons so popular and bringing in people from these sort of edge cases of programming
and computation is they can start really easy but then over time if 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 but I'm not even a
developer. What just happened? What do you think about this idea, Anthony?
Yeah, I think that's why people like it, especially people who have absolutely no
background in programming. What I notice is when they look at Python, they feel they can
understand it. Whereas when they look at something like JavaScript or C or pretty much anything else, like it looks difficult.
It could be the exact same, accomplish the same thing.
But Python just looks more approachable.
You can kind of read it and understand what's going on.
So people love it for that.
And I think that's why so many people new to programming go with Python first.
Right. It draws them into like, oh, hey, I can actually program in Python.
But then they grow into real programmers doing real cool stuff with like scientific libraries and other things or flask or whatever.
And then they're kind of hooked, right? Then they're in that space. And I think that's part
of the secret of Python's growth. But let me go through my listicle here nonetheless. So the 10
reasons that they claim in this article that Python's good to learn is it's free and open
source, obviously nice. It's popular's popular loved and wanted hat tip to the
stack overflow survey where they ask those exact questions who uses this who loves the technology
they use and who wants to use some technology they're not and python always ranks high there
it has a friendly and devoted community of course elegant and concise syntax not all those
semicolons and curly braces and type specifications.
It's multi-platform for most of the platforms, at least. Supports multiple programming paradigms,
just like no functions straight down the script versus actual functions versus functional
programming versus object-oriented programming and so on. Has tons of libraries built in and
third-party.
It's a general-purpose programming library,
unlike my example with MATLAB, right?
You can do stuff in it until you hit the limit
that you just can't do anything else.
And then it also integrates with other languages.
C, C++, it's got tons of integration there.
It has Rust integration, it has.NET integration,
and a bunch of cool stuff like that.
So anyway, there's a bit of a take
on why Python is good to learn or why people are adopting it. All right. Well, Anthony,
that does it for our main items. We've got a couple of a little bit of time to just talk
about a few extra things. Maybe you start first and tell us about what's going on in your world.
I'm from pretty printed dot com and mostly the YouTube channel. So
URLs for YouTube are a little tricky. So if you just go to YouTube
and search for Pretty Printed,
you'll find my channel.
And I basically talk about Python web development there.
I occasionally talk about other topics,
but it's mostly Blask and Django that I talk about there.
And then on my website,
I have courses that I have available
and I'm also trying to write more.
So hopefully you'll see some articles there soon as well.
So that's what I do. And if you
watch my videos, that would be great. Yeah, awesome. Yeah, you're doing good work.
So I have four quick announcements, maybe three announcements and a follow up there.
So I was just a guest on the.NET Rocks podcast talking about Python for the.NET developer. So
people are into.NET and they want to hear what does the world of Python look
like from that perspective, maybe you're working at a company that mostly is a.NET shop, but you
really love Python, right? Check that out. You could share that with your coworkers about why
they should maybe pay a little more attention. So I got a link to that episode that just came
out yesterday. I got a link to that in the show notes. And then I also kind of tied together with
that. These sort of one precipitated the other is I've just released a new nine hour course called Python for the.NET
developer. 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, like
recreate all of that, take those examples and then recreate them in Flask or SQL Alchemy or so on.
So that's a really fun course if you're into the.NET space.
Also, another course, Python for Decision Makers.
Like if you're thinking about whether Python makes sense for your organization or your team,
check that out as well.
Links to all those are in the show notes.
And then finally, a couple episodes ago, I was talking to Brian saying,
one of the reasons I call my virtual environment folder VENV is it doesn't show up
in Finder. And when I'm cruising through Finder and I get to one of my courses or one of my old
projects, I want to be able to just look really quickly and say, does this have a virtual
environment or do I need to hop over to the terminal and create one real quick? And by default,
if it's.ENV, which many times it has been, it's hidden. You don't know. You've got to go in there and go into the terminal and just find out.
It's not hard, but it's not like immediately obvious.
It requires a little step, right?
So many people, too many to name.
I mean, many people sent me this message, which kind of blew my mind.
It said, if you were in Finder and you want to see hidden files, you hit command shift
dot and it will refresh with all the
hidden files. So you see your dot files and your dot folders and whatnot. Did you know about this,
Anthony? I did not because I do not use Mac. Right. So this is not a problem that you have,
right? What do you use? Windows? Yes, Windows. And I use the Linux subsystem. Nice. Yeah. And
in Windows, this is more of a setting, right? You set in the Explorer, File Explorer, you say,
I would like to see hidden files
or not see hidden files.
But in Mac, there's no such setting.
So apparently it's a hotkey.
All right, well, that's all my announcements as well.
We always close this out at the end with a joke.
So are you ready for a joke?
By the way, I also would like to point out
that they're not always funny, but we always try.
Okay, I'm ready.
All right.
So here, speaking of different languages and all that,
here's a failed pickup line.
So this girl's hanging out with her friends at a bar.
They're just hanging around.
Some guy's like, well, I'd really like to meet her.
Maybe I could come up and say something clever.
She looks like she might be a programmer.
Maybe I'll say some computer thing.
Comes up and he says, you know,
maybe he's been watching too much of Jerry Maguire.
He's like, you're the semicolon to my line of code. She responds, get out of your creep by coding Python.
You know, that might be the reason number 11 to learn Python.
Yes, exactly.
It can come up with better pickup lines.
Exactly. You don't have to take that semicolon thing.
No, it's pretty funny. All right. Well, Anthony, thank you for filling in for Brian and being here
today. It was great to spend some time with you and talk about these ideas.
And thanks for having me here.
You bet. Bye.
Bye.
Thank you for listening to Python Bytes. Follow the show on Twitter via
at Python Bytes. That's Python Bytes as in B-Y-T-E-S. And 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
Auchin, this is Michael Kennedy. Thank you for listening and sharing this podcast with your
friends and colleagues.