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


Transcript #370: Your Very Own Heroku

Return to episode page view on github
Recorded on Tuesday, Feb 6, 2024.

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

00:06 This is episode 370, recorded February 6th, 2024. I'm Michael Kennedy.

00:12 And I'm Brian Okken.

00:13 And this episode is brought to you by us.

00:16 Check out our courses.

00:18 The ones over at Talk Python Training, we have 250 hours of them there, including some from Brian.

00:22 But Brian also has the complete pytest course, which just got finished up.

00:27 So check that out as well. Links in the show notes, of course.

00:30 And connect with us on Mastodon or all over there, the show, Brian and me.

00:36 And now with that, Brian, how are you doing?

00:38 I'm doing good. It's funny, the date, one of the things that I've noticed lately, I've actually had to write a couple checks recently.

00:46 And the hard part is not the day, because my watch tells me what day it is, or the day, you know, the day of the month.

00:54 And I usually remember the month, but I'm still having trouble with 2024, man.

00:59 So the year is a problem. It's definitely a problem.

01:02 Yeah. Anyway.

01:03 When I got to write stuff these days, it's like I break out the claw.

01:07 I used to write so good when I was in grad school.

01:10 It was like beautiful writing, right?

01:13 Not cursive, but just really fine print.

01:16 And it was excellent to read.

01:18 Now you'd be like, did you even go to school?

01:20 What is wrong with you?

01:22 Like, no, I can't write. I'm sorry. The claw is not working today.

01:25 That's funny. I write all the time.

01:27 And I was writing, I found some old ID cards from like high school and junior high.

01:33 And I showed them to my daughter and she's like, how is your hand, like your signature is the same now as it was in like eighth grade.

01:42 Incredible.

01:43 I don't know. I just nailed it, man.

01:44 So anyway, or I haven't gotten any better since eighth grade.

01:48 Right off the bat. That's awesome.

01:50 Yeah.

01:50 What topics are connecting with you today?

01:53 Well, a couple of things.

01:55 I've been converting a lot of projects to Python 3.12.

01:59 So, and I know it's been out for a while since December, I think.

02:04 Is it December?

02:05 But a little bit before then.

02:06 I can't remember.

02:07 Yeah, like November or something like that.

02:09 Okay.

02:10 So, but I wanted to do like a summary.

02:13 So I've been thinking about like, should I upgrade projects?

02:18 So some of my projects are still in 3.11, which is fine, but hopefully I'm kind of like halfway between 3.11 and 3.12.

02:25 So there's an article called, and we do this every couple of years, I guess, a summary of major changes between Python versions.

02:32 It's like reasons, you know, look back as to why you might want to update.

02:35 And this is kind of a fun, fun walk through.

02:39 So hopefully you're not still on 3.7 because 3.7 and earlier are all end of life.

02:45 You're living in the past if you're on 3.7.

02:47 Yeah, but some of those things that, some of the things that came in, it's kind of a nice thing looking.

02:52 We've had f strings since 3.6, so definitely use f strings everywhere.

02:57 And then underscores in numeric literals.

03:01 And you know what?

03:02 It's been around since 3.6, but I've just started using this.

03:06 I know it's been around for a while, but whenever I need to do a constant or something like that, I'm like, oh, yeah, we can put underscores in there.

03:15 It's nice.

03:16 Yeah, I like that one a lot.

03:17 Actually, I've been doing that a lot too.

03:18 It really makes a difference.

03:20 Is it 10,000 or 100,000 or is it a million or 100,000?

03:23 Yeah, it's really nice.

03:25 Anyway, a couple and data classes also been around since 3.7.

03:29 Anyway, those ancient history now, let's jump ahead.

03:33 I'm just going to highlight a few of these for people.

03:36 3.8, of course, we had the walrus operator in 3.8 and self-documenting f strings.

03:43 So this is something that I've been using all the time now.

03:46 And for some reason, I thought it was later, but putting equal sign in a f string variable so that it prints out like variable name equals value.

03:55 Super handy when debugging.

03:57 So that's great.

03:58 3.9 brought us a whole bunch of great stuff with typing.

