Django Chat

Databases, Django APIs, and AI - Haki Benita

Episode Summary

Haki Benita joins us to discuss mastering Django's ORM, optimizing database queries, and building applications that stand the test of time. We debate Django's future, including typing support, modern APIs, and why Django Ninja is so appealing. Plus, how AI is changing software development, open source, and the way developers learn and share knowledge.

Episode Notes

đź”— Links

📚 Books

📦 Projects

🤝 Sponsor

Thanks again to Laravel Cloud for sponsoring this episode. The team behind Laravel’s managed hosting platform has something big in the works, and we’ll share more here on the show in the coming weeks.

🎥 YouTube

Episode Transcription

Carlton (00:00)
welcome to another episode of Django chats podcast on the Django web framework I'm Carlton Gibson join us everybody will visit Hello Will

Will (00:06)
Hey, Carlton.

Carlton (00:08)
Hello, well today very excited to have with us Haki Benito who's a longtime hero of mine. Haki, thank you for coming on the show. I was

Haki (00:15)
Thank you for having me.

Carlton (00:17)
No, no, it's a it's really is an honor. I was just going to introduce you as that database guy and be done with it. Right. So.

Haki (00:24)
Yeah, that would that

sounds about right. Yeah, the database guy. I do arts and

Carlton (00:28)
Yeah.

Will (00:28)
Well I can

Haki (00:29)
crafts as well, but you know, database guy is fine.

Carlton (00:32)
Yeah, that's fine. For people who don't know, gone,

Will (00:32)
I have to

Carlton (00:34)
well, you were going to say.

Will (00:35)
I was just gonna

say, I don't know if we've told this story, but in at DjangoCon Dublin, what, two years ago, Carlton and I were I think that I think that's the first time we met you in person. Carlton and I both at the after party, we both went up to each other and were like, That's hockey Beneda. Like, cause we've read your stuff for years. You were like this mysterious

Haki (00:49)
Ha ha ha.

Will (00:52)
figure. And so we're like, Wow, he's he's here. Uh so many people don't but you know, you've you've written these deep, in-depth articles and teaching. Um

And we'd never seen you before. Now of course you're on the circuit at uh multiple conferences, but

Haki (01:07)
Yeah, I know. Dublin was my debut when it comes to the Django world. I had some appearances mostly online but this is the first time I came in person and uh yeah. I wanted to enjoy the the full experience. It was a good conference

Will (01:23)
Yes.

Haki (01:23)
by the way. I liked it very much, Dublin.

Carlton (01:23)
And you

came back the next year, so that must have spoke for itself.

Haki (01:28)
Yeah, I know.

And the food was uh significantly better. I mean, you know Dublin. Nice beer, but that's it. So Athens, that was that was great. Great food, great beer, great everything.

Carlton (01:42)
Yeah,

yeah. I came home raving about Athens to my wife. like, we must go back there.

Haki (01:49)
Yeah.

Carlton (01:52)
So let me just tee you up for people who don't know you. mean, I came across your blog many years ago where you write these just...

And for me, amazing articles about using the ORM and going into some of the more deeper things. So we can all, you know, write a model, can all filter on it basically, but you know, the more advanced things, I think the ORM is hard. And even if you know SQL, it can be hard to map what you do know from SQL to how the ORM wants to

Haki (02:18)
Yeah.

Carlton (02:19)
do it. And you write these lovely pieces. I guess I...

You know, my big question that I would just start with right in at the deep end is how do you view the mismatch or the impedance between SQL SQL and using the ORM? Because when I speak to people who are analysts, they quite often go, I hate Django, I hate Django because I just want to write my SQL. They want to write their thing, but.

Haki (02:44)
Honestly, I I I hear people say that as well, but I I can say that I really understand why. I mean, I wouldn't want to write and maintain SQL for trivial stuff like you know, fetching a transaction, doing a simple join. And I think that it boils down to really knowing the ORM, knowing the tool that you're using, making the best use of it. And if you are familiar with the ORM and you know how to use it.

Then it's a great tool. If you don't know how to use it, just like any other tool, you're going to shoot yourself in the foot. And this is why I

Carlton (03:15)
Yeah, yeah.

Haki (03:17)
write so much about the RM, because it's so easy to get it wrong, right? And I should say, just to be honest, you know, when there are situations where I can find an elegant solution with the RM, then yeah, I I write SQL and it's fine. It's completely okay. I mean, I have my wish list from the RM, you know that, and uh it's fine.

I mean there are situation if you'll search my code bases, you'll find SQL.

Carlton (03:44)
Okay.

Haki (03:44)
It's fine.

Carlton (03:45)
And the Jaggo's design philosophies have this thing about making the escape hatch to raw SQL deliberately easy and deliberately welcoming and not inhibiting that.

Haki (03:57)
Yes. I can honestly say that you know, with expressions and the ability to create functions and window functions and aggregates and everything, ninety-nine percent of what I usually want to do is covered. there are a few uh situations where I struggle, especially when you need to make custom joins between models that don't necessarily have uh foreign key between them. And this is uh this is sometimes happening when you have complicated generic relations.

Or when you're working with slowly change dimensions, when you want to do a join, but you can create a foreign key. I mean it would be nice if I was able to explicitly say join this model with just this model and use this this expression. Um but I don't know, I guess this is the only thing that comes to mind when I'm thinking about situations where I'm limited by the RM. It's usually very, very good.

Boring and good. Right? Boring is good. Yeah, we this

Carlton (04:58)
Okay. Yeah, no, mean, boring is what we're after. Boring is the selling point.

Haki (05:03)
is exactly what we're after.

Carlton (05:05)
Okay, so let me give you the flip side question then, because your talks are often teaching about what's going on in the database underneath the ORMEI indexes and how to optimize queries and these kind of more advanced topics. As Django nodes, do you think we need to know the layer below?

Haki (05:28)
Well, first of all, my background is uh databases. I have formal CS education. I have degree in CS and I uh spent a lot of time training on traditional programming languages, but my first actual job was being an Oracle DBA and this is what I've done most of my uh in the first years of my career. I talk about this from time to time, I know.

And uh and this is what I've done. And um so I I I know a lot about databases and when I transitioned into a more uh developer position as being like a back end developer, uh I think that I found that a lot of people are treating the database like a black box. They send queries, they don't know what's going on, and something comes out, and as long as it's fast, they don't really care. And you know what? That's

That's a good thing. I mean, that's the ideal. This is what you want. You want to be a black box. But Django, Django is all about managing data, right? It's for managing crude applications. This is what you do. You're building dashboards. This is where Django excels. So naturally, you need to process some data. So at some point, you reach this threshold when your system is big enough that you need to care about what's happening in the database. And I think that

I I found a very good niche because everyone has database problems. And as it turns out, a lot of people have the exact same database problems. Everyone wants things to be faster. So I try to share some of my I call them aha moments, you know, when you you realize something and then you everything starts making sense to you. So I have several aha moments like this in Django as well.

And this is what I try to uh write about. I rarely write

Carlton (07:29)
There you go.

Haki (07:30)
uh like tutorials. I know you really like this uh article I wrote comparing SQL to RM and doing group buys and stuff. This is not my normal style. This is very documentation like. Um but you know, this was my exploration of the URM. I wanted to have some kind

Carlton (07:48)
Yeah.

Haki (07:48)
of reference and I was missing that, so I just decided to write it and

I also come back to this article from time to time when I need to do some of the more complicated stuff and I don't remember the syntax.

Carlton (07:56)
No, it's a reference, right? Yeah, I

find myself on that regularly. What was the one where you have to do, know, because you get the group, the values gives you the group by and things.

Haki (08:05)
Yeah, maybe I should start starting

