WEBVTT

00:00:00.001 --> 00:00:03.680
Have you heard about HTMX? We've discussed it a time or two on the show.

00:00:03.680 --> 00:00:10.120
We're back with another episode on HTMX, this time with a real-world success story and lessons

00:00:10.120 --> 00:00:16.280
learned. We have Sheena O'Connell on to tell us how she moved from a React Django app to pure

00:00:16.280 --> 00:00:23.920
Django with HTMX. This is Talk Python To Me, episode 484, recorded October 29th, 2024.

00:00:23.920 --> 00:00:27.000
Are you ready for your host, here he is!

00:00:27.400 --> 00:00:32.380
You're listening to Michael Kennedy on Talk Python To Me. Live from Portland, Oregon,

00:00:32.380 --> 00:00:34.480
and this segment was made with Python.

00:00:34.480 --> 00:00:42.700
Welcome to Talk Python To Me, a weekly podcast on Python. This is your host, Michael Kennedy.

00:00:42.700 --> 00:00:48.040
Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython,

00:00:48.040 --> 00:00:54.020
both accounts over at fosstodon.org, and keep up with the show and listen to over nine years of

00:00:54.020 --> 00:00:59.740
episodes at talkpython.fm. If you want to be part of our live episodes, you can find the live streams

00:00:59.740 --> 00:01:05.520
over on YouTube. Subscribe to our YouTube channel over at talkpython.fm/youtube and get notified

00:01:05.520 --> 00:01:12.000
about upcoming shows. This episode is sponsored by Posit Connect from the makers of Shiny. Publish,

00:01:12.000 --> 00:01:16.660
share, and deploy all of your data projects that you're creating using Python. Streamlit,

00:01:16.820 --> 00:01:24.660
Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards, and APIs. Posit Connect supports all of

00:01:24.660 --> 00:01:30.460
them. Try Posit Connect for free by going to talkpython.fm/Posit, P-O-S-I-T.

00:01:30.460 --> 00:01:36.720
And this episode is brought to you by Bluehost. Do you need a website fast? Get Bluehost. Their AI

00:01:36.720 --> 00:01:42.260
builds your WordPress site in minutes, and their built-in tools optimize your growth. Don't wait.

00:01:42.260 --> 00:01:48.780
Visit talkpython.fm/bluehost to get started. Gina, welcome to Talk Python To Me.

00:01:48.780 --> 00:01:50.360
Thanks so much. Happy to be here.

00:01:50.360 --> 00:01:56.460
I'm happy to have you here. We've got an awesome topic queued up. One that I just, I don't know if

00:01:56.460 --> 00:02:01.460
I'll ever get tired of coming back to this because I'm just such a fan of simplicity and getting stuff

00:02:01.460 --> 00:02:07.240
done and not like, let's see how many layers of things we can pile on. And by that, I mean,

00:02:07.920 --> 00:02:14.320
HTMX as a success story for going from a whole bunch of front-end stuff, a bunch of different

00:02:14.320 --> 00:02:19.300
multi, multiple apps, you know, JavaScript front-end, Django back-end, talking to each other,

00:02:19.300 --> 00:02:21.720
but kind of being separate as well. Oh, yeah.

00:02:21.720 --> 00:02:25.560
And just switching to HTMX. And you wrote up a really cool essay on this that we're going to

00:02:25.560 --> 00:02:27.980
dive into, so, and share your experience.

00:02:27.980 --> 00:02:33.820
Pretty fantastic experience overall. I was really surprised by HTMX when I came across it the first

00:02:33.820 --> 00:02:39.680
time because there are so many fashionable front-end libraries and frameworks. So when I heard about it,

00:02:39.680 --> 00:02:46.620
I was like, oh, it's another one of those, whatever. And then I went to a DjangoCon, I think it was 2022,

00:02:46.620 --> 00:02:52.440
and I saw a talk from Chris May, who's in the audience, and that's got me excited about it. And

00:02:52.440 --> 00:03:00.060
yeah, that's kind of when my whole story started. What I had been doing before was working with,

00:03:00.060 --> 00:03:05.740
so I had this team, and we were building a thing, and we had a React front-end. So on the front,

00:03:05.740 --> 00:03:11.420
that's a normal thing. Like if you wanted a modern front-end application, you'd use something like

00:03:11.420 --> 00:03:17.900
React or Vue or one of the many competitors. And then on the back end, we had Django. And I think that's

00:03:17.900 --> 00:03:23.020
like a fairly normal, fairly accepted way to do things, or it has been for a long time.

00:03:23.020 --> 00:03:29.180
But I think it's like, I think it's a little faulty. I think that front-end web development has

00:03:29.180 --> 00:03:35.360
been in a little bit of a complexity death spiral for the last little while. And like, sometimes it's

00:03:35.360 --> 00:03:40.160
useful, sometimes it's really helpful. But like for some things, you need certain tools in the front

00:03:40.160 --> 00:03:45.960
end, I think. But yeah, I think it's, things have been going in the complexity for a direction for a

00:03:45.960 --> 00:03:48.620
long time. And HTML solves a lot of problems.

00:03:48.620 --> 00:03:54.140
Right. Well, you think back, you know, think back to the jQuery days. How did you use jQuery? You

00:03:54.140 --> 00:04:00.140
included a CDN, or if you're wild, you might download it and include it in your own static content. And

00:04:00.140 --> 00:04:05.420
then you just started using it, right? And just layers and layers have just been building. And

00:04:05.420 --> 00:04:11.820
JavaScript of 2024 era looks nothing like 10 years ago, 15 years ago, JavaScript.

00:04:11.820 --> 00:04:16.560
Yeah. I would say it's one of the more complicated programming environments compared to something

00:04:16.560 --> 00:04:21.580
like C++, right? Because there's so many steps in there, so many implicit linkings and stuff.

00:04:21.580 --> 00:04:25.880
Yeah, there's a lot of dark magic under the hood. It's very hard to know what's going on. And

00:04:25.880 --> 00:04:31.160
I think like one of the challenges is that a lot of people used to get into web dev as their gateway

00:04:31.160 --> 00:04:36.300
drug to programming. Like they'd start off with web dev and then branch out from there. But now web dev is

00:04:36.300 --> 00:04:42.780
like this magic weird box with so many layers. And I think it's, it's sort of messed a lot of people

00:04:42.780 --> 00:04:47.740
up. It's a challenge to get started in the way that people used to get started. And it's like the barrier

00:04:47.740 --> 00:04:54.620
to entry level programmers used to need to be here. And now it's here. And yeah, there's a lot of key

00:04:54.620 --> 00:04:59.980
things to the ecosystem as a whole. But yeah, like all the build steps, all the magic things that happen

00:04:59.980 --> 00:05:04.780
under the hood. And the fact that you have to like tasks switch between completely different applications

00:05:04.780 --> 00:05:10.860
and completely different like ways of thinking. So for me, I've always loved Django. It's so good.

00:05:10.860 --> 00:05:16.700
So with the thing that I was building, I wanted Django because I needed to build a thing really,

00:05:16.700 --> 00:05:21.980
really fast. And so my efficiency was important. And then it was like, I need a good front end. And

00:05:21.980 --> 00:05:27.660
react was, was a clear choice at the time, but it means like switching, like, like for me to work

00:05:27.660 --> 00:05:32.460
on this thing, I need to keep holding the Django application and the react application in my head

00:05:32.460 --> 00:05:37.500
and how they talk. And it's not just react. It's like Redux and Saga and side effects and asynchronous

00:05:37.500 --> 00:05:43.740
goodies. And, and then on the Django side, it's all of that. And Django is, I think much simpler to get

00:05:43.740 --> 00:05:49.260
your head around than react. Actually, it's a tricky thing. It definitely is a tricky thing. And one thing I

00:05:49.260 --> 00:05:54.940
would just like to put out early before we get too much mail is this is not necessarily a,

00:05:54.940 --> 00:06:02.140
a hate on JavaScript. Oh no, no. There are people in the node space that are super fans of HTMX. And I

00:06:02.140 --> 00:06:08.140
think what is not obvious about the benefits of HTMX, as we get into it, we'll, we'll talk about some of

00:06:08.140 --> 00:06:12.060
these things, but you were just touching on then, like you've got this react front end, it has its own

00:06:12.060 --> 00:06:17.420
state. It also has its own capability. So it's running in the client side. So it can't talk to file systems or the

00:06:17.420 --> 00:06:22.780
database. It can only talk to APIs. On the other hand, you've got the Django app, which probably is

00:06:22.780 --> 00:06:27.900
not talking to APIs, but talks to the database talks to, you know, the server levels things. And you've

00:06:27.900 --> 00:06:32.380
got to, as you're working on this app, think, okay, I'm in this context. That means no database. I'm in

00:06:32.380 --> 00:06:37.260
this context. That means primarily just database. Right. And it's just, you have these two worlds.

00:06:37.260 --> 00:06:41.900
And if you could say, can I just write in one of them? Yes. And the JavaScript people might even

00:06:41.900 --> 00:06:47.340
pick like, I just want to stay in JavaScript, but always node or always at least, you know, pick one

00:06:47.340 --> 00:06:52.220
of the styles of programming and not just constantly switch back and forth between these. You have

00:06:52.220 --> 00:06:56.620
browser capabilities, you have server capabilities, you have browser information. Like just, that is just not

00:06:56.620 --> 00:07:01.980
productive. It's not the best. Right. And so as much as you can avoid that, and as we'll see,

00:07:01.980 --> 00:07:07.900
HTML is super easy about keeping it in one place. Right. So that's, I think that's one of the big

00:07:07.900 --> 00:07:11.740
things that people should, should be honing in on as we talk about this. What do you think?

00:07:11.740 --> 00:07:16.540
If I came across as hating on JavaScript, I think JavaScript did. I use it a lot where it's needed.

00:07:16.540 --> 00:07:21.420
I think it is a fantastic tool in the toolbox that I'm on sides with you, that it's just the

00:07:21.420 --> 00:07:26.780
complexity of switching contexts all the time. It slows you down and it's a lot to keep in your head.

00:07:26.780 --> 00:07:31.660
And so it's like, for me, when I was working on this application and needing to switch contexts all the

00:07:31.660 --> 00:07:37.020
time, it's like, like you can't just make a thing. Like you have to like do the dance to make the

00:07:37.020 --> 00:07:43.980
thing. And it's. Instead of four different chained file watchers to do their things and stuff. Right.

00:07:43.980 --> 00:07:49.340
So it just like adds a little bit of a, like you're slower than, that you would like to be. There's like

00:07:49.340 --> 00:07:53.580
more tedium than there should be. It'd be nice if you could just like build the thing quickly in a

00:07:53.580 --> 00:08:00.300
simple way and it just works and is beautiful. And HTML kind of allows that along with other tools.

00:08:00.300 --> 00:08:05.020
Yeah. So for me, that context switching was like a painful, painful thing. And for the team I was

00:08:05.020 --> 00:08:09.980
working with as well, like I had a bunch of juniors on my team and it was so hard to get them productive

00:08:09.980 --> 00:08:13.340
because it was like, okay, do you want to be productive on the back end? Or do you want to be