04:02 So people were starting to use a lot of typing in Python even before then.

04:07 But one of the things was if you wanted to type a list or a dict, you had to say from typing import capital dict or something.

04:15 And in 3.9, you don't have to.

04:17 You can just do the lowercase, 3.9 and above.

04:19 So that's really handy.

04:21 And I use that a lot with even when I'm not type checking, but if I want to tell people what the parameter list looks like.

04:28 So I've been more using -- I do use the typing, like type checkers, PyPy and stuff.

04:35 What is it?

04:36 Yeah, I don't know.

04:37 I can't remember.

04:38 It's all built in.

04:39 But mostly I'm doing it not for correctness or anything, but for readability.

04:46 So that's one of the things I like.

04:48 And editors.

04:49 One other thing that was really notable in that release was they added remove prefix, remove suffix.

04:54 Yeah.

04:55 Because -- to strings.

04:56 Because there was strip, L strip, R strip.

04:59 It looks like I could put a string in there and it'll take it out.

05:02 Like if you could say L strip ABC.

05:04 And you have the string ABC because it would actually remove four letters, not three, because it just says if any of these letters appear in the beginning, start taking them away.

05:14 Right?

05:15 And people imagine they were this remove -- like this word at the beginning, take it away if it appears.

05:20 And so this is here.

05:21 And I always try to get it here and I should be using it more.

05:23 Actually, this is another thing that I've just started using more now, even though it's been since 3.9 is this remove prefix and suffix.

05:30 So kind of fun to look back and look at all the fun goodies and go, wow, it's been in for a long time.

05:36 I should totally use that more.

05:37 And sometimes people postpone it because they're supporting multiple versions of Python.

05:42 So this is another reason why this is a great thing to have these kind of lists around is when you start deprecating old versions, you can look back and go, oh, yeah, I can use this now.

05:51 Since it's been -- we're only doing 3.8 and above.

05:54 So we can -- or 3.9 and above, you can use some of these things.

05:58 3.10 brought us structural pattern matching.

06:01 I can't believe it's been that long.

06:03 But, yeah, we now have switch cases in Python.

06:07 Well, they're match case statements, but totally fun.

06:10 And then also one of the big things that are typing time savers for me is to be able to use the pipe operator for unions.

06:18 So I'm not going to go through all of these, but it's a fun look at -- oh, 3.10 also brought us slots in data classes.

06:27 That's pretty cool.

06:28 But I've had no problems with switching over to 3.12 in any of my projects.

06:33 So I think people should just jump the gun and try it.

06:37 One of the cool things with this article comes up -- I'm going to swing down to the bottom -- is some of the useful things in converting from different versions.

06:46 There's different changes to the typing extensions and stuff.

06:50 But there's a project called PyUpgrade that will allow you to just automatically upgrade a lot of your source code.

06:57 And I think that's cool, and I've done that for a couple projects.

07:00 But also I just sort of upgrade, and I leave the code alone often unless I go back and it bugs me, some of the things that bug me.

07:10 Do you proactively PyUpgrade your projects?

07:13 I haven't used PyUpgrade. It's looking interesting. Maybe I should.

07:17 I've used fluent, though.

07:19 I think it's fluent is what it's called.

07:21 Where you can just say, "Convert every string format of any variety to an f-string." And that to me was like, "Just f-strings. Just give me f-strings. They're so much more readable." But other ones, if it upgrades an optional of a thing to thing-pipe-none, I don't necessarily want that.

07:38 There's certain things where I know I could have a different syntax, but I kind of like it the way it is.

07:43 So I don't necessarily do that.

07:45 Although I do use rough format these days, and I think rough format kind of does that as well, but not as aggressively.

07:53 Yeah, one of the things that article brings up, and I'm curious about this with rough, I'm pretty sure they do this as well.

07:58 But it mentions that black, if you're using black to reformat things, the formatting at least, there's some conventions that have changed, or some different things about different versions of the language, but it respects the requires Python setting in your pyproject.toml.

08:16 So if you have that set, black will do that.

08:19 I'll have to look that up. I'm not sure if rough does that.