selling merchandise like posters you can hang on the wall. Or versus Yeah, yeah. This

Carlton (08:10)
I'd wear a Haki Benida t-shirt.

Haki (08:14)
is CSS Trix playbook, you know they have this uh Flexbox poster, you know that? man.

Carlton (08:20)
Right, yep.

Will (08:20)
no, we should. Well

Carlton (08:23)
Okay,

so let me ask you one more question because I guess the question is, does Django set you up for success as your application grows, think? Or does it lead you into bad patterns, which you're then going to struggle with? Because I think

The beginning story for Django is perfect. know, a million, a million, two millions of crowd applications say so. But as your application grows and you hit those growing points, you're always going to hit them with any framework, with any pattern. But are we leading down to paths where you have to dig a long way out to make progress forward or do you think it generally steers you in the right direction?

Haki (09:03)
Well, speaking from a position where I manage several large database applications running for a fairly long time. I mean, I have one system running for more than eleven years at this point. And we started with Django, we went through all the versions, releases, Python, typing, ORM changes, you name it, we've been through it. And I think that uh Django definitely stood the test of time.

And I think that we are able to maintain a uh very uh let's say it it's a busy system and it's working very well. And we've managed to uh do large migrations and you know work around uh performance problems and we've done all of that within the context of Django. So I think that if you take the time

To learn the framework and use it correctly, then you can definitely have a successful application using Django. And I think that most of Django's defaults are for the most part right and correct. I also talk a lot about the defaults. So yeah, I think I think that Django definitely sets you up for success. And you know, I I'm I I see myself as a living proof because I went through

Carlton (10:27)
Yeah.

Haki (10:27)
the process with Django.

Several times. And um yeah, I really like Django. I mean the fact that it's boring, it's stable, it's it's not changing very often. We are upgrading Django versions uh not long after they are released. We rarely have big problems. And I can say the same for other frameworks or you know, third parties that we use. So I think that Django in this sense is is very, very good. Exemplary, I would say.

Carlton (10:59)
Okay, so we can't ask for more of recommendation than that. It does everything you want it to, it's super powerful and it makes all the right choices for you to begin with.

Haki (11:10)
Yes, yes, yes. You know, you interviewed someone, one of the people who wrote Django initially a few weeks ago, right? And he said and you asked him why aren't you not engaged with Django as much as you used to be? And he gave you actually a very good answer. He said, Django is already doing everything I needed to do. Right?

Carlton (11:29)
Yeah, right, yeah.

Haki (11:30)
So I don't have to tinker with it as much. And I think that that's a very, very good way of looking at Django. He's just already he's very mature.

And it's doing everything that you need it to do. And if you need to extend it, you can. There's a very vibrant ecosystem around it. I mean, seriously, doing everything that I want it to do. This is like one

Carlton (11:51)
Yeah, I mean the web.

Haki (11:52)
of the great things about Django, and I think that this is um this is part of the things that you know maybe is less appealing to younger developers at this point. It's not changing as often. It's not let's

Carlton (12:05)
Yeah. But the web...

Haki (12:06)
say quote sexy.

Carlton (12:08)
Well, I mean, what it kind of is in its way,

Haki (12:10)
Yeah.

Carlton (12:11)
right? um

Will (12:11)
I mean look at Carlton, come on.

Haki (12:14)
Look at Carlton, come on.

Will (12:15)
A sweatshirt. Come on.

Haki (12:17)
Yeah,

Carlton (12:17)
Ha!

Haki (12:18)
we'll posture child for Django.

Will (12:20)
Yeah. uh

Carlton (12:20)
Oh, I've lost my

m

Haki (12:24)
Yeah, he gets excited. Will you got him excited? Lucky he can hear us, right? He's going to hear that in the recording, I'm sure.

Will (12:27)
Let's just say whatever we want. Yeah, he c not yet. He doesn't listen to him.

Carlton (12:29)
Cool.

Never put the

hood up during the recording. Never put the hood up during the recording. Here's my other one. Never put your hood up during the recording. There you are. So

Will (12:33)
I know he doesn't. I have to produce him. He doesn't he d Oh now I feel slightly bad. Okay.

Carlton (12:42)
the web problem is kind of solved, Yesterday they've added a new query method, new query verb to HTTP and we can add that in the new version. Won't that be exciting that, know, cloud-based views can handle query now as well as get and post and put and delete.

Haki (12:58)
Yeah.

Carlton (12:58)
Well, kind of, but...

One thing I think is nice and increasingly in our current moment is that it gives you a solid foundation within which to explore upon. It does the fundamentals right. And then the exciting thing isn't the framework, the exciting thing is the application you're working on. That all.

Haki (13:18)
Yeah. Yes. But having said all of that, if if I I had to uh pick two beefs I have with Django and I think you know

Carlton (13:32)
Brilliant, brilliant.

Haki (13:33)
about them. The first one would be typing.

Carlton (13:37)
Yeah.

Haki (13:37)
I really, really want typing. Um and the second one would be uh APIs.

I think that was a bit of a missed opportunity. The fact that we are now starting projects and we need to use uh a package that is not maintained for a very long time. I mean that's a problem. And I don't know if you had a chance to use it, but if I had to say what I really, really want, I would really want Django API views to look like Django Ninja. I think this is exactly how I want them to work.

I want to be able to uh have a function uh and with a very simple decorator to register the URL and I want to be able to say this is what I expect the payload to be using uh some kind of type and maybe it's a Piedenic base model that already handles serialization, deserialization. I want to be able to define properly my uh query using a proper type. I don't want to have to handle all of the uh, you know.

This uh serialized, deserialize and I want it to be function based. I don't want it to be class based. Okay. And uh I really want to have like this built in documentation that they have. I

Carlton (14:52)
That's three things now, Haki. That's three things.

Haki (14:57)
think it's very elegant. I used it, it was it was very it was so simple, so refreshing. I've done a project with Django Ninja. I think that the main problem with Django Ninja at this point is that well it's a it's a small project and it's maintained

by this one very talented guy, but I mean I wouldn't I wouldn't say I wouldn't, but I would be a bit hesitant to base a big project on something which is not that doesn't have the backing like DSF for example. You know? So I really would have been happy if Django

As an organization would lean to something more like Django Ninja because I think it really gives you I I think that Fast API really showed us a new type of way of writing views. And I think that it's very appealing, the ability to provide types and inject services directly into the view, and everything is kind of baked into that. And Django Ninja showed us that it can also work with Django, but I would really like to see endorsement from Django on this.

Project. I think that we can all benefit from that because it hits two very, very big pain points that I think me at least and a lot of other people that I talk to have with Django, which is APIs and typing, and everything that comes from when you join these two together, like documentation, you know. And um I think that now with a Gente coding, right? AI, and we all realize that typing acts like

A layer of documentation on the code. I mean, when I prompt, I basically just write the typing and leave the implementation to the agent. This is how I usually work now. I just define the typing. This is what the signature looks like. Go ahead and implement it. Usually it's very trivial. And if you have your typing right, then everything just falls into place. I

Carlton (16:58)
Yeah.

Haki (16:59)
mean, a development at the end of the day, it's all about abstractions, and abstractions are types.

So let me just write the types and everything will work itself out. Um so you know, I would say that it bothers me a little about Django. Just a little.

Carlton (17:15)
Yeah, no, I mean, it's worth mentioning in this context. There's another uh REST solution out there called Django Modern REST, is, I think that's what it's called, which is by uh the folks who are into Django Stabs and they'd be behind all of that. And that's fully typed. It's using... em

It can use PyDynic serializers, can use Adders classes, it can use message spec, it does the dependency injection thing as well. So it's worth mentioning that while

Haki (17:46)
Yeah.