00:08:13.340 --> 00:08:18.460
productive on the front end? And then on the front end, like that was complicated because of the,

00:08:18.460 --> 00:08:24.700
again, React, Redux, Redux saga. So, so they were all just like suffering. And then.

00:08:24.700 --> 00:08:29.260
To put real features into place, you've got to do a vertical slice, right? Which hits most,

00:08:29.260 --> 00:08:33.020
if not all, you know, you probably, you probably have to touch the React front end.

00:08:33.020 --> 00:08:33.260
Yeah.

00:08:33.260 --> 00:08:38.700
You probably need some new tiny bits of UI design. So CSS and maybe some

00:08:38.700 --> 00:08:44.700
SAS build step there. And you know, like then you're doing the server side bits and then you're

00:08:44.700 --> 00:08:47.740
doing a database migration and it's just like, it's end to end, right?

00:08:47.740 --> 00:08:52.300
Yeah. And for some people that's not even reasonable to expect them to have all of those

00:08:52.300 --> 00:08:56.540
skills, those end to end skills. And then it's like, you have to make your team complicated. You

00:08:56.540 --> 00:09:01.340
have to have a back end team and a front end team and they need to now integrate with each other. And so

00:09:01.340 --> 00:09:03.980
like the team resembles the team stack.

00:09:03.980 --> 00:09:04.780
Yeah.

00:09:04.780 --> 00:09:09.180
Yeah. That's interesting. Yeah. We have a group for this later, a group for that later. And you know,

00:09:09.180 --> 00:09:12.860
look, if you're a huge company, maybe that actually makes tons of sense. Maybe I'm not,

00:09:12.860 --> 00:09:17.420
I'm not saying it does, but it may, but when you're a small company, it just doesn't. Right.

00:09:17.420 --> 00:09:17.580
Right.

00:09:17.580 --> 00:09:21.180
When you're building something, you do need to think about the team that's going to be building

00:09:21.180 --> 00:09:25.340
it. The skills right now, the skills that they're going to have in the future, the skills that you're

00:09:25.340 --> 00:09:30.700
going to need to pull into the team in the future. And so it's, I don't know if it makes sense to,

00:09:30.700 --> 00:09:36.780
well, in my context, it didn't make sense to, to split up the team. If I had the tools to allow

00:09:36.780 --> 00:09:40.300
everybody to be in the same place from the beginning, that would have been freaking fantastic.

00:09:40.300 --> 00:09:44.780
Yeah, absolutely. That would be awesome. Let's talk a bit about HTML. So we, we said,

00:09:44.780 --> 00:09:49.980
Hey, we've been talking about this by and sort of broad terms, but let's be a little bit specific.

00:09:49.980 --> 00:09:56.700
And maybe you could tell us like, what is this HTML and why is it, why is it not just a different

00:09:56.700 --> 00:10:00.700
flavor of reactor view or something? And then maybe we could talk to you a few examples.

00:10:00.700 --> 00:10:08.220
The way I explain HTML to myself is that like, imagine looking at HTML, HTML is with us. It's,

00:10:08.220 --> 00:10:13.340
it's going to be with us forever, maybe not forever, but for a very long time. What, what if we like

00:10:13.340 --> 00:10:16.620
There've been many, yeah, there've been many attempts to replace it and they were all bad.

00:10:16.620 --> 00:10:22.300
Yeah. Yeah. So it's, it's probably going to stick around for the foreseeable future and it's everywhere.

00:10:22.300 --> 00:10:28.700
And what if we could just augment it slightly so that it could do what we needed it to do in the

00:10:28.700 --> 00:10:34.620
modern web. Like we, like since HTML got invented, like it's quite a simple tool, but now we need to

00:10:34.620 --> 00:10:40.940
do all this extra stuff because people expect all sorts of like interactivity in the user interfaces.

00:10:40.940 --> 00:10:47.420
They expect asynchronous workloads and things like that. And what if HTML could do that? And it can

00:10:47.420 --> 00:10:52.700
do that. And it's not actually that hard to make it do that. You just need to add a few extra attributes.

00:10:52.700 --> 00:11:00.220
And so what HTML is, is a really, really small JavaScript library. And you just include it as a

00:11:00.220 --> 00:11:05.660
script tag in your page and then it's there and it's available and it's installed just like the old,

00:11:06.300 --> 00:11:12.060
the good old days of jQuery. And yeah, you could just go back and throw it in a CD and if you wanted,

00:11:12.060 --> 00:11:15.980
couldn't you? That's right. I hadn't really thought about it. From there, you, you just have these extra

00:11:15.980 --> 00:11:21.820
attributes on your HTML tags that do different things. So for example, like, so HTML says a lot of

00:11:21.820 --> 00:11:27.420
different stuff, but if you were to like 80, 20 years and look at the parts that are the most used,

00:11:27.420 --> 00:11:33.660
then basically the stuff you'll use the most are like tying into events, like click event handlers or

00:11:33.660 --> 00:11:40.940
whatnot. And then when you click on the thing or whatever, it'll send in a request to a backend and

00:11:40.940 --> 00:11:50.300
the backend responds with an HTML fragment. And then you swap that fragment into your page somewhere.

00:11:50.300 --> 00:11:57.100
So if you were to look at the HTML documentation, the hello world of HTML is a button and the

00:11:57.100 --> 00:12:03.340
button says, has the attributes HX post clicked. So it's saying like, when you click on the button,

00:12:03.340 --> 00:12:08.780
then send a post request to a URL that's like forward slash click. So you can decide where,

00:12:08.780 --> 00:12:16.220
like what HTTP method you're using and where it's going and what event you're tying into. And then

00:12:16.220 --> 00:12:22.300
when the response arrives, then you do something with it. And the response is HTML. It's not a JSON response that you,

00:12:22.300 --> 00:12:30.060
they need to like turn into HTML. It's, it's plain old normal HTML. So it's super simple to write. And then you,

00:12:30.060 --> 00:12:36.540
you take that HTML and you put it somewhere on the page. So maybe you swap the current buttons that you just clicked with,

00:12:36.540 --> 00:12:43.500
with the HTML that was returned, or maybe you take it and you put it like at the end of another element. You can, you can, you can, you can,

00:12:43.500 --> 00:12:59.500
you can, you can, you can, you can, you can, you can pre-pen stuff. You can replace entire elements. You can replace the internals of elements. And that little pattern is actually really, really powerful. And you can tie into all sorts of different events. So there's like interacting with individual elements, like a click or a form submission.

00:12:59.500 --> 00:13:05.740
You can say like on load or like on scroll or all sorts of different things. So, so events. Yeah.

00:13:05.740 --> 00:13:21.500
Absolutely. So one of the motivations that Carl Carson Gross puts there is why should a and form only be able to make HTTP requests? Why should you only be able to click and have click and submit events, trigger them, right? And all these things, you know,

00:13:21.500 --> 00:13:41.500
So it's kind of like just extending some of these niche features. Like you can click a button, but not an image in HTML to, to all the pieces. And then like you said, exchanging fragments of HTML, right? Like just instead of sending JSON back and then having the client side, turn that into HTML, just do it on the server and stick it where it goes. Right. Basically that's it.

00:13:41.500 --> 00:13:42.240
Basically that's it.

00:13:42.240 --> 00:14:07.980
It's, it's dead simple to code as well, which is, which is fantastic. So it's a simple, you're just server side rendering some HTML like we used to a long time ago. So it feels, it feels very familiar to people who got into web dev a long time ago. The code itself is very, very easy to write. Like initially you might like scratch your head. It's unfamiliar, but give yourself a couple of hours and it'll start to feel familiar. It's yeah. It's lovely to work in.

00:14:07.980 --> 00:14:18.980
Yeah. I would also encourage people that want to get started with this and play with this. The examples that they have on the website are pretty comprehensive, right? If you scroll through, I don't know how many there are, maybe 20 or so.

00:14:18.980 --> 00:14:20.540
Yeah. More than that. It's a lot.

00:14:20.540 --> 00:14:35.260
Yeah. There's a lot of them here. And then, so if you go into each one of them, it'll show you basically some interesting things. So if you go to the first one, the click to edit, it says, here's a bit of static HTML, like a label and a div, and then a button that says click to edit.

00:14:35.260 --> 00:14:49.480
And all it has is HX get, and it says edit this thing. Right. And when you go and click it, like there's a little example at the bottom, you click it. That's all fun. But if you open up the bottom, there's like a little history of interactions.

00:14:49.920 --> 00:15:11.340
And like, I don't know what you call it, but like a web history that shows what's transferred. So when you, you click edit, here's what the response was. And it shows the HTML fragment, which in itself is a new HX has HX events. And then when it saves it, it goes back to the static and so on. And I think it's a really pretty easy way to get a sense for what it is. What do you think?

00:15:11.340 --> 00:15:21.340
Yeah, yeah. Yeah, I think so. I think so. Those examples are great. I think like one thing that I like to do is use HTML and a thing called Alpine JS together.

00:15:21.340 --> 00:15:32.140
So for me, HTML is great for when the data needs to be passed back and forth. But like for something like this, I'd probably use something like Alpine just to say like, show and hide, hide the form.

00:15:32.340 --> 00:15:47.460
Yeah, it's also fantastic. So you don't like strictly need it, I suppose, but it does save on like some back and forth. And it does make things a little bit more like in one place, a little bit more like locality of behaviors, a useful thing.

00:15:47.780 --> 00:15:58.780
So now we're looking at Alpine JS hello world. And this is cool because it also it's like HTML in that it just adds a couple of extra attributes to your HTML tags.

00:15:58.780 --> 00:16:12.780
And the 80/20 of this is that you can define variables and those variables are like this, like a state, and they are defined within the scope of the place where you defined it.

00:16:12.780 --> 00:16:22.780
So if you if you have like div x data equals open false and as a JSON object, then it's like within the scope of the stuff, we have this thing called open and its initial value is false.

00:16:22.780 --> 00:16:28.780
And then you can do things like click on a button to to change open to true or to toggle to toggle open.

00:16:28.780 --> 00:16:35.780
So you can have it like show form true or false. And then you can say then you can like say here it says span extra equals open.

00:16:35.780 --> 00:16:42.780
So we only show that under certain circumstances. And you can also have like not open or you can have like it speaks JavaScript.

00:16:42.780 --> 00:16:44.780
So you can do some interesting things in there as well.

00:16:44.780 --> 00:16:52.780
Yeah, this is pretty interesting. This is yeah, this is something I have not really used, but I do hear Alpine and HTML X mentioned together frequently.

00:16:52.780 --> 00:16:53.780
They do have a similar vibe.

00:16:53.780 --> 00:17:00.780
Yeah, yeah, they do. They do. Yeah, I've enjoyed a lot. I tend to just use it for like small, simple things, but those small, simple things add up.

00:17:00.780 --> 00:17:06.780
And so for example, if you have menus that open and close and things like that, you might you might want to use something like this.

00:17:06.780 --> 00:17:15.780
Yeah, or event handling, like if you click this button, change the state to this and then it triggers the binding to open and close sections and so on. Yeah.

00:17:15.780 --> 00:17:19.780
Yeah. Yeah. Okay. Interesting.