08:22 Anyway, fun article to look back and go, "Hey, why am I not using these features now?" Because we've already upgraded.

08:28 Yeah, excellent. I think rough does, but I don't know 100% for sure either.

08:32 All right, Brian, you want to talk about Heroku, sort of?

08:36 Sure.

08:37 All right. So Heroku, you know, the web hosting platform as a service, like, hey, you just get push, and then your Python code runs, or whatever other platform you want to run on probably runs, and you can get these managed databases, and you can get the, it'll just run this stuff, and kind of like Docker, but you don't really have to think about it.

08:59 It was the darling of many tutorials and other things among, as well as people using it, because it had a free tier, and completely reasonably, they said, "You know what? You can't just run software for free for everyone. We're going to stop this." But it's a hassle, right?

09:13 So people might have had the feeling like, "Hey, I'm, I had this change forced upon me against my will.

09:19 I was using this service, and then that service changed, and I'm committed to that service, but I don't necessarily like the way it's changed," right?

09:28 And as you know, as everyone knows, I've been on this Docker kick, and all the things that you can get out of it, and how awesome, once you get some kind of infrastructure set up to run those kinds of things, how easy it is to adopt additional stuff, right?

09:41 So I want to tell people about Doku, doku.com, with two Ks, D-O-K-K-U.com.

09:47 It is a open source platform as a service alternative to Heroku.

09:52 So basically, here's what you do. You create a $5 server somewhere, maybe 10 if you want to go crazy, like DigitalOcean or something like that.

10:00 You go in there, you run doku install, and it just runs on top of Docker.

10:05 And then once that foundation is created, you can just go and do all the stuff that you would normally do with Heroku, but here, right?

10:13 So you install it with just Wget or curl or whatever, set some information, set some domains, and then you create, go and create your app, right?

10:21 And then later, somewhere down the line, you can come over and you just say, basically, doku get sync, give it your app, give it your GitHub repo or your Git repo, and it'll go clone it, create the equivalent of dynamos that they had over on Heroku, and just run it on your machine.

10:42 You give it, and also it integrates with many of the same constructs that they had at Heroku.

10:48 So with Heroku, you had, what was it called, a proc file or something? I can't, I don't, I didn't do Heroku, so I don't really know.

10:57 But you basically had this file that was kind of like a Docker file that said, when the app starts, this is the command to make it run, right?

11:04 Like a flask run or uvicorn run or whatever, right?

11:10 Like you just tell it the stuff to do to start. And so you basically do that, and then you just get push.

11:14 And then even support scale out, right? So you can say, hey, I would like to scale up my web app to have two nodes. Boom, done.

11:21 Do that on your local machine, and off you go. That's cool, right?

11:24 Yeah, I mean, I assume you can use, you'd have to set up like multiple droplets if you're using like a database and stuff, but.

11:32 No, it just runs multiple containers in a cluster on there.

11:35 Oh, interesting.

11:36 Right? So everything this does is it basically is orchestrating Docker on some particular piece of hardware that you set up.

11:43 Like I would recommend a VM, not a real piece of hardware for most people, although the DHH, leaving the cloud makes sense if you're going to have something huge, right?

11:52 But in general, get like a $10 VM on one of the clouds that is more focused on that, like DigitalOcean.

11:59 And then you just, once you run this, it'll just scale up and create and build all the Docker containers and put them in networks together and all that kind of stuff.

12:06 Wow.

12:07 Yeah.

12:08 Pretty neat.

12:09 Yeah. Oh, Kim is pointing out maybe that I'm, I say Doku, he's right, I say that would be Doku.

12:14 Maybe.

12:15 Okay. I think, well, D-O-K, Doc is probably not Doku.

12:19 But it's D-O-K, oh yeah, it's two Ks.

12:22 From Docker, right? Probably, yeah.

12:24 I should know this, having a last name with two Ks in it. Yeah, it would be totally Doku.

12:29 Doku, okay. Because it's a riff on Docker, right?

12:32 Yeah.

12:33 There's also a ton of plugins you can get for it, which is pretty cool.