Carlton (17:47)
you've got it on the table. But I think, yeah, there are some exciting em changes that have happened in the ecosystem, in the wider Python ecosystem in the last five to 10 years, which Django needs to bring in.

It's...

Haki (18:06)
Yeah, I I

I I agree. I agree. Because right now, usually when you uh start a new project, usually you need an API, especially if you are doing something related to mobile or SPAs. And

Carlton (18:20)
Yeah.

Haki (18:20)
the fact that Django is perceived just as primarily uh you know as a servers server rendered engine, well, I think that it's uh unfortunate. I mean I I hate writing APIs. I really like

Carlton (18:35)
Yeah.

Haki (18:35)
doing everything

in the server rendering templates, that's great. But when once you go into places where you can't actually render HTML anymore, uh just for example, mobile apps, then you need an API and this is where it starts to get a bit hairy.

Carlton (18:54)
Yeah, what I like about the dependency injection isn't just about injecting services. It's about saying, I want this particular thing from the request object and it's going to come from the query string and it's going to be named this and it's going to be that type and your view gets given the value. And if it doesn't get the value, the framework handles the 404 or the 400 bad

Haki (19:16)
Yeah.

Carlton (19:17)
request error or whatever.

And you don't even have to see that. Whereas the way you do it is you get it in, you create a form, instantiate a form, check the form is valid, get the value from the form, and then, okay, you've got your value. But there's no reason why the framework can't wrap all of that for you. And you say, hey, just give me this from the request, you please?

Haki (19:36)
Yes. That's right. This is all just boilerplate and and I wanna focus on the actual, you know, the processes, the the business logic. This is the interesting part. All the nitty gritty stuff about serialization, this is just distractions. I wanna be able to read a view and understand exactly what it's doing. And this is also my beef with uh class based views. Um I wanna be able to understand the flow. Uh yeah, yeah.

Will (20:04)
Well all right.

Carlton (20:04)
So surely that's

not class-based fuse, that's the particular implementation of the generic class-based fuse that's with Django, With their mixins and their multiple files and...

Haki (20:11)
Yeah, yeah, yeah. You need a guide, you need

a poster just to you know, understand where everything goes. Too much for me. I just do function based and

Carlton (20:19)
Yeah.

Haki (20:20)
if I need to inject stuff to customize behavior, I just do it. I want the entire logic in just one place.

Carlton (20:27)
Yeah. Go on Will, you've sat there silently.

Haki (20:29)
But you know, this is just a personal preference. I know a bunch

of people who would be more than happy to argue with me about this for a very, very long time. It's like politics at this point. I don't get into it.

Carlton (20:39)
What would a Django conference

Will (20:38)
Yeah, yeah.

Carlton (20:40)
be without an argument about class-based views?

Haki (20:42)
Yeah, I know, it's like

it it's it's basically religion, right? You can't I can convert anyone.

Carlton (20:46)
Ha ha ha ha ha ha

ha ha ha

Will (20:48)
Well, I take your point. I mean, function and class base, to me that's I'll put that to the side. But I was thinking, like, so let's let's think about it like openly. How would we be proactive, Carlton, right? So on APIs, we know from the Django Developer Survey, most people come to Django through an API. It's Django REST framework, but at conferences, most people are using Django Ninja or these modern things, you know.

I like Carlton, I don't think we can just complain 'cause like you're on the steering council, Jeff Triplett's the president. Like, you know, like what would be a path forward? Is it is it a dep? Is it like a breakout session at DjangoCon Europe? You know, because these two things that Haki mentioned, types and a built in API, they're not new. Um, but I do feel if not the time has come, like, we shouldn't just like be like

You know, we should do something proactive about like maybe we say, Okay, we're gonna wait a year. Okay, but like what is the process to like steering council, board, you know, 'cause I would love to see the API in Django. I completely agree. I mean, hockey you teach, I teach beginners. It's like now there's a third party ecosystem and what is that and who are the people? Like, it's honestly it's crazy Django's as big as it is without a built in API. Like there's no other web framework at scale I can think of that doesn't have a built in one. Um

Sorry, sorry, I'm throwing that to you, Carlton. But like what would be like should we have a session at DjangoCon Europe in February? Can we do something before then? Like what what is the path?

Carlton (22:19)
Okay, so the path is uh there's a long standing depth that's been stalled for years about introducing content negotiation into the request object and modernizing the request object. It was stalled because of, know, whatever Django pushback regions that happened that are totally legitimate, right? Django's got a massive install base and those edge cases which break someone's thing, actually they're important. But that depth has been stalled for years now and...

needs picking up, that needs someone to come back and think through the difficult cases and work that out. So that's the hard bit of the request level. Then serialization is the big issue. The view layer in the REST framework is nothing. We can all write one in 10 minutes. We can have our clanker write one in five maybe. But the view layer is not the problem. It's the zero serialization story. is it, know, do we just jump on Pydantic? Well, Pydantic, yeah, it's great, but

Haki (23:14)
You know, Carlton,

Will (23:15)
Everyone.

Haki (23:15)
one might argue that Django already has two serialization formats, one for fixtures and you know, forms. They are basically serializable.

Carlton (23:25)
Right, yes, no, they're entirely serializers, but they're the same problem with DRF serializers is they're from the last generation. So how do they work? They work by taking the model, fetching your field off the model, getting the value for the field, and they do this in a loop, and it's pretty slow. And it was fine 10 years ago, it was fine 15 years ago, but compared to the speed of Pydantic or ATAS or ATAS and CATAS or MessageSpec, it's a lot, lot, lot, lot slower.

Haki (23:53)
You really think

the average Dango developer would care about serialization speed in for most use cases?

Carlton (23:58)
The, okay, so I was maintaining,

I was helping to maintain REST framework for years and years and years. And even years ago, the people that would complain on the issue tracker were complaining about how slow the serializers were. No, most users wouldn't. And so um Emma Dallas-Coyle, who's on the steering council, she's got a Django REST.

package which uses forms as the serialization layer and just shows how you could do it.

Haki (24:24)
Yeah, I read that.

Carlton (24:25)
And it's perfect. And it works really well, but it's not going to be performant for high traffic APIs. And it's going to be like, no, why are we using forms? They're slow. Why aren't we using this, that, the other? So it's this. So it's.

Haki (24:36)
Well let me tell you a secret

because DRF serializers are also not very fast on uh you know, high traffic use cases. And then you also need to get it down to the database level, Python level, whatever level. So I mean, once you introduce an API that works and is endorsed, then making it fast is an engineering problem that you can solve separately. The problem is that there's no official API to use with Django. I mean first

Show me how it should look like and then let's talk about how to make it fast. Separate problems, in my opinion, of course.

Carlton (25:10)
Okay,

fair enough. so Adrian Horovati, he also said why isn't there an inbuilt rest stories? Because there's no there there. He's like, there's nothing to it. And what he's talking about is the view layer. So yeah, we could come up with some simple view functions and be like, look, there's the official Django endorse view layer. unless we make it the serialization story pluggable, we're not going to satisfy.

anybody and until we get the request object modernized we're not going to it's not going to look modern it's just going to be exactly the same as rest framework but in Django rather than next to it.

Haki (25:42)
Yeah.

Carlton (25:43)
So yes I'm totally with you but just use you know half of people are still using rest framework but a few people are using ninja some are using Django modern rest and I'm fairly

Haki (25:53)
Yeah, I know.

Carlton (25:53)
sure there will be half a dozen more stories out there before we get a final solution.

Haki (25:58)
By the way, I can

tell you that in in some of my projects when we uh add new endpoints, we are now using DRF views and the serializers are already Piedenic.

Carlton (26:10)
Yeah, yeah, and why not? Why not? Because the view layer is fine, right?