00:17:19.780 --> 00:17:27.780
This portion of talk Python to me is brought to you by Posit, the makers of Shiny, formerly RStudio and especially Shiny for Python.

00:17:27.780 --> 00:17:33.780
Let me ask you a question. Are you building awesome things? Of course you are. You're a developer or data scientist.

00:17:33.780 --> 00:17:43.780
That's what we do. And you should check out Posit Connect. Posit Connect is a way for you to publish, share and deploy all the data products that you're building using Python.

00:17:43.780 --> 00:17:49.780
People ask me the same question all the time. Michael, I have some cool data science project or notebook that I built.

00:17:49.780 --> 00:17:57.780
How do I share it with my users, stakeholders, teammates? Do I need to learn FastAPI or Flask or maybe Vue or React.js?

00:17:57.780 --> 00:18:04.780
React.js? Hold on now. Those are cool technologies and I'm sure you'd benefit from them, but maybe stay focused on the data project.

00:18:04.780 --> 00:18:11.780
Let Posit Connect handle that side of things. With Posit Connect, you can rapidly and securely deploy the things you build in Python.

00:18:11.780 --> 00:18:20.780
Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, ports, dashboards and APIs. Posit Connect supports all of them.

00:18:20.780 --> 00:18:26.780
And Posit Connect comes with all the bells and whistles to satisfy IT and other enterprise requirements.

00:18:26.780 --> 00:18:30.780
Make deployment the easiest step in your workflow with Posit Connect.

00:18:30.780 --> 00:18:36.780
For a limited time, you can try Posit Connect for free for three months by going to talkpython.fm/posit.

00:18:36.780 --> 00:18:42.780
That's talkpython.fm/posit. The link is in your podcast player show notes.

00:18:42.780 --> 00:18:45.780
Thank you to the team at Posit for supporting Talk Python.

00:18:47.780 --> 00:18:54.780
One example that I can give from over that stuff that I'm working on is I'm definitely using HTMX over at Talk Python Training, right, for our courses.

00:18:54.780 --> 00:18:57.780
And I added this little tag cloud.

00:18:57.780 --> 00:18:59.780
It's not quite a cloud, but a bunch of different things you can explore.

00:18:59.780 --> 00:19:06.780
So when you load this page, actually, one of the things that's really challenging is it has the price in your local currency.

00:19:06.780 --> 00:19:08.780
So it figures out where your IP, where you live.

00:19:08.780 --> 00:19:13.780
And that currency, the prices of those things, you know, outside of the US change a lot.

00:19:13.780 --> 00:19:20.780
And it's super, sometimes it can be really slow to figure out what the price of every course is, if there's sales and you're in this country and that applies in this way.

00:19:20.780 --> 00:19:24.780
So all these prices are all calculated with HTMX.

00:19:24.780 --> 00:19:30.780
So it loads normally without the prices, then probably by the time you get to it, the prices are already there automatically.

00:19:30.780 --> 00:19:42.780
And then as you click around, you get this is all like as you click these little tags up here, you can even click on the HTMX tag and see you have three HTMX courses, right, with last Django and one that's just kind of uses it.

00:19:42.780 --> 00:19:48.780
But all of this stuff, this is no JavaScript on this page, at least not doing any of that is all just HTMX, right?

00:19:48.780 --> 00:19:50.780
Yeah, that's great.

00:19:50.780 --> 00:19:51.780
Beautifully good. It's so good.

00:19:51.780 --> 00:19:53.780
I've certainly enjoyed working with it.

00:19:53.780 --> 00:20:00.780
But let's talk a bit about your right of like, let's talk about, you know, spend the rest of time on your story, how you started using HTMX.

00:20:00.780 --> 00:20:06.780
I mean, you've given us some of the sense, but let's talk about the app that you were building, right?

00:20:06.780 --> 00:20:09.780
You had this team of fairly junior developers.

00:20:09.780 --> 00:20:10.780
What's the story?

00:20:10.780 --> 00:20:15.780
At the time I was working for a nonprofit training provider in South Africa.

00:20:15.780 --> 00:20:22.780
And we used to have everybody on premises in this place called JP's town, which is really a dodgy place.

00:20:22.780 --> 00:20:23.780
And it was great.

00:20:23.780 --> 00:20:24.780
It was, it was a lot of fun.

00:20:24.780 --> 00:20:25.780
But then COVID happened.

00:20:25.780 --> 00:20:28.780
And so we had to figure out how to support everybody remotely.

00:20:28.780 --> 00:20:31.780
And so it built an LMS.

00:20:31.780 --> 00:20:35.780
So initially we like looked around that LMS means learner management system.

00:20:35.780 --> 00:20:36.780
We had a whole lot of learners.

00:20:36.780 --> 00:20:39.780
We had, I think there were about 150 at the time.

00:20:39.780 --> 00:20:43.780
And we needed to figure out like how to support them from home.

00:20:43.780 --> 00:20:48.780
We couldn't just be like, come back next year because the like, partially we couldn't let them down.

00:20:48.780 --> 00:20:50.780
Partially the funding model wouldn't work and all sorts of things.

00:20:50.780 --> 00:20:52.780
So we need, it was an insane time.

00:20:52.780 --> 00:20:58.780
It's kind of normalized in our history because it's, we've moved past it, but we got to remember that's an, that was a disturbing time.

00:20:58.780 --> 00:21:03.780
So many people have horror stories from, from then I was like, this was hard.

00:21:03.780 --> 00:21:07.780
It was like super, super stressful, but in the end we ended up with this cool thing.

00:21:07.780 --> 00:21:10.780
So like a lot of LMSs exist.

00:21:10.780 --> 00:21:16.780
You can get one off the shelf and they're a lot like very clever textbooks that track learners over time.

00:21:16.780 --> 00:21:19.780
But for us, we're training, we are training software developers.

00:21:19.780 --> 00:21:22.780
And so we wanted something more than a textbook.

00:21:22.780 --> 00:21:23.780
We wanted to train professionals.

00:21:23.780 --> 00:21:27.780
And so we ended up building this thing from the learners perspective.

00:21:27.780 --> 00:21:32.780
It was a Kanban board and then they could move cards around on the board to do different things.

00:21:32.780 --> 00:21:40.780
They could like start a project and then we'd create a repo for them and make, add them as a collaborator and protect the main branch and all of that good stuff.

00:21:40.780 --> 00:21:44.780
And then we could get them to review each other and could track all that and display it in the front end.

00:21:44.780 --> 00:21:45.780
Right.

00:21:45.780 --> 00:21:48.780
Try to teach them get in GitHub and PRs and all that.

00:21:48.780 --> 00:21:49.780
Yeah.

00:21:49.780 --> 00:21:50.780
Yeah.

00:21:50.780 --> 00:21:54.780
So the time they got to work, like they're always very nervous getting into their first job.

00:21:54.780 --> 00:21:56.780
And then they'd say like, this is familiar.

00:21:56.780 --> 00:21:58.780
Like we know how this, and that was really, really cool.

00:21:58.780 --> 00:22:00.780
I'm teaching people stuff here actually.

00:22:00.780 --> 00:22:01.780
That's weird.

00:22:01.780 --> 00:22:02.780
Yeah.

00:22:02.780 --> 00:22:03.780
It was great.

00:22:03.780 --> 00:22:04.780
Exactly.

00:22:04.780 --> 00:22:05.780
That's cool.

00:22:05.780 --> 00:22:06.780
Yeah.

00:22:06.780 --> 00:22:09.780
So I built this thing out and managed to keep training the people and it worked.

00:22:09.780 --> 00:22:14.780
then it was like, okay, this thing is pretty rough around the edges because we built it in self-defense.

00:22:14.780 --> 00:22:18.780
And we're like, I hope this works.

00:22:18.780 --> 00:22:21.780
So we needed to, to build more on it.

00:22:21.780 --> 00:22:28.780
And we were hiring a lot of junior developers because we were training like very, very beginner stuff.

00:22:28.780 --> 00:22:36.780
So if you want to teach a person what a return statement is or what a loop is or anything like that, then you don't need a senior developer or like a senior lecturer.

00:22:36.780 --> 00:22:40.780
You need somebody who understands what a loop is and what a, what a return statement is.

00:22:40.780 --> 00:22:48.780
So we had like all these juniors running around, like helping out and they needed to build stuff with their own growth as well.

00:22:48.780 --> 00:22:52.780
And their own, like if they don't build stuff and they, and then built and it's sad.

00:22:52.780 --> 00:22:58.780
So, so yeah, they were trying to get them productive on the stack, but it was very, very difficult.

00:22:58.780 --> 00:23:02.780
So for me, I'd been working on react applications and I've been working on Django.

00:23:02.780 --> 00:23:03.780
And so for me, it was fine.

00:23:03.780 --> 00:23:09.780
I could just like, I could keep the whole thing in my head, but yeah, it was just, it was just really tough for them.

00:23:09.780 --> 00:23:16.780
I think there is a little bit of an art to making a junior developer productive, but like, I just was not figuring it out.

00:23:16.780 --> 00:23:25.780
So I tried this for a while and then one day went to a Django con us and I saw Chris May's talk that spoke about HTMX.

00:23:25.780 --> 00:23:27.780
And I was just like, maybe this is worth a try.

00:23:27.780 --> 00:23:34.780
I was like, okay, I'm just going to proof of concept it and see if I can build the weirdest parts of our application in HTMX.

00:23:34.780 --> 00:23:36.780
If you're asking, will it work?

00:23:36.780 --> 00:23:39.780
You're like, this is the most crazy interactive bit.

00:23:39.780 --> 00:23:41.780
And if it can do this, the other stuff is easy.

00:23:41.780 --> 00:23:45.780
Like switching from logged in to log out or whatever.

00:23:45.780 --> 00:23:46.780
I was like, yeah, okay, that's nothing.

00:23:46.780 --> 00:23:46.780
Right.

00:23:46.780 --> 00:23:49.780
Most of our functionality was around this Kanban board.

00:23:49.780 --> 00:23:54.780
So I was like, all right, let me just make some cards and make some columns and see if I can shift stuff around.

00:23:54.780 --> 00:23:57.780
And it all worked out really well.

00:23:57.780 --> 00:23:59.780
And it wasn't, it wasn't super hard.

00:23:59.780 --> 00:24:06.780
Like I think one of the, one of the challenges with HTMX is that it's very easy to build like spaghetti templates.

00:24:06.780 --> 00:24:12.780
Cause you have like the main template and all these partials and you need to, and then all these URLs that are pointing to the partial.

00:24:12.780 --> 00:24:15.780
So it's, so it is possible to get yourself in a bit of a tangle there.

00:24:15.780 --> 00:24:17.780
So you need to arrange things nicely.

00:24:17.780 --> 00:24:21.780
But yeah, the process was so smooth that I was like, let me try this.

00:24:21.780 --> 00:24:27.780
So our application was this Django app on the back, exposing a bunch of APIs with Django REST framework.

00:24:27.780 --> 00:24:34.780
And so the idea was to just, instead of like, we'd, we'd leave the react app as is, and we'd keep on working.

00:24:34.780 --> 00:24:39.780
Meanwhile, we'd, we just build out some like perfectly normal Django views to do the HTMX stuff.