12:36 So if you look at it, you can see there's stuff that just like copies files, but there's also CouchDB, you can integrate Let's Encrypt, MariaDB, MongoDB, RabbitMQ, all these different things you want to plug into it.

12:51 Also come along, right? Maintenance mode, I don't know what that is, but they all look interesting. People can check them out as well.

12:57 So it looks neat. Final thoughts on this is it does, it's open source and free, which is excellent, but there's also a pro version if you want.

13:07 If you want, like this is not required.

13:08 Yeah.

13:09 Right? So it gives you a little bit more features. It also gives you support and it's like $850 once.

13:15 A month.

13:16 No, it's just once.

13:18 If your company says like, we really want something we can get support with and whatever, you know, it's an option out there.

13:26 It's cool that there's a way for this project to be supported. And also if you're in a company and something goes wrong, the company's paying for it.

13:33 It's kind of nice to be able to say, somebody please help rather than, all right, who knows the most about Docker here? Get over there and get in that server and make it work. Right?

13:41 If it comes down to it. So anyway, that's what I got for our first item. I think it's for people who are looking for an alternative to Heroku.

13:49 Yeah. Well, I was just looking in, I was like, well, what if I want to use it and I want to throw them a few bucks anyway, but I don't want to give them $850.

13:57 On GitHub, they do have a sponsor of this project, so you can get a few bucks if you want.

14:04 Yeah. Yeah. And what about their GitHub? How many, they have 25,000 stars. So this is not just a, Hey, guess what I created this weekend, right? Like this is a project that's been around for a while.

14:16 Yeah. Some updates even yesterday.

14:19 Yeah, exactly. It's like, it's mostly built with Go, but has a little Python love in there.

14:23 Nice. Okay. Looks fun.

14:25 Yes, indeed. What's your next one?

14:28 Well, my next one is sort of a plea to everybody out there. I was looking for topics today and having a little difficulty. So I think that we should have more people writing more blog posts.

14:39 But okay, so I've got some information. So one of the great things is we can follow Jeff Triplett, because he's leading the way here. He's right, trying to do one blog post a day in February.

14:51 So let's get more people trying to do it. You can start late. It's only the sixth. Start from now and move on. So I want to highlight Jeff Triplett. So awesome. Starting this. So one post a day in February. And let's go through the ones he's got so far.

15:10 So on February 1st, he wrote a post called "Choosing the Right Python and Django Versions for Your Project." So I was just thinking that you just use the latest all the time, but interesting take on it.

15:25 It is like he does talk about waiting for possibly the third or fourth patch release of a particular version of Docker, maybe. Yeah, if you're doing production stuff, that makes sense. So anyway, so that's his first one.

15:42 Second one was "My First Mac," and actually, I really enjoyed this. This is kind of one of those types of podcasts or podcasts, blog posts that just sort of says, you know, what his history with Macintosh and with Macs, and then also talks about some of his favorite software.

16:01 So he picks out Bartender and Alfred. I've used Bartender. I haven't used Alfred yet. So I'm kind of intrigued by that.

16:09 Bartender is so good. It is so good. And I don't use Alfred. I use Raycast, which is incredible.

16:15 Raycast. Okay. So I kind of love this sort of thing for just because people like me and other people are like, "Oh, I've never heard of that." So just sort of a list of sometimes a list of things that you use on your personal computer or your development computer. It's helpful to people.

16:34 He does link to a post that he wrote last year called "Default Apps of 2023" or "Default Apps in 2023." And I was kind of looking through both stuff on his computer and also web apps and things.

16:48 And I saw Cal.com, which is kind of an alternative to Calendly. And so I'm like, "Hey, I should check that out." So it looks pretty nice. So I kind of love these sorts of things of like, what software do I use in every day? So that's great.

17:04 I see a lot of section with stuff that I like as well there.

17:07 Yeah.

17:08 What things have you been interested in on the show?

17:10 I was surprised to see Sublime Text still. So I haven't used Sublime Text. It's a great product, but I haven't used it for a while. February 3rd, what's your go-to comfort media? Kind of fun. Just sort of what do you do in your free time? Those are fun posts. Why not?

