Transcript #370: Your Very Own Heroku
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to
00:05 your earbuds. This is episode 370, recorded February 6th, 2024. I'm Michael Kennedy.
00:12 And I'm Brian Ockin.
00:13 And this episode is brought to you by us. Check out our courses, 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. So check that out
00:28 as well. Links in the show notes, of course. And connect with us on Mastodon or all over there,
00:34 the show, Brian and me. 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,
00:43 I've actually had to write a couple of checks recently.
00:45 What?
00:46 Yeah. The hard part is not the day because my watch tells me what day it is or 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 here's 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. It was like beautiful writing. All right.
01:13 Not cursive, but just really fine print. And it was excellent to read. Now you'd be like,
01:19 did you even go to school? What is wrong with you? Like, ah, no, I can't write. I'm sorry. The claw is not working today.
01:25 That's funny. I write all the time. And I was writing, I found some old ID cards from like high school and junior high.
01:34 And, and my daughter, I showed him to my daughter and she's like, how is your hand? Like your signatures the same now as it was in like eighth grade.
01:42 Incredible.
01:42 I don't know. I just nailed it, man. So anyway, or I haven't gotten any better since eighth grade.
01:47 Right off the bat. That's awesome.
01:50 Yeah.
01:50 Well, what topics are connecting with you today?
01:52 Well, I, a couple of things. I've been, converting a lot of projects to Python 3.12. So, and I know it's been out for a while since December, I think it's December.
02:04 Yeah.
02:05 But a little bit before then.
02:06 I can't remember.
02:07 Yeah. Yeah. Like November or something like that.
02:09 Okay. So, but, wanted to do like a summary. So, I've been thinking about like, should I upgrade projects? So some of my projects are still in 3.11, which is fine, but hopefully I'm,
02:22 kind of like halfway between 3.11 and 3.12. So there's an article called, and we do this every, every couple of years, I guess, a summary of major changes between Python versions.
02:31 It's like reasons, you know, look back as to why you might want to update. And this is kind of a fun, fun walk through. so hopefully you're not still in 3.7 because 3.7 and earlier are all end of life.
02:45 Yeah.
02:45 You're living in the past if you're on 3.7.
02:47 Yeah. But some of those things that, 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. And then, underscores in numeric literals. And you know what? I, it's been around since 3.6, but I've just started using this. I, I know it's been around for a while, but I'm whenever I need to do a constant or something like that. I'm like, I, oh yeah, we can put underscores in, in there. It's, it's nice.
03:16 Yeah. I like that one a lot. Actually, I've been doing that a lot too. It really makes a difference. Like, is it 10,000 or a hundred thousand or is it a million or a hundred thousand?
03:23 Yeah. It's really nice. Anyway, a couple and, data classes also been around since 3.7. Anyway, those are ancient history. Now let's, jump ahead. I'm just going to highlight a few of these, the, for people, 3.8. Of course we had, the walrus operator in 3.8.
03:41 And, self-documenting f-strings. So this is something that I've been using all the time now. And for some reason I thought it was later, but putting equal sign in a F string variable so that you could, so that it prints out like variable name equals value, super handy when debugging. So that's great. three, nine brought us, brought us a whole bunch of great stuff with typing. So, people were starting to use a lot of typing in Python even before then.
04:07 But, 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. And in three, nine, you don't have to, you can just do the lowercase three, nine and above. so that's really handy. And I use that a lot with, even when I'm not type checking, but if I want to like tell people what the, what the parameter list looks like. so I've been more using, I do use the, the, the typing like a type checkers, pipe high and stuff, or was it? Yeah.
04:36 I don't know. I can't remember. It's all built in. Yeah. But the, but mostly I'm doing it not for like correctness or anything, but for readability. So that's one of the things I like it.
04:48 And editors. Hey, one other thing that was really notable in that release was they added remove prefix or move suffix.
04:54 Yeah. Because, to strings, because there was strip L strip, R strip. It looks like I could put a string in there and it'll take it out. Like if you could say L strip ABC and you have the string ABC, because it would actually remove four letters, not three. Cause it just says if any of these letters appear in the beginning, start taking them away.
05:14 Right. And people imagine they were this remove, like this word at the beginning, take it away if it appears. And so this, this is here and I always try to get it's here and I should be using it more.
05:23 Actually, it's a, this is another thing that I've just started using more now, even though it's been since three nine is this remove prefix and suffix. 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. I should totally use that more.
05:37 and sometimes people postpone it because they're, they're supporting multiple versions of Python. So this is another reason why this is a great thing to have these kinds of lists around is, is when you start deprecating old versions, you can look back and go, oh yeah, I can use this now since it's been, we're doing only doing three, eight and above.
05:54 So we can, or three nine and above, you can use, use some of these things. 310 brought a structural pattern matching. I can't believe it's been that long. but, yeah, the, the, we now have switch cases in, in Python mother, their 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. So, I, I'm not going to go through all of these, but it's a, it's a fun look at, oh,
06:24 310 also brought us slots in, in data classes. That that's pretty cool. but, I've had no problems with switching over to 312 in any of my projects. So I think, people should just, jump the gun and, and try it. 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. There's, there's different changes to the typing extensions and stuff, but there's a, a project called pie upgrade that'll allow you to just
06:54 automatically upgrade a lot of your source code. And I think that's cool. And I've done that for a couple of projects, but also I just sort of upgrade in, in, I'd leave the code alone often if it's, unless it, unless I go back and it bugs me. some of the things that bug me, do you, do you proactively pie upgrade your projects?
07:13 I haven't used pyupgrade. It's looking interesting. Maybe I should.
07:16 I've used fluent though. I think it's fluent is what it's called where you can just say,
07:23 convert every string format of any variety to an f string. And that to me was like, just f strings,
07:28 just give me f strings. There's so much more readable, but other ones, I don't, you know,
07:33 if it upgrades say an optional of a thing to thing pipe none, I don't necessarily want that.
07:38 Right. There's certain things where I know I could have a different syntax, but I kind of like it the
07:42 way it is, you know, so I don't necessarily do that. Okay. Although I do use Ruff format these
07:47 days and I think Ruff format kind of does that as well, but not as, not as aggressively.
07:53 Yeah. One of the things that article brings up, and I'm curious about this with rough,
07:56 I'm pretty sure they do this as well, but it mentions that black, if you're using black to
08:01 reformat things, it will, the formatting, at least it, there's some conventions that have changed
08:06 or some, some different things about different versions of the language,
08:11 but it respects the requires Python setting in your pyproject.toml. So if you have that set,
08:17 black will do that. And I'm, yeah, I'll have to look that up. I'm not sure if rough does that.
08:21 Anyway, fun article to look back and go, Hey, why, why am I not using these features now? Cause we've,
08:27 we've already upgraded. So.
08:28 Yeah. Excellent. I think rough does, but I don't know a hundred percent for sure either.
08:32 All right. Brian, you want to talk about a Heroku sort of.
08:36 Sure.
08:37 All right. So Heroku, you know, the, the web hosting platform as a service, like, Hey,
08:43 you just get push and then your Python code runs or whatever other platform you want to run on probably
08:49 runs. And you can get these managed databases and you can get the, it'll just run this stuff and
08:56 kind of like Docker, but you don't really have to think about it. It was the darling of many
09:01 tutorials and other things among, as well as people using it because it had a free tier and
09:07 completely reasonably, they said, you know what? Can't just run software for free for everyone.
09:11 We're going to stop this, but it's a hassle, right? So people might've had the feeling like, Hey,
09:16 I'm had this change forced upon me against my will. I was using the service and then that service
09:21 changed and I'm committed to that service, but I don't necessarily like the way it's changed.
09:28 Right. And as you know, as everyone knows, I've been on this Docker kick and all the things that
09:33 you can get out of it and how awesome once you get some kind of infrastructure set up to,
09:37 to run those kinds of things, how easy it is to adopt additional stuff. Right. So I want to tell
09:42 people about Doku, Doku.com with two K's D O K K U.com. It is a open source platform as a service
09:50 alternative to Heroku. So basically here's what you do. You create $5 server somewhere, maybe 10,
09:57 if you want to go crazy, like digital ocean or something like that, you go in there, you run
10:01 Doku install, and it just runs on top of Docker. And then once that foundation is created, you can just
10:08 go and do all the stuff that you would normally do with Heroku, but here, right? So you install it
10:14 with just W get a curl or whatever, set some information, set some domains, and then you create,
10:20 go and create your app. Right. And then later, somewhere down the line, you can come over and
10:27 you just say, basically Doku get sync, give it your app, give it your, your GitHub repo or your
10:34 get repo. And it'll go clone it, create the equivalent of dynamos that they had over on
10:40 Heroku and just run it on your machine. Start, you give it, and also it, it integrates with many of the
10:45 same constructs that they had at Heroku. So with Heroku, you had, what is it called? A proc file
10:51 or something. I can't, I don't, I didn't do Heroku. So I don't really know, but you basically
10:58 had this file that's, that was kind of like a Docker file that said, when the app starts,
11:02 this is the command to make it run, right? Like a flask run or UVicorn run or whatever,
11:09 right? Like you just tell it the stuff to do to start. And so you basically do that and then you
11:13 just get push or scale out. Right. So you can say, Hey, I would like to scale up my web app to have two
11:20 nodes. Boom, done. Do that on your local machine and off you go. That's cool, right?
11:24 Yeah. I'm, I mean, I assume you can use, you'd have to set up like multiple droplets if you're using
11:30 like a database and stuff, but no, it just runs a multiple containers in a cluster on there. Right.
11:36 So every, everything this does is that basically is orchestrating Docker on some particular piece of
11:42 hardware that you set up. Like I would recommend a VM, not a real piece of hardware for most people.
11:47 Although the DHH leaving the cloud makes sense if you're going to have something huge, right? But in
11:52 general, get like a $10 VM on one of the clouds that is more focused on that, like digital ocean.
11:58 And then you just, once you run this, it'll just scale up and create and build all the Docker
12:03 containers and put them in networks together and all that kind of stuff.
12:06 Wow.
12:06 Yeah.
12:07 Pretty neat.
12:07 Yeah.
12:08 Oh, Kim is pointing out maybe that I'm, I say Doku. He's right. I said, that would be Doku.
12:14 Maybe.
12:14 Okay.
12:15 I think, well, DOK.
12:17 But it's DOK. Oh yeah. It's two, it's two Ks.
12:21 From Docker, right? Probably. Yeah.
12:23 Yeah.
12:24 I should know this and be 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. So if you look at it,
12:37 you can see there's, there's stuff that just like copies files, but there's also CouchDB. You can
12:43 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.
12:56 People can check them out as well. So it looks neat. Final thoughts on this is it does.
13:01 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. Yeah. Right. So it gives you a little bit more features.
13:11 It also gives you support and it's like $850 once. A month. No, it's just once.
13:17 If your, if your company says like, we really want something that we can get support with and
13:22 whatever, you know? Yeah. Yeah. It's an option out there. It's cool that there's a way for this
13:28 project to be supported. And also if you're in a company and something goes,
13:31 wrong, the company's paying for it. It's kind of nice to be able to say somebody, please
13:35 help rather than, all right, who knows the most about Docker here? Get over there and get
13:39 in that server and make it work. Right. If, if it comes down to it. So anyway, that's what
13:44 I, that's what I got for our first item. I think it's for people who are looking for an alternative
13:48 to Heroku. Yeah. Well, I was just looking in, I was like, well, what if I want to use it and I want to
13:54 throw them a few bucks anyway, but I don't want to give them 850. on GitHub, they do have a sponsor
14:01 this project. So you can give them a few bucks if you want. Yeah. Yeah. And what, what about their
14:07 GitHub? How many, they have 25,000 stars. So this is not just a, Hey, Hey, guess what I've, I created
14:13 this weekend, right? Like this is a project that's been around for a while. It's a 500 yesterday. So
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. Yes, indeed. what's your next one?
14:27 Well, my next one is sort of a plea to everybody out there. I was looking for topics today and having
14:34 a little difficulty. So I think that we should have more people writing more blog posts. but okay.
14:40 So I've got some information. So the, one of the great things is, we can follow Jeff triplet
14:45 because he's leading the way here. He's right. Trying to do one blog post a day in February.
14:50 so let's get more people trying to do it. You can start late. It's only the sixth.
14:55 you can start from now, and move on. So, want to highlight Jeff triplet. So awesome.
15:02 starting, starting this. so one post today in February and let's, let's go through the ones he's
15:09 got so far. so on February 1st, he said he wrote a post called choosing the right Python.
15:15 and Django versions for your project. So kind of, I was just thinking that you just, use the
15:21 latest all the time, but, interesting, take on it. it is like, he does talk about,
15:28 waiting for possibly the third or four fourth patch release of a particular version of Docker.
15:34 Maybe. yeah, there's, if you're doing production stuff, that makes sense. So anyway,
15:40 so that's his first one. Second one was my first Mac. And actually I really enjoyed this.
15:45 This is kind of, kind of one of those types of, podcasts or podcasts, blog posts that
15:51 just sort of says, you know, what his history with, with Macintosh and, with max. And then also,
15:58 talks about some of his favorite software. So, he picks out bartender and Alfred.
16:04 I've used bartender. I haven't used Alfred yet. So I'm kind of intrigued by that.
16:08 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
16:21 people are like, Oh, I've never heard of that. So just sort of a list of some, sometimes a list of
16:26 things that you use on your, on your, your personal computer or your development computer. It's,
16:32 it's helpful to other people. he does link to a post that he wrote last year called default apps
16:38 of 2023 or default apps in 2023. And I was, kind of looking through it as both, both stuff on
16:45 his computer and also, web apps and things. And I, I saw cal.com, which is kind of an alternative to,
16:53 Calendly. And so I'm like, Hey, I should check that out. So it looks pretty nice. so I kind of
16:59 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, that I like as well there. Yeah. on the show,
17:09 I was surprised to see, sublime text still. so I haven't used sublime text. It's a great
17:16 product, but I haven't used it for a while. February 3rd, what's your go-to comfort
17:20 media? kind of fun. Just sort of, what do you, what do you do in your free time? those are
17:24 fun posts. Why not? February 4th, Django apps. I actually use rough cut. So, this,
17:32 this sort of thing I love, like I wanted to do a one on pitest plugins of like plugins. I almost
17:38 always use. So this is a Django plugins that he almost always use. And there's no description
17:44 around them. It's just a list. So just great. You can, you can kind of go and look those up if you want.
17:49 And at the end he tagged, projects I no longer use, which is also interesting things. You things
17:55 people used to use, but don't, for some reason, that's also interesting to talk about. So I encourage
18:00 people to, to take, take that up. lastly, how to test with Django and pitest fixtures,
18:08 right up my alley. This is what the article that brought this series to my attention, but he talks
18:14 about model bakery and using fixtures. And one of the things I love, which is, is that I learned
18:19 something kind of new. I mean, I, I, I, he talks about, using you normally you put fixtures
18:25 in a conf test file, but he's using a, a, a feature of pitest called, which is the pitest
18:32 underscore plugins variable. And that's a global variable that you can say, Hey, I've got other
18:37 plugins go look for it here. and he uses that to put, like model bakery fixtures in,
18:44 in a Django project. And it's an interesting idea. And it's a use model that I haven't
18:48 seen. I haven't played with myself before. So that that's fun. All right. So good job, Jeff.
18:54 the, I wanted to look at, if you want more ideas, there's another article I wanted to point out,
19:01 called build an idea bank and never run out of blog ideas. So just this, this notion that pick
19:07 some way to write down whenever you have an idea, whether it's a notebook or, or you email yourself
19:14 or text yourself or something, keep a list of all the kinds of things that you'd like to write about.
19:19 And then whenever you want to write, you can just sort of look in there and grab an idea.
19:23 So yeah, this is the only way you have a little idea. It'd be kind of interesting, but then you
19:28 don't have time to work on it. Just throw it in there. Come back to it. I do this right now. I'm
19:32 keeping stuff in to do list and I have a just separate category of to do's and every blog post,
19:37 I just check them off when I write it, but I moved a lot of my stuff to notion. And I just absolutely
19:42 loving notion these days. It's, it's pretty amazing. And so maybe it'll find its way over there, but
19:48 that's not the really important. Just have a place. Yeah. Dealey, something you can check off both
19:53 notion and to do is has a little checkbox. You can check whether or not you've written it. So it can
19:56 kind of move out of the way and filter it and so on. Yeah. I think I have too many ways. So I've got like
20:01 paper slips that I write notes or notes down. I've got notebooks, actual physical notebooks. I've got
20:07 a email myself and it just sort of is a lot. I've had to narrow it down to something manageable.
20:13 Also the last thing around this writing, writing more is if you want to highlight that you're not
20:20 using AI to help you help you write. There's a website called not, not by AI.FYI that has these little
20:28 downloadable, downloadable icons or logos that you can put on your, on your work to say that you,
20:34 it was handcrafted and you didn't do it by AI. So I thought, I love it. I absolutely love it.
20:40 Put a badge on your work. Yeah. So I, I actually was thinking about playing with AI with helping writing,
20:48 like to sort of rough out a topic idea or something to start with. But I haven't, I haven't tried doing
20:54 that yet. Interesting. So, so that's kind of my topic is people blog more, please.
21:01 Hopefully about Python, but hopefully not with AI and hopefully not with AI.
21:08 So I use AI to like think of content and sort of, but just take the AI and paste it in.
21:15 Yeah. Yeah. Anyway, we should get people ideas.
21:19 So what you got for us next?
21:22 I do have some more stuff here. Let's see the next one. Oh, I just closed it. That was not ideal.
21:30 Here we go. Oh, let me get my screen up. All right. No, not that one. I'll come back to that
21:34 just a second. Okay. So this one was going to be an extra. Okay. How fast is your server? If you had
21:39 a server at AWS or you had a server at digital ocean or wherever, how fast is it? I don't know.
21:46 No idea. Network speed, not compute speed. How fast is it? Well, the way I would do it at home is I
21:51 would go to speedtest.net or one of the other speed mechanisms and I would run it. Right. And you know,
21:59 that's, I got to tell you doing speedtest.net is just more fun since I got fiber. Remember we talked
22:06 about like one of the episodes, I got it like straight away. So you go and run that and it tells
22:11 you, all right, four milliseconds over wifi, I'm doing 500 megs megabit per second, which that's good.
22:17 But how do I do this on my server? So this was originally going to be an extra, but it has a little
22:22 more to it than I first thought. So there's an exact identical way to do that on an arbitrary Linux
22:29 machine. But, you know, ideally I think the use case is a server with no UI, no web browser. It's
22:34 called speedtest-cli and it's a command line interface for testing internet bandwidth using
22:39 speedtest.net. Cool. Yeah. So use case is pretty simple. X, they always get this wrong. This is pip. I
22:46 don't know what this is about. PipX install speedtest-cli. That is how we pronounce this. I
22:52 know the X is invisible, but not silent. So pipX install speedtest-cli. And then somewhere down
23:00 here, you just run it with different options. So let's go over here to my server and we can just say
23:09 speedtest-cli. Look at it go. It does the same ping. It's checking the download speed. Who knows
23:16 what it's doing? It's kind of just chilling. It's not a great sign. Let's try again. It says,
23:21 oh, we got 2.8 megabit. This is incredible. You have no idea how happy this makes me, Brian.
23:28 I'll tell you in a second. So 2.8 gigabit down, 1.3 gigabit up on my server. That's excellent,
23:37 right? But that's a lot of output if you just run it normally. So I created a thing called,
23:42 which is an ALA, it's called speed. It's just a speedtest-cli-bytes because my brain works in
23:47 megabytes, not megabits. I think about how much data I have and how much I can send in bytes,
23:53 not like 1.8 or 8x bytes, whatever. And I don't need all that output. I just want the results. So you
23:59 can say just simple. Then you run it and you get, wait for it, download. Oh, now it's back down to this.
24:05 Oh, because it was in bits versus bytes. Anyway, 269 megabytes per second down, 190 megabytes up.
24:15 That's cool, right? Yeah.
24:16 It uses multiple connections to like the multicast testing that speedtest.net does and all that stuff.
24:23 And it's written in Python.
24:25 That's pretty great. I think it's funny that a lot of things are in bits per second because like-
24:31 Do you think in bits? Like how many, how big is your hard drive? Oh, it's 30 terabits. Like,
24:38 oh, really? That's a big one. Oh, wait, what? Yeah, exactly. That actually is still big, but-
24:44 Why don't we measure in tenth of a bit? Like decibits.
24:48 Decibits. Dude, my networks are real fast if I measure in decibits. All right. So this would
24:54 have probably just been an extra, like I said. If this is all I do, I type speed. It tells me the
24:58 speed. Excellent. But if you go back here, you go down a little bit. It also has a, because it's written
25:04 in Python, has a Python programmable API. So you can add these capabilities to your code. So you can do
25:10 things like if you've got an app that depends on speed, you could report, hey, it needs to be fast
25:15 enough. You could have a unit test that says, before we run this test with timeouts and things, we need
25:20 to make sure that the internet is working well because we're, I don't know, whatever, right? So you can go
25:24 and just create a speed test object called get servers, get me the best server, pass in the servers,
25:30 how many threads you want to download, how many threads you want to use to upload, all this kind of
25:34 stuff. Very cool, right? Yeah. Actually, this is great. I was just thinking about that because I've
25:38 been working with timeouts a lot, like pytest timeout and long test suites can slow down if
25:44 your network is slower, if you're actually hitting a service. So being able to check that, it's pretty
25:49 cool. And it's pretty cool. It gives you ping time, upload speed, download speed, and you can say only
25:53 do uploads, only do downloads and so on, right? That's like, those are separate functions to call in the
25:59 Python API to test those things. Okay, neat. Apparently you can even set a mini server.
26:03 What is a mini server? I don't know. I don't know. I guess you just specifically set a server. So I
26:10 don't know. Anyway, this is cool. If you want to know the speed of your network on your server or in
26:15 CI or something like that, you know, here you go. Yeah, nice. Indeed. All right. How about extras?
26:20 You got any gathered today? Just so last, just one last week, I mentioned that pytest 8 was out
26:27 and people should upgrade. And so I've been upgrading to pytest 8 and debugging stuff. And I,
26:33 I mean, I haven't, there's no problems except for something weird. So I was looking at a parameterized
26:41 test and then I ran it in my, in PyCharm. I just right clicked on it and said, Hey, rerun this.
26:48 And it ran the parameterized list backwards. It was like one, it was one, two, three, four to start
26:53 with. And then it reran it as four, three, two, one. And I thought I did something wrong. So I spent
26:58 like an hour debugging my code. And then I tried to do like a small example in another virtual environment,
27:06 which happened, happened to have an old version of Py, older version of pytest. And it was working just
27:11 fine. But when I moved it over, it was backwards again. And it, it just turns out it's a, it's a,
27:17 it's a new feature in quotes of a pytest 8. Actually, I am, we're going to link to a defect report.
27:24 I haven't had any feedback on it yet, but I, I, I let the, the core pytest people know that this
27:29 is going on. I don't know if it was on purpose or if it's a surprise, it shouldn't make a difference.
27:34 I just wanted to highlight this so that if you, if you, you know, if you run across this,
27:41 it's, you're not doing something wrong. It's just, it was a change in the behavior. So anyway,
27:45 implementation detail has surface. Yeah. Yeah. All right. Did it promise to run them in order?
27:53 It does. I don't, I don't think that's documented anywhere. Yeah. But people probably assume like
27:58 that it would, right? Well, and I did something terrible. I like, in, in the case where I found out
28:04 I was actually caching the value in my first parameter to compare it with others. Cause I was,
28:09 I was like starting at the zero, like zero offset case at the beginning and, and it failed because
28:15 that was being run last instead. And I'm like, what's going on? And so, yeah, it was bad form on
28:21 my part. I don't, don't cache the first value. So don't do that. So anyway, I'm just going to do what
28:26 you got to do. Yeah. All right. I got a few extras for us as well. First of all, a quick follow-up on
28:31 orb stack. I spoke about orb stack and also saw Jeff triplet says orb stack was the thing he's
28:36 going to. Remember I mentioned this before as an alternative to Docker desktop, open source,
28:40 all that two really quick notes. One, it does, it does require a paid version for commercial use.
28:46 So the free version is only non-commercial, which is, you know, whatever, like take that for that.
28:51 If that is good or bad to you, you know, whatever it's their business model. But I just wanted to
28:55 point out one of the things that this thing did that is super awesome. And I'm just really enjoying it.
28:59 Brian, when you create a Docker container, it's kind of like this isolated thing. And yes, I know you can
29:04 run a shell in it while it's running to basically attach into it and then like go through the terminal,
29:10 go explore it. But sometimes it's nice to just visually look at it or even edit in an editor with
29:16 syntax highlighting all this stuff. So with orb stack, see, there's a little on some of these,
29:21 oh, not this one is wrong. You got to get to the volume section. I don't know if it shows it, but
29:24 in the volume view next to every volume, which is like the little hard drive that's temporarily assigned
29:31 to that container, there's a button to click and open it in Finder or Windows Explorer. And then it's just
29:39 like a thing you could open it up in PyCharm or VS Code or whatever, and just start working inside of one of
29:45 these running things, which is, that's pretty excellent. So just wanted to give that a little
29:50 bit of a shout out. No time for a joke yet. We're talking CSS. CSS is not funny.
29:55 So have you, have you mostly moved over to like orb stack 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.
30:05 I haven't really.
30:06 Okay.
30:06 Although I'm doing more and more stuff with like running some of my apps in Docker. So in a sense,
30:12 yes, but, but not too much, but that's just really delightful. You're like, wow, I can just
30:15 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,
30:27 meta languages or languages on top of CSS that transpile or compile down to it. You know,
30:33 less SAS, SAS, these things that have more like, well, there's all these problems with CSS. Like you can't
30:39 have nesting where you can't have variables and they make it really hard to do stuff with CSS in a
30:44 way that doesn't duplicate code and values and stuff, right? If you want to have a background color,
30:50 you can't just say normal background color is gray. You have to repeat the word gray or to value gray
30:55 50 times through your file, right? Which is a hassle. Well, apparently modern CSS and most of the
31:00 browsers support this have built in CSS nesting already where you can put a value part of your
31:08 CSS design inside of the other one. So like, instead of saying parent space, child, parent space, other
31:14 child, right? You just put the child and other child inside the parent and modern day CSS takes that and
31:20 loves it. Awesome. Right. That's cool.
31:22 I didn't know that.
31:23 I didn't either. I thought you had to use one of these other languages, but apparently you can also have
31:27 variables, right? If you say this minus minus some variable name has a value that will create a thing,
31:34 a variable called minus minus, in this case, it's a main background color. And then later,
31:39 somewhere around here, where you can then go and then actually work with those. I don't know where
31:47 the example is, but somewhere you can go and just say, yeah, the background color is var of this thing.
31:54 It's kind of, I think this is actually super janky. It looks really weird, but yeah, modern CSS has
32:00 nesting and variables with no transpiling, nothing. You just write it and it just runs, which is pretty
32:06 excellent.
32:07 Yeah. The variables thing is the one thing that drove me to a transpiler. So cool.
32:12 Yeah. I think less, fewer steps, right? The modern web has got so gnarly to just get something to work.
32:18 It's like, oh, did you NPM install this? Oh, and then did you set up the watcher so that when you
32:23 change this, it like shakes the CSS tree over here and then transpiles the tri script and then
32:28 what is going on? I just could just type and run like, where did, where did this go wrong? Right.
32:33 I just want my dumb button to be blue, please.
32:36 Exactly. Why is it still gray? I'm going to go play in traffic. If it doesn't turn blue in the
32:43 next 30 minutes, I can't quit programming. I just can't. That's kind of the feeling in the modern web a
32:48 lot of times and like not depending on that stuff because apparently it's already supported is,
32:53 is like, you could just write this. It's great. All right. One final extra before we get to the joke
32:58 is I just want to give a shout out to this new feature in Safari where you can go and you can say
33:03 on any website, file, add to doc, progressive web apps, right? Because they're Apple, they can't call
33:09 it that. They have to say, we have a feature. It's called add to doc. No one else has add to doc.
33:13 It's like, cause they already had it under something else. Like Chrome has it, Vivaldi has
33:17 it and so on. So why, and I'm not a Safari person, right? I kind of think Safari is like one of the
33:22 least good browsers out there, but so why would I give a shout out to this? You're going to get hate
33:27 mail. I'm going to, please don't mail me. Show me how to set a DNS over HTTPS in Safari. Even a simple
33:36 thing like that. Can't do it. Okay. Back, back to Safari in a good way. So one of the things that's,
33:41 I like, I use Vivaldi, right? Everyone knows, I talk about it all the time. You can do this in
33:45 Vivaldi and it's excellent. The problem is if I want to open one of those apps and I don't have
33:50 Vivaldi open, Vivaldi with all of its histories and all the windows I had open come blasting into the
33:55 screen. And then that little thing I was trying to open opens, right? Which I got, or if I'm on the
34:00 big regular Vivaldi and I happen to have that on the side and I close Vivaldi, oh no, that thing closed
34:04 as well. And I forgot it was actually part of Vivaldi because it looked like it's own, right? It's just like a
34:08 hassle. With this, they're like standalone apps that just run completely dedicated. They don't
34:14 even have to be PWAs. They just have to be URLs. You can alt tab or command tab between separately.
34:19 They're really nice. So I encourage people who are on Macs to check this out. If you're not on a Mac,
34:24 well, then don't worry about it. We can title this the grumpy old man episode.
34:29 Write more blog posts. Write more blog posts. Use Safari, even if you don't love it.
34:34 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,
34:44 so much. All right, here we go. I'll tell you, Brian. So there's a woman developer who's being
34:50 distracted by their manager, obviously wearing a suit and tie. I'm saying to talk to her.
34:56 Talked to her and says, apparently talking about this new app, this amazing app that they're about
35:02 to launch. The boss asks, will this solution work for a million concurrent users? The very smart
35:09 developer says, how many concurrent users do we have today? 10, says the manager. Yes. Yes,
35:16 this will work for a million concurrent users. Exactly. You can dream all you want. We got 10 users right
35:22 now. Whatever I'm building is going to be fine until we got a whole lot more time to worry about it.
35:28 Yeah. Does that connect with you? Yeah, very much. Yeah. It's hard to not think about that. Like,
35:34 what if this takes off tomorrow? And we like, you know, well, then we'll add capabilities tomorrow.
35:41 Yeah. Yeah. Exactly. That's why it connects with me.
35:44 So it used to be that in the software world, you could tell if somebody was going into,
35:51 has had a job interview that day was because they were wearing a suit or wearing a tie or something
35:56 like that. And so I, when I first started, I would wear ties on Fridays and people would say,
36:03 you're freaking me, freaking everybody out. Cause everybody thinks you're interviewing for another
36:06 company. 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
36:18 they were yesterday. they might be on the job interview. So thanks. Thanks for the joke and the,
36:28 the wonderful episode. Absolutely. Great to, good to be here with you, Brian and with everyone else.
36:34 See y'all later. Bye.