00:24:39.780 --> 00:24:43.780
And then we could move everybody over to the new, the new application.

00:24:43.780 --> 00:24:46.780
So the new front end was part of the original Django app.

00:24:46.780 --> 00:24:49.780
So we didn't, we didn't rebuild absolutely everything.

00:24:49.780 --> 00:24:50.780
We just rebuilt that part.

00:24:50.780 --> 00:24:56.780
And generally speaking, if somebody suggests rebuilding a thing, I worry.

00:24:56.780 --> 00:24:58.780
Like usually it's a bad idea.

00:24:58.780 --> 00:25:02.780
Usually it's like, yeah, a fool or something.

00:25:02.780 --> 00:25:03.780
Yes.

00:25:03.780 --> 00:25:05.780
I've had to stop myself many times.

00:25:05.780 --> 00:25:09.780
Do you know that David, Dylan BD it is?

00:25:09.780 --> 00:25:10.780
Yeah.

00:25:10.780 --> 00:25:11.780
I'll put a link in here.

00:25:11.780 --> 00:25:17.780
He's got some, some amazing parodies and one's it's a six and a half minute parody of American Pie.

00:25:17.780 --> 00:25:18.780
We're going to do the big rewrite.

00:25:18.780 --> 00:25:19.780
And it's, it's glorious.

00:25:19.780 --> 00:25:22.780
So I'll link it, but you should be afraid, right?

00:25:22.780 --> 00:25:25.780
This is something that like, we're going to rewrite it.

00:25:25.780 --> 00:25:28.780
And basically the song is here's the eight version, the eight different languages.

00:25:28.780 --> 00:25:34.780
This thing's previously been written in, you know, it's with some things working times, even if it's not perfect.

00:25:34.780 --> 00:25:35.780
You just.

00:25:35.780 --> 00:25:36.780
Yeah.

00:25:36.780 --> 00:25:40.780
And it was also like rewriting it in order to optimize for this team that was mostly juniors.

00:25:40.780 --> 00:25:43.780
And so I was like, is this like, is this me being crazy?

00:25:43.780 --> 00:25:47.780
Like there was a lot of, yeah, I was, I was very unsure.

00:25:47.780 --> 00:25:50.780
So I tried everything out and, and it worked and it was fun.

00:25:50.780 --> 00:25:54.780
And it was like, like straightforward to write for this like small thing.

00:25:54.780 --> 00:25:57.780
And then I was like, let me see how the team works on this.

00:25:57.780 --> 00:26:00.780
So I gave them a bunch of little tasks to do.

00:26:00.780 --> 00:26:02.780
I was like, implement this, try that.

00:26:02.780 --> 00:26:04.780
And everybody was productive.

00:26:04.780 --> 00:26:05.780
How did they receive it?

00:26:05.780 --> 00:26:12.780
When you, when you introduced this idea to them after they'd been living in react and redux and all these things.

00:26:12.780 --> 00:26:13.780
They were happy with it.

00:26:13.780 --> 00:26:19.780
I think at first a little bit skeptical, but then once I started going, like I did get feedback from them.

00:26:19.780 --> 00:26:21.780
I make a point of getting feedback from them.

00:26:21.780 --> 00:26:23.780
And they were like, this HTMX thing is way better.

00:26:23.780 --> 00:26:26.780
So that's great.

00:26:26.780 --> 00:26:27.780
Like, wait, what's the trick?

00:26:27.780 --> 00:26:28.780
Why does this work?

00:26:28.780 --> 00:26:34.780
So they went with it, but, and then they succeeded and they were happy and productive, which is great.

00:26:34.780 --> 00:26:41.780
And like, even people who needed like way too much of my support, like people who I had to like really sit with and pair with, like just to do like anything.

00:26:41.780 --> 00:26:44.780
They were suddenly able to do stuff that was meaningful.

00:26:44.780 --> 00:26:48.780
So I think for me, that's one of the things that's so exciting about HTMX.

00:26:48.780 --> 00:27:04.780
It's like, I've been working and training for so long and I've been like fighting the fight of like getting junior developers job ready for so long that like I'm, I'm aware of many problems in the tech education ecosystem and the junior hiring ecosystem.

00:27:04.780 --> 00:27:11.780
And like the fact that entry level positions are like too hard for people, like it's a problem.

00:27:11.780 --> 00:27:15.780
And now we have tools that make web developments approachable again.

00:27:15.780 --> 00:27:21.780
So like I'm singing this HTMX song because I think it's going to change the industry in, in some pretty big ways.

00:27:21.780 --> 00:27:26.780
I think it's already making waves, but I'd like them to happen faster and bigger.

00:27:26.780 --> 00:27:28.780
Yeah, I think it will as well.

00:27:28.780 --> 00:27:33.780
And, you know, I think the current web frameworks are really good and work really well with it.

00:27:33.780 --> 00:27:41.780
But I wonder if I wouldn't be surprised to see kind of like FastAPI came along and just said Pydantic is the essence of this thing.

00:27:41.780 --> 00:27:44.780
And Pydantic changed a lot of data exchange, a lot of data validation.

00:27:44.780 --> 00:27:50.780
And I wonder if some framework comes along and just says HTMX is just ground up part of this thing.

00:27:50.780 --> 00:27:51.780
All right.

00:27:51.780 --> 00:27:52.780
That'd be interesting to see what that looks like.

00:27:52.780 --> 00:27:53.780
That would be interesting.

00:27:53.780 --> 00:27:57.780
I think there are definitely useful patterns and how to, how to do different things.

00:27:57.780 --> 00:28:02.780
And people are building tools around it or tools that complements it in useful ways.

00:28:02.780 --> 00:28:03.780
So we spoke about Alpine JS.

00:28:03.780 --> 00:28:08.780
There's another thing called template partials from Carlton Gibson.

00:28:08.780 --> 00:28:11.780
And he, and that's really, really great.

00:28:11.780 --> 00:28:16.780
Something like this is super needed to make the code go from like, all right, we can do this too.

00:28:16.780 --> 00:28:17.780
Oh, that's nice.

00:28:17.780 --> 00:28:18.780
Yeah.

00:28:18.780 --> 00:28:19.780
Yeah.

00:28:19.780 --> 00:28:20.780
Yeah.

00:28:20.780 --> 00:28:21.780
This really unspaghetti fires it, which is fantastic.

00:28:21.780 --> 00:28:24.780
Like this is one of my favorites at the moment.

00:28:24.780 --> 00:28:30.780
I have one that I created for a Jinja card Jinja, Jinja, Jinja partials, and also a chameleon one.

00:28:30.780 --> 00:28:35.780
So since I'm, I wasn't using for that, that course example, this is actually chameleon.

00:28:35.780 --> 00:28:41.780
So I use the chameleon partials, but something like this is required and you know, Carlton does great work, right?

00:28:41.780 --> 00:28:42.780
Yeah.

00:28:42.780 --> 00:28:43.780
Known for it.

00:28:43.780 --> 00:28:45.780
So you're using this as part of, as part of your, your site.

00:28:45.780 --> 00:28:46.780
So not that original site.

00:28:46.780 --> 00:28:50.780
I only heard about this later on, but now I use it on everything.

00:28:50.780 --> 00:28:51.780
Yeah.

00:28:51.780 --> 00:28:53.780
On all of my HTMX things.

00:28:53.780 --> 00:28:54.780
I use this.

00:28:54.780 --> 00:28:55.780
Right.

00:28:55.780 --> 00:28:57.780
Tell the Django people, what does this do?

00:28:57.780 --> 00:28:59.780
Like why, why do you need Django template partial?

00:28:59.780 --> 00:29:02.780
Django template partials instead of just Django templates.

00:29:02.780 --> 00:29:05.780
So it's just about organizing your code in a way that's a bit cleaner.

00:29:05.780 --> 00:29:18.780
So if you think about how you would render templates from your different views, if you had like a main page and then that page had a bunch of HTMX things happening that, that made calls to the back end to different views.

00:29:18.780 --> 00:29:19.780
And those different views.

00:29:19.780 --> 00:29:21.780
And those different views use different templates.

00:29:21.780 --> 00:29:27.780
Then even though that all those templates are associated with the same page, it kind of ends up being a bit of a mess.

00:29:27.780 --> 00:29:30.780
You've got like a lot of different, like partial templates.

00:29:30.780 --> 00:29:33.780
So you need a cool naming convention for that.

00:29:33.780 --> 00:29:34.780
So you need to see the pages as a template.

00:29:34.780 --> 00:29:43.780
But you need to switch between files all the time to see what things are associated with each other.

00:29:43.780 --> 00:29:48.780
Let's say you've got like five pages and each of them have like five different partials associated with them.

00:29:48.780 --> 00:29:53.780
Suddenly it's a lot of files and you need to organize things somehow.

00:29:53.780 --> 00:30:01.780
So what Django template partials does is it allows you to like, like, say you've got like a main page file to do list, right?

00:30:01.780 --> 00:30:10.780
Right. You could define a partial template for a to do item within that same file and it won't get rendered until you say render this thing.

00:30:10.780 --> 00:30:19.780
So you can like when you render your template for the first time, you can just say, OK, loop over the to do items and use this partial in place and render the things.

00:30:19.780 --> 00:30:20.780
And that's great.

00:30:20.780 --> 00:30:31.780
But then the other thing that you can do is that you can like in a view, you can choose to render a template, but you can choose to render a partial within that template as well.

00:30:31.780 --> 00:30:37.780
And so let's say you've got like a little form that says add a new to do list item.

00:30:37.780 --> 00:30:47.780
Then you'd submit that form and then the view would look for the partial within the page that you care about and it'll render that.

00:30:47.780 --> 00:30:57.780
And so it just ends up being that like everything is tidy and together and it makes sense because like the to do list items are only used in this page and those items are only used in that page.

00:30:57.780 --> 00:31:11.780
One of the big challenges that you'll quickly run into with this style, this HTML partial exchange style is when you show the page originally, you want just the server rendered version, which includes, let's say, your to do items.

00:31:11.780 --> 00:31:14.780
So you need the HTML for the to do items in the main page.

00:31:14.780 --> 00:31:23.780
But then when you make changes to it, you need a little fragment of that same HTML to put a new to do item in there or to edit one or something.

00:31:23.780 --> 00:31:33.780
And if you're not careful, well, then you have multiple copies of those laying around and somebody updates the design for one and then it doesn't update the partial one that you wrote, which is a copy.

00:31:33.780 --> 00:31:35.780
It's it's not pretty.

00:31:35.780 --> 00:31:42.780
So finding a way for reuse like this Django templates partials, it's pretty required, I think, if you're going to stay sane.

00:31:42.780 --> 00:31:44.780
It's like functions are required to write code.

00:31:44.780 --> 00:31:46.780
You know, it's it's pretty much like that. Right.

00:31:46.780 --> 00:32:03.780
I think so. Like you can get away with just using like lots of files and you could keep things dry with lots of files, but it gets like it's very spaghetti unless you're you put a lot of effort into organizing it and then keeping it organized because people make PRs do like all weird things.