Haki (26:12)
This is basically what we do. We

Yeah, I mean I mean yeah, we we stitched it together. I mean I guess that at some point we'll ditch DRF as well. And just maybe uh use uh you know raw Django with some decorators. I think this is uh what we're going to end up with eventually because we are slowly starting to strip away uh DRF parts. It started with serialization and I'm guessing that at some point we'll strip the resources as well. And

You know, there's not a lot of motivation at this point because it's kind of working and it's stable. But for new

Carlton (26:47)
Bro, yeah.

Haki (26:48)
stuff we are looking at doing it maybe differently. You know, just to keep up with all the changes. I mean Pidanic brings a lot of very uh convenient things that you don't necessarily get uh elsewhere. And it's as you said, it's fast. And

Carlton (27:05)
Yeah.

Haki (27:05)
uh when you design for scale, you want it to be fast.

Carlton (27:09)
Yeah, I mean, was always... No, it was always the complaint.

Haki (27:10)
I don't know if it's fast, but it's definitely faster than DRF serializers, which is the point.

Carlton (27:14)
People would turn up uh 10 years ago and they'd be like, it's not fast enough. So, marshmallow serializers were the big thing and then by the end of the day, you know, there's this long history of people wanting faster solutions than this loop through the bottle fields, fetch the field solution.

Haki (27:29)
Yeah. Let

me ask you a question, Colton. How did you start using Django? How did you end up picking Django?

Will (27:37)
I'm gonna lean back for this one.

Carlton (27:37)
well I guess it was

I went to a

Haki (27:40)
Why is there a story there? It's like story time.

Carlton (27:43)
I went to a conference called Future of Web Apps back in the day and it must have been around another 1.0 and there was lots of talk about Django, Django, Django. So I went home and I Googled it and it said the web framework for perfectionists with deadlines. And I was like, that's me. And so that was all quite a while back. And then I was doing mobile applications and I was building the backend to go with them. So I was using DRF for that. then Tom Christie came on the mailing list one day and said, I needed a bit of help.

maintaining it so I started answering questions and doing that kind of thing and you know that was that was a while back now but yeah

Haki (28:20)
So basically you

uh you got excited about Django after you saw it presented in the conference.

Carlton (28:25)
Well, yeah, mean, maybe I saw Simon Willison talk.

Haki (28:28)
Yeah, and you had an actual use case where Django fit.

Carlton (28:32)
Yeah, no, I mean, had like, so why did I start using it? I started using it because I needed a backend solution for mobile applications. I was using PHP in MySQL and I was like, okay, that's fine. But then I found Python and I was like, no, this is like that proverbial glass of water to the person in the hot boiler room. I was like, this is lovely.

Haki (28:50)
Yeah. By the way, it's very similar story for me. I mean, the only difference is I also needed to develop a backend for uh a a mobile app. And I went and asked my younger brother, which is a Python developer as well. He's also the maintainer of PyTest now and a bunch of other stuff. And that was like maybe fifteen years ago and I asked him, I need to do this backend, what should I use? And he's like, Get off me, man, get off me.

You and your crap. And I'm no, no, seriously, into do this thing, what what what should I do? And he says, Well, use just use Django. Like, get off me, use Django. He thought that

Carlton (29:23)
Yeah. Yeah.

Haki (29:25)
this way he would have to you know help me the least. So this is how I got this is how I got started with Django. I can say it because he's my brother, but Yeah.

Carlton (29:33)
Experts recommend Django because it's got the less user support needs.

Will (29:37)
Yeah.

Haki (29:38)
If he only knew how how how how much hand holding you would have to do, but yeah.

So this is how I got started with Django. And now the next question would be how do you think new people get started with Django?

Carlton (29:52)
I have no idea. I'm so far removed from how people get like, I guess they don't because what do new people get started with? They, they, they're talking to their clanker or, you know, my son's just gone to university. He's doing a programming course. Maybe they introduced that maybe there's a web module for that. And I don't know if there's a web module for it.

Haki (30:07)
Well, you know that's not true. You know exactly how people

get started with web frameworks these days. They have some idea, they go to the AI

Carlton (30:14)
Yeah, they use fast API.

Haki (30:16)
of choice and they say, I need this and that, and then the AI would vibe code something and you just pick it up from there. So the question becomes what do I have to write in my prompt for the AI to actually suggest Django? Right? I mean, if I write, I want an API backend for

A mobile app, am I going to get Django? Probably not, right? If I write, I need to develop a

Carlton (30:41)
No, get fast API if you get Python.

Haki (30:44)
back end for a crude app with lots of forms in an admin panel, I might get Django. Right?

Carlton (30:50)
Yeah. Yay.

Haki (30:52)
So I think the question now becomes understanding where Django shines, because this is eventually what's getting picked up by these AI tools, and this is, I think, how

A lot of people get started these days with new projects. This is how I get started when I need to develop something in a language or environment that I'm not familiar with. I let this thing uh suggest tools for me based on things I think I need. And then I just accept the recommendation because honestly, I just don't know. And AI

Carlton (31:25)
Thought. Yeah, yeah.

Haki (31:26)
is usually very confident in his in his answers, you know. Very convincing.

Carlton (31:30)
It's like a mediocre white man.

Will (31:33)
Wait, wait, I w I wanna I wanna

talk about AI, but I just wanna loop back to so Carlton, the request object. I think like 'cause this frustr this frustrated me for

Carlton (31:40)
Yeah, well, hang on,

Will (31:42)
years is we'd say, like, Django can't do something, why doesn't someone do something? Like we are in positions to do something now, Carlton. So what is the next step? Do we need to have a d a Django on the med on the request object? Do we need to have a breakout session at DjangoCon Europe? Like

W we we should or should we just close the depth? You know, like that seems like you're saying and I like that's the blocking function to these other things about, you know, an official thing and putting things in the docs.

Carlton (32:06)
Okay, so

I firmly believe that the way progress is made in the Django ecosystem, because of the way Django is and because of its installed mass and because of its slow inert, slow release cycle and all the rest, the way that progress is made is by third party apps building the thing and then, you know, there being a case made for it being to merge into core. So I've given my presentation of the take on serialization layer. um

The only reason why I haven't built the view layer and a request object replacement is because I haven't needed it for my project. I'm four years into my work project and I thought I was gonna add an API layer this summer and I did. I added one MCP endpoint to it. I haven't got to the rest of the API stuff. So I don't.

I'm not going to build it yet. will eventually if the next time I need an API, I will I will say, look, here's what I think an API framework can look like in 2027 or 2028, whenever that happens to be. But

It's for somebody who's interested to write that thing and present it. And there are a couple of things in the ecosystem. There's Django Ninja, there's Django Modern REST, there's a couple of others. think they're out there. But present these things. And then when there's a head of steam up, then it's possible to say, well, let's pull that in. Let's pull that in. Let's pull that in. But the idea that we're going to sit down in a sprint and add a full featured API framework into Django in a one shot, that's...

unrealistic. That's not how Django works.

Will (33:37)
Well no, but we

there's history for this. This is what the migrations framework happened, right? There was people realized we need migrations. There were three migration options out there. One was decided. I mean, I guess I'm just saying like I don't wanna just complain about stuff and not fix it. Like, so is it do we ask people to like DjangoCon Europe, DjangoCon US, like let's put a call out, bring us your ideas, maybe there's a Django on the med? Like 'cause to h to Haki's point, I do worry that Django is left behind and that

Agents don't think it can do APIs. And it used you know, I have my whole story of how I think beginners would come to Django, usually after trying a JavaScript framework and being frustrated, but they're just going straight to agents. And you know, again, not that we're I don't want to optimize just for agents, but I don't want us to to be having this discussion in five years about the context object. Personally.