17:26 February 4th, Django apps I actually use, rough cut. So this sort of thing I love. I wanted to do one on pytest plugins, plugins I almost always use. So this is Django plugins that he almost always use. And there's no description around them. It's just a list. So it's great. You can kind of go and look those up if you want.

17:50 And at the end, he tagged projects I no longer use, which is also interesting. Things people used to use but don't for some reason. That's also interesting to talk about. So I encourage people to take that up.

18:03 Lastly, how to test with Django and pytest fixtures right up my alley. This is what the article that brought this series to my attention. But he talks about Model Bakery and using fixtures. And one of the things I love, which is that I learned something kind of new.

18:20 I mean, he talks about using, normally you put fixtures in a conf test file, but he's using a feature of pytest called, which is the pytest underscore plugins variable. And that's a global variable that you can say, hey, I've got other plugins, go look for it here.

18:39 And he uses that to put like Model Bakery fixtures in a Django project. And it's an interesting idea. And it's a use model that I haven't seen. I haven't played with myself before. So that's fun.

18:52 All right. So good job, Jeff. I wanted to look at, if you want more ideas, there's another article I wanted to point out called, Build an Idea Bank and Never Run Out of Blog Ideas. So just this notion that pick some way to write down whenever you have an idea, whether it's a notebook or email yourself or text yourself or something.

19:15 Keep a list of all the kind of things that you'd like to write about. And then whenever you want to write, you can just sort of look in there.

19:22 This is the only way you have a little idea. It'd be kind of interesting, but then you don't have time to work on it. Just throw it in there. Come back to it. I do this right now. I'm keeping stuff in Todoist. And I have a just separate category of to do's and every blog post. I just check them off when I write it.

19:38 But I moved a lot of my stuff to Notion. I just absolutely loving Notion these days. It's pretty amazing. And so maybe it'll find its way over there, but that's not really important. Just have a place. Ideally, something you can check off both Notion and Todoist has a little checkbox. You can check whether or not you've written it so it can kind of move out of the way and filter it and so on.

19:59 Yeah, I think I have too many ways. So I've got like paper slips that I write notes down. I've got notebooks, actual physical notebooks. I've got email myself and it just sort of is a lot. I've got to narrow it down to something manageable.

20:13 Also, the last thing around this writing more is if you want to highlight that you're not using AI to help you write, there's a website called notbyai.fyi that has these little downloadable icons or logos that you can put on your work to say that it was handcrafted and you didn't do it by AI.

20:38 I love it. I absolutely love it.

20:41 Put a badge on your work.

20:43 Yeah.

20:44 I actually was thinking about playing with AI with helping writing, like to sort of rough out a topic idea or something to start with. But I haven't tried doing that yet. Interesting. So that's kind of my topic is people blog more, please. Hopefully about Python.

21:04 And hopefully not with AI.

21:08 And find these AI to like think of content and sort of, but don't just take the AI and paste it in.

21:16 Yeah. Yeah. Anyway.

21:18 We should get people ideas.

21:20 So what you got for us next?

21:23 I do have some more stuff here. Let's see. The next one. Oh, I just closed it. That was not ideal. Here we go. Let me get my screen up. All right. No, not that one. I'll come back to that in just a second. Okay. So this one was going to be an extra.

21:37 How fast is your server? If you had a server at AWS, you had a server at DigitalOcean or wherever, how fast is it?

21:46 I don't know.

21:47 No idea.

21:48 Network speed, not compute speed. How fast is it? Well, the way I would do it at home is I would go to speedtest.net or one of the other speed testing mechanisms and I would run it. Right. And, you know, that's, I got to tell you, doing speedtest.net is just more fun since I got Fiber.

22:05 I remember we talked about like one of the episodes, I got it like straight away. So you go and run that and it tells you, all right, four milliseconds over Wi-Fi. I'm doing 500 megs, megabit per second. That's good. But how do I do this on my server?

22:20 So this was originally going to be an extra, but it has a little more to it than I first thought. So there's an exact identical way to do that on an arbitrary Linux machine. But, you know, ideally, I think the use case is a server with no UI, no web browser. It's called speedtest-cli and it's a command line interface for testing internet bandwidth using speedtest.net.

