Latest / Talk Python To Me / #345: 10 Tips and Tools for Developer Productivity
Transcript
- 0:00You know that feeling when one of your developer friends or colleagues tells you about some
- 0:04amazing tool, library, or shell environment that you never heard of and that you have
- 0:08to run out and just try right away?
- 0:10This episode is jam-packed full of those moments.
- 0:14We welcome back Jay Miller to discuss tools and tips for developer productivity.
- 0:18The title says 10 tips, but we actually veer into many more along the way.
- 0:22I think you'll really enjoy this useful and lighthearted episode.
- 0:26This is Talk Python To Me, episode 345, recorded November 17th, 2021.
- 0:31Welcome to Talk Python To Me, a weekly podcast on Python.
- 0:48This is your host, Michael Kennedy.
- 0:49Follow me on Twitter where I'm @mkennedy and keep up with the show and listen to past
- 0:54episodes at talkpython.fm.
- 0:56And follow the show on Twitter via at Talk Python.
- 0:59We've started streaming most of our episodes live on YouTube.
- 1:02Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming
- 1:08shows and be part of that episode.
- 1:10This episode is brought to you by Coiled and CockroachDB.
- 1:14Please check out what they're offering during their segments.
- 1:16It really helps support the show.
- 1:18Jay, welcome back to Talk Python To Me.
- 1:22It is always a pleasure to join the show and hang out.
- 1:27Yeah, it's a pleasure to have you here.
- 1:28You help out with all sorts of things and it's been great to bounce ideas off of you.
- 1:33I've had you on the show a couple of times, literally two times so far, I believe.
- 1:37How many more before I get like that golden jacket like they do on SNL?
- 1:42You get the golden jacket after 10.
- 1:43This is a really...
- 1:44After 10?
- 1:44Wow.
- 1:45It is a commitment to get the jacket.
- 1:47Wow.
- 1:48Yeah.
- 1:49Well, we'll pick up the cadence here and we'll get you the jacket.
- 1:52I mean, you're a third of the way there, basically.
- 1:54All right.
- 1:54All right.
- 1:55I got goals now.
- 1:56Before I retire from the Python community, I will have my golden jacket from Talk Python.
- 2:01That's right.
- 2:02Oh, man.
- 2:03If you come on 10 times, you are getting a jacket.
- 2:04I'll figure out how to get one of those.
- 2:06I'll demand one.
- 2:07Thank you for being here.
- 2:08This episode is going to be something of a reversal, but not 100% reversal.
- 2:13I've got all these ideas about developer productivity.
- 2:16I've been bouncing around and I want to share them with the audience.
- 2:20And so we're going to kind of share those together, right?
- 2:23I'll present them because it's my idea.
- 2:25I don't want to force that recommendation coming out of anyone else or you in particular.
- 2:31So I'll present them and then we'll discuss them, right?
- 2:33So you'll be both the guest and the sounding board.
- 2:37How's that sound?
- 2:37I get to be the Simon Cowell to your performance.
- 2:40I love it.
- 2:41Yeah, exactly.
- 2:42Well, hopefully you're in a good mood because Simon, he can be tough sometimes.
- 2:47We'll see.
- 2:47We'll see how it goes.
- 2:48We'll see how it goes.
- 2:48I've seen the talk.
- 2:49I think there's a lot of great points in there and some stuff that I immediately was like,
- 2:54oh, and then I heard you explain.
- 2:55I go, actually, you know, that's not a bad idea.
- 2:57Maybe.
- 2:58Well, you know, you let me know where you disagree because a lot of these things,
- 3:02one thing that works for one person is exactly the wrong thing for others.
- 3:07Now, before we jump into it, though, you know, you've been on the show a couple of times.
- 3:11The most recent time we were on, we talked about little automation tools, which was super fun.
- 3:16We had you.
- 3:17We had Rusty, we had Kim Van Wick, and we had Rivers Cuomo, of all people, who did a fantastic job on the show.
- 3:23So that was really fun.
- 3:25And I feel like that's a really good lead into this conversation here.
- 3:29Before we get to it, though, for people who don't know you, it has been a little while.
- 3:32When was that?
- 3:33That was back in July since you've been on the show.
- 3:35Tell people a little bit about yourself.
- 3:36Yeah.
- 3:37So I'm Jay Miller.
- 3:38I'm a developer advocate for a company called Elastic.
- 3:42We do Elastic Search.
- 3:45I also do podcasting and a lot of productivity automation.
- 3:50And you can usually find that stuff over either on Relay.fm, where my podcast lives,
- 3:55or on YouTube, where I'm often talking about different productivity tools around the macOS ecosystem
- 4:02or the iOS ecosystem, mostly Mac.
- 4:04And I guess the biggest difference there is I don't shy away from the programming-friendly stuff.
- 4:13I am the more that I can hack in, you know, shell scripting, Python scripts, even Swift from time to time, like, bring it on.
- 4:22I am here for it.
- 4:23And yeah, so you're not, you're not, you're going to see some software recommendations from me.
- 4:28But I often tell people like, let's use what we know, build what we can, and ultimately just make things that work for us.
- 4:35And it's kind of me.
- 4:36That's kind of what I do in my day-to-day.
- 4:38That's awesome.
- 4:38If it's got to be solved with if this, then that, then let it be solved that way, right?
- 4:43Absolutely.
- 4:43Yeah.
- 4:44You want to give a quick shout out to your podcast in particular, Conduit?
- 4:47That's kind of new, right?
- 4:49You also did the productivity podcast before this and then transitioned over here, right?
- 4:54Yeah.
- 4:54So before I did a show called Productivity and Tech, it was, you know, just a general productivity conversation with people around the tech, I guess, lowercase word, tech ecosystem.
- 5:07Just learning how they did things and how they were more productive.
- 5:09Somewhere along the lines, I found my co-host for my current show, Kathy Campbell.
- 5:14And we do a show on Relay.fm called Conduit, where we talk about productivity, but make it so that it fits no matter what tools you're using.
- 5:24We don't, we don't like to, we do like to make up, you know, our own different funny names for things, different techniques and tools and stuff.
- 5:32But ultimately the idea is whether you like GTD, whether you like bullet journaling or whether you absolutely have to build to-do lists and Visual Studio code, like whatever you're choosing to do, like hopefully we can provide some guidance on how to do it to the best of your abilities.
- 5:49Yeah, that's awesome.
- 5:50We all have different tools.
- 5:51I remember being in one high-level meeting with some executives and such, and they said, for some reason, my screen was being shared because I was demoing something.
- 6:01And I said, Michael, can you just go ahead and take some notes on this?
- 6:03I'm like, yeah, sure.
- 6:03So I fired up VS Code in Markdown mode and just started taking notes.
- 6:07So I go, okay, I see how we're taking notes here.
- 6:10This is very, like, I didn't know they expected like one note or something.
- 6:12I don't know what they wanted, but yeah, like, no, this is how we do it.
- 6:15We're doing this.
- 6:15Yeah.
- 6:16I mean, you'll often hear me talk.
- 6:18I'm a notebook pen and paper person.
- 6:20So when it comes to managing projects or tasks, I'm often starting in my notebooks and then I'll move it over to a digital format.
- 6:28Like if I need to share it out or something like that.
- 6:30Yeah.
- 6:31Right on.
- 6:31Also from the audience, Jaylee says, please make that golden jacket a thing.
- 6:35Goals.
- 6:36We got goals.
- 6:38I think so.
- 6:38It's easy for me to stand behind this because I'm pretty sure we don't have any 10 time repeat guests.
- 6:44I've put the bar pretty high, but we'll get there.
- 6:46It'll happen.
- 6:47It'll be awesome.
- 6:48I feel like I'm in the race with people like Rusty Van Wick and Anthony Shaw and maybe Brian.
- 6:54I feel like Brian can sneak his way on.
- 6:56Brian does sneak in periodically.
- 6:58He's an easy one to reach out to and like, hey, we got to cover this topic and I can't find somebody.
- 7:03You want to drop in and do it?
- 7:04Yeah.
- 7:05Awesome.
- 7:06So what do you think?
- 7:07Should we jump into the tips straight away?
- 7:09Let's do it.
- 7:10I'm excited to do.
- 7:10Awesome.
- 7:11Well, I think there's a lot of little things that you pick up when you work in software.
- 7:17And I feel like you and I share this belief that software is the superpower to whatever you're actually trying to do.
- 7:23You talk so much about, oh, I found this cool tool to automate that.
- 7:27You've even created mail through automation and stuff like that.
- 7:33It's beautiful.
- 7:33Yeah.
- 7:34You know, I think the coolest part about tools is that they are that.
- 7:40They're tools.
- 7:40I love artists that are able to take a tool that wasn't designed for that thing and make something truly beautiful with it.
- 7:50Like, I mean, the first time I saw like Bob Ross on like TV, you see some of the brushes that he uses and they're not like these little ones that you used in like your high school arts class.
- 8:00They're like shop brushes that you would use, like paint a fence.
- 8:03And like somehow he could still make these crazy pictures in like 30 minutes.
- 8:08That's where the happy trees come from.
- 8:09Exactly.
- 8:10Awesome.
- 8:12So the things we're going to cover here, they're like that.
- 8:15They're a bunch of little things and I specifically chose them because I thought they're incredibly easy to try out.
- 8:22Right.
- 8:22They're not like, oh, you know what you should do?
- 8:24You should move to a no SQL key value store database.
- 8:28That would be better.
- 8:29You're like, yeah, no, that's like a month.
- 8:31And then we have to live with the consequences.
- 8:33Like, so everything that we're going to talk about here, I believe is something you could try out really quick and say, yeah, that's cool.
- 8:39Actually, no, maybe not.
- 8:42Okay.
- 8:42And if we got some time, I'm going to throw in some extra ones there.
- 8:45I think everything here is free except for like one or two things.
- 8:51So like, absolutely.
- 8:53Your download manager like might get exhausted, but your bank account won't.
- 8:57Exactly.
- 8:58Exactly.
- 8:59So the first one that I wanted to start out with, and I feel like this is a very bimodal distribution is shells or terminals or command prompts, depending on your origin, where you're coming to think about these things.
- 9:12And I say bimodal because I feel like there's one group of developers that lives in the shell even more than me by quite a wide margin.
- 9:20They're incredibly talented there.
- 9:22And then there's a whole group that are just like, well, whatever is on my system, that's what I'm using.
- 9:25What do you think?
- 9:26What would your estimation on that population be like?
- 9:30It's tough because I think as the community continues to grow, you're going to have more and more people that are not back in my day.
- 9:38We we had the green screen with the blinky dot, you know, like I don't think you're going to have as many people that are doing that.
- 9:44And I don't think that's necessarily a bad thing.
- 9:47I think the first programming thing I learned was like when I was like eight or nine and like my grandfather was using Eclipse.
- 9:56And it's like I don't go anywhere near Eclipse now.
- 10:00Like that is not that's not me at all.
- 10:03But nowadays, like even in my IDE, I find myself often going into Vim to make changes like in my IDE instead of just clicking on the file right there, making the change.
- 10:16It's like, oh, I know I can do this faster just from my muscle memory.
- 10:21So I think I think having at least some knowledge of, you know, if I need to dig into the shell, I can.
- 10:28And I think that was actually, you know, one of the things you talked about here was using different tools to augment the shell.
- 10:35I think that even if you're not going to go in there a lot, at least when you have to go in there, make it make it at least enjoyable.
- 10:42Yeah, there's a bunch of little tools.
- 10:44And there really seems to be a renaissance of the tools around the terminal.
- 10:49We've got things like Rich and Textual, allowing people to make really cool apps there.
- 10:53We've got OhMyZShell, OhMyPosh, a bunch of things there.
- 10:58Some stuff called Big.io.
- 11:01I'm not totally sure I want to make a recommendation for it yet, but I'll sort of bring it out there and so on.
- 11:06And so, yeah, so my recommendation was if you open up your terminal or command prompt, if you're on Windows and you're still using cmd.exe, if it looks like the way it looked when you got the machine, there's a problem.
- 11:21You're doing it wrong.
- 11:22If it if it just comes out of the box and it's just cmd.exe, that's what you're using.
- 11:27Or if you just open up macOS and it's the white bash, like you're missing out on so much.
- 11:33Yeah, Brandon Brainer out there in the audience says, I'm using Fig and it's pretty awesome.
- 11:38I just started checking out Fig.
- 11:39I'll pull up Fig in a moment.
- 11:41We'll talk about that.
- 11:42So on one hand, there's a bunch of people who are incredibly talented, but there's also all these things that support being more efficient on the terminal.
- 11:50So for example, I'm a big fan of OhMyZShell, OhMyZSH at OhMyZ.sh, which I learned that macOS now switched to ZShell as the default terminal.
- 12:03So that's interesting.
- 12:04But that means it's even easier to install OhMyZShell because you've already got ZSH or ZShell.
- 12:09And there's just so many little nice tricks.
- 12:12Like if you go into a directory and that directory happens to be within a Git repo, you get information about your Git repo right there in the prompt.
- 12:21It tells you what branch you're on and what repo you're in and all those kinds of things.
- 12:25If you can get it to say things about like the Python version that you're on and so on.
- 12:29Do you ever use ZShell?
- 12:31Yeah.
- 12:31What do you use?
- 12:32Oh, I use OhMyZShell.
- 12:33Absolutely.
- 12:34Like it's to me, if I'm not using it, I immediately know because of like, it's like, wait a minute, what's happening here?
- 12:44I'm typing stuff and nothing's happening and I don't get it.
- 12:47I hit tab and it didn't help.
- 12:48Or I hit, I typed a few things to hit back here and it just went back to the previous command.
- 12:52This is broken.
- 12:53So, so we can't, I can't give you the name on it because I guess we'll try to be a family friendly episode.
- 12:59But there's one of the things I like about OhMyZShell is that they have these plugins that do a lot of the configuration for you, which is already a big help.
- 13:09Like the fact that I don't complete and all sorts of things.
- 13:12Yeah.
- 13:12Not even that.
- 13:13Just the fact that I don't have to go into like my like ZSHRC and then put a bunch of like path statements and this crazy shell scripting to make things work.
- 13:24I can just go to the plugin section and type something in.
- 13:26But one of the things that one of my favorite ones, the command for it is WTF.
- 13:32So if you know, you know, but the way that it works is if you type in something wrong, like if you mistype it, if you type in the phrase, the magical phrase, it'll go, Oh, I think you meant to type in this.
- 13:47And you can just hit Y and then it inputs it in for you.
- 13:51So like if you can't remember, what's that one weird command that you have to use if you're using something like said or awk, which I will.
- 13:58I have another suggestion if you're using those still like you can be like, Oh, I think you meant awk slash this not awk slash this other thing.
- 14:08Yeah.
- 14:08Like, yeah, that's what I meant.
- 14:09That's awesome.
- 14:11There's one also that is the spelling out of the last of those three letters.
- 14:16Yeah.
- 14:17In there.
- 14:18And you type that and it'll say, did you like if you do like a get checkout and it meant get branch or something like that, it'll you can just type that and go, did you mean this?
- 14:27You say yes.
- 14:27And it'll fix it.
- 14:28Yeah.
- 14:28It sounds similar as well.
- 14:30That's awesome.
- 14:31Yeah.
- 14:31And things like fast D and ASDF, like ASDF, I'm sure we'll talk about later, but fast D, like the fact that you can do like things like fuzzy searching, you don't have to remember the exact path.
- 14:41You just know the name of the directory you want to go into.
- 14:44You hit Z space, the name of the directory, hit enter, and then now you're in that directory.
- 14:48And if it ever messes up, you just hit tab and then you can manually set it to whatever you want it to be.
- 14:54So in the future, it doesn't mess up again.
- 14:56To me, it's like you're missing out on a very modern and clean browser experience if you're not kind of unleashing it with some of these extra plugins.
- 15:06And Oh, my Z shell is the way to start with those.
- 15:09To me, it feels a little bit like I'm programming in Notepad versus I'm programming in PyCharm or VS Code.
- 15:15Like, why would you not want all this stuff that can help you with what you're trying to do?
- 15:18Okay.
- 15:19If you just take the base one.
- 15:20All right.
- 15:20So now if you're in Mac, I think macOS has the best shell of all the OSs.
- 15:25And then you've got Linux.
- 15:26There's a lot of good stuff there.
- 15:28They're very, very similar.
- 15:29But then if you're on Windows, I felt like that's just a different world, right?
- 15:33It's just you're not meant to be on the terminal command prompt that much until recently.
- 15:39So Microsoft released this thing called the Windows Terminal, which I started using on my Windows machines.
- 15:45And I really like the Windows Terminal.
- 15:48There's a bunch of good stuff in there.
- 15:49And in particular, you can install ohmyposh on there and get fantastic similar experiences over on Windows Terminal plus ohmyposh.
- 15:59Yeah.
- 15:59I haven't gotten to play around with the new Windows Terminal experience.
- 16:03But everything that I've seen makes me really impressed with what they've been able to do in the last few years.
- 16:10Yeah, totally.
- 16:11And you can set up Windows so that if you just say open command prompt, open terminal, the default terminal is the Windows Terminal.
- 16:19And then within Windows Terminal, you can set up the new PowerShell, the PowerShell 7 or whatever it is, not the old school PowerShell 3 or command prompt version.
- 16:28So it'll also drop in to like the latest version with ohmyposh set up.
- 16:32And then you're in a pretty good place on Windows, actually.
- 16:34Yeah.
- 16:35And I guess on Mac too, I mean, Terminal is fine.
- 16:38Use iTerm.
- 16:39Like iTerm 2, it is...
- 16:42Unless you're using data of some sort, I would highly suggest iTerm 2 to replace it.
- 16:49This portion of Talk Python is brought to you by Coiled.
- 16:54You already love using Python to build your data science projects, but training models and working with tons of data on your laptop is limiting to say the least.
- 17:02But that does not mean you need to learn new cloud APIs or buy expensive and hard to acquire hardware.
- 17:08Just use Coiled.io.
- 17:11Coiled supercharges the tools you already use for scale and performance, so you can use Python for your ambitious problems.
- 17:17In the words of Eric Ma, principal data scientist at Moderna, quote,
- 17:21Quite literally, burst into the cloud from your laptop.
- 17:24Everything I've been dreaming of since grad school, unquote.
- 17:27With Coiled, you really can burst into the cloud with a few clicks and stay focused on solving the important problems.
- 17:33Adding Coiled to your project takes less than one minute.
- 17:37So what are you waiting for?
- 17:38Get started today.
- 17:39Just visit talkpython.fm/Coiled or click the link in your podcast player's show notes.
- 17:45A couple other things.
- 17:46We're going to spend a lot of time.
- 17:48We're going slow, but we'll make it.
- 17:50We'll make it.
- 17:50We've got a lot of stuff to cover.
- 17:52This is the most exciting one for me because it's like, oh, you want recommendations.
- 17:57I'm here for it.
- 17:58Yeah, absolutely.
- 17:58Oh, it's so good.
- 17:59Yeah.
- 18:00If we spend a lot of time here, I think that's also totally fine.
- 18:02So one of the things I much prefer about all my Z shell over, say, bash is I could type git git space and hit the up arrow and it'll only show me stuff that started with git.
- 18:15So if I'm like, all right, what were the git commands I recently did?
- 18:18I hit up arrow, up arrow, and it'll cycle through them.
- 18:19Very common, like SSH.
- 18:21I'm like, I need the third server I was recently on.
- 18:23I don't want to type it.
- 18:24So SSH space, up arrow, up arrow, up arrow, enter, right?
- 18:26And that's really good.
- 18:28Something I've been using for about a month now that's really neat was recommended to us by somebody listening to Python Bytes.
- 18:35We covered it there.
- 18:36Was it McFly?
- 18:36Are you familiar with McFly?
- 18:37I'm not.
- 18:39And now I want to know because I have a very specific wish that ohmyzshell would do.
- 18:46And if this does it, I will insta-download it.
- 18:48Okay.
- 18:48First thing that makes this nice is it integrates in a non-conflicting way with ohmyzshell.
- 18:55So I have McFly and ohmyzshell working together.
- 18:58Okay.
- 18:58So McFly, what it does is if you type normally, if you type control R, it'll go to a reverse search on Bash or zshell or whatever, right?
- 19:07And that's, I find, to be very useless.
- 19:09I've never done that.
- 19:10Yeah.
- 19:10You know what?
- 19:11I'll tell you what I do.
- 19:12I'm like, oh, I tried to type something else and I accidentally hit it.
- 19:15I'm like, darn it.
- 19:15I got to get it out of this thing.
- 19:16I know that you can search for stuff historically and it's useful.
- 19:19But what I already talked about with the up arrow stuff, that's like the way I go through history.
- 19:25And zshell, like, ohmyzshell, really nice.
- 19:27But this, imagine if you could just say, actually, what I want you to do is use artificial intelligence, a context, and fuzzy matching to show me a dropdown, Emacs-like experience for my history that I can then run.
- 19:42So what you can do is you can type a part of a command and hit control R and this replaces your control R with this, like, full screen select mode that'll show you all the stuff, which is really cool.
- 19:53The stuff that matches.
- 19:55And it doesn't have to just be the beginning.
- 19:56It can match in the middle of strings and commands.
- 19:59So you're like, oh, I checked out this branch.
- 20:01I don't remember where it was.
- 20:02Or you just type part of the word of the branch and hit control R and then boom, there's all the commands you ever issued to that branch, basically.
- 20:08Which is fantastic.
- 20:09It uses context.
- 20:10So if you're in a certain directory or you had just typed one command that's usually followed by another command, it'll give you different ordering on your history, not just the order you typed in.
- 20:19But, like, usually go to this directory and type that.
- 20:21So you're in this directory.
- 20:22You ask for help on it.
- 20:23So we're going to suggest that one first.
- 20:25Isn't that cool?
- 20:25See, that's the exact problem that I had was the directory sensitive, like, context.
- 20:32I mean, I guess the big example for me is if I'm building something in, like, Flask, I often use something like Tailwind CSS to do the styling for it.
- 20:40And I need to reload Tailwind from time to time to add the changes.
- 20:45And, you know, on some project, I might put that CSS file in, like, static CSS Tailwind slash Tailwind CSS or something like that.
- 20:55And the other one might be in, like, static Tailwind CSS.
- 20:58And the thing I need to remember is when I do NPX Tailwind CSS output, whatever that file name is, I always mess it up.
- 21:05And I always put it in the wrong folder.
- 21:07So if I knew what folder, like, based on history it was supposed to be in, like, to me, that solves that problem.
- 21:14Yeah.
- 21:14I don't know how well it'll work there, but that's one of the types of things it takes into account.
- 21:20You can also optionally turn on fuzzy matching and some other stuff.
- 21:24So, so far, it's been working pretty well.
- 21:27I'm pretty, pretty psyched with it.
- 21:28So, yeah, this one's fun.
- 21:31I would recommend people check it out.
- 21:32It's been working well for me.
- 21:33I'm going to give this a shot, but I have one that I recently just started using.
- 21:38And I think that this is, this might be something that a lot of folks have had issues with.
- 21:43Have you ever tried to do, like, a grep for something, and then you find the thing that you're looking for, and then you're like, wait, but now I need to go and replace that thing?
- 21:53How do I do that?
- 21:54Yeah.
- 21:54Like, I found a program called Amber, which has two commands to it, AMBR and AMBS.
- 22:03And the way I think I sent you a link in, oh, it's a link in the doc there for you.
- 22:10But AMBR is a replace and AMBS is a search and everything else is basically the same.
- 22:19And it uses that grep-like feature.
- 22:21So you could do AMBR for, sorry, AMBS for search.
- 22:26And then type in what you're searching for, what file directory you want to have it search through.
- 22:32It'll do some nice, you know, stylized matching.
- 22:35And then when you're ready to replace it, just hit up, replace the S with an R, and then add whatever you want to change it to.
- 22:43And it'll just go in and make that change.
- 22:46So like, if you don't have to remember, like, how does sed work or how does awk work?
- 22:50It's like, you know what?
- 22:51Just AMBR, I found what I'm looking for.
- 22:54Or in AMBS, other way around.
- 22:57That's the one thing I will say is I get them confused and mix them up when I'm talking about it.
- 23:01But you don't have to remember two different languages.
- 23:05You just have to remember, replace one character with another and then add whatever I want to do as my substitute.
- 23:12Oh, that's pretty nice.
- 23:14Yeah, I haven't heard of this.
- 23:15This is great.
- 23:15So another one, the one that Brandon talked about that I mentioned was fig.io.
- 23:21This one is new and interesting.
- 23:23So with tools like PyCharm and VS Code, as you type things, you get autocomplete dropdown.
- 23:30What if you could have that as part of all of your shell?
- 23:33That's what this fig thing is.
- 23:35And it has crazy integration, like all sorts of coloration and stuff.
- 23:39And to the point where I have a bunch of custom icons I put for certain folders so I can find them more quickly.
- 23:46When it shows the folders, if I type cd space, like GitHub space, like talk and start to type top Python,
- 23:52it'll show the top Python icon on the folder.
- 23:55It's autocomplete in the terminal.
- 23:56Like it's ridiculous.
- 23:58See, this is where like I wish that there was like copilot for just working through the shell.
- 24:05Like I just start typing something.
- 24:07It's, oh, you meant to do this.
- 24:09And it's like, yes, exactly.
- 24:10And I hit okay.
- 24:11And I'm good.
- 24:12So I was trying it.
- 24:13They updated today.
- 24:14It broke some stuff.
- 24:15I got frustrated.
- 24:16I've only tried it for one day.
- 24:17So it's not a real recommendation.
- 24:18Brandon seems to like it out in the live stream.
- 24:21I thought it was pretty cool.
- 24:22But I can't give a full recommendation.
- 24:24But I can tell you to check that out.
- 24:25All right.
- 24:26So that was a bunch of stuff for just the shell.
- 24:30But I think this is really one of the things that's super important.
- 24:33I'd also like to point out, was it Starship?
- 24:36Is that the one?
- 24:37Yeah.
- 24:38Starship was the reason why I specified use iTerm if you're not using some type of emulator.
- 24:44because Starship is actually pretty cool.
- 24:45Yeah.
- 24:46That's the one Brett Cannon definitely recommends all the time.
- 24:49And I definitely admire his recommendations.
- 24:52So this is another one.
- 24:54If you're not on the Oh My Zoo Shell bandwagon, that sounds like it'd be pretty good.
- 24:58This one's more about the prompt and not the whole shell.
- 25:01So you can like swap it from place to place, which is also pretty cool.
- 25:04All right.
- 25:04Ngrok.
- 25:05Have you done anything with Ngrok?
- 25:07I haven't.
- 25:08Please.
- 25:08Like I was taking a look at it and I was like, this seems amazing.
- 25:12But I also don't know if I have a need for this.
- 25:15Ngrok.
- 25:16Is it .com?
- 25:17Yeah.
- 25:18Ngrok.com.
- 25:18So there's this, there's like three or four scenarios that are just so painful that this
- 25:24hauls so well.
- 25:25So Ngrok is a tool that's free, but also has a paid plan.
- 25:28It's like a hundred dollars a year.
- 25:29They get a hundred of my dollars every year because it's extra useful what you can do with
- 25:34the paid plan for me, but maybe it's not for you.
- 25:36So you can try it for free.
- 25:37So let me give you a scenario.
- 25:39I'm working on rewriting the credit card e-commerce system of Talk By Line training.
- 25:45Yeah.
- 25:45Okay.
- 25:46And the way this new site that I'm at a new service I'm going to integrate with tells me
- 25:51somebody bought something because you don't want to do all the processing on your server
- 25:55because then you have PCI compliance and all that stuff.
- 25:57Like they do the processing and they let me know and I take the person to where I tell them
- 26:01they need to go.
- 26:01The way they let me know is they do a webhook, a call into my server with the results.
- 26:07And then I create the access to the course and then redirect.
- 26:11And then when they go to that place, they have access to it, for example.
- 26:14Right.
- 26:15So I've got to debug this and I've got to debug their server calling into my server.
- 26:20And you're like, well, how do you do that?
- 26:21Right.
- 26:22So one terrible way would be to like open up your router and put your computer straight
- 26:27on the internet.
- 26:28But with Ngrok, you could just say Ngrok, I want to accept HTTP messages to my local machine.
- 26:33It opens an SSH tunnel out.
- 26:36So I don't have to open any firewalls, any ports.
- 26:38It can be as complicated on the way out of town as it wants to be.
- 26:41And then it listens on Ngrok.com for an HTTPS URL that then is SSH tunneled back to my local
- 26:48server.
- 26:48So I put a break point in PyCharm, go to their little app and type in my stuff and say, test
- 26:54this purchase.
- 26:54And then boom, paused in PyCharm, pausing their server request as I'm going through.
- 26:59See, I thought about something like that.
- 27:01And as soon as you pulled up the site, an actual use case for me popped up.
- 27:05And a good example of this was, you know, doing the developer advocate thing.
- 27:10I often have like builds of stuff, servers, you know, Docker composed instances.
- 27:14And I keep all of this on like a Mac mini at my house.
- 27:17And the one time I actually needed it and it kind of, you know, bit me in the backside was
- 27:23I was in LA for KubeCon recently.
- 27:26And I was like, oh no, I want to do this demo.
- 27:29But all of my database stuff is like on my server at home because, you know, we haven't
- 27:36been going anywhere for like a long time.
- 27:38So yeah, you forgot what it meant to leave the home.
- 27:40Exactly.
- 27:40So had I had something like this, I could have just said like, you know, open up access on
- 27:46this port and this port only and say like, hey, now I can actually access data on my home
- 27:51server and keep all of my configs the same instead of doing what I had to do, which was like redownload
- 27:57all the data, open up a cloud instance and then, you know, move everything to the cloud
- 28:03and then get a call from our company saying, hey, you, you, your bill went up like several
- 28:08hundreds of dollars with the gives.
- 28:09And it's like, oh, sorry.
- 28:10I was downloading gigabytes and of data and left it on.
- 28:14Yeah.
- 28:14Yeah.
- 28:15On conference wire on conference wifi nonetheless.
- 28:17Yeah.
- 28:18Yeah.
- 28:19So you don't even have to open up ports.
- 28:21It just like you run this and then it, it, it SSH tunnels in reverse back.
- 28:26Oh, that's really, really awesome.
- 28:28So, and you can just leave it running for days if you want.
- 28:31Another example is when we were debugging the mobile apps for viewing the courses, we just
- 28:37told it the URL was that opened up the phone.
- 28:39It didn't matter if we were on LTE or whatever, hit a button and boom, break point again.
- 28:44Another one that I think this would be really helpful for is, Hey, I'm in this standup meeting.
- 28:49I want to show everybody this new feature we added to the website, but it's only on my local
- 28:53version.
- 28:54We haven't deployed it, but you don't want to show it over Zoom.
- 28:56Cause like the animations look crappy and all that just and grok it, give everybody in
- 29:00the meeting a URL and they can interact with it live with all like the JavaScript fanciness,
- 29:05but it's running on your server, right?
- 29:06It's just the latest one.
- 29:07It's beautiful.
- 29:07I was, I was thinking about that in terms of like, what's the, what's the overall latency
- 29:12of what is happening there?
- 29:14Because in my mind, I'm, I'm like this, this is the better way to, to show people things
- 29:19is like, you can go to this website and you can play around with this.
- 29:21And at the end of the day, like you just close the end grok connection and you know,
- 29:25it's all done.
- 29:26You don't have to control C and like you're off the network again.
- 29:29Yeah.
- 29:29Yeah.
- 29:29I might have to play with this as soon as we're off this call.
- 29:32Cause I have a demo that I have to do soon.
- 29:34So yeah.
- 29:35It's awesome.
- 29:36One of the things you get with the paid plan is you can create a stable URL.
- 29:39Whereas if you have a free one, it always resets the URL.
- 29:42So you got to like reshare it, which might be fine.
- 29:45It might actually be good, but yeah.
- 29:46That's good for me.
- 29:47I needed to reset on its own.
- 29:49Yeah.
- 29:49So instead of trying to set up some crazy server setup at home and trying to do like router
- 29:54NAT routing, which you probably don't want to even expose your, your server to the, or your
- 29:59machine to the internet, just fire up an ingrok session.
- 30:01Good to go.
- 30:02I really think this is a, I've been using this like all week and it just reminds me how much
- 30:06I love it.
- 30:06I'm like, yep.
- 30:07It's just set the sandbox URL to have my ingrok endpoint instead of the production endpoint.
- 30:13And boom, it's good to go.
- 30:14You know, one of the things that I was thinking about as a productivity tip is very much for
- 30:20the beginners out there.
- 30:21Like I have always struggled in the idea of like, Oh, what do I do with all of this server
- 30:29admin stuff that I don't want to have to do?
- 30:32I remember how intimidating that stuff was.
- 30:34Yeah.
- 30:35And, and I think that this is, you know, it's, it's kind of a good segue between, you
- 30:40know, the next topic that you're going to talk about and this existing one.
- 30:44And that's like the idea of like you, it's okay to embrace, you know, not necessarily the
- 30:50serverless ecosystem, but like the power, like the past product as a service ecosystem
- 30:56to where like, Hey, I just want to build my app and I don't want to be a, you know,
- 31:01sysadmin.
- 31:02Can I do that?
- 31:03And now with stuff like Netlify or sell digital ocean has a thing now, like Heroku, Heroku.
- 31:10Yeah.
- 31:11Like taking advantage of some of those things or even doing something like in grok that you
- 31:16can spin up when you're done with it, tear it down.
- 31:19I think that was actually a tip on the last time we were in this call is like, I often
- 31:24build admin consoles and flask, do them locally, have them connect to my servers offsite to do
- 31:30any database changes.
- 31:31And that way I know for a fact, I'm not leaving anything secure open because I'm just doing localhost.
- 31:37It's sending the API calls.
- 31:38And when I'm done and I close the terminal, it disconnects and there's no more access unless
- 31:44someone has my API keys.
- 31:46I'm not putting anything up on a server.
- 31:47I'm not putting anything up in GitHub and I don't have to maintain it and be worried about
- 31:51it.
- 31:51I can just go, Oh, Python app.py enter, and then go to localhost 5000, make my changes and
- 31:58then close it.
- 31:59And then cool.
- 32:00Got access.
- 32:01Don't got access.
- 32:02That easy.
- 32:03This portion of Talk Python To Me is brought to you by Cockroach Labs.
- 32:08Let me ask you a question.
- 32:10What if you could build like big tech?
- 32:12Use the same powerful infrastructure that they spent engineering centuries building.
- 32:17It's actually possible with CockroachDB.
- 32:20The founders has spent the last eight years creating a cloud native distributed SQL database
- 32:26that provides the consistency, ultra resilience, data locality, and massive scale for modern
- 32:32cloud applications.
- 32:33Tech that was only once available to the likes of Google, Facebook, and Netflix.
- 32:37The easiest way to kick the tires on CockroachDB and feel the power of a distributed SQL database
- 32:43is to sign up for their serverless database over at talkpython.fm/cockroachDB.
- 32:49With CockroachDB, you'll get automatic scale without breaking your budget.
- 32:53The storage and transactional volumes automatically scale up and down to meet your application's
- 32:58demands.
- 32:59You get a familiar SQL interface that's compatible with Postgres.
- 33:03Zero downtime.
- 33:04The ability to make schema changes in production with no interruption.
- 33:08And even a generous free tier.
- 33:11You get up to five gigabytes without even entering a credit card.
- 33:15With their credit cardless free tier and Postgres compatibility, you owe it to yourself to check
- 33:20out CockroachDB.
- 33:21Just visit talkpython.fm/cockroachDB or click the link in your podcast player's show
- 33:27notes to get started.
- 33:28Jaylee out there also says, I'm using Ingrok to work with my RPI, or Raspberry Pi.
- 33:36Raspberry Pi, yeah.
- 33:37Yeah, for home security services.
- 33:38Works great.
- 33:38Yeah, that's another thing on devices that aren't necessarily listening.
- 33:42You can get them to sort of push out and then start listening again on the public internet.
- 33:46Yeah, there's a lot of good use of it.
- 33:47Told you, it's Ingrok thing.
- 33:48It's a thing of beauty.
- 33:49All right.
- 33:50So another thing that I think, speaking of people who are beginners and struggle, right,
- 33:55has to do with security, right?
- 33:57You push something out on the internet, you know, who knows what's going to, how quickly
- 34:01will it get owned, right?
- 34:03It's not going to be good.
- 34:03And there's a bunch of recommendations from OWASP that they say, look, these types of things
- 34:10we found to be common vulnerabilities that websites have, like injection, cross-site scripting,
- 34:19other things like if you don't explicitly disallow it, people can take your site and embed them
- 34:25in an iframe and then wrap other stuff around it, right?
- 34:28Like go to your login screen, but actually overlay something that captures the keystrokes
- 34:33or other weird things, right?
- 34:34So how do you keep track of these?
- 34:37How do you prevent them?
- 34:37So this thing called SecurePy is fantastic.
- 34:41And it's got the most amazing PyPI name, just secure, like how they got that name.
- 34:47I have no idea.
- 34:47That's incredible.
- 34:48But it integrates.
- 34:50One of the things I like is it just, it's like a couple of lines of code to integrate
- 34:53into whatever framework you're using.
- 34:55So Quart, Responder, Sanic, Flask, FastAPI, Django, Pyramid, AIO, HTTP, like all of these
- 35:02things.
- 35:03And it's just a couple of lines of code to get it integrated.
- 35:07Usually it's some kind of like middleware type of thing that you wrap it up with.
- 35:12And so in order to use it, all you have to do is create one of these secure headers.
- 35:17And then you set a couple of values like whether or not you want to allow cross-site scripting
- 35:23and things like that.
- 35:24And then what it'll do is it'll automatically put all the security controlling headers into
- 35:30the response coming out of your website.
- 35:32So for example, X content type options, no sniff.
- 35:35Did you know any of that?
- 35:36Want to protect against that X frame thing or iframe?
- 35:39X frame options, same origin.
- 35:41So you can do it with no one else.
- 35:43Things about the referrers and so on.
- 35:46Cross-site origin for JavaScript and whatnot.
- 35:49So it's super easy to integrate with what you're doing.
- 35:53It also has like a tamper-proof cookie type of option for doing that as well.
- 35:58So what do you think of this one?
- 35:59So I know when I first saw this, I was like, oh, what is this obfuscation of like what's
- 36:05happening behind the scenes?
- 36:06And, you know, I literally just talked about this 30 seconds ago.
- 36:10Like, oh, you don't want to have to think about that stuff.
- 36:12Yeah, I'm going to completely walk that back.
- 36:15And like in my own projects like that I'm building, it's like I want to know what's happening.
- 36:21I just don't want to have to maintain it.
- 36:23Yeah.
- 36:24Which is like, yeah.
- 36:25And that's kind of where you actually, your response in like showing how this works and
- 36:30showing like it's just adding the headers on that it needs makes me feel a lot better because
- 36:36I mean, I'm in a DevOps space where we're like, we do a lot of like APM stuff.
- 36:41And I just got off a live stream where someone was like, yeah, it just connects to your platform.
- 36:46And it's like looking and digging and getting like logging of all of this stuff that like
- 36:51is a dependency of the tools that you're using.
- 36:54And it's like, oh, that's kind of, I mean, it's cool.
- 36:57Should it be doing that?
- 36:58I don't know.
- 36:59I mean, it's great because I know that I can drill down and see where the problem is.
- 37:03But at the same time, like I want to know that it's doing that.
- 37:06And that's my concern with tools like this.
- 37:10But I will always say leave security to people who know security and don't try to roll your
- 37:19own.
- 37:19I think Jacob Kaplan Moss said that.
- 37:22Yeah, that's good advice.
- 37:23One of the things in my dream world imagination or idealification of this thing is if a new
- 37:31recommendation comes out, some new header that we should all be adding that we are not paying
- 37:35attention to that we should have added, but we didn't for some sort of configuration change
- 37:40for security, secure pie could be updated to make those changes and you just pick them up
- 37:46and you don't have to know that that was improved.
- 37:48So that makes me wonder, do you know if any of these protections come in at like a platform
- 37:58level?
- 37:58Like if you can, you know, if you're using something like a Netlify, you say, oh, I use Netlify
- 38:03functions to load a thing.
- 38:05I mean, I wonder if Netlify is doing something on their end to also include some of these.
- 38:11And that's, I mean, that's where a lot of my concern comes from is that, you know, if
- 38:16down the road I'm doing a thing and then like my provider is also doing a thing, am I going
- 38:20to run into some goofy error that I have to troubleshoot?
- 38:24I would guess because it's headers, just they would overwrite what your app creates.
- 38:29Yeah.
- 38:29This is more intended for like Flask or Django or something like that where you're kind of
- 38:35the beginning and the end of the security statement.
- 38:38Yeah.
- 38:38I mean, something like that.
- 38:40Absolutely.
- 38:41And like I said, I will always leave security to in the hands of people who get paid to
- 38:47think about security because I know I should be thinking about it.
- 38:51And the most secure thing I can do is say, hey, I need an adult in this situation.
- 38:57Please make this right.
- 38:58I've thought a lot about this and I haven't.
- 38:59Absolutely.
- 39:00I also would like to point out that if you're not doing Python and web apps, I mean, first
- 39:05of all, what's wrong with you?
- 39:06No.
- 39:07But seriously, second, there's tools like this for other frameworks for like ASP.NET
- 39:11and other ones.
- 39:13If you want it, if you seek it out, they have a totally different name.
- 39:16Very unlikely to have a cool name like secure, but there's other tools for other frameworks
- 39:20and platforms as well.
- 39:21You'll have to listen to talk whatever that language is to me, I guess, to hear about
- 39:26that.
- 39:26Yeah.
- 39:27Yeah.
- 39:27Talk Cobalt to me about our APIs.
- 39:30All right.
- 39:31So yeah, to integrate it is like incredibly easy.
- 39:33So that's super cool.
- 39:34All right.
- 39:35So here's a recommendation, which is in some sense in contrast to how much I went on and
- 39:41on about how much I love the shell and the terminal.
- 39:43And that is don't shy away from UIs for your Git.
- 39:46For source control, basically.
- 39:48This is the one that I was like, I'm ready to fight on this one.
- 39:53All right.
- 39:53Let's battle.
- 39:54So here's the thing.
- 39:55I think there's a lot of value to having nice visualizations of what's happening, right?
- 40:02Like, for example, my first thing I pulled up for this was source tree from Atlassian.
- 40:07And when you open up a repo, you see the branch history and who has made what changes and where
- 40:12the tags are all in like one quick shot.
- 40:14And you still have hotkeys.
- 40:16Like if you want to just do a pull latest, you shift command L and that's the same as
- 40:20Git pull.
- 40:20You want to push shift command.
- 40:22I don't remember what the push one is.
- 40:24P maybe.
- 40:24But, you know, there's a couple of hotkeys that are sort of give you a quick access that
- 40:30is like being on the terminal.
- 40:31But you also have really nice and beautiful things.
- 40:35One, for if you're an expert or two, like if you have two branches, you want to merge
- 40:38one, you drag one branch on the other and that merges the changes from one to the other.
- 40:42Right.
- 40:42There's things that help people who are new a lot.
- 40:45So I find this doesn't mean you should never do source control in the terminal or with
- 40:50Git in the terminal, but that also shouldn't mean you should never use UI tools.
- 40:54That's my stance.
- 40:55How do you feel about this?
- 40:56Okay.
- 40:57Same.
- 40:57I can tell you feel the same.
- 40:58With that phrase, with that phrasing, I'm like, fine.
- 41:02But I did.
- 41:05I took the first word on this one.
- 41:06So go from there.
- 41:08So I have many a tweet that has said, I have made said mistake.
- 41:15I need to unmistake it.
- 41:17And how do I do this?
- 41:19And almost like clockwork.
- 41:21I do it wrong.
- 41:22And I wind up.
- 41:24Yeah.
- 41:25I just, I wind up deleting things that weren't supposed to be deleted.
- 41:28And then I'm banging my head against the wall and then figuring out how do I fix this?
- 41:31And the biggest get undo is just delete the whole directory.
- 41:35That is, that is actually.
- 41:37Check it out again and just hope that you can like kind of get it back.
- 41:40Yeah.
- 41:40That's, that's exactly my, my solution in most cases.
- 41:44and, and again, I also want to say, I am not saying that any type of UI is bad.
- 41:51I'm just saying, if you're getting started, learn the basics because you're going to be
- 41:57on a server one day.
- 41:58You're not going to have access to tower or source tree or something else.
- 42:03And you're going to need to know what was that command?
- 42:06Like what would get, get Brent?
- 42:08What, what is cherry picking?
- 42:10Get whatever, whatever.
- 42:11And it's like, you're going to need to know it.
- 42:13And if you have an over reliance and you don't understand what's happening behind the
- 42:18scenes, that's when you're going to be in trouble.
- 42:21So for me, it is very much, you can use the UIs, you can use the tools, know what's happening
- 42:29behind the scenes and know what they are as well.
- 42:33And I love what's this comment.
- 42:35Why make things more difficult?
- 42:37There's so much to memorize in our languages already.
- 42:39Why do we need to memorize the get commands as well?
- 42:41That's the thing.
- 42:42You don't have to memorize all of the commands.
- 42:45You just need to know, get a good understanding of what you do need to know.
- 42:49And on top of that, plus we already talked about use things like OhMyZSH where you can just
- 42:54tap through it and get a list and you can use man and you can learn about all the different
- 42:57commands and what they do.
- 42:58But again, if, if you hit delete on the Git or the GitHub, you know, interface, what is that
- 43:08doing?
- 43:08Is that just deleting your re is that deleting your entire repo?
- 43:11Is that deleting the clone that you have locally?
- 43:14Like what is happening?
- 43:15And what happens when you go to use some other tool and they use the exact same phrasing to
- 43:19do something different?
- 43:21What happens when you go to a new company and your Git workflow changes and you're like, Oh, well, now we don't do branch stuff.
- 43:30We do tagging and things like that.
- 43:32I'm not saying that you can't use the UI.
- 43:36I'm just saying it's good to kind of understand what the UI is doing so that if you ever need to change it or if you ever need to change what UI you're using, you can do so and do it in confidence.
- 43:47And when you're stuck in that one situation that I have personally been in where it's like, crap, I don't have I don't have the button that I press.
- 43:54Like, what do I need to do?
- 43:55Like you can at least have a better chance at making the right decision.
- 44:00Yeah.
- 44:00No, that's fair.
- 44:01I would say to Robert, I think our jail is Robert.
- 44:05Hopefully I got that right.
- 44:06Robert.
- 44:06There's probably five or six Git commands you need to actually know how to do.
- 44:11And then the rest I would go go to the UI because to me, it's like, do I really need to like visualize the branching in some other way?
- 44:19No, just open up source tree and look at it.
- 44:21That's going to be totally fine.
- 44:22But if I need to know how, you know, Git pull, Git commit, Git add, push, Git checkout, like these, these are the various things I need to know, you know, but like a complicated rebase, maybe I'm maybe I'll just go.
- 44:36I'm going to find I'm going to find the server or the UI and I'm going to do it.
- 44:40We've all done that interactive rebase.
- 44:42And we're just like, why am I doing?
- 44:44We get like three of them through and we're like, yeah, sure, whatever.
- 44:48Just accept the rest of them and go.
- 44:50And then you realize that you weren't, you shouldn't have done that.
- 44:53I mean, I'm totally there.
- 44:55Why am I, why am I in VI?
- 44:58Just accept theirs, accept theirs.
- 45:00But I think that that's the thing is like, no, I'm not typing Git commit dash M insert my message.
- 45:08And then all the files that I want to commit.
- 45:10I'm often just doing Git add dot GCam for Git commit add message all.
- 45:16And then whatever my message is.
- 45:18But at least I understand what those commands are doing.
- 45:21So that down the road.
- 45:23And to be fair, I do understand it.
- 45:24Yeah.
- 45:24And to be fair, sometimes the tools like you're also giving access to your repo.
- 45:29Like, I mean, it's cool if you're using like GitHub and everything's public.
- 45:33But like, you're also adding a layer of opening to another company.
- 45:40Yeah.
- 45:40And I would be hesitant to say that there's no company out there that's not going to be vulnerable
- 45:47to some type of attack.
- 45:49And then you got to revoke access to your repos and things like that.
- 45:53Because again, in order for these UIs to work, you're giving it a lot of access to what you're
- 45:59doing.
- 45:59So again, some of them, I think, I think source tree mostly just work.
- 46:04Like you can just drag a folder onto it and it'll start to do its thing.
- 46:07Whereas there's other ones where you're like, oh, off, you know, all the, oh, I'll sign
- 46:12it into GitHub or get lab or something.
- 46:14Yeah.
- 46:15All right.
- 46:15I'm going to, I'm going to let Anthony from the audience have the fun word here.
- 46:18Don't roll over Sourcetree.
- 46:20Yeah.
- 46:20Not at all.
- 46:21Not at all.
- 46:21Like you use the tools.
- 46:23I think tower is great.
- 46:24I think the GitHub UI is great.
- 46:26I've never actually used Sourcetree.
- 46:27I'm sure it's fine.
- 46:28I would say source tree is the one that hides the least.
- 46:31It's there to help you.
- 46:32And there's UI, but like, it's actually pretty complicated in what it does.
- 46:36And I don't mean that necessarily in a bad way.
- 46:37Like it's, it's not hiding everything behind pseudo actions.
- 46:40Yeah.
- 46:41And I'll also throw out there.
- 46:43I am probably not the best, you know, subject test case for this because most of the project
- 46:48that projects that I work on, it's just me or it's me and like one or two other people.
- 46:54So it's easy to follow that tree.
- 46:56If you've got 50 people working on a thing and you need to be able to trace back and forth
- 47:01what's happening.
- 47:02I totally get using a tool to help with that.
- 47:04Yeah.
- 47:05If you find yourself over here in the SKCD world where you start out writing beautiful,
- 47:12beautiful code, like created main loop and timing control, enable config parts.
- 47:16And at the end, you'd find yourself just eight A's, A-F-D-K-F-S-G.
- 47:21My hands are typing worse.
- 47:22Hands.
- 47:23Yeah.
- 47:24You're kind of breaking down there.
- 47:25All right.
- 47:26So I reset this on active.
- 47:29Where did they get access to my git commit messages?
- 47:32Exactly.
- 47:32How did they do that?
- 47:34All right.
- 47:34There's also GitHub desktop, which I reckon is kind of neat.
- 47:38I would say the other area that I just point out really quick is a lot of the tools we have
- 47:42already have built in awesome Git stuff.
- 47:44Like PyCharm has fantastic Git integration.
- 47:47And so does VS Code with like GitLens and stuff.
- 47:49So you might already have a UI for it if you just press the button.
- 47:52You know what I mean?
- 47:53All right.
- 47:54Keeping along with Git, if you've got a Git repo that you've forked, something that's always
- 47:59driven me crazy is like, I've got to go and there's a series of events I got to do on the
- 48:05terminal, like add a remote origin.
- 48:08And then I can earn upstream origin and then I can do some commands to pull the upstream origin and merge it back into my main branch and so on.
- 48:19And so GitHub added a button that just says, have you forked this?
- 48:22Oh, look, there are changes.
- 48:23Press this button to make them the same.
- 48:25I love this fetch upstream and fetch and merge.
- 48:28This is awesome.
- 48:29I really want to give a shout out to like a lot of the features that Git has added recently that like every time I go in there and like I see something, I'm like, oh, this is nice.
- 48:40Yeah, GitHub is coming along.
- 48:42Yeah, there was concern about what would happen to it and Microsoft bought it.
- 48:46I think it's only gotten better.
- 48:47Yeah, I think because, you know, I'm such a professional open source contributor.
- 48:52There was a misspelling in a read me and I wanted to lift, tilt my glasses up my brim and go, well, actually, you swapped the T and the H and without.
- 49:06Yeah.
- 49:07And you're like, and by the way, I am a contributor to Django now.
- 49:10Exactly.
- 49:10And like just the process of doing all of those things can sometimes be more when it's like this is a simple fix.
- 49:18And like in your mind, you're like, now I got to go do this thing.
- 49:22I need to fork the code base.
- 49:23I need to go and do all this stuff.
- 49:24And like I literally did everything just in the browser.
- 49:28And then it was like, hey, do you want to sync this?
- 49:31Or, hey, do you want to create a new, you know, do you want to put this on the branch?
- 49:34Do you want to do a new thing?
- 49:35How do you want the PR to look?
- 49:37Hey, they accepted your PR.
- 49:39Do you want to go ahead and delete this?
- 49:41And it's like all this maintenance stuff that I am bad at doing.
- 49:45I am glad that GitHub will be like, hey, it looks like you merged a PR.
- 49:49I mean, to me, Microsoft just clippified GitHub and made it easier for me to do what I do.
- 49:55Good afternoon, Jay.
- 49:57Are you trying to write a letter or merge a PR?
- 49:59It looks like you're trying to rebase.
- 50:02Would you like some help with that?
- 50:03Exactly.
- 50:04Wait a minute.
- 50:05First, why are you rebasing?
- 50:06All right.
- 50:07So I love this.
- 50:08This is like a single button click.
- 50:10It solves a lot of the problems.
- 50:11Really nice.
- 50:12Because keeping your forks in sync have been a problem.
- 50:14What I would love to do is just say yes and do this every day and don't tell me about it ever again.
- 50:19Just make it happen.
- 50:20Make it as if they're committing a line.
- 50:21It depends on what I'm working on.
- 50:23But there's a lot I would be happy to do that on.
- 50:25Yeah.
- 50:26I think as long as I maybe give me like a deadline.
- 50:30Give me like, hey, we're going to auto merge this in after like five days.
- 50:34You know, at least that way you can get the messages of like, hey, we broke this thing.
- 50:38Don't do it.
- 50:38Don't do it.
- 50:39Yeah, sure.
- 50:39So for me, there's like two reasons I'll fork a repo.
- 50:43One is because I really love it and I want to contribute to or explore.
- 50:46The other is just I really want a personal copy of this thing that I can control just because I depend on this so much.
- 50:53I want a copy of it.
- 50:54And for those, just keep it in sync.
- 50:56You know, I can always go back to the version before.
- 50:58I was wondering, like, how many like were you doing this for like dependency management?
- 51:04But I don't know if I I don't know how much I'm doing that.
- 51:09I'm not really forking someone else's code and then like bundling it in with my projects.
- 51:14But I mean, there I'm never going to say never because that's the one time you need to go and do that.
- 51:20Yeah.
- 51:20Yeah, for sure.
- 51:21All right.
- 51:22Well, so glad that we're I mean, we're only partway into like we're on halfway through now.
- 51:27And we're just barely into the podcast.
- 51:30So it'll be fine.
- 51:31Oh, I mean, some of some of these I am just like, I agree next.
- 51:35Like, yeah, this one's perfect.
- 51:37If you're not using Let's Encrypt and like you're not a company that buys their own certificates and other things like just just use Let's Encrypt.
- 51:46Yeah.
- 51:46And it is so simple.
- 51:49I I would say getting a certificate is kind of a challenge.
- 51:52I remember being on the phone with a certificate company and having to verify the identity.
- 51:58Where's the office and what do you do there?
- 52:00Maybe we'll give you an SSL certificate.
- 52:02It might have been one of those enhanced ones or something that didn't really matter, but they thought it would matter.
- 52:07And it was just such a hassle.
- 52:08And then, oh, my goodness, if you've got to renew that thing and you don't remember the details or the person who originally got it is gone.
- 52:15What what a hassle.
- 52:17Right.
- 52:17And so one of the benefits of Let's Encrypt is not just you get an SSL certificate, TLS certificate.
- 52:22You also get them automatically renewed behind the scenes without you doing anything.
- 52:27That's beautiful.
- 52:28And this is I mean, again, this is a plus one for those platforms as a service.
- 52:32I know like Jamstack and all this other stuff.
- 52:35People are like, I don't want to have time to deal with that.
- 52:37The fact that I can just commit to GitHub or, you know, push my push my repo up to GitHub.
- 52:43And then from there, I know my website's done and I don't have to worry about the sort of like certificate renewals and everything else.
- 52:50I will always go that route, but I do have servers that I run for like, hey, I want to show you what it looks like to run the server.
- 52:57Let's Encrypt is absolutely like the first step in that process.
- 53:01Like, OK, let's make sure this is good to go.
- 53:03And I always imagine this would be kind of complicated until I actually saw the steps.
- 53:07The steps are apt install software properties common apt add apt repository universe apt update and then just apt install certbot Python 3 certbot Nginx.
- 53:20And then just run certbot Nginx.
- 53:21That's it.
- 53:22That's then say yes to the prompts.
- 53:25You know what I mean?
- 53:25That's it.
- 53:26Yeah.
- 53:27It's really, really not that intimidating.
- 53:29So people should absolutely be using it.
- 53:31And the audience, RJL, Robert says, hey, don't forget about FlaskCon in a couple of weeks.
- 53:34Michael will be speaking.
- 53:35I will indeed.
- 53:36That'll be super fun.
- 53:37And he agrees with us.
- 53:39I'm also speaking at FlaskCon.
- 53:41You're speaking at FlaskCon?
- 53:42I had no idea.
- 53:43Awesome.
- 53:43We didn't even get a chance to connect.
- 53:44What is your talk on?
- 53:45My talk is on utilizing the Google Maps auto complete API to do location based searching with Elasticsearch.
- 53:55That's awesome.
- 53:56And I'm demoing it in my college board clone.
- 54:00So anybody that's, you know, in high school getting ready to go to college and wants to know how much student loan debt you're going to go into.
- 54:05Yeah.
- 54:06Check out my talk.
- 54:07There you go.
- 54:08Awesome.
- 54:08No, congratulations on being there.
- 54:09You could run in Grok and let the audience interact with it.
- 54:13That's why I said I was going to test this as soon as we're done here.
- 54:15Nice.
- 54:17Yeah.
- 54:17I'm doing Flask plus HTMX stuff.
- 54:19I'm a big fan of that.
- 54:20And it's not even on my list of my suggestions.
- 54:22All right.
- 54:22Here's another one I find really challenging is testing web maps.
- 54:27And yes, you should write very focused tests like, oh, here's the e-commerce section.
- 54:31And this is what the price is when I set a discount code and I'm not logged in and I tried to purchase it.
- 54:38But sometimes you want to know, will the thing just catch on fire and 500 or will it actually work if I put it, if I were to push this to production?
- 54:47So this recommendation is that if you have a sitemap and most sites do, one of your tests can be just request all the pages and see if they 500 or 404 or if they return something that looks like a response like 200, 201, 302, something like that.
- 55:02I'm trying to remember what it was called.
- 55:04I think it was like pytest Request or something like that that does something similar.
- 55:08But I love the idea of using sitemaps.
- 55:11I'm going to do a shameless plug.
- 55:14One of the things that we started doing with our search platform is adding a crawler that you can tell it to just go and, you know, brute force all of the links on your site and make sure they're good.
- 55:25But you're going to miss something like you will miss something that way.
- 55:29But you can also just add a sitemap.
- 55:31So sitemaps are a great tool.
- 55:33And it's one of those things that like a lot of like I don't think Flask does it by default.
- 55:38Django doesn't do it by default.
- 55:39But there's usually a very simple way to add a sitemap to those applications.
- 55:46And I think if anything, this is just another reason to implement sitemaps.
- 55:52Also, search engines do like sitemaps.
- 55:55So if you want to get another bump in the SEO ranking, this is the way to do it.
- 55:59Yeah, absolutely.
- 56:00Super easy.
- 56:01It's not a lot of work for the relative benefit you get.
- 56:04John out in the audience says, Ingrok sounds similar to Cloudflare tunnels, which are also free.
- 56:09That's awesome.
- 56:09I have no idea what Cloudflare tunnels are, but it's a good recommendation.
- 56:13People can check that out.
- 56:14So thanks, John.
- 56:14I'm going to add that to the list.
- 56:15Right on.
- 56:16All right.
- 56:17Here's actually the code I put up there.
- 56:18Like it literally is 15 lines of code or something to do the sitemap test, which is pretty straightforward.
- 56:25Another one, you're talking about the SEO aspect.
- 56:29Google's been paying attention to how fast your site responds and not just what is the server response, but how long does it take to get all the JavaScript and parse it and run it?
- 56:39How long does it take to read the HTML and then get the images and resize them and all kinds of stuff?
- 56:45So there's a place called PageSpeed Insights by Google, which you can just go put any web page, your root page or some sub page in there.
- 56:55And it'll give you not just what they think your speed is, but what their recommendations are.
- 57:00Like your image is too large here on wimpy processors like phones.
- 57:06It's going to slow down the page load.
- 57:08So you should resize.
- 57:10Like you're saying 300 in your CSS, but the image is a thousand.
- 57:13Just make it 300.
- 57:15I'm right in the orange on my site.
- 57:17So I got, I got, I'm at the high.
- 57:19I'm like right underneath green.
- 57:20So I got some changes I can do.
- 57:23But I, one of the things that I thought about this and I love the idea and I absolutely agree with it 100%.
- 57:30One, if you're doing static, static tends to be faster.
- 57:33I'm just going to throw that in there.
- 57:35But, cause I love static sites.
- 57:37But it's not as easy of a fix as you would think.
- 57:40There's still a lot of problems you can have with a static page.
- 57:43Yeah.
- 57:44And, and actually one of the things that I wanted to add onto that, speaking of like scores and ranking is the idea of accessibility scores and ranking as well.
- 57:53We've all, we don't want to be dominoes.
- 57:56We don't, we don't want to be the company that gets sued for not having, you know, good accessibility.
- 58:00Luckily, I don't think anyone here is, you know, building stuff like that.
- 58:04And if you are high, welcome.
- 58:05I'd love to chat sometime.
- 58:06But I do think that it's important to be good stewards in the community.
- 58:10That's, that's something that I think is, is really great.
- 58:14And if your site isn't accessible, like you're, you're cutting off a lot of people.
- 58:18And, you know, a lot of people are like, well, you know, it's hard to do this.
- 58:21And, you know, what, what else can I do?
- 58:23There are a lot of great tools out there.
- 58:25The one that I'm going to promote is wave, which is the wave web accessibility tool.
- 58:32And it gives you a bunch of different things.
- 58:34It even does its own evaluation and you can use it to say how accessible is my website?
- 58:41Yeah, that's cool.
- 58:42Definitely.
- 58:43People should check that out.
- 58:44This is important.
- 58:45I think it might even be legally required.
- 58:47And then also page speed is starting to be used for actual ranking as well.
- 58:51So we'll should consider that.
- 58:53All right.
- 58:54Here's an interesting one, which I don't know how you feel about this, but I find if I set
- 58:59up a server and the server's job is to run a website or an API and I log into it, there
- 59:05is about a half of 1% chance that I want to change details about the service of the system
- 59:11Python.
- 59:12There's a 99.5% chance that anything I need to change is with packages or details or commands
- 59:19involving the service I set up.
- 59:21And I found I was always, I would log in there.
- 59:23I'm like, okay, well, where's the virtual environment?
- 59:25I got to activate this thing.
- 59:26And now I can issue the pip install this new thing or, or do some other command that I needed
- 59:32to do on the server.
- 59:33And then it occurred to me, like, why do I do this every time?
- 59:35Why don't I just set my ZS HRC to say the last thing is to source activate the virtual
- 59:42environment.
- 59:42So now when my servers, when I log in, at least the ones that are web servers, it automatically
- 59:46activates the virtual environment that runs the web app.
- 59:49So are you familiar with DIRENV?
- 59:51D-I-R-E-N-V?
- 59:52Yes.
- 59:53So to me, my solution here is DIRENV.
- 59:56For those that don't know.
- 59:58Tell people what this is.
- 59:58Yeah.
- 59:59Yeah.
- 59:59So DIRENV is this way to load an environment in based on the path that you're in.
- 1:00:07And in most cases, this works for just environment variables, which I mean, I love.
- 1:00:13It means I don't have to put stuff in open source.
- 1:00:16I don't have to risk putting a password in there.
- 1:00:18I can just point to an environment variable, load that stuff in, and then know that if
- 1:00:22I'm actually in that folder, then the variables are loaded properly.
- 1:00:26Right.
- 1:00:27Exactly.
- 1:00:27If you're in the folder that contains the somewhere above it contains the virtual environment,
- 1:00:32it's going to use that.
- 1:00:33Exactly.
- 1:00:34And the thing that's really cool about this is there's another tool called ASDF that uses
- 1:00:39something similar to PyEnvironment or PyE and V that you can put into your environment
- 1:00:45variables to say layout Python and the Python version.
- 1:00:50And it creates a virtual environment the same way that when you load into that directory, you're
- 1:00:56loading into a virtual environment that you can control the actual version of Python that
- 1:01:01you want to run.
- 1:01:02And that works for both pip and the Python environment.
- 1:01:05So when it's like calling PyE and V every time you you change directories into a certain
- 1:01:12path.
- 1:01:13And to me, like this is the new way of doing it.
- 1:01:16When Python 310 came out, all I had to do when I wanted to test for 310 was change my
- 1:01:22ENV RC to say layout Python 3.9.1 to 3.10.0.
- 1:01:28And from there, that was it.
- 1:01:31I CD'd out of it, CD'd back in, it created a new environment.
- 1:01:34I reloaded my requirements and I was off to the races.
- 1:01:36That's pretty awesome.
- 1:01:37Yeah.
- 1:01:37Yeah.
- 1:01:38Very cool.
- 1:01:38Yeah.
- 1:01:39I think that's good as well.
- 1:01:40For I would definitely lean heavy on that for the dev side for the servers.
- 1:01:45I'm like, I might not log into the location I want to be in.
- 1:01:48I just, it depends on if I have a bunch of services running there, just one.
- 1:01:51But yeah, those are good recommendations for sure.
- 1:01:53Especially like I said, on the dev side where you're doing lots of different projects.
- 1:01:56All right.
- 1:01:58Last one is dependencies and there's all sorts of dependency stuff going on here.
- 1:02:03So there's levels.
- 1:02:04So you can pip install some package.
- 1:02:06Like I could pip install Pyramid that would install Pyramid.
- 1:02:08It'll get me the latest one.
- 1:02:10Unless I already have it.
- 1:02:11Then it says you already have it.
- 1:02:12So you're good.
- 1:02:13Even if there's a newer version.
- 1:02:14It's cool.
- 1:02:15So you just do --upgrade and you get a new one, right?
- 1:02:19But Pyramid might install Chameleon and my Chameleon might be out of date.
- 1:02:22But this pip install Pyramid --upgrade doesn't upgrade my Chameleon, right?
- 1:02:28It doesn't upgrade the transitive closure of all the dependencies, which is a hassle.
- 1:02:33And then, you know, you got to remember to run these commands.
- 1:02:36What if there's like a security vulnerability that I just got a notification a couple of days
- 1:02:40ago.
- 1:02:41There was some security vulnerability and not something I'm using, but something that I'm
- 1:02:44using is using, right?
- 1:02:46Very indirect.
- 1:02:47So there's all these challenges, I think, around dependencies.
- 1:02:51You talked about GitHub having cool features.
- 1:02:54If you pin a version in your pyproject.toml or your requirements.txt and there's a security
- 1:03:01problem, right?
- 1:03:02If I say I'm using flask 0.1 and there's a security vulnerability that was fixed in flask
- 1:03:08to get up will automatically create a PR for me and say, there's a problem except this PR
- 1:03:12to fix it.
- 1:03:13Right?
- 1:03:13That's pretty cool.
- 1:03:14Right?
- 1:03:14So one of the questions I had with this was, does pip-tools solve this second problem
- 1:03:20of like doing upgrade, but then it only upgrades like the top level and none of the stuff below.
- 1:03:25Yes.
- 1:03:26And that is my current solution is I'm using pip-tools.
- 1:03:31And I think the command is actually pip compile in there.
- 1:03:35I don't remember.
- 1:03:35I've aliased it away.
- 1:03:36So it's like gone from my mind.
- 1:03:38Like I just type pip, pip.
- 1:03:40I think it is pip compile update all or something like that.
- 1:03:42It's pip compile --upgrade.
- 1:03:46I do the same thing except for I never thought to just alias the whole pip compile upgrade
- 1:03:53plus pip sync.
- 1:03:54Like that makes sense.
- 1:03:55Exactly.
- 1:03:55Yeah.
- 1:03:56I've aliased these things away.
- 1:03:57They're all down to like, like pip install -r requirements dash dev .txt is just
- 1:04:02PIR, PIRD.
- 1:04:03If you want to without the dev, he's PIR.
- 1:04:05Like I'm all about the aliases.
- 1:04:07My, my Neo Vim, because I could never remember N V I M.
- 1:04:10I just do V V I.
- 1:04:11Yeah.
- 1:04:12Nice.
- 1:04:12Exactly.
- 1:04:13So, the pip-tools is my current recommendation because what you do is you create a requirements
- 1:04:19dot I N and you put the things you would have pip installed yourself, like pip install flask,
- 1:04:24pip install SQLAlchemy, not their dependencies, just the things you want.
- 1:04:29And then when you run the command that you talked about, it'll create the requirements
- 1:04:32dot txt with the closure of all of the dependencies and actually on dent them showing why they're
- 1:04:39in there.
- 1:04:39Like blast depends on it's dangerous.
- 1:04:41So like it would put that in there and it would be clear.
- 1:04:44This is a dependency of flask and it pins the versions of all of them.
- 1:04:47And then at first say it drops the it's dangerous requirement and you rerun this again, like
- 1:04:53that'll come out of your txt file entirely, which is also nice.
- 1:04:56So there's, I think this is fantastic.
- 1:04:58You, it sounds like you're using it as well.
- 1:04:59Yeah.
- 1:05:00That's, I mean, that's part of my default setup of, of any new project is install, you know,
- 1:05:06pip-tools.
- 1:05:07And then from there build my requirements dot I N and then immediately compile and upgrade.
- 1:05:12Yeah.
- 1:05:12Yeah.
- 1:05:13Awesome.
- 1:05:13Also package managers for the OS, like homebrew.
- 1:05:16I use homebrew on my macOS.
- 1:05:18I know there's other things to use, but that works well.
- 1:05:20Windows has chocolatey, which I think a lot of people on windows are not using a package
- 1:05:24manager.
- 1:05:25And I think chocolatey is awesome.
- 1:05:26You can install Python that way.
- 1:05:27Obviously there's apt and other things on Linux, right?
- 1:05:31Yeah.
- 1:05:31I really like a homebrew.
- 1:05:33I know they were, I think they're now in one there.
- 1:05:37Yeah, they are.
- 1:05:38One ready.
- 1:05:38Okay.
- 1:05:39Good.
- 1:05:39On this computer we're talking on, I got this one in December, 2020.
- 1:05:43It has the Intel homebrew on it, but my new MacBook.
- 1:05:46Pro, I put just the straight up, in the Apple Silicon version on there and it's been
- 1:05:52working fine.
- 1:05:52I haven't had any problems.
- 1:05:53Okay.
- 1:05:54Yeah.
- 1:05:54Homebrew to me, it just makes sense.
- 1:05:57the one thing that I will say is ASDF.
- 1:06:00if you're using that, you're, you don't want to run, you know, Pippin or brew install
- 1:06:07Python because then you have different, they're like your stems and stuff will get all weird.
- 1:06:12so install Python through ASDF.
- 1:06:16If you're using that, but other than that, like, yeah, I think homebrew is, is great.
- 1:06:21and I guess the other bonus to ASDF is you can use that not just for Python, but if
- 1:06:26you're doing like Ruby and you have like RVM or, you know, you need to manage node versions,
- 1:06:30which I hate managing node versions, but you have to do it, I guess.
- 1:06:34that's like, you can do all of those things in that environment control area, you know,
- 1:06:41in VRC.
- 1:06:42and again, with homebrew, it's like, it works, but when it doesn't work, you're just
- 1:06:47like, okay, great.
- 1:06:48Now I need to uninstall this.
- 1:06:49I need to run brew doctor.
- 1:06:51Like, I'm going to format the computer.
- 1:06:53I'm going to, yeah, exactly.
- 1:06:55You just need to just, just reformat your hard drive.
- 1:06:58It's destroyed.
- 1:06:58It's destroyed.
- 1:06:59It won't upgrade Python anymore.
- 1:07:01We're done.
- 1:07:01I've had so many times where just updating Python is like.
- 1:07:04Just giving me time to be like, well, I'm done with this.
- 1:07:07Yeah.
- 1:07:08Yeah.
- 1:07:09All right.
- 1:07:09A couple other things out in the audience.
- 1:07:12Anthony suggests pip depth tree, which will show you kind of that.
- 1:07:16Here's the top level things you installed and what they depend upon, which is great.
- 1:07:19That's really a good one.
- 1:07:20Product fund says pip audit is a cool tool.
- 1:07:23If you want something on security, it's a project by Dustin Ingram, who is associated with
- 1:07:28pypi.org and pypa and stuff, which is awesome.
- 1:07:30One more thing I'll throw out there.
- 1:07:32Pretty new is pip dash or pypi dash changes.
- 1:07:35So this just came out and you type pypi dash changes and you point at the Python, the Python
- 1:07:41executable in a virtual environment.
- 1:07:42And it'll list all the things you've installed, what version they are, how old they were.
- 1:07:47Like, here's a thing I've installed.
- 1:07:48It's 10 years old.
- 1:07:49Maybe I should think of something newer, but also whether or not there's an update.
- 1:07:52So this is a fun one as well.
- 1:07:54That's nice.
- 1:07:55Again, I'm really impressed with a lot of these tools and companies.
- 1:08:00Like, I mean, the fact that Python now has some folks that are dedicated to working on
- 1:08:06these systems and it's what they do.
- 1:08:08I mean, talking about like Lucas and having a developer in residence.
- 1:08:13I think this is the benefit that we see of this is you get these little touches that just
- 1:08:17make each version of Python, not just, you know, more performant, but also nicer to work
- 1:08:23with and nicer to play around with.
- 1:08:25Yeah.
- 1:08:25It gives you joy, not frustration as you work with some of these things for sure.
- 1:08:29All right.
- 1:08:30So those were the 10.
- 1:08:32How about I just throw a real quick thing out there for people as a delightful little
- 1:08:36takeaway.
- 1:08:37Nerd fonts.
- 1:08:38Have you played nerd fonts?
- 1:08:39I haven't.
- 1:08:39What is this?
- 1:08:40So if you want fonts that are good for programming that support font ligatures and for example,
- 1:08:46the ohmyposh I talked about, they have all sorts of weird like continuation between like
- 1:08:51transitional characters and stuff.
- 1:08:53All those things test against nerd fonts to make sure every nerd font will work well in
- 1:08:58that shell fancy extension.
- 1:09:00So if you go over here to the downloads, you can see there's like a huge scroll bar, but of
- 1:09:06all these different fonts that support font ligatures, nerd fonts, et cetera, et cetera,
- 1:09:11that you get here.
- 1:09:12So, and they all come with a ton of variations.
- 1:09:14So if you want to have a bunch of cool programming fonts, you've got like Neto nerd font looks
- 1:09:20pretty good.
- 1:09:20Pro font nerd font, not a nerd action.
- 1:09:23That is, that is if you support.
- 1:09:26That's if you like ligatures, you can turn them off.
- 1:09:29I mean, you can turn them off, right?
- 1:09:30You can turn them off.
- 1:09:31I was going to say, I don't want to start that, that war of whether or not ligatures or anything.
- 1:09:35I love ligatures, but I don't want to, I don't want to battle that out right now.
- 1:09:38But I went and installed every one of these nerd fonts on my new MacBook.
- 1:09:43It took half an hour longer for that little font book app was like locked up.
- 1:09:47I thought it destroyed my computer, but nope, it just had 2,600 font families to install
- 1:09:53or something.
- 1:09:53I'm glad you don't use Photoshop.
- 1:09:56It probably doesn't like you either.
- 1:09:58Probably not.
- 1:09:59What are all these fonts?
- 1:10:01Exactly.
- 1:10:01No, but if you're looking for good programming fonts, I don't have one over the other to
- 1:10:07recommend, but there are many, many of them here.
- 1:10:09All right.
- 1:10:10And then I see Antonio out there in the audience who is saying, we got to wrap this up with
- 1:10:14a notable PyPI package.
- 1:10:17I mean, I had, I had two that weren't included in the list and that was black and eyesort.
- 1:10:24I'm pretty sure the folks listening know like black is a great formatter for your code.
- 1:10:31If you're like me and pepe is a thing that you want to, you want to understand and believe
- 1:10:38in, but from time to time you're like, but what about this weird scenario?
- 1:10:42I don't think about that anymore.
- 1:10:43I just run black and then I'm done with it.
- 1:10:46You know what I think is the real value that black adds is not necessarily that it does
- 1:10:49the formatting.
- 1:10:50Like I could open a PyCharm, go to the top level of a project, right click and save format
- 1:10:54everything in this directory.
- 1:10:56And it would format it the way I told PyCharm.
- 1:10:58I like it, but it solves the debate.
- 1:11:00It's like, you don't have to debate.
- 1:11:02Is there a space before the comma or after the comma?
- 1:11:05Does it go on one line or does it go on three lines?
- 1:11:08Like black puts it on the lines.
- 1:11:09We've agreed that we're just going to take this and nobody's going to be a hundred percent
- 1:11:13happy, but you're going to be 84% happy.
- 1:11:15And we're just going to stop fighting about the formatting.
- 1:11:17And I sort is the exact same, except for it does this with sorting your imports.
- 1:11:23And I mean, I will say sometimes when I'm writing code, it's messy.
- 1:11:29Thank goodness.
- 1:11:30I have black and I sort to make it not so messy whenever I have to give a talk.
- 1:11:34And then someone goes, is there a repo for this code?
- 1:11:37And I'm like, give me 30 seconds.
- 1:11:38Black.
- 1:11:39I sort.
- 1:11:40Okay.
- 1:11:40Now there is now, now I can, now I'm willing to share this.
- 1:11:45That's right.
- 1:11:46It's not embarrassing anymore.
- 1:11:47Also, John out in the audience says, I was just going to say black and I sort get out of
- 1:11:52my head.
- 1:11:52Jay.
- 1:11:53Oh man.
- 1:11:54Well, other than that, I mean, I, you've talked about rumps so many times.
- 1:12:00I mean, we can, we can, we can play the classics, you know, all the time here.
- 1:12:05I personally, I try to, to not do a lot of installation of stuff, but, if I go to
- 1:12:14some of my projects really quick and just open up, you know, actually, I think I do know one
- 1:12:20and let's see.
- 1:12:22I, I'm trying to remember what it's called.
- 1:12:24yeah, I have an app I built with rumps, Python three and pie to app.
- 1:12:31That's running up in my Mac terminal bar.
- 1:12:33And if I'm really unlucky, it'll get hidden in the notch of my new Mac book.
- 1:12:38Oh no.
- 1:12:39I haven't played with rumps recently.
- 1:12:41I need to do some more with rumps.
- 1:12:43rumps is good.
- 1:12:44Honestly, some of these little dependencies that I add to some of my projects that, I mean,
- 1:12:51I could probably do my own, but also I don't want to like sluggify.
- 1:12:55you know, if you've ever, again, a lot of this is just getting rid of how do I do
- 1:13:01this?
- 1:13:01one of my projects that I just started working on is this idea of we've all done, you
- 1:13:08know, markdown and then you convert it to like a markdown table or, you know, you convert
- 1:13:13it to like HTML and you got to do some stuff with it and then you got to process that HTML.
- 1:13:17But what about doing like markdown to JSON, like where I have a markdown table and I want
- 1:13:22to convert that table into a CSV file or a JSON file.
- 1:13:25So I'm like playing around with this.
- 1:13:27And in my head, I am, I'm like physically pulling my hair out, but I'm also like banging my head
- 1:13:32against the wall going like, Oh, but how do, what's the regular expression for this thing?
- 1:13:36And that's where stuff like validators is absolutely amazing.
- 1:13:40Cause you can just go, is this an email?
- 1:13:42If it is okay, good.
- 1:13:43Run this, you know, is this a properly formed URL?
- 1:13:45It is good.
- 1:13:46Okay.
- 1:13:47Run this.
- 1:13:47Like I don't need to, to rebuild those things.
- 1:13:50Yeah.
- 1:13:51Awesome.
- 1:13:51Yeah.
- 1:13:52A bunch of good recommendations.
- 1:13:53So thanks for being here, Jay.
- 1:13:54This was a lot of fun.
- 1:13:55I, I love just going through a bunch of these little tools because I learned a bunch from
- 1:13:59you and it looks like people, the audience have found a bunch of interesting ones that we
- 1:14:03covered as well.
- 1:14:03I love it.
- 1:14:04I mean, as always, now that I'm a front runner for the golden jacket club of, you know, talk
- 1:14:10Python, I absolutely love coming on and, you know, just now that you got the chat
- 1:14:15here, they're, they're talking about products.
- 1:14:17I'm like, what's that?
- 1:14:18Let me, let me add that to my list.
- 1:14:19And, you know, I get to learn as much as you know, everyone else does.
- 1:14:23Yeah.
- 1:14:24That's awesome.
- 1:14:24Yeah.
- 1:14:24I just want to give a shout out to the YouTube live stream.
- 1:14:27It's been really fun to have so many of you all come and join the streams and give us
- 1:14:31feedback and thoughts during the show.
- 1:14:32I think it lets the audience have a little bit of representation.
- 1:14:35If you want to watch that one, just go to the episode page.
- 1:14:37You can click it right at the top.
- 1:14:39It'll be there.
- 1:14:40Or subscribe to the newsletter.
- 1:14:41there's a link to the YouTube videos.
- 1:14:44Every, every newsletter drop.
- 1:14:46They are in there.
- 1:14:47Absolutely.
- 1:14:47Every time.
- 1:14:48That's awesome.
- 1:14:48All right.
- 1:14:49Robert says, thanks again, J.
- 1:14:51Michael.
- 1:14:51This has been very informative.
- 1:14:52Thank you so much for being here, Robert.
- 1:14:54J.
- 1:14:55Final word.
- 1:14:55Call to action.
- 1:14:56People are psyched about this stuff.
- 1:14:57What will you tell them?
- 1:14:58honestly, just play around with it.
- 1:15:02Have fun.
- 1:15:02be a good steward of the community and absolutely take, take someone that was like me.
- 1:15:10Seven years ago.
- 1:15:11That was like, this Python thing seems hard, but I really like flask.
- 1:15:15So I'm going to keep trying it and just continue to, to pour time and energy into them.
- 1:15:20Trust me.
- 1:15:20It'll, it'll pay off for them in the future.
- 1:15:22And you know, they'll, they'll be sure to thank you with all the drinks that they can.
- 1:15:26And, yeah, if you ever want to get in touch with me, you can do so.
- 1:15:29I'm on Twitter, KJAYMiller on Twitter, LinkedIn.
- 1:15:33That's kind of it.
- 1:15:34yeah, I'll definitely put that in the show notes as well.
- 1:15:36Yeah.
- 1:15:37And, yeah, again, if you're interested in my productivity takes in wild, hilarious
- 1:15:42opinions on things, but you know, you want to get outside of the Python space, check
- 1:15:48out conduit, on relay FM relay.fm slash conduit, where, we put out an episode
- 1:15:54every other week, this next one actually talks about having to do your job when you're
- 1:15:59in physical pain, which is something that, you know, you don't think about until you have
- 1:16:04that migraine for like the third day in a row.
- 1:16:06And you're like, all right, how do I do this?
- 1:16:07My most recent example was when I fell in a river and landed on some mossy rocks and broke
- 1:16:14my finger in three or four places and couldn't, and had a cast that went to the tips of my fingers
- 1:16:18could only work with one hand for two months.
- 1:16:20Let me tell you, you got to find some productivity tips to keep things going.
- 1:16:24Absolutely.
- 1:16:25That was a while, a couple of years ago, but still, yeah, it's, it's all of a sudden
- 1:16:29it usually realized, oh boy, I got to keep going, but this is not so easy.
- 1:16:32Oh man.
- 1:16:33Yeah.
- 1:16:34So, people should check out conduit.
- 1:16:35Yeah.
- 1:16:36Thanks for being here.
- 1:16:37It's been great.
- 1:16:37Absolutely.
- 1:16:38Yep.
- 1:16:38Bye.
- 1:16:39This has been another episode of talk Python to me.
- 1:16:42Thank you to our sponsors.
- 1:16:44Be sure to check out what they're offering.
- 1:16:45It really helps support the show.
- 1:16:48Coiled supercharges the tools you already use for scale and performance.
- 1:16:52So you can use Python for ambitious problems.
- 1:16:55Add coiled to your project in less than one minute.
- 1:16:58Get started today at talkpython.fm/coiled.
- 1:17:02Experience the joy of distributed data in zero downtime with cockroach DB.
- 1:17:07Get started with no credit card and Postgres compatibility at talkpython.fm/cockroach
- 1:17:13DB.
- 1:17:14Want to level up your Python?
- 1:17:15We have one of the largest catalogs of Python video courses over at talk Python.
- 1:17:20Our content ranges from true beginners to deeply advanced topics like memory and async.
- 1:17:25And best of all, there's not a subscription in sight.
- 1:17:27Check it out for yourself at training.talkpython.fm.
- 1:17:30Be sure to subscribe to the show, open your favorite podcast app and search for Python.
- 1:17:35We should be right at the top.
- 1:17:37You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 1:17:41and the direct RSS feed at /rss on talkpython.fm.
- 1:17:46We're live streaming most of our recordings these days.
- 1:17:49If you want to be part of the show and have your comments featured on the air,
- 1:17:52be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
- 1:17:57This is your host, Michael Kennedy.
- 1:17:59Thanks so much for listening.
- 1:18:00I really appreciate it.
- 1:18:01Now get out there and write some Python code.
- 1:18:06I'll see you next time.
- 1:18:24Thank you.