Carlton (34:27)
I'm

skeptical that the situation is equivalent to back in the days of 1.7 when migrations were added. That was in the Wild West days when nobody upgraded Django. Half

Will (34:42)
Yeah.

Carlton (34:42)
of the ecosystem was still on like 0.96 when 1.7 was released, right?

Now we have the very, and since 1.8 and the period, the scheduled release cycle, Django has matured into a very stable, very easy to update, very reliable foundation upon which you build. And it's not the case that we're just gonna add, I believe, that we're just gonna add an API framework that doesn't yet exist, that we're gonna write from scratch and add it in and be like, there's the new API framework. It will have to be, but it took me a whole,

LTS release cycle to get template partials into Django, right? We're talking about one, a pair of template tags. It took a whole LTS cycle to go from third party package to into Django. And that's two template tags. How on earth are we gonna merge an entire API framework whilst maintaining the API stability policy whilst doing all of these things? It's not feasible. How does Django...

Will (35:44)
I don't like your negativity, Carlton.

Carlton (35:47)
No, it's not negative. I think it's massively positive. think Django is in a... um No, but I'm as excited for the

Haki (35:50)
I feel like I got Carlton in trouble here.

Will (35:53)
No no, this is I know you're excited, yeah.

Carlton (35:57)
framework as I've been in years. I think we're in a really fertile and exciting exploratory time. But the way that exploration happens is in third-party packages and whatnot. It doesn't happen in trying to merge...

essentially untested solutions into Django itself. Because people don't use Django for untestedness. They use Django for reliability and knowing that their application is still going to be running

Will (36:23)
Yeah.

Carlton (36:25)
in a dozen years.

Will (36:27)
No, I got I and just not not to go on forever about this, I just maybe if a plan was like this is what the plan would look like for success, s um, you know, we could have some some you know, some people come on the podcast. I know that's unfair because it assumes they can speak, you know, comfortably in English. Um I don't know. I just don't I just wish the steering council, the board, I mean, we know these people, Carlton, like could say if we're you know

Carlton (36:53)
Just build it. Just

build the thing.

Will (36:55)
But what does Django Ninja need to do? Like for example, right? What what

Carlton (36:58)
Well Jang-Eun-In

needs to be maintained. Right? He's the pro- Like Jang-Eun-In-

Will (37:02)
Well, so the

DSF has money. Like we could, you know, it could we can do things, right? Like the Postgres features, you know, w like we can f I guess that's what I'm saying is we have more resources than we did before. Even as the complexity is more and and the, you know, messing it up is higher, we could there's more possibilities. I don't know. Okay, we could we could go on about this. And I'm I'm not attacking you, Carlton. I just all right.

Carlton (37:20)
Okay, I don't want to, we've got Haki on to talk to Haki, but I don't want

to upset the hard word that

Haki (37:27)
Ha ha ha

Carlton (37:29)
goes on on Django Ninja, but Django Ninja is a nice proof of concept, a nice demonstration that things like dependency injection in Django are possible and all those things, but merge it as is? No way, no way. There's all

Will (37:40)
Well, all right.

Carlton (37:41)
sorts of things that aren't right about it.

Will (37:43)
Carlton, let me

Haki (37:43)
Yeah.

Will (37:43)
this is a question to hockey. So as our transition, what if I just ask Opus five point five to do it? Problem solved,

Haki (37:53)
Well, I would

Carlton (37:53)
Oh.

Haki (37:53)
just tell him you know, Pip installed Django

Will (37:55)
Ha ha ha.

Haki (37:56)
Ninja, honestly at this point. I told you what my problem with Django Ninja, it's not even a problem. It's just like more like a management point of view. I I just you know, we do a lot of scrutiny on the dependencies to make sure that they are uh okay and reliable, especially these days when you get C V E's left and right. And uh we we wanna make th sure that things are legit. So we have trusted the DSF. We know they run

tight shop and we know that everything that goes into Django is uh is uh is is good. I mean see what's happening with Postgres right now. I mean it's crazy, right? Are you following the news?

Will (38:30)
Well, what

wait, okay, let's talk about Postgres, because I've had this discussion. Like what well all right, I'll give you my

Haki (38:34)
Yeah, let's. I mean there are some exciting stuff in nineteen is then not getting out.

Will (38:38)
all right, I'll give you my one sentence and then you're much more of a domain expert than I am. So one argument is LLMs are introducing a whole bunch of bugs, but what I've seen is that LLMs are uncovering lots of bugs that were there for a long time, and that's

Haki (38:50)
Old box, yeah.

Will (38:51)
why it's taking so long. So in a sense, that's a positive, not a negative. But what do you think?

Haki (38:56)
It is a positive. Yeah, yeah, yeah. I mean, I think that we all underst understand that LLMs made a huge leap at the end of last year, which was right after the uh last version, previous version of Postgres, because they usually release in October and the big model was released in November. So I mean this is basically the first version that we have that you had actual resources pointed at the source.

and and and checking for you know old bugs and stuff so I think what we're seeing is uh um let's say it otherwise I think that this is the first release that we're going to see this and I I hope that most of these things are going to get fixed and that the next release would be uh on time. And I think that I I read a lot of uh Postgres contributors saying that it's it's

Uh a lot thanks to LLM uncovering a lot of very very old things and we should also say that this was a very ambitious release from the get-go. There's a lot of very big stuff that was supposed to get in. This is what made this release so exciting. And uh you know uh hopefully the next one would be released in time and and I think that at the end of this release we're going to get uh a much more reliable Postgres.

So I think that from this uh sense it's it's a good thing. It's a very good thing.

Will (40:25)
Well, I'll just say, and I hate to name drop, but last week, we were talking about this before we went on the air, I was at an AI conference um in California, and Peter Norvig, I was texting Carlton during it, gave up and gave a talk. And you know, I think he knows mostly what he's talking about. And he made the case that all these things LLMs are uncovering are nothing new. We've known about them for decades. And so he was actually optimistic that LLMs will help us address these longstanding security issues that again are not new.

But we can use the LLMs to plug the holes. Um, so I

Haki (41:00)
Yeah.

Will (41:00)
appreciated some optimism in a sea of pessimism, right? Because a lot of time, you know, they're it's not necessarily something brand new. It's just like, yeah, well, no one took the time to do these things. And if you again, he said, look, I studied these, well, I forget the vulnerability, but he's like, this was done, you know, I studied this in the 80s in grad school and the LLM found it. Like it's not a new thing. So yeah, an optimistic take, potentially.

Haki (41:24)
So you say the cost of fixing these things became so cheap that we just go ahead and do that.

Will (41:29)
Well that's what he was saying. He's he was you know, he was optimistic about cybersecurity 'cause he said we know what the problems are. It just was hard to track down the long tra l the the long tail of them. And now like we know the list of here's what we should do, there's no reason not to do it on every project. So he was you

Haki (41:46)
Yeah.

Will (41:47)
know, as opposed to like LM's discovering zero days everywhere, like, okay, occasionally, but that's usually not what it is. It's you know, something lurking in the code base.

Haki (41:55)
Yeah. So

we all agree we are going to get a better Postgres when nineteen is going to be released. Yeah. I'm going to wait for the beta, but

Will (42:04)
I hope so. I think so.

Carlton (42:04)
Is it going to be like Pearl Six though? never comes.

Haki (42:08)
Yeah. Exciting stuff in Postgres nineteen, by the way. Uh I really I was really looking for the uh graph queries, which I already

Carlton (42:15)
Yeah, I wanted that.

Haki (42:17)
know are not going to make it. Uh but I don't know, maybe uh maybe next year. Maybe next year.

Will (42:24)
Is there anything Django specific that you think once Postgres nineteen is out or you know, the ideas that are in it come out that Django should should look at?