22:40 Cool.

22:41 Yeah. So use case is pretty simple. pipx, they always get this wrong. And this is pip. I don't know what this is about. pipx install speedtest-cli. That is how we pronounce this. I know the X is invisible, but not silent. So pipx install speedtest-cli. And then somewhere down here, you just run it with different options.

23:04 So let's go over here to my server. And we can just say speedtest-cli. Look at it go. It does the same ping. It's checking the download speed. Who knows what it's doing? It's kind of just chilling. It's not a great sign. Let's try again.

23:21 It says, oh, we got 2.8 megabit. This is incredible. You have no idea how happy this makes me, Brian. I'll tell you in a second. So 2.8 gigabit down 1.3 gigabit up on my server. That's excellent, right? But that's a lot of output if you just run it normally. So I created a thing called, which is an alias called speedtest-cli --bytes because my brain works in megabytes, not megabits.

23:50 I think about how much data I have and how much I can send in bytes, not like one eighth or eight X bytes, whatever. And I don't need all that output. I just want the results. So you can say just simple. Then you run it and you get, wait for it, download. Oh, now it's back down to this. Oh, cause it was in bits versus bytes.

24:08 Anyway, 269 megabytes per second down 190 megabytes up. That's cool. Right? Yeah. It uses multiple connections to like the multicast testing that speed test.net does and all that stuff. And it's written in Python.

24:24 That's pretty great. I think it's funny that a lot of things are in bits per second because like -- Do you think in bits? Like how many, how big is your hard drive? Oh, it's 30 terabits. Like, oh really? That's a big one. Oh, wait, what? Yeah, exactly. That actually is still big.

24:43 Why don't we measure in tenth of a bit? Decibits.

24:47 Decibits. Do my, my networks are real fast if I measure in decibits. All right. So this would have probably just been an extra, like I said, if this is all I do, I type speed. It tells me the speed. Excellent.

24:59 But you go back here, you go down a little bit. It also has a, because it's written in Python, has a Python programmable API. So you can add these capabilities to your code. So you can do things like if you've got an app that depends on speed, you could report, hey, it needs to be fast enough.

25:15 You could have a unit test that says, before we run this test with timeouts and things, we need to make sure that the internet is working well because we're, I don't know, whatever. Right? So you can go and just create a speed test object called get servers, get me the best server, pass in the servers.

25:30 How many threads do you want to download? How many threads do you want to use to upload? All this kind of stuff. Very cool, right?

25:35 Yeah, actually, this is great. I was just thinking about that because I've been working with timeouts a lot, like pytest timeout and long test suites can slow down if your network is slower, if you're actually hitting the service. So you need to check that. That's pretty cool.

25:50 And it's pretty cool. It gives you ping time, upload speed, download speed. And you can say only do uploads, only do downloads and so on. Right? That's like, those are separate functions to call in the Python API to test those things.

26:00 Okay, neat.

26:01 Apparently you can even set a mini server. What is a mini server? I don't know. I don't know. I guess he's just specifically set a server. So I don't know. Anyway, this is cool. If you want to know the speed of your network on your server, or in CI or something like that, you know, here you go.

26:17 Yeah, nice.

26:18 Indeed. All right. How about extras? You got any gathered today?

26:22 Just so last, just one. Last week, I mentioned that pytest 8 was out and people should upgrade. And so I've been upgrading to pytest 8 and debugging stuff. And I mean, I haven't, there's no problems, except for something weird.

26:38 So I was looking at a parameterized test, and then I ran it in PyCharm. I just right clicked on it and said, hey, rerun this. And it ran the parameterized list backwards. It was like, it was 1234 to start with. And then it reran it as 4321. And I thought I did something wrong. So I spent like an hour debugging my code.

27:01 And then I tried to do like a small example in another virtual environment, which happened to have an older version of pytest. And it was working just fine. But when I moved it over, it was backwards again. And it just turns out it's a new feature, in quotes, of pytest 8.

27:20 Actually, we're going to link to a defect report. I haven't had any feedback on it yet. But I let the core pytest people know that this is going on. I don't know if it was on purpose, or if it's a surprise. It shouldn't make a difference. I just wanted to highlight this so that if you run across this, you're not doing something wrong. It's just it was a change in the behavior.

