Python Bytes - #370 Your Very Own Heroku
Episode Date: February 6, 2024Topics covered in this episode: Dokku Summary of Major Changes Between Python Versions How to check Internet Speed via Terminal? speedtest-cli Blogs: We all should blog more Extras Joke See the ...full show notes for this episode on the website at pythonbytes.fm/370
Transcript
Discussion (0)
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 370, recorded February 6th, 2024. I'm Michael Kennedy.
And I'm Brian Ocken.
And this episode is brought to you by us. Check out our courses, the ones over at TalkPython Training.
We have 250 hours of them there, including some from Brian.
But Brian also has the complete PyTest course, which just got finished up. So check that out as well. Links in the show notes,
of course, and connect with us on Macedon or all over there, the show, Brian and me.
And yeah, with that, Brian, how are you doing? I'm doing good. It's funny, the date,
one of the things that I've noticed lately, I i've actually had to write a couple checks recently and what yeah the hard part is not the day because my watch tells me what day it is
uh or the day you know the day of the month and i usually remember the month but i i'm still having
trouble with 2024 man so here's the problem it's definitely a problem yeah anyway when i gotta
write stuff these days,
it's like I break out the claw.
I used to write so good when I was in grad school.
It was like beautiful writing, all right?
Not cursive, but just really fine print.
It was excellent to read.
Now you would be like, 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. That's funny. I write all the time. And I was writing, um, uh, I found some old ID
cards from like high school and junior high. And, um, and my daughter, I showed him to my daughter
and she's like, how is your hand? Like your signature's the same now as it was in like
eighth grade. I don't know. I just nailed it, man. So anyway,
or I haven't gotten any better since eighth grade. Right off the bat. That's awesome.
Yeah. Well, what topics are connecting with you today? 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. Is it December, but a little bit before then.
I can't remember.
Yeah.
Yeah.
Like November or something like that.
Okay.
So, um, but, uh, wanted to do like a summary.
So, um, I've been thinking about like, should I upgrade projects?
So some of my projects are still in three 11, which is fine, but hopefully I'm kind of like halfway between three 11 and three 12.
So there's an article called, um, and we. But hopefully I'm kind of like halfway between 3.11 and 3.12.
So there's an article called, and we do this every couple of years, I guess,
a summary of major changes between Python versions.
It's like reasons, you know, look back as to why you might want to update.
And this is kind of a fun walkthrough.
So hopefully you're not still in 3.7 because three, seven and earlier are all end of life.
Yeah.
You're living in the past of you on three,
seven.
Yeah.
But some of those things that, that some of the things that came in,
it's kind of a nice thing looking,
we we've had F strings since three,
six.
So definitely use F strings everywhere.
And then underscores in numeric literals.
And you know what?
I,
it's been around since three,
six,
but I've just started using this. I, I know it's been around since three six but i've just started
using this uh 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 oh yeah we can put underscores in in there it's it's nice yeah
i like that one a lot actually i've been doing that a lot too it really makes a difference like
is it ten thousand or a hundred thousand or is it a million or 100,000? Yeah, it's really nice.
Anyway, a couple and data classes also been around since three, seven.
Anyway, those are ancient history.
Now, let's jump ahead.
I'm just going to highlight
a few of these for people.
Three, eight, of course,
we had the Walrus operator in three, eight
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.
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 3.9, you don't have to.
You can just do the lowercase, 3.9 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 tell people what the parameter list looks like.
So I've been more using, I do use the typing,
like type checkers, PyPy and stuff.
Or was it, yeah, I don't know.
I can't remember.
It's all built in.
Yeah.
But mostly I'm doing it not for like correctness or anything, but for readability.
So that's one of the things I like.
And editors.
One other thing that was really notable in that release was they added remove prefix, remove suffix.
Yeah.
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, because it just says,
if any of these letters appear in the beginning,
start taking them away, right?
And people imagine they were this remove,
like this word at the beginning,
take it away if it appears.
And so this is here and I always forget it's here
and I should be using it more.
Actually, this is another thing that I've just started using more now, even though it's been in since 3.9 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.
And sometimes people postpone it because they're supporting multiple versions of Python.
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 since it's been, we're doing only doing three, eight and above.
So we can, or three, nine and above, you can use some of these things.
3.10 brought us structural pattern matching.
I can't believe it's been that long.
But yeah, the we now
have switch cases in Python mother, their match case statements, but totally fun. 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, 31010 also brought us slots in data classes.
That's pretty cool.
But I've had no problems with switching over to 3.12 in any of my projects.
So I think people should just jump the gun 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 uh from
different versions there's uh there's different changes to the typing extensions and stuff but
there's a a project called pi upgrade that'll allow you to just um automatically upgrade a lot
of your source code and i think that's cool and i've done that for a couple projects but also
i just sort of upgrade and and 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 pi upgrade your
projects I haven't used pi upgrade it's looking interesting maybe I should okay I've used fluent
though I think it's fluent is what it's called 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 i don't you know if it upgrades say an optional of a thing to thing pipe
none i don't necessarily want that right there's certain things where i know i could have a
different syntax but i kind of like it the way it is, you know, so I don't necessarily do that. Okay.
Although I do use rough format these days, and I think rough format kind of does that as well, but not as aggressively.
Yeah, one of the things that article brings up some different things about different versions of the language.
But it respects the requires Python setting in your pyproject.toml.
So if you have that set, Black will do that.
And yeah, I'll have to look that up.
I'm not sure if Ruff does that.
Anyway, fun article to look back and go, hey, why am I not using these features now? Because we've we've already upgraded. Yeah, excellent. I think
rough does, but I don't know 100% for sure either. All right, Brian, you want to talk about a Roku
sort of? Sure. All right. So Roku, you know, the 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.
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, I can't just run software for free
for everyone. We're going to stop this. But it's a hassle, right? So people might have had the
feeling like, hey, I'm I had this change forced upon me against my will. 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?
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?
So I want to tell people about Doku,
doku.com with two Ks, D-O-K-K-U.com.
It is a open source platform as a service alternative to Heroku. So basically here's
what you do. You create a $5 server somewhere, maybe 10, if you want to go crazy, like Digital
Ocean or something like that. You go in there, you run Dokuku install and it just runs on top of docker 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 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 and then later somewhere down the line you can come over
and you just say um basically doku get sync give it your app give it your uh your github repo or
your get 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 start you, you give it, it also, it integrates with
many of the same constructs that they had at Heroku. 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,
but you basically had this file that's, that was kind of like a Docker file that said, when the
app starts, this is the command to make it run, right? Like a flask run or UV acorn run or whatever, right?
Like you just tell it the stuff to do to start.
And so you basically do that and then you just get push.
Yeah.
Or scale out, right?
So you can say, hey, I would like to scale up my web app to have two nodes.
Boom.
Done.
Do that on your local machine and off you go.
That's cool, right?
Yeah. two nodes, boom, done. Do that on your local machine and off you go. That's cool, right? 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.
No, it just runs multiple containers
in a cluster on there, right?
So everything this does is it basically
is orchestrating Docker
on some particular piece of hardware that you set up.
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?
But in general, get like a $10 VM
on one of the clouds that is more focused on that,
like DigitalOcean.
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. Wow pretty neat yeah oh kim is pointing out maybe
that i'm i say doku he's right so that would be doku maybe okay i think well d-o-k doc is probably
but it's d-o-k oh yeah it's two it's two k's, right? Probably, yeah. Yeah. I should know this, having a last name with 2Ks in it.
Yeah, it would be totally doku.
Doku, okay.
Because it's a riff on Docker, right?
Yeah.
There's also a ton of plugins you can get for it, which is pretty cool.
So if you look at it, you can see there's stuff that just 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.
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.
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.
If you want,
like this is not required.
Yeah.
Right.
So it gives you
a little bit more features.
It also gives you support
and it's like $850 once.
A month.
No, it's just once.
If your company says like,
we really want something
we can get support with
and whatever, you know.
Yeah.
It's an option out there.
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.
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?
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.
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.
On GitHub, they do have a sponsor of this project.
So you can give them a few bucks if you want.
Yeah.
Yeah. And what about their GitHub? they do have a sponsor of this project. So you can give them a few bucks if you want. 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.
It's 500 contributors. Some updates even yesterday, so.
Yeah, exactly.
It's like it's mostly built with Go,
but has a little Python love in there.
Nice.
Okay, looks fun. Yes, indeed. What's like it's mostly built with Go, but has a little Python love in there. Nice. Okay. Looks fun.
Yes, indeed. What's your next one?
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.
But okay, so I've got some information. So one, uh, one of the great things is, uh, we can follow Jeff triplet cause he's leading the way here. He's right. Trying to do one blog post a day
in February. Um, so let's get more people trying to do it. You can start late. It's only the sixth.
Um, you can start from now, uh, and move on. So, um, want to highlight Jeff triplet. So awesome.
Uh, starting, starting this. Um, one post today in february and let's
let's go through the ones he's got so far um so on february 1st he said he wrote a post called
choosing the right python and django versions for your project so kind of i was just thinking that
you just uh use the latest all the time, but interesting take on it.
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.
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.
So he picks out Bartender and Alfred.
I've used Bartender. I haven't used Alfred yet. So I'm kind of intrigued favorite software. 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.
Bartender is so good.
It is so good.
And I don't use Alfred.
I use Raycast, which is incredible.
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 other people.
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
uh web apps and things and i i saw cal.com which is kind of an alternative to uh calendly and so
i'm like hey i should check that out so it looks pretty nice um so i kind of love these sorts of
things of like what software do i use and every day so that's great nice i see a lot of
section with stuff that that i like as well there yeah um on the show uh i was surprised to see uh
sublime text still um so i haven't used sublime text it's a great product but i haven't used it
for a while uh february 3rd uh what's your go-to comfort media um kind of fun just sort of what
do you what do you do in your free time? Those are fun posts. Why not?
February 4th, Django
Apps. I actually use
Rough Cut. So
this sort of thing I love.
I wanted to do one on
PyTest plugins of 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 just great.
You can kind of go and look those up if you want.
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.
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.
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. 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.
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,
this notion that pick some way to write down whenever you have an idea, whether it's a notebook
or, or you email yourself or text yourself or something, 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 and grab an idea. So yeah, 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
to do list and I have a just separate category of to do's and every blog post. I just check them
off when I write it. But I moved a lot of my stuff to notion and I just absolutely loving
notion these days. It's, it's pretty
amazing. And so maybe it'll find its way over there, but that's not really important. Just
have a place daily, 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. Yeah. I think I have too many ways. So I've got like paper slips that
I write notes, notes down. I've got notebooks, actual physical notebooks. I've got, um, uh, email myself and it just sort of is a lot.
I've had to narrow it down to something manageable. Um, also, uh, the last thing around this writing,
writing more is, um, if you want to highlight that you're not using AI to help you, help you write. Um, there's a website called not,
not by AI dot FYI that has these little, uh,
downloadable,
uh,
icons or logos that you can put on your,
on your work to say that you,
it was handcrafted and you didn't do it by AI.
So I thought,
I love it.
I absolutely love it.
Put a badge on your work.
Yeah.
So,
um,
I,
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,
I haven't tried doing that yet.
Interesting.
So,
so that's kind of my topic is people blog more,
please.
Hopefully about Python,
but hopefully not with AI And hopefully not with AI.
And hopefully not with AI.
And find these AI to think of content
and sort of,
but don't just take the AI and paste it in.
Yeah, yeah.
Anyway.
We should get people ideas.
So what you got for us next?
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.
Okay.
How fast is your server?
If you had a server at AWS,
or you had a server at DigitalOcean or wherever, how fast is it? I don't know.
No idea. 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 Fiverr.
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, which that's good.
But how do I do this on my server?
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.
Cool.
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. pip x install speed test dash CLI. That is how we pronounce
this. I know the X is invisible, but not silent. So pip x install speed test dash CLI. And then
somewhere down here, you just run it with different options. So let's go over here to my
server. And we can just say, speed test dash 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. 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 speed, just a speed test dash CLI dash dash bytes.
Cause my brain works in megabytes, not megabits.
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 and you run it and you get, wait for it.
Download. Oh, now it's back down to this.
Oh, because it was in bits versus bytes.
Anyway, 269 megabytes per second down, 190 megabytes up.
That's cool, right?
Yeah.
It uses multiple connections to like the multicast testing that speedtest.net does and all that stuff.
And it's written in Python.
That's pretty great. that speedtest.net does and all that stuff. And it's written in Python.
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, but...
Why don't we measure in tenth of a bit
decibels do my my networks are real fast if i measure in decibels all right so this would
probably just been an extra like i said if this is all i do i type speed it tells me the speed
excellent um 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.
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, how many threads you want to download, how many threads you want to use to upload, all this kind of stuff.
Very cool, right?
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 a service so yeah check that that's pretty cool 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 okay neat 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. Yeah. Nice. Indeed. All right. How about extras?
You got any gathered today? 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.
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 one it was one two
three four to start with and then it reran it as four three two one and I thought I did something
wrong so I spent like an hour debugging my code and then I tried to do like a small example in another virtual environment, which
happened to have an old version of 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. 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 was a change in the behavior.
Implementation detail has surfaced. If you run across this, you're not doing something wrong. It's just, it was a change in the behavior. So anyway.
Implementation detail has surfaced.
Yeah.
Yeah.
All right.
Did it promise to run them in order?
I don't think that's documented anywhere.
Yeah, but people probably assume like that it would, right?
Well, and I did something terrible. I like 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 I was like starting at the zero like zero offset case at the beginning.
And it failed because that was being run last instead.
And I'm like, what's going on? Yeah, it was bad form on my part.
I don't don't cache the first value.
So don't do that.
I'm just going to do what you got to do.
Yeah.
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 may if that is good or bad to you you know whatever it's their business
model 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 and all this stuff.
So with OrbStack, see there's a little on some of these.
Oh, 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 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 so i just wanted to give that a little
bit of a shout out uh no time for a joke yet we're talking css css is not funny so have you have you
mostly moved over to like orb stack and not using docker desktop then yes but i mean it's really
just like something running in the background. So Docker commands work.
I haven't really.
Okay.
Although I'm doing more and more stuff with like running some of my apps in Docker.
So in a sense, yes, 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.
Yeah.
Okay.
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 SAS, S-A-S-S, these things that have more 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? If you want to have a background
color, you can't just say normal background color is 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 built-in CSS nesting already, where you can put
a value, part of your CSS design inside of the other one. 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.
Yeah, I guess I didn't know that.
I didn't either. I thought you had to use one of these other languages,
but apparently. And 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, it's a 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.
You can go and just say, yeah,
the background color is var of this thing.
I think this is actually super janky.
It looks really weird.
But modern CSS has nesting and variables
with no transpiling, nothing.
You just write it and it just runs, which is pretty excellent.
Yeah, the variables thing is the one thing that drove me to transpiler.
So, yeah, cool.
Yeah, I think 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 shakes the CSS tree over here and then transpiles the triscript and then what is going on i just
could just type and run like where did where did this go wrong right i just want my dumb button to
be blue please exactly why is it still gray i'm gonna go play in traffic if it doesn't turn blue
in the next 30 minutes i 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 like
you could just write this.
It's great.
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 doc
progressive web apps, right? Because they're Apple, they can't call it that. They have to,
we have a feature it's called add to doc. No one else has add to doc. It's like,
cause they already had 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, but so why
would I give a shout out to this? You're going to get hate mail. I'm going to, please don't mail me.
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 like I use Vivaldi,
right? Everyone knows, talk about it all the time. You can do this in Vivaldi and it's excellent. 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 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 just like a hassle with this.
They're like standalone 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.
We can title this the Grumpy Old Man episode.
Write more blog posts.
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?
Yeah, let's.
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, 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, 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, talk to her and says, says apparently talking about this new
app, this like amazing app that they're about to launch says, will that the boss asks, will
this solution work for a million concurrent users?
The very smart developer,
a woman like Silver says,
how many concurrent users do we have today?
10, says the manager.
Yes, yes, this will work for a million concurrent users.
Exactly.
You can dream all you want.
If 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.
Yeah.
Does that connect with you?
Yeah, very much.
Yeah.
It's hard to not think about that.
Like, what if this takes off tomorrow?
And we're like, you know,
well, then we'll add capabilities tomorrow.
Yeah.
Yeah.
Exactly.
That's why it connects with me.
So it used to be that in the software world,
you could tell if somebody
who was going into
had a job interview that day was because
they were wearing a suit or wearing a tie
or something like that.
So when I first
started, I would wear ties on Fridays
and people would say, you're freaking
everybody out because everybody thinks you're interviewing for another company.
Hey, just keep them on edge.
Just don't let them don't let them get too comfortable.
Yeah.
But now I kind of I watch out for any of my coworkers that are not wearing the same shirt they were yesterday.
They might be on the job interview.
Anyway.
So thanks. Thanks for the joke and the job interview. Anyway. So thanks.
Thanks for the joke and the wonderful episode.
Absolutely.
Great to,
good to be here with you,
Brian and with everyone else.
See y'all later.
Bye.