Haki (42:32)
Yeah.

Well, I can think I can think of a Postgres uh nineteen s feature that would be relevant to Django. ah no.

No. Actually no.

Will (42:50)
Not Django as we know it, no. Hm.

Haki (42:54)
It's hard to keep track of what made it and what didn't, you know, at this point.

Will (43:01)
All right. What Carlton, where d wh where where should we touch I mean, we have some AI questions, we have or I don't know, hockey to you. I mean you're an educator. Like what what sh what do you want us to ask you about? What do you want to talk about while you have a couple thousand people listening? Surely there's some things you wanna get off your chest about Django.

Haki (43:18)
Well

first of all, thank you for calling me an educator. I don't uh I just write my blogs, you know, and I I I hope that people can uh Yeah, I do teach it O'Reilly. You

Will (43:23)
No, no, you teach you teach at O'Reilly, right?

Carlton (43:25)
You do, you've got the O'Reilly course.

Haki (43:28)
know, I I started writing uh ten years ago. I think that my first post was exactly October uh twenty sixteen. And I had the very good fortune of having a very popular first blog. First post. I wrote about how to uh

Will (43:39)
Mm, so that's the problem. Yeah.

Haki (43:42)
turn Django admin into a dashboard.

And I got a lot of uh responses, which was great and very unexpected. And this motivated me to keep writing. So I set myself on a schedule and I said that I want to publish every month. And I actually published every month. I started writing and writing and writing. Obviously, the second article was a bust, the third one was a bust. The fourth one started to pick up. You know, I I learned that people really appreciate uh you publishing on a schedule. They knew that they are going to get something new every month.

And I actually was able to maintain that for like three years. And then my firstborn, my first child was born. And then from once

Carlton (44:20)
Yeah, right, ruins everything.

Haki (44:24)
a month, it became once every three or four months, you know. But still good good pace. I was able to produce some very uh good posts. Also, a lot of engagement, people were starting to reach out. I went out of medium and into my own website, started publishing.

For myself. At this point, I also uh started to write for other publications like for the Python and Trilio and stuff like that. Got to work with editors, which was new to me because I wasn't a writer, I was a developer. And they started commenting me about the grammar and how I structure my opticals and how should you uh never end a paragraph with a code block and stuff like that. And I think that it it made me a better writer and I write

Wrote more and more, and then I had twins. And then I had like a blackout period of like a year where I was basically sleepless completely. I I was completely

Carlton (45:20)
Yeah!

Haki (45:27)
sleep deprived. I was not thinking straight. But I started getting back into it. And I now try to publish around once or twice a year. And

And I think that this is probably one of the best things that I've done because a lot of the people that I know, a lot of the interactions that I get, a lot of the very interesting individuals that I get to meet, uh, and the opportunities that I had were thanks to people reaching out to me uh after reading my uh

Carlton (46:00)
what you're in.

Haki (46:01)
posts. I mean, if you think about it, when you write, you basically put yourself out there and then

people with similar interests feel comfortable reaching out to you. And I think that this is amazing. And O'Reilly by the way, uh they reached out to me after reading one of my blogs, the editor there, and he said that's let's turn that into a live training. And um I just talked with my editor and and I'm with O'Reilly I think for fo seven years.

Will (46:33)
Wow.

Haki (46:33)
Which is uh a long time.

Yeah, it was a very emotional moment because I just changed editals and he brought me in. So I realized it's like seven years. Yeah. Um, yeah. So around COVID, I think I started uh submitting CFPs for conferences. And the funny thing is that the first CFP I submitted, actually two CFPs were were for FOSDEM. You know FOSDEM?

Carlton (47:02)
Yeah, yeah, yeah, in Belgium.

Will (47:02)
I've yeah, I yep.

Haki (47:04)
Yeah, that's a pretty big deal. I mean, that's a pretty big conference. And I wasn't really into the conference scene, so I I like I didn't know what I was submitting to. So I submitted two CFPs. I got two talks accepted, one for Python and one for Postgres. And I went to my brother and I said, I just submitted the CFP to this thing called Foostem. And he told me

Will (47:25)
huh.

Haki (47:26)
and he told me, You mean FOSDEM? And yeah, yeah, FoSTEM, FOSDEM, something, I don't know. Really? Seriously?

Carlton (47:29)
Yeah. uh

Haki (47:33)
You're not joking? That's huge. And then he explained to me what it is. Uh I stayed cool though, and I gave my talk. It was a very good experience.

Carlton (47:40)
Yeah, of you did.

Haki (47:43)
And I started pitching to more and more conferences. I realized that I can take a lot of my posts and I can turn them into uh talks. I usually uh try to talk about non unconventional things. As I said, these aha moments that I have, I think

I think people find this very useful. I try not to talk to ride and talk about uh trivial stuff, you know. Uh and I think that the main advantage

Carlton (48:07)
Yeah, I mean, like you're talking Athens was

Haki (48:11)
sorry, what what?

Carlton (48:12)
you're talking Athens was amazing about reliable signals. I think you know, there were there were some very sharp people in the room listening very closely to your approach.

Haki (48:20)
Yeah, I know, I know. I know. I I think that the most interesting thing about reliable signals is that all of the people came to me afterwards and they actually made some good points which made me think about my own uh solution. I also heard a bunch of very interesting stuff um in the conference which I took back with me and wrote about them and and integrated them into uh my

my own systems, especially around partitioning and stuff like that. I think that it

Carlton (48:52)
Yeah, okay.

Haki (48:53)
yeah, it's very interesting. And you know, one of the things that I I think it's a bit unfortunate recently is that I I don't know if you sense this as well, but I have this uh feeling that people are writing less and reading less because we're not interacting as much as we used to, and uh I think that uh one of the

One of the only remaining ways of actually interacting with people is if you attend these conferences. Uh because I I I see it for myself as well. I do a lot of my research these days with uh AI. So I used to uh read lots of blogs. I have my RSS feed, I don't see as much blogs as I used to. People don't write as much. I don't know if there's nothing left to discover anymore.

no new patterns anymore or people just interact with with uh machines. Um

Will (49:51)
I think it's discover I

think it's discovery. I mean, I think a lot of it is discovery. I mean, so Jeff Triplett and I do the Django newsletter and there's less stuff than before, but I think the problem is if you write a s a something on

Django, Postgres, you know, you would you would get Google traffic. You know, it would rank really highly. Like tra search traffic is gone. So unless somebody already knows you, it's hard for them to find you or an LLM pulls it in and appropriates it. I mean, really the only discovery mechanism is video, but video is its own thing. But like

I can look up traffic to my personal site. You know, like you, I wrote some stuff and it got traffic and people commented and you know, and I still got the initial uptick and then some downtick, but I got engagement right off the bat. My traffic was ten times higher, you know, ten years ago. And for me and for l most people I know, right around twenty twenty two, twenty three, traffic just falls off a cliff. And so why so I think

Haki (50:49)
Lomited. Yeah, for me too. For me too.

Will (50:52)
it's

I think it's discovery as much as anything. Like, even if you go to Google, it's gonna give you a Gemini result, right? And so it makes it less

Haki (50:59)
I know.

Will (51:00)
again, you don't have those add-on effects of people commenting and engaging and I mean, at this California conference, it was everyone was making the joke of I can't wait to get off stage to wasting time talking to you humans to see what my agents have done. Like many s m keynote speakers,

Haki (51:16)
Ha ha ha

Will (51:17)
right? They're like, I've got a hundred agents running, you know, this is great, but like I'm really more

interested in what they're doing. Um so something yeah something is something is lost.

Haki (51:25)
Yeah. I can uh I