27:44 So anyway, implementation detail has surfaced. Yeah. Yeah. All right. Did it promise to run them in order?

27:53 I don't think that's documented anywhere.

27:57 Yeah, but people probably assume that it would, right?

27:59 Well, and I did something terrible. In the case where I found out, I was actually caching the value in my first parameter to compare it with others. Because I was starting at the zero offset case at the beginning. And it failed because that was being run last instead. And I'm like, what's going on? It was bad form on my part. Don't cache the first value. Don't do that.

28:24 So you just got to do what you got to do?

28:26 Yeah.

28:27 All right. I got a few extras for us as well. First of all, a quick follow up on Orbstack. I spoke about Orbstack and also saw Jeff Triplett says Orbstack was the thing he's going to. Remember I mentioned this before as an alternative to Docker Desktop, open source, all that. Two really quick notes. One, it does require a paid version for commercial use. So the free version is only non-commercial, which is, you know, whatever, like take that for that. If that is good or bad to you, you know, whatever, it's their business model.

28:54 But I just wanted to point out one of the things that this thing did that is super awesome. And I'm just really enjoying it. Brian, when you create a Docker container, it's kind of like this isolated thing. And yes, I know you can run a shell in it while it's running to basically attach into it and then like go through the terminal, go explore. But sometimes it's nice to just visually look at it or even edit in an editor with syntax highlighting all this stuff.

29:17 So with Orbstack, see there's a little on some of these, not this one is wrong. You got to get to the volume section. I don't know if it shows it, but in the volume view next to every volume, which is like the little hard drive that's temporarily assigned to that container. There's a button to click and open it in Finder or Windows Explorer. And then it's just like a thing you could open it up in PyCharm or VS Code or whatever, and just start working inside of one of these running things, which is, that's pretty excellent.

29:46 So just wanted to give that a little bit of a shout out. No time for a joke yet. We're talking CSS. CSS is not funny.

29:54 So have you, have you mostly moved over to like Orbstack and not using Docker desktop then?

29:59 Yes, but I mean, it's really just like something running in the background. So Docker commands work. I haven't really.

30:05 Okay.

30:06 Although I'm doing more and more stuff with like running some of my apps in Docker. So in a sense, yes, but, but not too much, but that's just really delightful. You're like, wow, I can just use a proper editor to like see what's going wrong with this. That's pretty excellent.

30:19 Yeah. Okay.

30:20 Yeah. As I said, the next one is CSS. So there have been traditionally like meta frameworks, meta languages or languages on top of CSS that transpile or compile down to it. You know, less SASS, S-A-S-S, these things that have like, well, there's all these problems with CSS, like you can't have nesting or you can't have variables and they make it really hard to do stuff with CSS in a way that doesn't duplicate code and values and stuff. Right?

30:49 If you want to have a background color, you can't just say normal background colors, gray. You have to repeat the word gray or the value gray 50 times through your file. Right? Which is a hassle. Well, apparently modern CSS and most of the browsers support this have built in CSS nesting already where you can put a value part of your CSS design inside of the other one.

31:10 So like instead of saying parent space child, parent space, other child, right? You just put the child and other child inside the parent and modern day CSS takes that and loves it. Awesome. Right? That's cool.

31:22 Yeah. I guess I didn't know that.

31:24 I didn't either. I thought you had to use one of these other languages, but apparently you can also have variables, right? If you say this minus minus some variable name has a value that will create a thing, a variable called minus minus in this case, the same main background color. And then later somewhere around here, somewhere, you can then go and then actually work with those. I don't know where the example is, but somewhere.

31:48 Oh yeah there.

31:49 You can go and just say, yeah, the background color is var of this thing. It's kind of, I think this is actually super janky. It looks really weird, but yeah, modern CSS has nesting and variables with no transpiling, nothing. You just write it and it just runs, which is pretty excellent.

32:07 Yeah. The variables thing is the one thing that drove me to transpiler. So cool.

