Building a Django API Framework Faster than FastAPI - Farhan Ali Raza
This video features Farhan Ali Raza .
Farhan is a software engineer from Pakistan who added template partials to Django 6.0 as part of a Google Summer of Code project. These days he is pushing the boundaries of what Django can do in a host of exciting new projects, most notably django-bolt, a fully typed API framework for Django that is faster than FastAPI on common performance benchmarks.
🔗 Links
- Farhan's personal site: https://www.farhana.li/
- Farhan's GitHub: https://github.com/FarhanAliRaza
- django-bolt: https://github.com/FarhanAliRaza/django-bolt
- django-repl: https://github.com/FarhanAliRaza/django-repl
- turbo-orm: https://github.com/FarhanAliRaza/turbo-orm
- bombardier: https://github.com/codesenberg/bombardier
- Robyn web framework: https://robyn.tech/
- Reddit thread on Django Bolt vs Django Ninja vs FastAPI: https://www.reddit.com/r/django/comments/1pvhv7a/django_bolt_vs_django_ninja_vs_fast_api_vs/
- Developer Productivity AI Arena: https://blog.jetbrains.com/blog/2025/10/28/introducing-developer-productivity-ai-arena-an-open-platform-for-ai-coding-agents-benchmarks/
🎥 YouTube
YouTube Channel: @djangochat
Sponsor
This episode is brought to you by Six Feet Up, the Python, Django, and AI experts who solve hard software problems. Whether it’s scaling an application, deriving insights from data, or getting results from AI, Six Feet Up helps you move forward faster.
See what’s possible at sixfeetup.com.
Transcript
9,584 words
· auto-generated
· en
Show
Automatically transcribed, so expect mistakes in names and technical terms.
Speaker 1: Hi, welcome to another episode of Django Chat, podcast on the Django Web Framework. I'm Carlton Gibson, joined as ever by Will Vinson. Hello, Will.
Speaker 2: Hey Carlton.
Speaker 1: Hello, Will. And today we've got with us Um Fahan Ali Raza, who was um who I had the pleasure with of spending the summer this summer w work working on the Google Summer Co project to bring template partials into Django Court. Hi Fahin, thank you for coming on the show.
Speaker 3: It's an honor to come here. I have been seeing you like for like uh months and like I'm f I have been following Carlton for years. So like It's an honor to be here.
Speaker 1: Oh well I'm all blushing now. So come on Fahhan, let's talk about um template partials and um the Google Summer Code project, because that was the big thing. And I've mentioned it a few times on the show, but you were on you were on the sort of coalface doing the the hard work there. So how how was that for you? Describe the summer.
Speaker 3: It was amazing. Uh I did not like uh think that it will be like that hard but like I was I was just uh when I was applying I was just thinking like uh it is gonna like it's just a package I'm just gonna copy paste things So but like when doing like I f find out like it was not just copy pasting So it was an amazing uh experience. Um I learned a lot of things. It was great.
Speaker 2: Well and I'll just mention you you've written about this on your blog, so we're gonna put links to everything, but You went into more depth, but that's pretty pretty impressive that your first Google Summer of Code is like a top three feature in a major release I would say. Carlton, what about for you? You've mentored other people.
Speaker 1: Oh, I was I was just gonna ask for a hand. Was there a moment when you panicked? Is there any moment where you were like, oh no, this is going wrong?
Speaker 3: Uh panic, I will not call that panic, but like uh first moment like when I realized like this is not like what I thought it will be uh was like when I was handling like uh I it i I think it was the first PR in Django packages uh Django tablet partials um in when we were handling render time and compile time things. So I I I did not like I did not even think about that when applying So uh I was thinking like th this is something else like um there is kind of there is a kind of thought that kind of b you have to think before making changes and stuff like that So
Speaker 3: th that was um the whole process was cool. Like I enjoyed the whole process. There was no panic per se, but like it was just Uh a surprise there.
Speaker 1: Okay. I mean so the way I've described it when we've talked about on the show is that without your help I would never have been able to get it in. Not because I couldn't physically do it, but I just didn't have the time. I didn't have the the capacity. It really does need like somebody dedicate, you know, a twelve week project does need someone to dedicate a good chunk of time to make it actually make it happen. Because there's a lot of Things which were the third party package was okay, but not up to Django standards.
Speaker 3: Yep. And like there there are so many uh kind of what can we say like a side quests that happen when we are merging something into Django. Uh the thing that I remember is the um like we uh merged the like um that thing like to find partials, uh the reject solution that was merged into Dango template partials and then that was merged. So we thought the regix was the solution and we I think uh there was five or six reviews for that regix They're like we have to fix the trajects part, trajects part, trajects part. And in like in the next PR we removed the trajects. So
Speaker 3: many side quests that happen.
Speaker 1: Well e any time you bring in a reggae you're in trouble, right? So okay, we'll b we'll move move along there. But t tell us a bit more about yourself. What did like you were you s are you a student? Were you a student? What are you up to now?
Speaker 3: I have graduated in twenty twenty three. uh uh bachelors of computer science. I uh now I'm like just uh freelancing and stuff like par working part-time like that Uh before that I I was a pre-med student, so I was not like a computer science student, but like la it Uh it like there is I don't want to go that deep into it, but like uh there is a process uh in like Pakistan called MCAT. So there is a like a competitive exam for medical admissions, uh like MBPS student admissions. So uh that was the goal
Speaker 3: when when I was doing pre-med, but uh I discovered kind of programming in my like eleventh grade. So there is uh like it's different I don't know like what is uh in Spain or America but like it's first eleventh grade, twelfth grade and after that you start your bachelor 's degree. So I discovered programming in like eleventh grade. I will just um Um like I I downloaded a book head first on like HTML CSS. That then I discovered HTML CSS and like I thought that was very interesting. So luck like it was lucky like um no the I could not clear the the competitive like exam and
Speaker 3: but I could become like um uh of uh of a doctor of pharmacy or something like that. So I thought I don't want to do medical at all. I want to do computer science. So I switched the whole
Speaker 1: Okay.
Speaker 3: Yeah.
Speaker 2: Can I ask what um how is it taught in Pakistan? Do you use Python? Is it Java or what is the formal or what are the languages that are used?
Speaker 3: Uh it depends on the university, like every university have uh different way of teaching. Like uh most commonly I think uh they start with C<unk> like uh in first semester there is introduction to programming that is C<unk> and after that Python comes at like I think fourth or fifth semester After that like a python and stuff.
Speaker 2: And do they have anything on web development per se? Because in the US they don't. It's like an elective court.
Speaker 3: I think in Pakistan that is also an elective course, but they have made it like it is not elective, like you will have to take it. So because they uh in like smaller universities they don't have like a lot of teachers so they just enforce uh email active subjects. So um there is a one development uh web development course. And is
Speaker 2: that I'm sorry, go ahead.
Speaker 3: Yeah, but they don't teach anything productive there So I I rema I remember like we did HTML and CSS in twenty twenty one, I think. Like HTML and CSS just in six months of that semester.
Speaker 2: Right. That's not um That's the case also in some US universities, so it really depends. Um sometimes the web development course is designed for people who are not computer science majors. Actually often it's not, so that's why it'll be HTML, CSS, a little bit of JavaScript, but um I there's not that many places that have a you know Django course or a Spring Java course. Um, for some reason it seems seems important, right? Because everyone gets trained and then goes to work on the web. But I guess there's a databases course, but there's really there's even you know, even MIT, uh just down the street for me, they have a missing semester. Uh it's like a January term where they teach like how to use terminal, how to use GitHub, how to do web development, because in the core MIT
Speaker 2: curriculum, you're not gonna take web development. Unless you do it on your own, right? So it's everywhere.
Speaker 3: Yep. Uh there's a very good course that Harvard gives, like that is called CS fifty. Uh And like I I I learned my Python from that course.
Speaker 2: Wow. Did you actually this is the the David Malin course, did you work through the whole thing? Because like famously people start but then it's a lot of work to do on your own and it just sort of keeps ramping up the uh demands.
Speaker 3: I I knew programming like some programming before that. So I just uh like watched the stuff that I wanted to learn. They um there was I think a Django video for one hour uh and like pa the Python video there is uh for one hour. So I just So like what I wanted to learn from that. I did not like follow the whole course. I just like uh learned the small parts that I wanted to learn from that But that was very like uh very good uh course.
Speaker 1: So I want to ask you about all the things you've been doing since the summer of Co Project 'cause um you've been quite prolific. Uh can you You know, I mean I've got a whole uh bullet point the list of projects to mention, but can you talk us through your your open source work around Django for the last few years? Well,
Speaker 2: can I just hype you up a little bit? I would say besides the fact Carlton knows you, when I look and see who's doing really interesting stuff. It's like you again and again and again and again. So it's not just with Carlton. I'm having discussions with people. We're sitting back going, who is this mad scientist doing all these crazy things? So it's just so you know, it's really exciting to see someone smart with new ideas just doing stuff because. So it's it's exciting for the community that you're doing this.
Speaker 3: Uh I started Django board because I did not want to use like fast API. So because uh I I was uh there was a like side project I was building that uh required web sockets or like uh a server like SSing server sentiments so When I uh went to like the forum, uh it said like you will have to use like uh Daphne for uh because like uh some like long views uh take time So uh you will have to do that or use channels, uh Django channels. So there was a fear of fast API and Django channels So I thought I should build a new framework to solve that.
Speaker 3: So I will
Speaker 1: go on, carry on, carry on.
Speaker 3: I uh there like for some reason I just wanted to have something fast because I really enjoyed uh ORM part of Django. Like it is amazing. So m I just h wanted to have something fast that is built for Django. So and then I I I saw Robin. There is a framework called Robin. It is also like Rust and Python mixture. So I thought like it should be possible to like build something that uh handles uh request in Rust and uh uh does um like m business logic and django part of the things so that uh was it l gives me like inf uh inspiration to like uh go all in I
Speaker 3: I I I I started that just an e as an experiment, so I wanted to see if like that was possible or not. But when I like tried to implement it it its performance was very good, so I th I thought like I can spend like m months after that to like make it something better.
Speaker 1: Okay, and you mentioned his performance was very good. It's one of my pet peeves that on the show that people talk about fast. But they never give any numbers. And you've been you've been laying down benchmarks from day one, which is what makes it so exciting. So can you give us some idea of the performance, the throughput you get you're seeing on Django Bolt?
Speaker 3: So I Uh uh I agree with you like performance is subjective. Like it will all depend what are you are doing in views. Uh so like I And there there is like a r whole ready discussion when I um like launched Django Vault on that. So everybody was saying these benchmarks are like uh just uh just wrong like th this does not approve anything, prove anything and stuff like that. So like uh my whole point was like when I am building something I will have to use something to measure something. Like like What I will do like a build a whole application and deploy it on a VPS to measure. I I cannot do that. I will have to measure like small JSON, small database queries, small like stuff
Speaker 3: so that I know like if I make a change it makes a positive impact on my like base results. So what I am getting in like w if we use one worker So one worker in Django Vault is uh one Actis thread, like Actis is a Rust framework that I use and that one Actice thread is uh bound with one like Python event loop So acrics handle the Rust part and Python loop like a kind of uh um like uh execute the whole Python thing. So that makes one worker. So that one worker I get about 27,000 RPS um on like simple if like uh if we return a simple hello worldjson
Speaker 3: so if we do like a database query so that like the ORM becomes kind of the bottleneck for that so that like uh the performance that becomes th that is still faster if we use SQL alchemy with SQLite So I have not measured with PostgreSQL SQL or like faster uh ORMs with fast API, but I have measured with like SQL Alchemy So that I was getting about uh 5,000 nearly I think 5,000 RPS uh with like uh I think there is one query For ten records that reads.
Speaker 1: Okay, and what's kind of um ch difference between that and this vanilla jango, I guess, would be the question.
Speaker 3: The performance difference? If like we uh like take account like database queries, if we compare database queries, then the performance difference uh is like I think uh 1000 rps on Django like if we use some faster serialization and like um Yeah I yeah I I have forgotten the actual numbers but like it I think it was 1000 RPS uh on Django like raw Django and like I think uh I got about like four above four thousand I think five thousand RPS in Django Bolt.
Speaker 1: So uh both of those sound quite fast, right? I mean the first the first thing I saw here was you did um you did a project called Django Rapid, which was using diff which was just uh pro Python based vanilla vanilla Django but then changing out the serializer layer and you can qu comparing rest framework serializers to I don't know um uh Pydantic serializers to messy spec serializers. Um And what was interesting I thought there was that you were getting fast API like um throughputs just with with basically with Django.
Speaker 3: Yep. If if like we compare like um database queries, uh like the performance uh is kind of equal It like I think um it will uh like if we have because Django ORMs or fast API ORMs are async So if we have a lot of queries and uh like a lot of business logic, then the performance I think then the performance difference will will increase, I think. And uh but like if we compare simple read queries the performance difference is nearly equal. Like the the per difference is not very stark.
Speaker 1: And what I think is lovely about all of these benchmarks is you've got them all up on GitHub and everyone can go and look at them and everyone can b pull them locally and everyone can run them themselves and they can see that these ideas are at well actually, you know, Django Slow is Well no it's not. It's the same speed as everything else. It depends what you're doing. You mentioned you mentioned async ORM then today, I think, or yesterday, you put out um a a kind of uh turbo ORM package, which is um an async query manager for the Django RM, right? Talk us about that.
Speaker 3: So uh the idea was uh uh I I think uh Adam Gill he created like a benchmark of like um time he he was comparing the whole like uh the request response like time mm cycle so he he he wanted to measure that with like the async backend that uh Frey created so I he he also like I think he does not said like um uh another I forgot his name. Uh he said like uh w you should be able to use that async backend with uh Django bolt and my year like what performance difference you get. So
Speaker 3: I uh when i tried to use it because it is just uh uh async backend so we can just use raw sql So I thought like it will not be that hard. Just w uh I because in my in my mind I was thinking I am gonna overload some like execution of Django um queries uh and like uh use that asic backend and just create it but like when I tried to create it like there was a whole another person it took me like four five hours of work uh to just like uh create something working because it worked like in uh in one request it worked fine like it loaded the thing
Speaker 3: but when I wanted to benchmark it with the bombardier the like I was getting um like connection exhaustion errors So I had to fix uh polling issues and stuff like that. And I did not know like the full It it's it's a naivety of like a person. So uh I because I did not know how the full ORM and database things work, I did not even think about like how the connection management works and uh how the stuff like that things work so in my naivety I started and after that I have to solve the whole connection things and stuff like that Because uh in a s Django handle the sync version of Django handles the connection in a very different way.
Speaker 3: It like uh I think threads context was and stuff like that. So it like uh I think it uh when you do not use polling it closes after request. I don't know f for fully uh is uh if that the case but I could not find anything uh for async that we like we were discussing before this podcast. So I will try the async signal thing on that.
Speaker 1: What I love is the way you just like not just but the way you dive in. You're like, yeah, I'm gonna take this on, I'm gonna do it. And then you discover the massive locker and you're like, right, I'm gonna fix that as well, and you just keep going. So I mean For me, looking through uh the the the the front rust front end for the the request response ban, I think that's a really exciting um uh development. Looking at the different serializers, we talked about that on the show before, but like REST Framework Serializers are kind of last generation and there's Katters, there's Pydentic, there's Message Spock, there's all these um much quicker options out there. And to so to demonstrate those with Django is like a real service to the community. It's like, yes, look, this is how you do it and look how much faster they are. Wow. And then for me, the the um async properly fully asynchrifying the
Speaker 1: ORM is like the last piece of the async story. You know, if we go all the way down to the database connector, then, you know, whatever you want to do with async, whether you want to use it or not, it's it's the story's then at that point finished. So Like you're really hitting kind of all the all the tick boxes of the the things I'd love to see.
Speaker 3: Yeah. I think it's uh i I'm like just Like a w I understand that part. Like a as a beginner you kind of like obsess over benchmarks for some reason. Like that thing is fast, that thing is fast, that thing is fast. So as a beginner I kind of like that my thing is fast. Okay kind of stuff. So Uh that was the whole kind of process if like we if we have ORM that is full async that will make the ORM very fast because there is like a sync to async part and the whole stuff. It is i it it I when I was using
Speaker 3: uh I was trying to handle sync in Django Bolt, um the performance drop for sync to async part like becomes very like stark at that if you are getting like some even if you don't use the ORM the performance difference uh if you are getting 22000 rps and you want to execute the synchronous views you like um m uh create uh like a wrapper using sync to async uh on the above the performance difference drops like twenty two to drag like uh ten twelve thousand so there is like a fifty percent drop there because of the third part of the whole thing. So uh if we have the whole ORM async I think that will
Speaker 3: be W that will I think uh be the performance difference will become I think us to talk like a fifty person or something like that So
Speaker 1: are you hitting the gill there, just out of interest? Is that where the um because obviously there's a cost to um spin up the extra thread, but is it is it the fact that the the Python threads aren't able to um execute c in parallel Um it's causing a lot of the blockage there. Do you know? I mean you may not know. You may not have been able to profile it.
Speaker 3: Because like how the Django Bolt works, uh there is one gear for one worker. So actrice is a one worker and then the gill part. So if we have uh something that execute using thread, it kind of blocks a gill for some reason. So this is also a gill part and also a latency part of like uh spinning up a new thread for handling that request I think
Speaker 1: But do you think well I mean have you have you experimented with the uh I can never say this because of the F and then the TH the free free threading uh mode on Python three point
Speaker 3: one four. No, its performance decreases very much. Like it's for some reason uh I think it is not kind of ready or something. The performance difference like decreases on perform It like decreases a lot, like not like normal decrease. It decreases a lot. I tried it with like I think fast API and the Django port the performance difference decreases a lot I think if there is some issues or like I was not able to and also because um the PyO three it does not like it has uh different like for it is a it has a different method of handling uh the non-threading python so I was not using the whole uh things that it provides to handle like non-threading python
Speaker 3: So I think that also causes an issue. So I was not able to like properly benchmark that.
Speaker 1: Okay, that's not quite ready yet. Okay, that's I I think all that's really interesting. We'll jump in before we g disappear down the uh
Speaker 2: Yeah, no, no, I'm happy to listen. I I mean th you have so many projects. I I wanted to ask about the bulk mail verifier, which seems like was one of your early projects, but is gets a lot of usage. What what can you say about that project?
Speaker 3: So that was the project um like I have been because uh I had to work part time when I was like studying. So uh that is a project that I have been working when I was studying. Uh that project is like a partnership with uh like another person. uh he's uh like um i i build stuff and like he manages the whole selling part of the stuff so it's an email validation site Like for email marketing people come in and validate their email like is this is a valid email, this is a invalid email, this is a catch-all email and uh uh that like people take that result and do email marketing with that.
Speaker 2: Mm-hmm. So did did he come to you with that idea or is that Like how it seems like that would be the case, right? As a student, I mean I wouldn't think of that unless I was in the email marketing world.
Speaker 3: No, I he is an email marketing kind of guy. So m he knew that he w it was his idea and stuff. So I was just the like kind of CTO part of it. So I I I was gonna build and like we have like a partnership kind of thing there. So
Speaker 2: that's not a bad setup. That's Carlton's setup right now at his
Speaker 1: I don't know. I do exactly that. I'm the code monkey and he's the you know the the player
Speaker 2: Okay. I uh I guess the one other one are we we're on we're not quite at 30 minutes, but I I want to ask. Um Carlton has mentioned that Uh you y do you use um LLMs and AI in your coding at all?
Speaker 3: Yep. Uh I use a lot of code.
Speaker 2: Tell us about it, because I feel like a dinosaur, like uh because I we use them, but I use them to sort of tack on to my existing learning profile, but it seems like you're just sort of straightlining LLMs and doing it in a better way than than I do. So what what's your process? How do you think about them?
Speaker 3: Like, I am kind of lazy. I enjoyed coding because like it's a puzzle. Like I s I like like solving puzzles kind of that. So but typing was never my thing. When like I started there was no LL members, I st I did not enjoy typing the code. So LLM part solves that part for me. So I use cloud code. So it depends on like what I am trying to do. Uh I usually start with plan mode because it is so hard to predict what they are gonna do. So I usually start with plan mode uh uh for card code like if I am for example like if we uh discuss like
Speaker 3: Django Turbo So what I I I will do with that is I I will start with plan mode. It does not produce any code with that plan mode. It just uh produces a markdown file. So I will go I will discuss the whole plan with it So if I wanted to build like a sync ORM. So I will discuss uh like uh because I did not know. So I I I Tell him like this is the repository the Django backend and this is uh what I want to build. It like researches the whole thing and uh I usually have like a cloned Django repository in in the project folder so I say um like uh this is the Django repository like tell me like
Speaker 3: how can I achieve that thing So it like goes all in and like at the end it produces a plan like what we want to achieve. I read that and if like that makes sense or if I want to change something Because like once you enter like if you accept the plan and you want to change something, you They forget that like they have added a function or class and they are gonna just like create a new thing. So you will have a lot of code that that has no like purpose in there. So that is kind of an annoying part. So I usually spend a lot of time planning and stuff. Um I I research if like um I I'm not sure
Speaker 3: if like the L and M is telling something. So I I will go and uh th like read ma code myself and like tell it like you are thinking it is wrong or you're like uh your hypothesis is wrong, yeah, stuff like that. So mm th that is kind of the whole process. So after that like testing is a whole another thing with LLMs. I think it is impossible to produce like correct test with L LM because they think like f and you are like they don't think like we humans do. So like um uh their tests are like made up things. They are gonna test what like they are gonna say it is working, but I can see it is not working
Speaker 3: So the testing part is a whole another thing I I usually like tell it to like test, but if you remove that git commit, the test should fail. Like so that I followed from Django. So uh uh like Django f I think uh um s Uh I forgot her name. Natalia Natalia Altalya. Yeah. He said like if you create a test, the test should fail without the fix. So I I took that thing from that. So I m I like tell LLM to like test should fail. But it still produces a lot of bogus tests. So there did a
Speaker 1: removed the ki yeah, the cu commit and then puts an assert false in the test and goes, Look, the test failed.
Speaker 3: I think that is uh like it is a problem with reinforcement learning. They they too optimize for passing of the test. Whenever I I will say like create a failing test for this case. It will create a test that is passing but in the like in the in the test it will have a if condition like it is failing but it will pass the test. for some reason.
Speaker 2: Yes.
Speaker 3: So they are very afraid of like failing tests. So I think their O C D kind of personality they have, they don't want to have a failing test at all.
Speaker 2: Yeah. That's that's really interesting. I mean there's I I think that's the way to do it. You're you're I think you're a b I I know you're a better user of them than I am, but you have to plan with them in advance. And I mean so one of my colleagues uh Paul Everett, he's been doing a bunch on spec driven development. And so basically what you described, like having talking through, planning things out, and I s I suppose you're too young to know, but the joke is you could never get a human, like a senior software architect, to write specs for something. But now that the LLM will do it for you, everyone suddenly is excited about specs. Whereas they never were excited about specs before. So it's forcing maybe good behavior on humans. So there's an irony in there for those of us who are a little bit older. But I completely agree.
Speaker 2: Yeah, I I wonder if there's If we're gonna have different cause they're so eager to write code, so eager to pass things. I don't know if it's a filter or it's a different retraining, but it feels like they do need to be harsher, at least in a coding context, right? I it would I wonder You know, yeah. Can the companies get there? Can we get there with better prompts? Is can some third party package come in with a whole thing of like, you know, how do we get there? Because I agree, it's a big problem. Especially around Tus.
Speaker 3: Because in plan mode they don't start to write code and I I tweeted like uh s months some like few weeks ago at Claude. Like it for some reason it is like very eager to write code. Like it is very eager to produce a hypothesis. Even if like it is a wrong hypothesis. Like it is very eager to uh say, Oh, I found it. But i it it it like it the in whole conversation like it will be say two and three times I found it but it never found it like it it just say I found it But like it it will create a like wrong hypothesis and like start working on it. And after that it will oh
Speaker 3: I did s this thing wrong I but it will forgo to revert to the changes that it made because of that wrong hypothetical. So there is a lot of code that is like uh just uh uh like unowned code So that is just a junk that kind of lives there.
Speaker 2: Yeah. I'll just say one last thing, Carlton, then then you take it. Um I know from at at JetBrains and our our AI AI teams work. A lot of times the benchmark is user accepted completion rate. So they want their they want you to say, oh, that looks good and move on. And so I suspect that writing more code or writing things that pass even though it's not good is better than them. Like they're not incentivized to say, don't do that. Right. I think you know, that sounds simple, but I really do think it's it's almost like I can see like we say, oh what's our you know completion rate user acceptance rate, whatever, for Juni versus Cloud Code versus Copilot. Like that's that's the benchmark that internal AI teams are using, which would lead to that behavior.
Speaker 3: Yep. I think that is why like it we it is gonna try always try to pass the test. Like even if that feature is not complete or not working, it is just gonna pass the test if it's working. Hey ,
Speaker 2: you should be able to put like a 10x multiplier on removing code, right? Like if you get a point for adding code, you should get two points for removing code, right? I want that a that agent.
Speaker 3: There is new skill uh that Cloud Code uh uh creator introduced, simpli code simplify. I have not tried it uh like very significantly, but it is kind of does that like it it is gonna see the commit that you made for the solution. It is gonna go that go over all the changes and it is it is gonna simplify the code and like uh try to remove if like it thinks it is it it does not belong. I think that is a step in the right direction I think.
Speaker 2: It's interesting. Carlton.
Speaker 3: Beautiful.
Speaker 1: Yeah, go on. Go on Fahan.
Speaker 3: The difference that I found I find in a human code and an LM code Um i it's uh also a like a viral uh uh tweet. Th the human code is beautiful. Like everything that it produces, it looks like it is like it was designed to do that thing The LLM code is like a kid coding. It is just gonna s solve the thing. Like it is not gonna see like if I'm putting that function there, why I'm putting there, like it should belong to that file or not. b the a lot of comments that it adds so like beautification of the beautiful code like uh if you think like a coding as an art like that is human
Speaker 3: And if you think like NLM coding that is like um uh kid coding, like it is gonna solve the task it like it it it is gonna solve s like solve the issue but like uh the code will be everywhere and like uh stuff like that the difference you we can see if like we see a professional code base like Django and a solution provided by an LLM. So the difference is very clear there.
Speaker 2: Sorry, I have one more question. Um That code simplifying thing from Claude, I know I think it was only four or five days ago that that came out, but that's that's really interesting. So my question is How do you stay informed about all this? I mean, cause Carlton and I like we we pass tips on like RSS feed readers because we love to see like blog posts. And I feel like we're multiple generations back. Like, are you on So like what are your news sources to stay up to date on all this?
Speaker 3: Um I think uh you also have that Simon Wilson newsletter. That is that is a very good source and like on I think Twitter part of social media is very eager for wipe coding. Mastodone is like 180 degrees of that. They don't want like AI in their code.
Speaker 2: That's where Carlton and I hang out with our Django, you know. Greybeards.
Speaker 1: Django Greybeard. I I hate us.
Speaker 3: The creator of Flask, I don't I forgot his name. Uh he also did uh like Paul. Uh the mustard on people and the Twitter people. The Paul is like a 180 degree. Like Twitter there is like ten less than ten percent of code, like LLM write and in Mastodon like there is like few um I think larger than 50% code I write myself So there is a difference and so I I like the there is like the extreme kind of like uh two things. I I kind of believe that like both uh like any extreme I don't know the word for that. Like any extreme
Speaker 3: What is the word like that? Um d like any extreme thought a person have, like uh any extreme opinion, sorry. Any any extreme opinion a person have, like extreme opinions are never right. So the truth will always be like some something in like in between. So if like coding changes It will be like kind of fifty percent human, fifty percent LRM and stuff like that.
Speaker 1: I guess um my question here is um Th it probably loops back to what you've already said, but I think uh th these machines are very good at creating um stock code, you know, boilerplate that you've you know, seen written a hundred times. It seems to me they're less good when you're trying to push the boundaries into something that's not directly in the training data that's not that's new, right? And you seem to be doing a lot of things that are new. So how do you how do how do you find I mean does is it that the planning mode, spending enough time in the planning mode helps to pin it down?
Speaker 3: It's like trying different things. I ask for like if something is not working, I ask for like options. Like give me options to solve this thing. So it is gonna say like it is gonna be an uh an extreme option there. It is gonna be like something that like That I think like can work. So I I will say try that. That is also I think a very good point for LLM because we can try a lot of options because the the price of code is very cheap that way so if like that thing does not work I can I can just like uh discard the those whole changes so I try different options uh the it there is
Speaker 3: uh there is like two extreme. Uh uh one time you are gonna say like LLM is oh m LLM this solution was very intelligent something it is gonna be stupider than a dog. This the solution is very like stupid it thought something else and produced something else. So uh there is like extreme cases there. So I think we can never like predict LLM stuff. that makes them dangerous kind of that way. So there will always be human for coding, I think. They will be less human, but there will always be human somewhere.
Speaker 2: Well it's so it's so interesting to think about how you're brain is being wired because for me, like I had to type everything. And I you're making me almost rethink the advice I would give people, which is before you start coding, make sure you're you're a really good typist because you don't want any friction. Between typing and thinking. But so for me, like if I don't type something, this is my biggest problem with LLMs. If I don't type it it's not I'm missing a pathway in my brain. So I'll have LLM code. And it part of it is I didn't fully think it through, but I think a lot of it is I just didn't type it. Um and so you're making me wonder maybe that's just a step leap that the newer generation of people you know, won't have that problem. Like they'll just be like, oh, th this this is normal. This is how I I do things. Um 'cause I don't know, Carlton, is that the case for you?
Speaker 2: For me, if I don't physically type it, it doesn't quite get in there, but but that's because that's how I learned it learned how to code originally.
Speaker 1: There's something in in that. Yeah, go Fahan, you you were gonna speak, so you
Speaker 3: I think that is kind of right because if If LLM produces the code like the solution works, but I don't fully understand it 100%. Like I don't understand it fully. Uh so the difference kind of becomes you have to be a good reader of the code if you like read it and some like and you will have to because sometimes like because I I was new to Rust. So sometime it produces uh like keywords or something like that that I don't understand. So there is like a skill to have like uh you should have a kind of a way to like you want to learn So if it uses RW log, you don't know RW
Speaker 3: log, you should ask it to like what is RW log. If you just become a like uh um just inter inter inter like everything except like it just works and stuff like that so that um you will know never like understand like what it it is doing there is a thing like if you Code it yourself, you understand it better. When I was working for GSOC, I I was very aware of that thing So I usually if I I I I used LLM I used it for uh like small commits. Uh i there is a mode in Cloud Code where you like you don't accept changes it it just shows you that commit so if uh if like I uh see that commit
Speaker 3: I will say like this this is not Django standard So m rewrite it this way or like if I wanted to do it myself I will I'm I'm gonna rewrite it that way So if you want to understand the code, it is uh like a uh a requirement that um you will have to read it and if you type it then like you will be a better understander than uh just uh simple person that uses LLM to just push everything.
Speaker 1: I'm really interested here where the um equilibrium point ends up falling. In that I'm a hundred percent convinced that, you know, the person who just taps yes and accepts you know, accepts they're gonna be in trouble. They might be able to produce something very quickly, but, you know, m code is more maintenance than it is production. And then at the other end, I'm I'm as much as it might pain me just to to think, I I don't think we can handcraft every character anymore. Um because of the echo the just the economics of it aren't gonna make any sense. And so Between those two extremes, that the that it's gotta settle somewhere and maybe there are a range of of sustainable positions that that an individual developer could take up. But I mean, how how are you finding you know, how are you finding in your freelance work that you have to
Speaker 1: you have to balance these things?
Speaker 3: Freelance work is very repetitive. So if like a person comes of the people come with a like kind of an MVP of the project So mm, I want oath, I want um like stuff like that that is already there, like solved kind of things So th L L M is very good at those. Like if you uh uh tell it to do all th in Django it will like does it like hundred percent good actually kind of. So in freelance work if like problem is something interesting or something complicated that kind of like uh uh a recent project that I am doing it is a like uh So it were for ships like um uh
Speaker 3: there is uh uh like a task is assigned to people on ships like uh uh like ocean ships kind of that so um it does not get it like it does not understand it like if a task is like Th the whole thing is that it does not understand world w like or AI companies say it does, like it does not. So i if like it i it creates a task, it like makes wrong hypothesis about the real world. Stuff like that. So that way you have to guide it. Like you like uh if a delivery comes uh a person have to accept that delivery. It is gonna put the all the buttons on the top to accept delivery accept accept accept.
Speaker 3: I uh I I I saw that because I build that it's like if a delivery comes I have to see the pro product and like uh receive that delivery because that's how the real world works But it created like every button on the top to accept delivery and it like it asked nothing like uh like what is the delivery ID, what is the like there is a whole process there is a difference the whole like how the real world works and how LLM thinks it works because I think the this this is the whole context problem also because if it is working on a small solution it kind of forgets a lot of how there other things work or something like that. So it it has a narrow focus kind of that way. So there is a difference. If if a like a problem is
Speaker 3: uh kind of real like so we I will have to like or like explicitly say that like uh you don't want to do that you m you have to do this like in this way. That's the kind of the difference
Speaker 2: I mean I wonder if it's a training data problem too, because there's a lot of authentication examples, like how many real-world Django shipping container options are there? Like is there a point where it Um and actually that's uh I'm gonna pose you my philosophical questions to get your take. Uh are you familiar with the term model collapse? Have you seen this idea out there? Um I can describe it. It's it's so it's basically that um as the data goes from being human generated to being computer synthetic data generated. There's there was an academic paper out of Oxford uh 2024 showing that over time if you train on synthetic data LLMs get worse right so In my mind, I think of it as we know the underlying data is kind of getting worse.
Speaker 2: Like it's AI stuff. Even as the models are somehow getting better. But where does that all end up? It feels to me like maybe the whole foundation is crumbling beneath us. Um But I'm curious what your take is on that. I feel like you're much more in tune with these tools.
Speaker 3: I uh I I watched your video that you made
Speaker 2: about. So
Speaker 3: I just don't remember the w keyword.
Speaker 2: Yeah, yeah.
Speaker 3: So I agree like I agree 100%. It is also becoming a race for the benchmarks that they have set up. Like it is like they want to optimize for those benchmarks. So if like you compare a GPT 5 point something to cloud code, even if like cloud code is better, but like GPT is gonna be like uh higher on the benchmark or some something like that. And the data problem is real. Like that is also the I think that data problem and the architecture problem because like you can say it is ADI, but it is just a probabilistic like um prediction of the next world.
Speaker 3: You can say it is more intelligent, but it will never be. It is just a prediction of the next word. But like the like people who are like um more intelligent ma than me, but like they're gonna say like your word uh your brain also predict the next word. But it does not. Like We cannot explain it like what our brain does, but it does not predict the next word. Because if I Like if I walk on a like an icy road or something I know I'm gonna fall because I have like fallen when I was four or something So the context of that 20 years is there with me. So LLMW
Speaker 3: Like I agree with that uh your statement like hundred percent the uh like uh artificial data part and like the optimizing for the benchmark part. Like it is gonna be it is never gonna be like more intelligent than uh like this is my opinion uh it is not gonna be more intelligent than human in like general task you can train it for a specific task in specific environment and specific like in a box it is gonna be more intelligent than a human but if you break that box and Everything's one of thought like stuff like that.
Speaker 2: Carlton, you look like you 're not going to be able to do that.
Speaker 1: l like the the criticisms and the the LLM architecture has gone a long way and they are truly amazing what they can do. The you know I i if nothing substantive changes then it looks okay, that's a very clever trick and it's a very useful trick, but it's not AGI as you know, was promised to us by now.
Speaker 2: Well well let's let let's dodge the AGI bullet. Um I do I think you you're right what you were saying though about the the benchmarks. I mean this is something that Uh jet brains again, I'm just gonna read it out. They have a developer productivity AI arena, DP AI. So they're trying to do an an open standard because right now there are these kind of closed standards for the b major models, and it just leads to you know, optimizing for the standard, right? When it's like, well, who set the standard? What is the standard, right? So I think there is some work being done there to have something better that hopefully makes the models better. But it's like a as complex and intelligent as these things are, it's sort of like We ha we all have narrow incentives as humans and as AIs.
Speaker 1: So I guess to bring it back to Coda, you kn y I'm I'm, you know. veteran, I I use these tools. I think okay, they're interesting, you know, but I don't feel that my w um career is under threat. You're sort of at the other end of your career. How do you feel with about
Speaker 3: I kind of think Like there is a fear, like I'm not gonna lie, like there is a fear of because In the world kind of like that we live in, um uh corporates are gonna optimize for the cost that is like stuff like that. So if I am like if I am trying to get a job in a small city in like where I live, I would like There is a fear. Like in short, there is a fear like uh the whole thing is gonna change and uh uh they uh Mm like there will be less jobs. But the uh the thing that is like
Speaker 3: I am hopeful Um like n because like I like to learn and like to know stuff. So only those people who kind of have that uh like there are some people who are gonna do computer science just for the job. So there is a difference between uh like a programmer who want to do is for like Because like they love programming and there is a difference because he like someone said it to like the computer science is a good like job or good pay and stuff like that. So I think there will be less programmers, but we don't know because the costs now are very optimized and stuff like that.
Speaker 3: Uh we don't know how much the LLM actually cost because like n not everybody is gonna be able to like mm uh use them if like uh something like not a doomer but like something the bubble crash or something like that. So w if the cost is gonna be the same or something like that. So mm W there is a fear in like normal computer science student like there there is gonna be no jobs or l less jobs.
Speaker 2: Well, speaking of jobs, I believe are you Looking for work? Is that fair to say? Or what is your current employment status?
Speaker 3: I am looking for work, like uh full-time work. Uh now I am just uh doing freelance stuff. Uh I'm open to freelance contract or job. Anything works for me.
Speaker 1: And I will just put a shout shout out here. Having worked if I hand over Google Summer of Code and seen him in action since he is, you know, he's a good He's a good find. You should snap him up.
Speaker 3: Thank you.
Speaker 2: Well, we're gonna have links to everything. I guess if somebody does want to get in touch is I guess email on your personal site, uh LinkedIn. What what is the best way for someone to contact you?
Speaker 3: Uh uh m like my uh LinkedIn uh is fine. There is also email on the LinkedIn. So like both options are fine, LinkedIn or email.
Speaker 2: Okay Well, we have I mean, we're basically out of time. I haven't asked you about, you know, static typing and your thoughts and whether in an LLM world everything is pushed that way. But um I guess I don't know. Is there's I I always like to ask uh wait Carlton are we doing are we doing book reviews?
Speaker 1: I don't know about a book. It's been Christmas holidays, I've hardly read a thing. I've got a project I'm yet I can mention.
Speaker 2: Okay, shout out.
Speaker 1: One of our hands that we haven't mentioned. Um it's Django Reple. Yeah, yeah, yeah. Pi it's sort of full Django environment in the browser, which is an amazingly built on is it PyScript?
Speaker 3: Uh it is TypeScript swelt on the front end and using WebAssembly, uh Pyrodide for the Python part.
Speaker 1: Okay. But that that that's a super project, so um you know check that out. Okay, so Fahan, I've really, really enjoyed chatting with you and working with you, you know, over the last year and it I'm so excited for all the things you're doing um in the Django. ecosystem. So thanks for coming on the show. It's been super.
Speaker 3: Thank you. It's been an honor. Thank you. For inviting me.
Speaker 2: So DjangoChat. com, we're on YouTube and we'll see everyone next time. Bye bye. Bye bye.
Presenters
Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.