00:32:03.780 --> 00:32:09.780
So, yeah, it's it's not good to have to like monitor that everything's organized.

00:32:09.780 --> 00:32:14.780
It would be better if it was just there done by default, like the next to the behavior is correct.

00:32:14.780 --> 00:32:15.780
Yeah. Yeah.

00:32:15.780 --> 00:32:19.780
So to grab grab a file, a library for that.

00:32:19.780 --> 00:32:22.780
This portion of talk Python to me is brought to you by Bluehost.

00:32:22.780 --> 00:32:25.780
Got ideas, but no idea how to build a website.

00:32:25.780 --> 00:32:28.780
Get Bluehost with their AI design tool.

00:32:28.780 --> 00:32:33.780
You can quickly generate a high quality, fast loading WordPress site instantly.

00:32:33.780 --> 00:32:36.780
Once you've nailed the look, just hit enter and your site goes live.

00:32:36.780 --> 00:32:37.780
It's really that simple.

00:32:37.780 --> 00:32:42.780
And it doesn't matter whether you're a hobbyist, entrepreneur or just starting your side hustle.

00:32:42.780 --> 00:32:49.780
Bluehost has you covered with built in marketing and e-commerce tools to help you grow and scale your website for the long haul.

00:32:49.780 --> 00:32:59.780
Since you're listening to my show, you probably know Python, but sometimes it's better to focus on what you're creating rather than a custom built website and add another month till you launch your idea.

00:32:59.780 --> 00:33:08.780
When you upgrade to Bluehost cloud, you get a hundred percent of time and 24 seven support to ensure your site stays online through heavy traffic.

00:33:08.780 --> 00:33:11.780
Bluehost really makes building your dream website easier than ever.

00:33:11.780 --> 00:33:12.780
So what's stopping you?

00:33:12.780 --> 00:33:14.780
You've already got the vision.

00:33:14.780 --> 00:33:15.780
Make it real.

00:33:15.780 --> 00:33:20.780
Visit talkpython.fm/bluehost right now and get started today.

00:33:20.780 --> 00:33:22.780
And thank you to Bluehost for supporting the show.

00:33:22.780 --> 00:33:26.780
Let's talk about the before and after stack.

00:33:26.780 --> 00:33:33.780
So before you talked about react, but tell us all the pieces involved and then what does it look like today?

00:33:33.780 --> 00:33:35.780
So Redux was for just state management.

00:33:35.780 --> 00:33:47.780
And then I used Redux saga for mostly for data fetching stuff so that I could handle like loading spinners and I could see like different, like the status of different requests over time and that kind of thing.

00:33:47.780 --> 00:33:54.780
Then I used material UI because my front end make pretty skills aren't the strongest.

00:33:54.780 --> 00:33:59.780
So I wanted a component library that would just work and that was the chosen one.

00:33:59.780 --> 00:34:02.780
Then on the back end, it was Django.

00:34:02.780 --> 00:34:05.780
Django REST framework is fairly well known.

00:34:05.780 --> 00:34:11.780
Then I used a thing called Django Guardian because I needed object level permissions on the different model instances.

00:34:11.780 --> 00:34:20.780
So for example, so we had this Kanban board and there were cards on this board that the people could move around and different people would have different permission to different cards.

00:34:20.780 --> 00:34:28.780
So we had things like one learner would be working on a card and then they'd ask for a review and then another learner should be able to review that.

00:34:28.780 --> 00:34:35.780
But we wouldn't want to let just any learner look at their code because then it would cause all sorts of problems.

00:34:35.780 --> 00:34:40.780
So it's like, okay, this person has finished this project so we can add them as a reviewer on this card.

00:34:40.780 --> 00:34:46.780
And so we needed to be like pretty particular about like which of our users could see different things.

00:34:46.780 --> 00:34:50.780
It wasn't super straight, obvious, straightforward and that this person can see this.

00:34:50.780 --> 00:34:52.780
It was like this person can for these reasons.

00:34:52.780 --> 00:34:55.780
Django Guardian is really, really cool.

00:34:55.780 --> 00:34:56.780
And then Postgres.

00:34:56.780 --> 00:34:57.780
That's a cool library.

00:34:57.780 --> 00:35:00.780
You know, maybe people could find a nice use for that one.

00:35:00.780 --> 00:35:01.780
Like that's, that's the one that's new to me.

00:35:01.780 --> 00:35:02.780
Yeah.

00:35:02.780 --> 00:35:03.780
That's really nice.

00:35:03.780 --> 00:35:09.780
And you can even do things like when you query a database and you say, fetch me all the cards, you can do something like,

00:35:09.780 --> 00:35:12.780
fetch me all the cards that Bob can see.

00:35:12.780 --> 00:35:18.780
And so long as it's configured well, then, then it can do that sort of thing, which is very, very helpful.

00:35:18.780 --> 00:35:19.780
Wow.

00:35:19.780 --> 00:35:20.780
That's really cool.

00:35:20.780 --> 00:35:23.780
So you don't have to go get all the cards and then, yeah.

00:35:23.780 --> 00:35:24.780
Yeah.

00:35:24.780 --> 00:35:28.780
Who have all these different permissions and then like construct some query that comes up with it.

00:35:28.780 --> 00:35:29.780
Yeah.

00:35:29.780 --> 00:35:30.780
Very nice.

00:35:30.780 --> 00:35:31.780
I love it.

00:35:31.780 --> 00:35:32.780
And that plugs into DRF as well.

00:35:32.780 --> 00:35:36.780
So like your, your serializer or your view set.

00:35:36.780 --> 00:35:38.780
So I haven't worked in it in a while, but the query that's a lot of data.

00:35:38.780 --> 00:35:46.780
But the query that gets, gets used when you access like a list API endpoint, you could just apply that automatically as well.

00:35:46.780 --> 00:35:50.780
So if you, so you don't need to, yeah, you don't need to build it in that, in that case either.

00:35:50.780 --> 00:35:52.780
So it plugs into all of the things.

00:35:52.780 --> 00:35:54.780
It's a little bit weird at first to get used to.

00:35:54.780 --> 00:35:55.780
And then, and then it's just fantastic.

00:35:55.780 --> 00:36:00.780
And now I'm guessing much of the front end stuff is probably not there.

00:36:00.780 --> 00:36:07.780
The old application still exists, but it's not, but it's like the HTML based version would just be a drop in replacement.

00:36:07.780 --> 00:36:10.780
So I go to this URL instead kind of thing.

00:36:10.780 --> 00:36:11.780
Yeah.

00:36:11.780 --> 00:36:12.780
Now that it's done.

00:36:12.780 --> 00:36:13.780
Now that it's done.

00:36:13.780 --> 00:36:15.780
You said you used to work there, but you don't work there anymore.

00:36:15.780 --> 00:36:15.780
Is that right?

00:36:15.780 --> 00:36:16.780
Oh yeah.

00:36:16.780 --> 00:36:17.780
Not anymore.

00:36:17.780 --> 00:36:18.780
As of a few months ago.

00:36:18.780 --> 00:36:21.780
I guess that's recent enough to say sort of, how is it going now?

00:36:21.780 --> 00:36:22.780
Right?

00:36:22.780 --> 00:36:23.780
How are, how's it being used?

00:36:23.780 --> 00:36:26.780
How are people, you know, is it still going strong as the technology?

00:36:26.780 --> 00:36:28.780
I hope that they're still building on it.

00:36:28.780 --> 00:36:32.780
There was some, some weird things happening at the organization before I left.

00:36:32.780 --> 00:36:38.780
So yeah, I expect, I hope that everything is still going smoothly, but I haven't been plugged in for a while.

00:36:38.780 --> 00:36:45.780
Let's give a, maybe a quick shout out to this video, this other Django con talk.

00:36:45.780 --> 00:36:55.780
Gosh, why is, I need to sign into my YouTube premium on this browser, but this real world SaaS product example from this guy in France, David Gilead.

00:36:55.780 --> 00:36:56.780
Yeah.

00:36:56.780 --> 00:36:58.780
That, that one you said was a pretty good example.

00:36:58.780 --> 00:37:00.780
If you need like a walkthrough case.

00:37:00.780 --> 00:37:01.780
Yeah.

00:37:01.780 --> 00:37:02.780
So that one, I didn't see it live.

00:37:02.780 --> 00:37:07.780
I saw a video of it after the fact, but it is like the ultimate HTMX demo.

00:37:07.780 --> 00:37:10.780
It shows, this guy really makes it dance.

00:37:10.780 --> 00:37:12.780
It's, it's quite an amazing thing to see.

00:37:12.780 --> 00:37:14.780
So highly recommend that.

00:37:14.780 --> 00:37:14.780
Yeah.

00:37:14.780 --> 00:37:21.780
This guy, David goes through and says, you know, here's our complex SaaS product and let me walk you through all the features.

00:37:21.780 --> 00:37:23.780
I feel like this would be a pretty good one.

00:37:23.780 --> 00:37:25.780
Everyone, your article as well.

00:37:25.780 --> 00:37:32.780
And then this video, if, if you want to say, make a case to your team, like, Hey everyone, can we consider doing this?

00:37:32.780 --> 00:37:34.780
And yeah, I'm sure right off the bat, you'll get some folks.

00:37:34.780 --> 00:37:36.780
So, well, no, we have to use react.

00:37:36.780 --> 00:37:37.780
We have to use this.

00:37:37.780 --> 00:37:37.780
It's interactive.

00:37:37.780 --> 00:37:39.780
This, you interact with that part and it changes that part.

00:37:39.780 --> 00:37:41.780
How are we going to possibly pull that off?

00:37:41.780 --> 00:37:43.780
It's like, yeah, no, that's, that's totally possible.

00:37:43.780 --> 00:37:44.780
Yeah.

00:37:44.780 --> 00:37:49.780
I think the main arguments people have against it are like scale, but that argument doesn't make super, a lot of sense to me.

00:37:49.780 --> 00:37:55.780
I think it might be complexity scale that they're concerned about, but I think things like template partials solve a lot of that problem.

00:37:55.780 --> 00:37:58.780
And then there's, can it do the things?

00:37:58.780 --> 00:38:00.780
And this solves that problem.

00:38:00.780 --> 00:38:04.780
And then is it really, is it really so much better for the team?

00:38:04.780 --> 00:38:05.780
Is the other question?

00:38:05.780 --> 00:38:06.780
Is it just another fashion?

00:38:06.780 --> 00:38:07.780
Is it just another fad?

00:38:07.780 --> 00:38:10.780
And that's something that's sometimes hard to get across.

00:38:10.780 --> 00:38:16.780
I think that my article will do a good job of explaining why it's a good idea.

00:38:16.780 --> 00:38:19.780
Cause I had to explain this to non-technical stakeholders.

00:38:19.780 --> 00:38:23.780
I was like, okay, I I'm making this crazy decision and this is why.

00:38:23.780 --> 00:38:25.780
And so I think I've got the argument down.

00:38:25.780 --> 00:38:28.780
Go, go read that article if you need to convince someone.

00:38:28.780 --> 00:38:33.780
But I think the other thing to mention is the full stack that I moved to in the end.

00:38:33.780 --> 00:38:34.780
Yeah.