32:13 Yeah. I think less fewer steps, right? The modern web has got so gnarly to just get something to work. It's like, Oh, did you NPM install this? Oh, and then did you set up the watcher so that when you change this, it like shakes the CSS tree over here and then transpiles the tri-script and then bundle. What is going on? I just could just type and run. Like, where did, where did this go wrong? Right?

32:34 I just want my dumb button to be blue, please.

32:37 Exactly. Why is it still gray? I'm going to go play in traffic. If it doesn't turn blue in the next 30 minutes, I can't quit programming. I just can't. That's kind of the feeling of the modern web a lot of times. And like, not depending on that stuff, because apparently it's already supported is, is like, you could just write this. It's great.

32:55 All right. One final extra before we get to the joke is I just want to give a shout out to this new feature in Safari where you can go and you can say on any website file, add to dock progressive web apps, right? Because they're Apple, they can't call it that. They have to say, we have a feature. It's called add to dock. No one else has add to dock. It's like, because they already got it under something else. Like Chrome has it, Vivaldi has it and so on. So why? And I'm not a Safari person, right? I kind of think Safari is like one of the least good browsers out there.

33:24 But so why would I give a shout out to this?

33:26 You're going to get hate mail.

33:27 I'm going to, please don't mail me.

33:29 Show me how to set a DNS over HTTPS in Safari. Even a simple thing like that. Can't do it. Okay. Back, back to Safari in the good way. So one of the things that's, I like, I use Vivaldi, right? Everyone knows, talk about it all the time. You can do this in Vivaldi and it's excellent.

33:46 The problem is if I want to open one of those apps and I don't have Vivaldi open, Vivaldi with all of its histories and all the windows I had open come blasting into the screen. And then that little thing I was trying to open opens. Right. Or if I'm on the big regular Vivaldi and I happen to have that on the side and I close Vivaldi. Oh no, that thing closed as well. And I forgot it was actually part of Vivaldi because it looked like it's on. It's just like a hassle.

34:08 With this, they're like standalone little apps that just run completely dedicated. They don't even have to be PWAs. They just have to be URLs. You can have our command tab between separately. They're really nice. So I encourage people who are on Macs to check this out. If you're not on a Mac, well, then don't worry about it.

34:25 We can title this the grumpy old man episode. Write more blog posts.

34:30 Write more blog posts. Use Safari, even if you don't love it. All right. How about this? How about a joke? Shall we wrap it up?

34:38 Yeah, let's.

34:39 And I got to tell you, this joke is entitled white lies and it connects with me so much. So much. All right, here we go. I'll tell you, Brian. So there's a woman developer who's being distracted by their manager, obviously wearing a suit and tie. I'm saying to talk to her. And says, apparently talking about this new app, this like amazing app that they're about to launch. Says, the boss asks, will this solution work for a million concurrent users?

35:07 The very smart developer, a woman like Sarah says, how many concurrent users do we have today? 10 says the manager. Yes. Yes. This will work for a million concurrent users.

35:17 Exactly.

35:18 You can dream all you want. We got 10 users right now. Whatever I'm building is going to be fine until we got a whole lot more time to worry about it.

35:27 Yeah.

35:28 Does that connect with you?

35:30 Yeah, very much. Yeah. It's hard to not think about that. Like, what if this takes off tomorrow? And we like, you know, well, then we'll add capabilities tomorrow.

35:41 Yeah, exactly. That's why it connects with me.

35:45 It used to be that in the software world, you could tell if somebody was doing, going into, had a job interview that day was because they were wearing a suit or wearing a tie or something like that. And so when I first started, I would wear ties on Fridays and people would say, you're freaking me, freaking everybody out because everybody thinks you're interviewing for another company.

36:09 Hey, just keep them on edge. Just don't let them, don't let them get too comfortable.

36:12 Yeah. But now I kind of, I watch out for any of my coworkers that are not wearing the same shirt they wore yesterday. They might be on the job interview.

36:22 Mm hmm.

36:24 Anyway. So thanks for the joke and the wonderful episode.

36:29 Absolutely. Great to be here with you, Brian, and with everyone else. See y'all later.

36:34 Bye.

Back to show page