can tell you that I have a similar experience. My own website, I have uh my fair share of popular blogs from Hacker News and Reddit and and other websites that link to me. And I used to have very high traffic and you can just see it plummeted in recent years. And

Will (51:46)
yeah.

Haki (51:46)
you know there's a lot of media outlets that suffer because of ad revenue. I don't sell ads,

Carlton (51:51)
Yeah.

Haki (51:52)
I don't care about the revenues.

I do care about the interactions and uh if less people visit my site, less people are uh presented with the opportunity of reaching out, talking to me. And as a result, you know, I do I do have one uh experiment that I do whenever I publish something new. Yeah. For example, I I go, I recently published something about um partition pruning, right? So I went to uh I went to

Some LLM, Gemini, for example, and I asked the question. And I was very, very specific about the question. And I wanted to know if it can figure this out,

Carlton (52:29)
Give me a leading prompt.

Haki (52:32)
right? If it can actually replace me. And I I presented it a very contrived example. And I said, can you suggest any solution to that? He couldn't find anything. Then I published my article and I asked the exact same question. And he actually replied with my solution, right?

So I figured at this point I'm basically feeding the machine, you know? um

Will (52:54)
Yep.

Carlton (52:55)
I think a lot of

people are feeling that.

Haki (52:59)
Yeah.

Will (52:59)
I mean that's in DjangoCon Europe, uh or Dublin, I loved your talk and you know, I know you've written about this, this is why I tee it up. At the time you said, let's see an L LM do that after going through this complicated example. But I think, you know,

Haki (53:11)
Yeah, yeah, yeah.

Will (53:14)
you even wrote L LMs now can do that. You know, back back two years ago they couldn't, but now I I mean I where I'm at is

they s you know, everyone was talking about living on the exponential out in San Francisco. And at some point maybe it comes down, but as it's just going up and to the right, you know

Everyone there was v deeply uneasy, right? People with PhDs, twenty years experience saying the models surpassed me in the spring, so kind of what do I have left to give, right? So I know customer service reps are, you know, in danger, but people with twenty years experience are also going, like, what am I here for? Um, and I Okay.

Haki (53:57)
I don't sh I don't share this feeling. I I

I'm not feeling like my becoming obsolete. I think that uh well I always tell my my team that I don't think actual development happens on the computer. I think actual development happens on the whiteboard and I don't think this changed. I think that you know the same way Django makes things faster because I I don't have to implement everything, uh LLMs make

you know, the rest of it become very, very quick, but I still need to uh be able to explain to the computer what I want. You know, I actually had a very interesting conversation the other day. I went to uh this event for a friend and I was sitting next to this guy which I haven't seen in a while and I was talking with him. He's a police detective, right? So we were talking, you know, we were drinking and he asks me um

What do you do for a living now? And I've told him, I'm a developer. And he looks at me and he says, man, you guys are screwed, right? And I asked him,

Carlton (55:02)
you

Haki (55:03)
Why are we screwed? And he said, You I mean, I just downloaded this app, right? And I can just vibe code my own computer game with drones and everything. Dude, it's amazing. I mean, what do you what do they need developers for anymore? You're dude, man. And I asked him, let me ask you a question, right? You're a police detective, right?

If I take all the evidences, the videos and everything, and I send them to the LLM and I say ask the LLM who's the killer, and he just gives me a response. Does this make you obsolete? And he says, no, no, no, no, you don't understand. You need to draft

Carlton (55:39)
Yay!

Haki (55:41)
it in a certain way. You need to ask it in a certain way. And I told him, Well, it's the same exact thing. You know, you really think that two of us doing the exact same task using the exact same

LLM are going to produce the exact same outcome. Obviously, mine is probably going to be better, scalable, you know, something that you can actually use in production and not some vibe-coded toy that you whipped up in five minutes using some LLM. So I think uh there's still something left to say for developers, and I don't think we're doomed yet. I do think that you know we we are in a level where we are going to the next.

higher level of programming where you don't actually need to know the syntax, you can just talk in English. Or not even English, I don't know. Whatever you talk. Right?

Carlton (56:30)
Yeah, whatever you want.

But you've still written things. You've still

Will (56:33)
Well, yeah. Carlton you have to say something.

Carlton (56:38)
read, written, let's call it prose, output, written text from these things. And every one of us can agree that LLM text is deeply flawed in any number of ways. It's verbose and vacuous and probably

Haki (56:51)
huh.

Carlton (56:51)
incorrect

Will (56:51)
But

Carlton (56:52)
and really easy to spot.

But so it is for

Haki (56:55)
Yeah.

Carlton (56:55)
code, right? The code that comes out of these things is fine

Haki (56:58)
Yeah.

Carlton (56:59)
for a lot, but actually

Haki (57:00)
Yeah.

Carlton (57:01)
at the design of the application that's going to be sustainable in production, they cannot be left to implement a long chain of tasks and expected it to work at the end. They don't spot their own mistakes. don't, you know.

Haki (57:13)
Well, first of all, I think that I think

that you we should be honest and I should say that I'm uh avid user of LLMs. I enjoy them very much. I use them for coding, I use them for research. I use them to proofread my articles. I don't use them to for prose because uh for me writing is understanding and thinking. So

Carlton (57:36)
Yeah.

Haki (57:36)
this I leave for myself. But I do delegate a lot of my coding these days to LLMs and I think it's it's fine.

I do go over everything because when you write something, you need to own this thing for better or worse, right? So you need to at least understand what it says. Um and I think that it's going to get better. But at the same time, I also think that it can uh well, I would say differently. I see a lot of people producing very good, let's call them MVPs or stuff.

Carlton (58:12)
Yeah.

Haki (58:13)
that work like 80% of the time. But I've I've deployed AI generated code to production. I actually integrated AI into the product in meaningful ways, not just bullshit ways, actual meaningful ways, right? And I experienced some of the challenges involved with working with AI in production in user-facing applications. And I think that it takes some expertise to

Get it production ready, really production ready. There's a lot of things that people uh when they just do the MVP, they don't experience with AI. For example, uh it's slow, can be very, very slow, which makes it extremely difficult to use in user facing applications. I mean, not everything can be async. Something you want the process to be sync. There's a very high error rate. I mean, I can tell you that right now.

When I use inference in production, I get like six percent timeouts and failures. And it can be timeouts and it can be uh situations where the response doesn't match match the the the template that I give it. So I mean this is very high error rate that I don't have to deal with with any other API that I'm using. And of course, hallucinations and injections, these are actually getting better. I see less and less of these.

But I mean as I said, LLM can lie to you in very convincing ways. And it's uh it's it can be tricky trying to spot that. But I think it's an amazing thing. I think AI is unlocking a lot of capabilities that were previously very uh inaccessible, especially around understanding natural language, working with documents, images, uh voice.

I've done some of these stuff and it's truly amazing. I I I'm just trying to imagine what would it take to do this stuff that I do now with L LMs if I had to do it with traditional tools. Um I think that's that's the most interesting part.

Carlton (1:00:19)
Yeah, I was

speaking to someone at Django on the Met about this. They work in a similar domain and I was asking them about the comparison with traditional NLP tools and they were like basically those libraries are no longer of use. so, know, decades of

Haki (1:00:36)
Yeah.

Carlton (1:00:36)
work has gone into producing those and the LLMs beat them hands down, even though they're not reliable.

Haki (1:00:40)
Yeah. It's also very accessible

these days because you can just describe what you want and you want API call away from getting a response. Things like you know, sentiment analysis, summaries, these were pretty difficult tasks just a year ago, and they are now very, very simple. I do a lot of work with documents, for example, and o traditional OCR tools are very, very difficult, expensive, and not as reliable. And now