00:38:34.780 --> 00:38:35.780
So HTMX we spoke about Django.

00:38:35.780 --> 00:38:36.780
We spoke about an Alpine.

00:38:36.780 --> 00:38:39.780
We spoke about now, if you are running a.

00:38:39.780 --> 00:38:44.780
A react front end or whatever you would test the front end in a react way.

00:38:44.780 --> 00:38:46.780
Like you would use tools that are appropriate for that.

00:38:46.780 --> 00:38:49.780
So, and so you need to think about different ways to, to test things.

00:38:49.780 --> 00:38:52.780
Would that be like Selenium or something?

00:38:52.780 --> 00:38:53.780
Or what are we talking?

00:38:53.780 --> 00:38:54.780
So I like play, right?

00:38:54.780 --> 00:38:55.780
Quite a lot.

00:38:55.780 --> 00:38:59.780
So you could do it with, but that would be a, like, it would include some pain.

00:38:59.780 --> 00:39:02.780
Playwright is very, very lovely to, to work with.

00:39:02.780 --> 00:39:08.780
So it's like Selenium only with all sorts of useful test goodies built in.

00:39:08.780 --> 00:39:17.780
So like you can get it to take videos of your failed tests and it's got useful flags for like running your tests on different browsers.

00:39:17.780 --> 00:39:20.780
And you can like keep a trace of things.

00:39:20.780 --> 00:39:24.780
It's got interesting debugging stuff built in and you can just run it with pytest.

00:39:24.780 --> 00:39:27.780
And so yeah, playwright is a big part of it as well.

00:39:27.780 --> 00:39:28.780
Yeah, playwright is really nice.

00:39:28.780 --> 00:39:41.780
You know, one thing that just occurred to me around the testing, if you've got a rich JavaScript front end sort of thing, you have to use something like playwright or Selenium where it does a full browser request render of the page to interact with it.

00:39:41.780 --> 00:39:42.780
Right.

00:39:42.780 --> 00:39:44.780
And you can also do that with HTMX.

00:39:44.780 --> 00:39:53.780
But a lot of these web frameworks, you can just in your, your web test code, you can say, create like a, a testing instance of my server.

00:39:53.780 --> 00:39:54.780
Right.

00:39:54.780 --> 00:39:59.780
And then make it do this request and then see what the response came back without nearly the same overhead.

00:39:59.780 --> 00:40:07.780
And because this stuff all happens on the server, I guess you could just write a unit test, like a web test against a fragment response.

00:40:07.780 --> 00:40:08.780
Right.

00:40:08.780 --> 00:40:09.780
Yeah, you can.

00:40:09.780 --> 00:40:13.780
So you can, you can write little unit tests that check different things like that.

00:40:13.780 --> 00:40:22.780
But since a lot of the interactivity is defined within the HTML tags, your unit tests won't, they won't be able to cover like if the unit fix this and that happens.

00:40:22.780 --> 00:40:25.780
And so that's where, that's where something like playwright will come in.

00:40:25.780 --> 00:40:26.780
Yeah.

00:40:26.780 --> 00:40:30.780
You'll still need that to, but maybe less playwright is needed than otherwise is what I was thinking.

00:40:30.780 --> 00:40:31.780
Yeah, definitely.

00:40:31.780 --> 00:40:36.780
I think one of the anti patterns I've seen is too much playwright where they're just like, want to use playwright for everything.

00:40:36.780 --> 00:40:38.780
And then your tests are ridiculously slow.

00:40:38.780 --> 00:40:42.780
And it's like, you could have just, you don't even need to test the view.

00:40:42.780 --> 00:40:44.780
There was this function that you wanted to test.

00:40:44.780 --> 00:40:45.780
Exactly.

00:40:45.780 --> 00:40:46.780
You're not Shakespeare.

00:40:46.780 --> 00:40:47.780
You don't need that much playwright.

00:40:47.780 --> 00:40:48.780
Come on.

00:40:48.780 --> 00:40:49.780
Yeah.

00:40:49.780 --> 00:40:50.780
Yeah.

00:40:50.780 --> 00:40:51.780
Playwright is a cool thing.

00:40:51.780 --> 00:40:52.780
I definitely recommend it.

00:40:52.780 --> 00:40:53.780
Yeah.

00:40:53.780 --> 00:40:54.780
Yeah.

00:40:54.780 --> 00:40:55.780
And it plugs into Django really smoothly as well.

00:40:55.780 --> 00:41:01.780
So you don't actually, so playwright, it spins up a browser and points it at a running instance of an application in order to like test the things.

00:41:01.780 --> 00:41:09.780
But with Django and pytest, you can use a fixture to spin up like test version of your, of your application.

00:41:09.780 --> 00:41:12.780
It's kind of like run servers running there in your tests anyway.

00:41:12.780 --> 00:41:14.780
So it integrates very, very smoothly.

00:41:14.780 --> 00:41:15.780
Yeah.

00:41:15.780 --> 00:41:16.780
It makes it very convenient.

00:41:16.780 --> 00:41:17.780
Yeah, absolutely.

00:41:17.780 --> 00:41:28.780
You know, one of the things you wrote a lot about, and you, you mentioned this, but you kind of flew past it a little bit was you said, am I crazy for optimizing for junior developers?

00:41:28.780 --> 00:41:29.780
Right.

00:41:29.780 --> 00:41:36.780
On the other hand, optimizing for simplicity, even if you're, you're an expert, right?

00:41:36.780 --> 00:41:42.780
You don't, just cause you can do all the steps and all the complexity doesn't mean you should constantly be doing those steps.

00:41:42.780 --> 00:41:43.780
Right.

00:41:43.780 --> 00:41:45.780
I think there's a case for optimizing for simplicity here.

00:41:45.780 --> 00:41:46.780
What do you think?

00:41:46.780 --> 00:41:47.780
I completely agree.

00:41:47.780 --> 00:41:53.780
I mean, if you, if you can just like take the cognitive load of developing your app and then make it like simple.

00:41:53.780 --> 00:41:58.780
So you can focus on actually solving problems instead of wiring, I suppose.

00:41:58.780 --> 00:42:00.780
And life gets a lot, gets a lot easier.

00:42:00.780 --> 00:42:02.780
So yeah, simplicity rocks.

00:42:02.780 --> 00:42:09.780
It's, it's fast to develop, but things like, like HTMX make your code way, way smaller than, than it would otherwise be.

00:42:09.780 --> 00:42:10.780
So it's not just simple.

00:42:10.780 --> 00:42:12.780
It's not just that it's less convoluted.

00:42:12.780 --> 00:42:13.780
There's also less of it.

00:42:13.780 --> 00:42:15.780
And so there's less to test.

00:42:15.780 --> 00:42:17.780
There's, there's less stuff that can, can cause bugs.

00:42:17.780 --> 00:42:24.780
And most of the like front end interactivity is handled by another library that's really well tested.

00:42:24.780 --> 00:42:28.780
And you're just doing these like tiny little things that are easy to reason about.

00:42:28.780 --> 00:42:32.780
And so it's just, it's robust and clean.

00:42:32.780 --> 00:42:35.780
So yeah, I do think it's worth optimizing for simplicity.

00:42:35.780 --> 00:42:40.780
I mean, it made, it made everybody more productive, the juniors and me as well.

00:42:40.780 --> 00:42:42.780
So top notch.

00:42:42.780 --> 00:42:47.720
I'm constantly in pursuit of, of trying to keep things simple.

00:42:47.720 --> 00:42:58.720
You know, if you go over to the HTMX site, I don't know if you've, you've looked at this section, but they've got a, you know, Kirsten has this essay section, which, you know, it's not quite a blog, but it's kind of a blog.

00:42:58.720 --> 00:43:01.720
You know, it does, it's not, not in order.

00:43:01.720 --> 00:43:02.720
It's in sort of category, whatever.

00:43:02.720 --> 00:43:03.720
And these are all nice.

00:43:03.720 --> 00:43:09.720
One thing that's nice is he has a, on the other hand, here's a couple of examples why people didn't pick it.

00:43:09.720 --> 00:43:10.720
Right.

00:43:10.720 --> 00:43:11.720
But he's got a whole section on complexity.

00:43:11.720 --> 00:43:12.720
Very, very bad.

00:43:12.720 --> 00:43:13.720
Yeah.

00:43:13.720 --> 00:43:16.720
But if you keep going, there's a bunch of memes.

00:43:16.720 --> 00:43:18.720
The memes are so good, aren't they?

00:43:18.720 --> 00:43:19.720
They are fantastic.

00:43:19.720 --> 00:43:29.720
And one of these super definitely applies is, you know, there's one that says HTML plus a backend for like the, you know, it's got this bell curve for the beginners.

00:43:29.720 --> 00:43:32.720
Like, Oh, this is what I want that as you get a little bit better.

00:43:32.720 --> 00:43:36.720
You're like, Oh, I need all this, all this complexity and all these layers.

00:43:36.720 --> 00:43:39.720
And then, you know, sort of the Jedi Knight at the end is yeah.

00:43:39.720 --> 00:43:40.720
HTML in the backend.

00:43:40.720 --> 00:43:44.720
I have going, going through this path and like, you don't waste any.

00:43:44.720 --> 00:43:45.720
These two ends.

00:43:45.720 --> 00:43:46.720
Yeah.

00:43:46.720 --> 00:43:48.720
I don't necessarily want to characterize beginners.

00:43:48.720 --> 00:43:54.720
It looked like this, this character in this meme, but you know, I think the meme still speaks, speaks to this somewhat.

00:43:54.720 --> 00:43:55.720
Right.

00:43:55.720 --> 00:43:56.720
Yeah.

00:43:56.720 --> 00:43:57.720
Yeah.

00:43:57.720 --> 00:43:58.720
Definitely.

00:43:58.720 --> 00:43:59.720
Definitely.

00:43:59.720 --> 00:44:00.720
Yeah.

00:44:00.720 --> 00:44:10.720
I think it's about like when I, when I teach people to code, when I teach people like the very basics of code and like something I see with very junior developers is that they try to show off and be like, look how fancy I can make my code.

00:44:10.720 --> 00:44:12.720
I can do all of these complicated things.

00:44:12.720 --> 00:44:16.720
And then you get them to think more like Jedi's and say, like, don't waste any moves.

00:44:16.720 --> 00:44:22.720
Like, like how you wouldn't be flailing about like, this is kind of like flailing.

00:44:22.720 --> 00:44:25.720
And HTML, HTML, HTML does that for you.

00:44:25.720 --> 00:44:31.720
It just lets you like move directly towards your goal instead of having to like move around it.

00:44:31.720 --> 00:44:32.720
Yeah.

00:44:32.720 --> 00:44:33.720
It's pretty glorious.

00:44:33.720 --> 00:44:35.720
So I know that you do a lot of teaching.

00:44:35.720 --> 00:44:42.720
Maybe, you said you work for this local company that was, you did the come on board out for and so on.

00:44:42.720 --> 00:44:43.720
Now, what are you up to?

00:44:43.720 --> 00:44:44.720
I'm teaching just differently.

00:44:44.720 --> 00:44:45.720
It was really cool working there.

00:44:45.720 --> 00:44:49.720
I was there for a long time, like five years in total, which is really long.

00:44:49.720 --> 00:44:51.720
And it was super successful.

00:44:51.720 --> 00:45:01.720
So like since 2020, basically everybody who passed our courses ended up getting good jobs, like very, very close to a hundred percent of the people who passed.

00:45:01.720 --> 00:45:04.720
And the people who didn't pass was like actually kind of small, like 7%.

00:45:04.720 --> 00:45:07.720
And then there's lots of reasons for that.

00:45:07.720 --> 00:45:10.720
But yeah, I learned a ton from being there.

00:45:10.720 --> 00:45:12.720
That was in person, but pre COVID, right?

00:45:12.720 --> 00:45:13.720
Yeah.

00:45:13.720 --> 00:45:22.720
So post COVID, we actually got way, way better because we had better monitoring of individuals and we could do things like track people's cards on their board, moving around.

00:45:22.720 --> 00:45:25.720
And then from that, you can say like, Oh, this piece of content is dodgy.

00:45:25.720 --> 00:45:29.720
Like it would give us as educators, a lot of feedback about what we were doing.

00:45:29.720 --> 00:45:33.720
Cause if a person was stuck and you're like, I explained this thing.

00:45:33.720 --> 00:45:34.720
Great.

00:45:34.720 --> 00:45:35.720
And then they're still stuck.

00:45:35.720 --> 00:45:36.720
You're like, I didn't explain this thing.

00:45:36.720 --> 00:45:37.720
Great.

00:45:37.720 --> 00:45:41.720
Like the way that the teaching mechanism was built was like really good for the students.

00:45:41.720 --> 00:45:47.720
But like, if, if we as educators didn't do a good job on something, we'd know about it and we'd have to fix it.

00:45:47.720 --> 00:45:50.720
And I think that's honed the craft quite a lot.

00:45:50.720 --> 00:45:52.720
So I learned a bunch there.

00:45:52.720 --> 00:45:56.720
Now what I'm doing is I want to spread those skills in different ways.

00:45:56.720 --> 00:45:58.720
So there's a whole lot to what I'm doing.

00:45:58.720 --> 00:46:02.720
One thing I want to do is help educators themselves.

00:46:02.720 --> 00:46:05.720
So I've got this thing called the guild of educators, cause I always wanted to guilt.

00:46:05.720 --> 00:46:11.720
And, it's got a whole lot of people in there who are like, it's a free community.

00:46:11.720 --> 00:46:12.720
Come and join.

00:46:12.720 --> 00:46:16.720
It's a bunch of education nerds who, who talk about education with each other.

00:46:16.720 --> 00:46:27.720
It's a support structure because I think educators need support structures and it's a place to share, share learnings and share resources and opportunities and things like that.

00:46:27.720 --> 00:46:30.720
So it's still very new, but that's one part of it.

00:46:30.720 --> 00:46:34.720
I want to offer teacher training and things like that, but I also just like,

00:46:34.720 --> 00:46:36.720
Just like, we have junior developers.

00:46:36.720 --> 00:46:39.720
You have people got to start somewhere with teaching and teaching online.

00:46:39.720 --> 00:46:40.720
It's different.

00:46:40.720 --> 00:46:40.720
All that.

00:46:40.720 --> 00:46:44.720
It's hard because they aren't really good resources for tech educators.

00:46:44.720 --> 00:46:53.720
There's like, if you dig into the literature on how learning works and how teaching works, it's like, it's all either very academic.

00:46:53.720 --> 00:47:01.720
And so it's a little bit hard to pass and it's not like, it's just not packaged well for the people who need it or it's packaged in the wrong way.

00:47:01.720 --> 00:47:06.720
So I came across a code school recently who I was like, how do you handle your teacher training?

00:47:06.720 --> 00:47:07.720
And they're like, we outsource it to these guys.

00:47:07.720 --> 00:47:11.720
And they showed me this other organization that does teacher training.

00:47:11.720 --> 00:47:21.720
And it's like, I dug through their courses and one of their selling point points was like our teacher training courses are so versatile that they can be used for florists and personal trainers.

00:47:21.720 --> 00:47:29.720
So I was like, yeah, maybe not appropriate for, for what we're up to here, but that's what people are relying on.

00:47:29.720 --> 00:47:31.720
And that's like the best that the industry has to offer.

00:47:31.720 --> 00:47:38.720
So I think there's a big hole in the education space and I want to want to work to fill that.

00:47:38.720 --> 00:47:40.720
Yeah. So that's part of what I'm doing.

00:47:40.720 --> 00:47:42.720
And the other part is offering technical training.

00:47:42.720 --> 00:47:55.720
And this is partially because you've got to like practice the craft partially because I want to create opportunities for educators to get good partially because I like really like teaching the stuff.

00:47:55.720 --> 00:47:59.720
So there's all different reasons why I'm teaching.

00:47:59.720 --> 00:48:05.720
So right now I'm building out a bunch of small workshops that cover different skills and are fairly standalone.

00:48:05.720 --> 00:48:10.720
And those are Lego blocks that will combine into something much bigger in the future.

00:48:10.720 --> 00:48:16.720
But for now, the first workshop that I have on offer is all about Django and HTMX.

00:48:16.720 --> 00:48:18.720
So it's pretty exciting.

00:48:18.720 --> 00:48:21.720
So it talks about the stack that we just spoke about.

00:48:21.720 --> 00:48:23.720
We didn't mention Tailwind, but Tailwind is great as well.

00:48:23.720 --> 00:48:26.720
It means that I can make front ends that look reasonable.

00:48:26.720 --> 00:48:27.720
That's right.

00:48:27.720 --> 00:48:31.720
You said you had used material UI previously to make it goodish.

00:48:31.720 --> 00:48:33.720
And Tailwind is what used in the new version.

00:48:33.720 --> 00:48:35.720
Yeah, I'm really enjoying Tailwind.

00:48:35.720 --> 00:48:36.720
Yeah.

00:48:36.720 --> 00:48:41.720
So the idea with this little workshop, I ran it as part of DjangoCon US recently.

00:48:41.720 --> 00:48:42.720
It was super cool.

00:48:42.720 --> 00:48:46.720
I got, I don't know, there were way too many people there, which was great.

00:48:46.720 --> 00:48:50.720
But also it was a lot of problems resolved.

00:48:50.720 --> 00:48:52.720
It was like, whoa, all of you.

00:48:52.720 --> 00:48:54.720
That was super cool and went really well.

00:48:54.720 --> 00:49:04.720
The basic idea is that I want to show how to build a crowd application using the stack of tools in a way that sets people up to be able to build their own stuff.

00:49:04.720 --> 00:49:10.720
And part of the workshop is, in fact, taking these tools and building your own thing.

00:49:10.720 --> 00:49:18.720
So for people who are kind of early on their career, in their career, they can get some, like the starts of decent portfolio projects out of it.

00:49:18.720 --> 00:49:20.720
People built all sorts of interesting things.

00:49:20.720 --> 00:49:26.720
The one person built their own personal learner management system for like their own learning, which was really lovely.

00:49:26.720 --> 00:49:28.720
Somebody built a music store.

00:49:28.720 --> 00:49:36.720
Somebody else built a, what was it, like a chore manager for their family so that they don't fight so much.

00:49:36.720 --> 00:49:37.720
It was great.

00:49:37.720 --> 00:49:38.720
Oh, that's interesting.

00:49:38.720 --> 00:49:38.720
Yeah.

00:49:38.720 --> 00:49:39.720
Yeah.

00:49:39.720 --> 00:49:42.720
And all with Django, HTMX and Alpine JS and the others.

00:49:42.720 --> 00:49:46.720
And the other thing that's cool about this is it's a CRUD application.

00:49:46.720 --> 00:49:50.720
I'm teaching people the bits and pieces that build a CRUD app.

00:49:50.720 --> 00:49:55.720
And like most of the internet is CRUD applications because it's for the audience.

00:49:55.720 --> 00:49:58.720
Like if anybody hasn't heard of CRUD, it's create, read, update, delete.

00:49:58.720 --> 00:50:00.720
Like that's most of what you need to do on the internet.

00:50:00.720 --> 00:50:07.720
And so if you get the patterns down for like a simple CRUD app, then you can do some pretty hardcore things with it.

00:50:07.720 --> 00:50:09.720
So yeah, this is, so it's covering that.

00:50:09.720 --> 00:50:11.720
The workshop is small.

00:50:11.720 --> 00:50:18.720
So it's like, I'm, I'm keeping things very, very small intention intentionally because I believe in the power of teachers.

00:50:18.720 --> 00:50:22.720
And I want to make sure that everybody gets attention and then gets the support that they need.

00:50:22.720 --> 00:50:27.720
And also because of the people who tend to come to these kinds of things have different backgrounds.

00:50:27.720 --> 00:50:28.720
So some people need help here.

00:50:28.720 --> 00:50:29.720
Some people need help there.

00:50:29.720 --> 00:50:33.720
And so you need to keep like a good ratio of teachers to students.

00:50:33.720 --> 00:50:38.720
So yeah, expert led, high support, small group, all of that good stuff.

00:50:38.720 --> 00:50:39.720
Quite exciting.

00:50:39.720 --> 00:50:40.720
That's very cool.

00:50:40.720 --> 00:50:41.720
I'll link to this workshop in the show notes.

00:50:41.720 --> 00:50:42.720
People want to check it out.

00:50:42.720 --> 00:50:46.720
And it's out of time, but it's remote.

00:50:46.720 --> 00:50:48.720
So people can attend from wherever, right?

00:50:48.720 --> 00:50:49.720
You don't have to be near you.

00:50:49.720 --> 00:50:50.720
Yeah.

00:50:50.720 --> 00:50:51.720
So you don't need to be in South Africa.

00:50:51.720 --> 00:50:59.720
In fact, I made it in U.S. Eastern time because strangely enough, most of the people who read my blog are in the U.S.

00:50:59.720 --> 00:51:05.720
So it's U.S. and South Africa and it shifts and changes around.

00:51:05.720 --> 00:51:12.720
But part of the reason I'm marketing it to the U.S. is because I want to be able to fund training Africans.

00:51:12.720 --> 00:51:17.720
And like there just isn't as much money on the side of the world.

00:51:17.720 --> 00:51:24.720
So, yeah, I want to be able to make doing good in the tech education space into something that's financially sustainable.

00:51:24.720 --> 00:51:29.720
So that's why the U.S. and that is why it's priced in dollars.

00:51:29.720 --> 00:51:30.720
Yeah.

00:51:30.720 --> 00:51:32.720
So you guys can have a discount code.

00:51:32.720 --> 00:51:33.720
Talk Python.

00:51:33.720 --> 00:51:34.720
Talk underscore Python.

00:51:34.720 --> 00:51:35.720
I think that was the one I said.

00:51:35.720 --> 00:51:36.720
Let me just share.

00:51:36.720 --> 00:51:37.720
Yeah, I'll put it in show notes.

00:51:37.720 --> 00:51:38.720
People can find it there.

00:51:38.720 --> 00:51:39.720
Awesome.

00:51:39.720 --> 00:51:41.720
So you'll get 10% off.