If you do it correctly, you can actually get very good results working with documents using off-the-shelf API uh inferences. I'm not even talking about fine-tuned stuff, I'm just off-the-shelf LLMs that you can use. And uh and I think that it this opens up a whole new world of stuff that we couldn't do before. And I think that this is what I'm mostly interested in. How can I integrate?

LLM into my product in meaningful ways. And when I say meaningful ways, I mean things that I couldn't do a year ago with, you know, a certain amount of effort.

Will (1:01:49)
Yeah. Okay, well we're at an hour, so let's

Carlton (1:01:51)
Yeah, that's gotta be the hope right?

Will (1:01:54)
Yeah. Let's quickly do are you okay with doing the book and project recommendations?

Haki (1:02:00)
What do you mean broken?

Will (1:02:01)
at the end uh we've we've started r uh mentioning what we're reading uh to the audience. It's it's optional. So is there anything I mean, I see you have a Godzilla comic behind you, I think. Is there something you wanna Carlton and I will go first and you can think about it, but I'll just say quickly, I've been reading In the Distance by Hernan Diaz, a novel.

Just started it, really good so far. Uh the author won the Pulitzer Prize for a book Trust a couple years ago. Um I find I'm liking fiction more and more given that all I do is read AI generated text all day. And so maybe I'll find my way to pure poetry soon, but I'm enjoying that. Um Carlton, anything you're reading?

Carlton (1:02:48)
Yes, so this week I've been focused on the sixth edition of Django for Beginners by William S. Vincent. So this is like,

Will (1:02:50)
Oh yes let's go let's go

Carlton (1:02:56)
this is the absolute canonical or essential learning reference for Django, you know, and it's newly updated. So it's updated for the 6.x series. It pulls in chapters on deployments and on APIs that you should perhaps take a look at, Haki. It's, uh yeah,

Haki (1:03:13)
Maybe I can learn something.

Carlton (1:03:16)
it's,

You know, everything we've been talking about, Django is the foundation upon which you explore, right? It's the foundation upon which you go on and build. And whether we're talking about training juniors or telling our LLMs the styles we want them to um generate code in so that we can understand them ourselves, solid foundation doesn't, the need for that solid foundation doesn't go away. And entirely human-written, absolutely canonical, available in a beautiful print edition.

Will (1:03:43)
Yep. A I I used AI for copy editing, but no

writing. Yeah, thank you. And I I just

Carlton (1:03:48)
Yeah, so you

should go and check that out, at LearnJango.com.

Will (1:03:53)
Thank you, Carlton. I so I've I've maintained three books

Carlton (1:03:55)
You

Will (1:03:56)
for a long time. I now have just one book. I pulled in things from the APIs and and professionals book into one, partly because sales are down, but I also still sell copies every day. So I'm still happy to work on it while people still read it. Um Yeah, I mean, right? I

Haki (1:04:09)
Congratulations on that.

Will (1:04:12)
mean it's like, well, sales are down, but I still have sales, so that's something.

Haki (1:04:16)
Yeah. So I have a random selection of a book if you want it. I was

Carlton (1:04:17)
We talked about expertise, right? Go on.

Will (1:04:20)
Yes.

Haki (1:04:22)
recently on a very long flight and I I I s I read a book cover to cover. It's it's very random. It's called Story Worthy. It's by a poetry slam uh actor. He it he talks about storytelling and how you should structure a story in a compelling way. And uh yeah it's completely random, I know, but

I actually enjoyed some of his uh insight. It's called Story Worthy by Matthew Dix.

Will (1:04:50)
Okay, we'll put it in the show notes. Cool.

Haki (1:04:52)
Yeah.

Will (1:04:54)
and then quickly, projects. Um, so I'm gonna c usually we call out a new project. I'm gonna call out the Django admin, just because I increasingly hear people saying that they don't use the admin anymore because they just use MCP and agents, and I I still think the admin is great. Um our previous guest is using the admin to help put satellites into space. And I think Django without the admin wouldn't be Django, so

I don't know if it's around in 10 years, but I appreciate the admin and all the people who w do a lot of work continually on it. So that's my shout-out.

Haki (1:05:24)
Definitely. Yeah, yeah, definitely.

Will (1:05:28)
Carlson or hackey, is there one that comes to mind? Anything?

Carlton (1:05:31)
This week I've been using a package called Rosetta which enables you to, gives you a nice UI that you plug into your Django app to do your translation files which is pretty nice. I had a requirement to whip up a translated page quickly and I needed such a UI and that was remarkably smooth and remarkably polished. I was like, okay, I'll give that a go.

Will (1:05:56)
This is

J Django Rosetta, right? Django dash Rosetta. Okay, I I got it.

Carlton (1:05:59)
Yeah, yeah, I'll find the link, I'll put it in the...

Will (1:06:01)
I'll put it in. Yep.

Haki (1:06:04)
Yeah. Well I don't actually have a project specific that I focused on in the past uh few weeks, but I can tell you that I am enjoying following there's a new repo where they can uh post suggestions for Django, right? Ideas. Yeah, so I like whenever I have some time

Will (1:06:21)
Yep, the new features. New features, yeah.

Haki (1:06:23)
I like to go over the suggestions and the PRs and the issues that they open. Sometimes they have some very creative ideas of what to add to Django.

Sometimes it's things that I say, wow, that's a great idea. Sometimes I say, no, that's a terrible idea. That should definitely be a package. Or why would you even want to do that? But there's

Carlton (1:06:43)
Yeah.

Haki (1:06:43)
some very good and interesting ideas there. So I recommend everyone using Django if you have some time, go over the issues and see some of the things that are people are actually struggling with and want to add to Django. I think it's it's a very good idea and I hope that we'll be able to keep this up.

Carlton (1:07:03)
Yeah,

Will (1:07:04)
Fantastic.

Carlton (1:07:04)
think that was introduced when we started the Steering Council term nearly two years ago. I think as we're coming to the end of that term, we're going to mark it as like it was marked as an experiment. We're going

Haki (1:07:15)
Successful.

Carlton (1:07:16)
to mark it as a permanent thing because it's been really nice. And what used to happen when people would turn up for track, which is Django's very old school issue tracker, they'd open something and it'd be closed as one fix, go and discuss it somewhere else. it was quite...

Haki (1:07:30)
Yeah.

Carlton (1:07:32)
It just wasn't very welcoming and friendly. was the new ideas, the new features board gives people a chance to uh discuss it. gives ideas time to bubble away. And we can see over time which are getting the attractions and those ones can be taken forward for more consideration. So I think it's been a real success. It's not perfect by any measure, but it's...

Haki (1:07:47)
Yeah, yeah, that's definitely a good platform. I completely agree. That would be a successful

experiment.

Carlton (1:07:54)
Yeah,

Will (1:07:54)
Yeah.

Carlton (1:07:55)
it's much better than it was and that's good progress and then people can move it forward over time.

Will (1:08:01)
Okay. Well, I would love to s keep talking, but I I think you have things to do and we've already gone over, but Haki, thank you for coming on. We'll have to have you on again. You this is it took two hundred and something episodes to have you on, so we'll get you on before four hundred. my god. Yeah, put it in the schedule. Lock it down. Lock it down.

Carlton (1:08:15)
I'll get you on in another seven years. Okay,

Haki (1:08:17)
Twenty thirty. I put it on the schedule.

Will (1:08:24)
but th thank you

Haki (1:08:25)
Okay, thank you for having me.

Will (1:08:26)
Yeah, thank you for all the stuff you've done. We're gonna have

Carlton (1:08:27)
Yeah, thank you, Haki. Keep up all your good work.

Will (1:08:31)
Absolutely. We'll have links to everything in the show notes and DjangoChat dot com. We'll see everyone next time. Bye bye. Bye bye.