00:51:41.720 --> 00:51:45.720
And then I also want to give like another 10% to something.

00:51:45.720 --> 00:51:52.720
So Foxly wanted me to give 10% from their discount code to the DSF.

00:51:52.720 --> 00:51:54.720
So that's another code that's out there.

00:51:54.720 --> 00:51:55.720
So that's fantastic.

00:51:55.720 --> 00:51:57.720
I've definitely benefited a lot from the DSF.

00:51:57.720 --> 00:51:59.720
So that's really, really cool.

00:51:59.720 --> 00:52:08.720
So since this is your podcast, should the further 10% go to the DSF or the PSF or the DjangoCon Africa event?

00:52:08.720 --> 00:52:09.720
I vote DjangoCon Africa.

00:52:09.720 --> 00:52:10.720
Fantastic.

00:52:10.720 --> 00:52:12.720
I was hoping that you'd say that.

00:52:12.720 --> 00:52:13.720
Yeah, I love DjangoCon Africa.

00:52:13.720 --> 00:52:15.720
It's so freaking cool.

00:52:15.720 --> 00:52:26.720
Speaking of a conference and talks and stuff, Kim out in the audience says, in a few weeks, a really good talk Sina gave at South Africa PyCon a few weeks ago should be online.

00:52:26.720 --> 00:52:28.720
Power to the people who teach people to code.

00:52:28.720 --> 00:52:29.720
So that's cool, right?

00:52:29.720 --> 00:52:30.720
Yeah, that's cool, right?

00:52:30.720 --> 00:52:34.720
Yeah, that's the longest title I've had for a talk ever.

00:52:34.720 --> 00:52:35.720
Thanks, Kim.

00:52:35.720 --> 00:52:42.720
Yeah, so I did that talk at PyCon South Africa and I also did it, I did a longer version of it at DjangoCon US as a keynote.

00:52:42.720 --> 00:52:45.720
So I was super, super happy that I got that opportunity.

00:52:45.720 --> 00:52:46.720
It's so cool.

00:52:46.720 --> 00:52:55.720
But yeah, it just talks about kind of how I think about teaching and how I, that's how I think about teaching and the mechanisms that we set up.

00:52:55.720 --> 00:53:08.720
So, so like, how does mastery based learning work and how do you actually get, how do you engineer a education system so that it sets people up for success and not like either frustration or boredom?

00:53:08.720 --> 00:53:12.720
Because there's a lot of, a lot of things that are weird about the traditional systems.

00:53:12.720 --> 00:53:19.720
Yeah, so it talks about that, but then it also shares a bunch of lessons for individual educators on the ground.

00:53:19.720 --> 00:53:33.720
So that thing that I was talking about earlier about how we as educators in the system were getting like a ton of feedback about our own, the quality of our work that gave us space to, to figure out a lot of like hard hitting things.

00:53:33.720 --> 00:53:39.720
So it's, it's kind of the 80, 20 of what teachers or would be teachers should, should focus on.

00:53:39.720 --> 00:53:42.720
And I think it's powerful because a lot of like everybody teaches.

00:53:42.720 --> 00:53:45.720
I mean, you teach people, teach new team members.

00:53:45.720 --> 00:53:49.720
Like there's a lot of volunteer teachers as well, which is great.

00:53:49.720 --> 00:53:57.720
I mean, there's stuff like, I think we, I think doing this kind of these presentations, this, this kind of teaching is a super cheat code for leveling up your own skills.

00:53:57.720 --> 00:53:58.720
Yeah, definitely.

00:53:58.720 --> 00:54:02.720
There's this thing called protege effect, which is a well studied thing.

00:54:02.720 --> 00:54:07.720
So when people say teaching is a great way to learn, it's, they're not just being squishy.

00:54:07.720 --> 00:54:08.720
Like it's legit.

00:54:08.720 --> 00:54:10.720
It's really, really legit.

00:54:10.720 --> 00:54:14.720
And there's, there are a lot of mechanisms behind it.

00:54:14.720 --> 00:54:19.720
It's like one of the simple ones is that teaching is spaced repetition and recall.

00:54:19.720 --> 00:54:21.720
And that helps you remember your stuff.

00:54:21.720 --> 00:54:26.720
Another one is like, people will ask you weird questions that you wouldn't expect.

00:54:26.720 --> 00:54:33.720
And so you look at your own knowledge from a different direction and you build better mental frameworks or more robust mental frameworks.

00:54:33.720 --> 00:54:38.720
Like some people are good at building mental frameworks and some people aren't as good.

00:54:38.720 --> 00:54:48.720
And a good way to like get a person to build good mental frameworks is to ask them weird, like left side questions about the stuff they know and get them to look at things from different angles.

00:54:48.720 --> 00:54:50.720
And then you get that from, from the people you're teaching.

00:54:50.720 --> 00:54:52.720
It's yeah, it's really, it's a beautiful thing.

00:54:52.720 --> 00:54:53.720
Yeah, it really is.

00:54:53.720 --> 00:54:59.720
It definitely rounds out your knowledge and makes you think deeply about some of these ideas that you just maybe glossed over.

00:54:59.720 --> 00:55:00.720
Yeah.

00:55:00.720 --> 00:55:01.720
Yeah.

00:55:01.720 --> 00:55:02.720
This is probably a good place to leave it.

00:55:02.720 --> 00:55:06.720
Let's, I want to give out one more resource real quick for people is just awesome.

00:55:06.720 --> 00:55:07.720
HTMX over on GitHub.

00:55:07.720 --> 00:55:17.720
I don't know if you poked around this, but it's got many, many examples of tools and libraries for HTMX and Python, but also in a ton of other languages.

00:55:17.720 --> 00:55:18.720
So that's super cool.

00:55:18.720 --> 00:55:25.720
Apparently there's a flashtmxtailwind one and one for sockets or maybe HTMX over web sockets.

00:55:25.720 --> 00:55:26.720
I don't know.

00:55:26.720 --> 00:55:27.720
These are all look pretty cool.

00:55:27.720 --> 00:55:29.720
So people can check them out.

00:55:29.720 --> 00:55:36.720
But yeah, and I definitely want to recommend people check out your essay and yeah, they can take these ideas and run with them.

00:55:36.720 --> 00:55:37.720
Yeah.

00:55:37.720 --> 00:55:38.720
Cool.

00:55:38.720 --> 00:55:40.720
Well, Gina, thanks for being on the show.

00:55:40.720 --> 00:55:41.720
It's been great to talk to you.

00:55:41.720 --> 00:55:42.720
Yeah, it's been great to talk to you too.

00:55:42.720 --> 00:55:43.720
This was a lot of fun.

00:55:43.720 --> 00:55:44.720
It was.

00:55:44.720 --> 00:55:45.720
Bye.

00:55:45.720 --> 00:55:46.720
Cheers.

00:55:46.720 --> 00:55:47.720
Thank you for another episode of talk Python to me.

00:55:47.720 --> 00:55:49.720
Thank you to our sponsors.

00:55:49.720 --> 00:55:51.720
Be sure to check out what they're offering.

00:55:51.720 --> 00:55:53.720
It really helps support the show.

00:55:53.720 --> 00:55:57.720
This episode is sponsored by Posit Connect from the makers of Shiny.

00:55:57.720 --> 00:56:02.720
Publish, share and deploy all of your data projects that you're creating using Python.

00:56:02.720 --> 00:56:09.720
Streamlit, Dash, Shiny, Bokeh, FastAPI, Flask, Quarto, Reports, Dashboards and APIs.

00:56:09.720 --> 00:56:11.720
Posit Connect supports all of them.

00:56:11.720 --> 00:56:16.720
Try Posit Connect for free by going to talkpython.fm/posit.

00:56:16.720 --> 00:56:17.720
P-O-S-I-T.

00:56:17.720 --> 00:56:20.720
And this episode is brought to you by Bluehost.

00:56:20.720 --> 00:56:21.720
Do you need a website fast?

00:56:21.720 --> 00:56:22.720
Get Bluehost.

00:56:22.720 --> 00:56:28.720
Their AI builds your WordPress site in minutes and their built-in tools optimize your growth.

00:56:28.720 --> 00:56:29.720
Don't wait.

00:56:29.720 --> 00:56:32.720
Visit talkpython.fm/bluehost to get started.

00:56:32.720 --> 00:56:34.720
Want to level up your Python?

00:56:34.720 --> 00:56:38.720
We have one of the largest catalogs of Python video courses over at Talk Python.

00:56:38.720 --> 00:56:43.720
Our content ranges from true beginners to deeply advanced topics like memory and async.

00:56:43.720 --> 00:56:45.720
And best of all, there's not a subscription in sight.

00:56:45.720 --> 00:56:48.720
Check it out for yourself at training.talkpython.fm.

00:56:48.720 --> 00:56:53.720
Be sure to subscribe to the show, open your favorite podcast app and search for Python.

00:56:53.720 --> 00:56:55.720
We should be right at the top.

00:56:55.720 --> 00:57:01.720
You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct

00:57:01.720 --> 00:57:04.720
RSS feed at /rss on talkpython.fm.

00:57:04.720 --> 00:57:07.720
We're live streaming most of our recordings these days.

00:57:07.720 --> 00:57:11.720
If you want to be part of the show and have your comments featured on the air, be sure to

00:57:11.720 --> 00:57:14.720
subscribe to our YouTube channel at talkpython.fm/youtube.

00:57:14.720 --> 00:57:17.720
This is your host, Michael Kennedy.

00:57:17.720 --> 00:57:18.720
Thanks so much for listening.

00:57:18.720 --> 00:57:19.720
I really appreciate it.

00:57:19.720 --> 00:57:21.720
Now get out there and write some Python code.

00:57:21.720 --> 00:57:22.720
We'll see you next time.

00:57:22.720 --> 00:57:22.720
Bye.

00:57:22.720 --> 00:57:22.720
Bye.

00:57:22.720 --> 00:57:22.720
Bye.

00:57:22.720 --> 00:57:23.720
Bye.

00:57:23.720 --> 00:57:24.720
Bye.

00:57:24.720 --> 00:57:25.720
Bye.

00:57:25.720 --> 00:57:26.720
Bye.

00:57:26.720 --> 00:57:27.720
Bye.

00:57:27.720 --> 00:57:28.720
Bye.

00:57:28.720 --> 00:57:29.720
Bye.

00:57:29.720 --> 00:57:30.720
Bye.

00:57:30.720 --> 00:57:31.720
Bye.

00:57:31.720 --> 00:57:32.720
Bye.

00:57:32.720 --> 00:57:33.720
Bye.

00:57:33.720 --> 00:57:34.720
Bye.

00:57:34.720 --> 00:57:35.720
Bye.

00:57:35.720 --> 00:57:36.720
Bye.

00:57:36.720 --> 00:57:37.720
Bye.

00:57:37.720 --> 00:57:38.720
Bye.

00:57:38.720 --> 00:57:39.720
Bye.

00:57:39.720 --> 00:57:40.220
you

00:57:40.220 --> 00:57:40.720
you

00:57:40.720 --> 00:57:42.720
Thank you.

00:57:42.720 --> 00:58:12.700
Thank you.