Transcript: Boost Your GitHub DX - Adam Johnson
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.
Okay, so welcome to another episode of Django Chat, podcast on the Django web primero.
Carlton Gibson joined as ever by Will Vincent.
Hello, Will.
Hey Carlton.
Hello, Will.
And today we've got with us back on the show Adam Johnson.
How are you doing, Adam?
Long time.
Oh, good to be with you again.
Yeah, lovely to chat.
One more title.
Let's dive right in, because you've got yet another book hot off the press.
That makes it a a DX uh trilogy, yeah.
Is it only three?
I was thinking it was four now already.
There's four books, but it's the it's the third in the Boost Your DX series.
Before we dive in, what are the titles again?
Because the you've got the testing one, which is so
speed up your Django tests.
But that's not a DX book.
No.
There you go.
Right, okay.
And then you've got Boost Your Django DX, Boost Your Git DX, and now Boost Your GitHub DX.
Okay, so you've drawn a distinction there between Git and GitHub.
Oh yeah, well, that's uh interesting, isn't it?
So Git is the version control system.
It's what we use, it's local software, and it can go on our server too.
And GitHub is the website that basically popularized Git.
Um they kind of like rose in prominence together.
GitHub was, you know, some engineers saying, hey, Git is like the next level in version control in like 2005-ish.
Around the same time as Django was created.
And like it promoted Git and like also promoted like code being out there in the open on a reliable forge.
You know, previously we had things like SourceForge and Google code that were harder to use, much harder.
What was always nice about GitHub was you could browse the code, right?
It was much easier
to browse code.
Like it it had a much code.
Yeah.
You felt like you're in the code.
They put the README front and center, and yeah.
But yeah, so you can use GitHub Git with many different Git hosting providers.
GitHub, GitLab.
Now things like Code Bug, free open source ones, are are rising in prominence as GitHub is falling in popularity.
Um yeah, so I wrote this book on using Git better and to limit the scope, it was all about things you can do locally with the Git command line and related tools.
And there was always like this idea of oh, I could write a chapter on some of these cool tricks I know on GitHub.
But by the time you start listing out all of these things and doing a bit of research, you're like, that's not a chapter, that's a book.
Right.
So, you know, it was deferred until you know I finished off this book last year, between February and November.
Okay, pretty.
And I think it's fair to say, even though it is a book on GitHub, you can use a lot of these um techniques and things that you talk about on GitLab.
I mean, not directly one-to-one, but it's basically any hosted CI tool or uh Git tool, because increasingly they're adding things like the equivalent of GitHub Actions and they're trying to not let you not have you have to do everything yourself locally or in your own production setup.
You can just offload test runners and these types of things, right?
Is that fair to say?
Uh it is like I definitely think even if GitHub like uh like you know falls out of favor with the general community, um, there'll be a lot of things to take forward from that, whether that's like these are the cool features and I think you know other platforms should implement them or um these are the things that like still map into GitLab or whatever, then yeah, I think that's something for everyone in there.
Okay, I mean let's let's dive in there because you've took you've mentioned it twice, the the sort of falling popularity of GitHub.
And I and yet I feel that because I I there's a lot of new features that I just don't want, and I there's also kind of a monoculture thing, and you know, it it there is a risk of having everything all in the same place, but I don't think GitHub's going anywhere anytime soon, is it, right?
I don't think so.
Um there have been some prominent projects like Zig, which moved off because of uh, I think primarily all of these AI contributions, and definitely at least on Mastodon as a developer community, there's a lot of ranting about the next co-pilot button or the slop piers that are coming through.
But Mastodon is a particular I mean, I'm on Mastodon, I like Mastodon, I don't go on the other ones, but it is a particular community, right?
It is more to the ext the hardcore.
It's a it's an echo chamber.
I mean, if you know, sitting in a larger organization where we talk about the socials, I think finally the the the um the news has gotten out that maybe X, Twitter isn't the best platform, which I was interested to see was not as much the case in Europe as America, but it the only social that matters honestly is LinkedIn at this point until they completely muck it up.
So so I enjoy Mastodon, Fostodon for hanging out with friends, but in terms of like reaching, you know, blue sky is not it.
I think it's LinkedIn for the for now and then something else.
It's true.
Now, you know, my posts used to do like quite big numbers on Twitter before the takeover.
Um now the only one that compares in that kind of scale is LinkedIn, yeah.
Yeah.
But all right, but let's let's plug the book.
All right, let's talk about why you what what are some of the key we you know, we want people to read the book.
What what
what are some of the top features that you can learn in the book for um someone who is using GitHub?
Yeah, so it's structured a bit like a run-through of GitHub, pointing out things in the UI uh that you might have missed, as well as command line commands.
So there's the GitHub CLI that I've leaned more and more into as it's become powerful and capable.
And uh, you know, now I can do uh pull requests and a few letters on my command line.
And I think that's that's pretty powerful.
I've always been a bit skeptical about the GH command.
I've like there was I've had these old.
Well, no, but okay, but that that's me down to a nutshell, right?
Why would I use a new tool when the tool I've got will will do it perfectly happily?
But you know, there was a few things like um, I don't know, fetch a PR, check out a PR for which I had an alias and things.
You know, when the the GH command came out, um I already had those, so why would I, you know, why would I change it?
But you're not everyone, Park, right?
This is the problem.
No, I understand I'm not everyone, but this is what I'm asking Adam because he's you know much more open to experimenting with new things than I am.
But I think it's grown quite a lot of capacities over the years.
It's quite fully featured now, right?
Yeah, nearly every like daily button on the UI has an equivalent um command.
And some of them are quite flexible as well, like creating a pull request.
It has like four different modes.
So you can either like provide all the details in one long command, or if you run it without any arguments, it will prompt you, or you can get it to open an editor where you type it in your favorite editor.
Um so yeah, it's a pretty, pretty nifty piece of kit and woefully underused, I would say.
Uh, from what I see from people developing, like GitHub is normally that that website you learn how to clone, you learn how to make a pull request, you learn how to bug your coworkers on Slack for reviews, and then like you you start focusing on the code.
Um But so are you are you using it more in a command line capacity then?
Is that the sense I'm getting here?
Yeah.
Yeah, definitely more and more, and especially writing the book like made me look at some of those corners I hadn't investigated.
Well, this is your I've sorry, I forget the tagline, right?
Your di Oh, was it your development led through books, right?
Where you always end up you contributed to Git when you wrote the Git book and what's your phrase for that?
I'm sorry, I'm forgetting.
Book-driven development, yeah.
There you go.
Yes.
Yeah.
Yeah.
I haven't quite I think.
A little bit of de BDD here.
I got uh a few pull requests into the GitHub docs fixing in the QC.
I did look at the CLI, but everything I wanted was there.
Um yeah.
But so the main idea though is sorry, I'll just go, Carlton.
Um of course I will.
The main point of I mean of this book with DX and your other ones is people developers can save time using these techniques and tools that they probably either d don't know about or don't know how to get the most out of, right?
And that's fair to say, right?
Because someone, you know, why read the book?
Like there's lots of ways they could speed up their development workflows with GitHub that they're just not doing if they're just clicking on the website and bugging people through Slack, right?
Yeah, that's that's the basic thesis of the of these books is like there's some you know low-hanging fruit for nearly everyone out there.
And it's hard to discover this through like the usual mechanisms of like just using the product or like reading the docs.
Nobody really reads the docs top to bottom, especially for like a web UI like GitHub.
Um or even an open source project like Neapolitan, we had a previous one.
Why would you read the docs?
Why would I read the We
had Vel Velda on um right before you who was talking about using Neapolitan for client work and um admitted to not directly reading the docs?
So Yeah, nice.
Yeah.
Well why would I read those?
Like, you know, just intuitive needs.
I I do think at a meta level, the git and git like what's gonna remain if AI truly takes over?
Like you're still gonna need git, you're still gonna need a way to look at compare pull requests.
Like I think the the UX of AI is yeah, whatever it is, like you need like a bomb way to look at different git and pull requests.
Yeah.
That's the one thing I'm like that's gonna stay.
Yeah, that's a key thesis here.
Is like my book is about the fundamentals, it's about knowing them, you know, inside out.
Hopefully, something that applies it, especially as you become more senior or use more and more code generators.
You just it's best to know them and know all the keyboard shortcuts, the the little secret tools on GitHub that will help you navigate quicker.
And I think it's true of all like all your books is that if you if you're an experienced developer, you may know say 60% or 70% of whatever, but the what the things you pick up will be like, oh they're gold dust.
And they, you know, the one or two things you pick up, they're worth it in and of themselves.
If you're not a senior developer, you're gonna learn an awful lot.
Like just you know every chapter bam bam bam bam bam and if you did if you don't have something like this resource you'll just sort of do the same thing over and over again.
This is the pattern I'm in.
This I so I push my code I open the web UI I fill in my you know there's just a routine that you'll go into without ever opening the box for what's more and that's what I like about the whole series to be honest I think there you know I I remember um Tim Schilling asked me if I had any tips for people to up their developer skills.
I'm like get Adam's book just go and buy Adam's books just go and buy the step as you know that's an investment in your career.
I noticed you talked about um markdown and writing yes go on that's the system
is there a question in there
kind of a a sneaky almost Trojan horse right in the middle of the book like you're learning about how clicking on GitHub and then suddenly you're learning how to write better um through first the GitHub markdown syntax and then like just specifically rules for writing on GitHub.
I think that's very important.
I think you know even more important in the age of like being able to spew out pages of of text it's it's better to know what good writing looks like.
LLMs can write a lot and it can be cogent but it can be yeah almost like low information or zero information.
There's a lot of these tools that summarize your PR but all they're doing is like echoing back what the code changes are and I know what the code changes are because I can read them.
I can read the code it's I don't know who that's for really uh
it's like the comment where it's like you know op open the file and then you know file equals open sort of thing.
The the comment just said what the code line follows
oh yeah
sor sor sorry for the slight lag.
I was just gonna say I think one of the themes that I would say out of this season of the podcast has come up with you know because AI comes up in all capacities is more than ever you need you need books, you need primary resources from people you can trust because an LLM will give you the average of whatever it trained on but it won't give you you know Adam Johnson telling you how to do something.
It won't give you Carlton Gibson it won't give you like whatever canonical book on systems design like it will only ever give you at best okay stuff.
And so I think just for myself too more than ever like you gotta know the basics and you gotta go to experts and they're still out there you know but sorry you were gonna say something on Django though Adam Yeah just as
a as a like um a good baseline like Django's own Git commit history, the tickets, the docs that are all like examples of of fantastic technical writing and once you get perhaps into Django or read a few commits as well as the do
cs you might realize that you know you're spoiled there compared to most commercial projects you work on where the commit messages are all over the place or they're just the letter A or the word update why did you do this?
We don't know
fix it oops yeah yes I think that's something that's you know when you contribute to open source you do get to see kind of best practices in a way that's much better than the median team is doing.
You know you think oh it's just running black well a lot of teams aren't running black or you know whatever formatter they're using oh it's it's just you know doing some docs a lot of teams aren't doing docs like it's you think that these are like the minimum bar they're not they're much beyond the minimum bar.
So if you you know contributing to an open source project and learning these tact these these techniques when you go to an interview and say hey do you know what I do this I do that I do that you stand out as a a good candidate so it's an it's another reason to you know be interested in these techniques I think.
Absolutely I mean I'll just say I find that people who learning how to code based on you know my books, Adam's books and and other things and then they em sometimes when they email me, there's a real shock at seeing what production code looks like for a junior developer.
Again, because they're just used to classroom stuff, open source curated books and um you know production code is always one one tweak away from being broken.
That's the business imperative, right?
It's very rare to have a chance to actually do good code for the sake of good code.
That seems like a segue into your your day to day Adam
Yeah Yeah well I was just gonna say like it's a it's a common thing for companies to do a quality week or a you know a sprint to improve their code base.
It's like well what are you doing the rest of the time you're making it working maybe not making it better.
Yeah yeah so
we talked about um LMs and um you know you've been using them a bit yourself Adam how's how's your experience?
Yeah it's a bit mixed I'm I've been trying to think like how how much more productive do I really feel with an LLM.
I was making a list of things that I think that were almost on par, which are like having a clipboard history manager.
I think that's just almost as useful as an LLM sometimes um and like just generally copying like if I'm gonna start a new open source project I'm gonna copy one of my previous ones I'm not gonna you know ask Claude to start from scratch in a blank directory like there's so much embedded knowledge in in my code already.
Yeah.
So yeah there's tools like like that are more deterministic too like linters and formatters that kind of stuff in my Django DX book which does admittedly need updating for the world of rough but um I think those are almost on par.
So like maybe LLMs are like a good boost but they're not they're not like as revolutionary as people are are saying I think I'm in the middle of the pack.
My recent project uh this ICU for Pi which we can talk about more later that's in C and before having access to an LLM that could help me generate the C binding between the C library and C Python API I might not have taken that on.
Yeah but then on the same side like once I started doing it and I realized I was fixing loads of errors and like looking up APIs and finding that they were deprecated and I had to tell it to use the real one it's like maybe I just had the power in myself all along and I just wasn't as daring.
Power the blank py the the scare of the blank page though maybe
exactly exactly like there's something so I can stop fixing it, editing it, yeah.
Okay.
I I do think that for like LLMs to me that where they shine well two areas one is just obscure bug stuff that maybe you wouldn't find quickly on your own.
But the other is for someone who's not at you know Adam Eur or Carlton's level, someone who doesn't know where to look.
So we've had, you know, for example we had Farhan on who's very accomplished but more earlier in his career and like an LLM can help point you to oh maybe it'll suggest things but then it's on you to go in and research them for yourself.
So it can uncover the map of programming tools and techniques that you know you might not know on your own.
So I think they're useful for that but if you already have 20 years experience, you know you might it might be more like you just need to be bold as you say.
But as well I like you might know you know you might be an expert over here but you know if you want to work over here there's you know you don't know all the libraries and all the interfaces and all the the whatnots and you know they can give you a
good first first map.
Like I if you're if you're new to something I think they're actually can be really helpful.
But you have to then go and do the work.
You can't just forever rely on them to do stuff I would say.
I'm curious about these um these people that have this policy of not inspecting the code that's generated.
I'm I'm like I can't I couldn't I just couldn't like the the the rubbish that is generated like it's fine, you know it can work and it it's useful stuff maybe but it's not good.
And I kind of think okay you might get something working but how are you going to maintain it in you know in times to come if you haven't really tightened every screw on it.
I'm I'm still not quite there on just letting them run and
I d I don't feel comfortable there either.
The what is it?
The motebook, the AI social network.
They uh they had just the open database of everyone's API key.
And uh the security researcher who submitted to them, hey, I I found this, is like, well, I'm gonna fix it, but I'm gonna vibe code that fix too, so I'm not gonna look at the fixed code either.
So it's fixed now, the AI says it's fixed.
It's like, okay, is it really?
Like, but I mean, I I I think part of the problem, I mean, like, you know, so anthropic, right?
Cloud code, they still have they have something like 300 open positions to pay developers, you know, $500,000, right?
Even as they say that no one actually writes code, they're still hiring a ton of you know, I think the problem is the people talking about this are generally the fr the people making the models.
So that at, you know, because there's parts of Anthropic that put out papers saying, you know, developers get dumber, or like pointing out limitations, right?
Like the problem is no one else is speaking or promoting outside of people pushing the models, right?
So they're not gonna, you know, like Apple did a really great paper, what, two years ago pointing out just like inherent limitations to the LLM architecture before they did their deal with Gemini.
Um so I don't know.
I think I always have to think like what are the part of the problem is the only thing you see on Reddit or Hacker News is generally hype coming from these companies.
And so it clouds.
Yeah.
In practice, most I think almost everyone has some sort of nuanced idea.
I mean, I don't know.
Some people are I don't know.
Some people who are all on agents, I still think, yeah, I can't help but be suspicious as much as I want to be open-minded about it.
I'm like, really?
Really?
Yeah.
Um one thing I'm worried about, which is slightly meta, is um there seems to be a big divide in the community.
There seems to be a a big cleave between people who are very pro, very anti, and the the a lack a breakdown of the community there.
In that, you know, if we as soon as we become tribal, it it becomes difficult
to yeah.
Um and what's acceptable to send a Z pull request, for example, to Jenko?
Like is it okay to open a hundred things that your AI agent found?
Yeah, no, I mean not really.
I'm really struggling at the moment in that that you know, it it's always been hard to keep the balance between contribu you know, four kids, full-time job, open sourcing on the side.
It's it's difficult to find that time.
And the the increase in just really low quality noise is I'm finding that problematic.
Um I wonder if you I mean you maintain so many ad problem uh projects, Adam, so how's it going for you?
I feel like I've been lucky, like very few things so far.
Um I've had a security report the other day that maybe the person doesn't speak much English, but in general, like, you know, the it's it's it's replying as if it was replying to a person.
It's it's chat it's definitely Chat GPT or something that I've sent.
And like the underlying issue is somewhat legitimate, but is this a great way to receive it?
You know, two pages of text that are like out of a chat prompt?
Not really.
No.
I mean and as well, like if it's some if it's like somebody doesn't speak English to use a a a a machine tool to aid communication, that seems like a positive, but uh
I don't know.
If I can go I don't want to skip over the ICU for Pi.
Like, could could you talk a little bit more about so Rippling is one of the clients you work with?
Uh can you talk about you know who they are, what they're doing, and you know why you had to develop uh this library?
So yeah, I'm I I work as a a Django consultant, I built it.
So part of the time writing the book, writing the blogs, part of the time on client work.
Most of the time my clients have found for me through my blog.
And in the case of Rippling, that's true, because I wrote a post a few years ago about improving your startup time in Django.
Yeah.
Um I remember that one.
My primary mandate at Rippling is make things faster.
Uh so I'm writing the profiler, cutting things out of the tests, cutting things out of uh base libraries, some of which are forks of open source ones.
Um but in the case of this library ICU for Pi, that was creating a brand new capability for them and the Python ecosystem, as it turns out.
So in Django, we do translations with uh get text.
Um this is a GNU project, I believe, that um you know can gather your strings and you can write translated versions of those strings.
I uh the Unicode consortium has this library ICU, which also has a competing kind of translation standard.
It's the one that's made into JavaScript, for example.
There's it's part of the INTL, I think, framework in the browser.
So that is a is a different format of messages, it can express more complex things like pluralization rules between languages change.
So like there's no plurals in uh Chinese and Korean, for example.
There's more many plurals in uh I think like German, Greek, for example.
So it's a mini programming language in your translation strings, and then I wanted to expose that um to Rippling.
They were desperate to start using this because they're products all around the world, they've got they support uh hundreds of countries around the world, and they want their translations to be perfect for all of them.
They were looking for a library to use ICU, and uh existing ones, they're all hard to install, and it's basically at the ground level because ICU is a C library.
C libraries need to be compiled exactly on the right platform with the right cut architecture, and you know, it it turns out that if you install one of these libraries, uh those Python ones, they're gonna compile from scratch on install every time.
They can't build wheels right now because they don't ship ICU.
So it kind of looped into like a whole project of like baking ICU into each uh into the Python wheels for each platform architecture.
So it's it's ended up as two repos, one to build ICU itself and one to build the Python library on top.
Um you
get your veterans medal for Python packaging the hardware, right?
Yeah.
Lots of uh like build architecture and a little bit of code on top.
Yeah.
This portion of Django chat is brought to you by Six Feet Up.
What's stopping you?
Maybe it's an application that won't scale or an AI initiative that just isn't delivering?
That's where Six Feet Up comes in.
With deep expertise in Python, Django, and AI, they solve hard software problems, modernize platforms, and get teams to market faster.
Their impact speaks for itself.
Automating healthcare pipelines for hospitals, helping NASA explore Pluto, building severe weather prediction tools, and applying AI to connect farmers with vital crop data.
When the stakes are high and the problems are hard, six feet up is the partner that delivers.
See what's possible at six feet up is the partner that delivers.
But that's that's fun to do, right?
It's fun to do something new, right?
Rather than definitely in addition to everything else.
So d is that something we'll we might pick it, not you know, obviously we're never gonna do anything quickly, but is that something we might pick up in the Django ecosystem?
Yeah, I've I've been considering this.
Um Rippling use Django, and that's why they're interested.
But they aren't using, say, Django templates um because everything's an API for them.
So it wouldn't make much sense to build like a specific Django integration for them, but I think it could be useful, like maybe a template tag library to begin with.
Um maybe, you know, um a management command like the existing one to compile messages.
You might want something else to extract your strings for translation.
So it's a bit early days there.
RipPlay have yet to deploy it to production.
Okay.
We'll see.
Okay, okay, cool.
I have stuff.
I'm just trying not to speak over you, Carlton, which I tend to.
No, no, no.
I the question I came, I wanted to ask you is about um so performance.
Um and in the news recently it was about uh lazy imports being coming into Python.
I wonder, you know, if you've got that's gonna make quite a big difference, I would imagine.
Yes, that'll make a huge difference, especially for Rippling, whose uh startup time has you know ticked up over the years from 30 seconds plus.
Um but it's also a matter of that's coming in Python 3.15 and you know you've got to upgrade all the versions in between.
Those are months-long projects for for a big client.
Um looking forward to it, but that's like you know, three, four years time kind of thing.
Oh right, okay.
So that file
takes a while.
Okay.
So the other work you've been doing is on profiling, and that you've got the the Tprof project.
So tell us about it, because my favorite my absolutely favorite chapter of your testing book was the one about profiling and
oh yeah.
Yeah, Tprof has was like naturally arisen from my attempts to optimize rippling other projects and Django itself.
Um there was even one Django ticket that like made things click for me.
Whereas like we're uh Jake Howard optimized um part of the template tag setup.
So let's like it moved it moved a slightly expensive function call from every template compile up to one time when the template package is imported.
And it's like, okay, you know, there's a small reduction here, but it's very hard to measure with a traditional profiler because you profile the whole program and then you try and find that slice out of it, and then the noise kind of adds up from profiling everything.
So Tprof lets you it's a targeted profile.
I came up with that name, you target which function to profile.
So you could say that's the only function I care about, or these are the only functions I care about.
And then it will
a three night a three a three-drink naming session.
Yeah.
Uh yeah.
It it hooks in through the Python sys monitoring API.
It listens to when that function gets called.
It tracks it in nanoseconds.
It reports like a little chart using uh the rich library for a nice table at the end.
Yeah.
Well anything using rich we're gonna support.
Well if if I may, uh I'm curious um, because you set in at an interesting position, Adam, because obviously Django background, but also doing work uh not just in Python.
Um like what do you make of Fast API these days?
Because for me, like when I go to conferences for PyCharm and stuff, you know, all the usual metrics show that Fast API has eclipsed Django, which is a little bit of the Flask Django thing we're familiar with.
But um are you seeing examples where you know it it does make sense in client work over Django or or yeah, what do you make of it?
I don't know.
I don't really think about it.
Um I'm hired to work on Django stuff and it's it's it's always like, well, we're not gonna change it out of Django.
Okay, because they already have they are, I guess they already have a Django setup, so they're not just
generally established projects, yeah.
Um Well, let me change that slightly then.
Oh sorry, I like with asynchronous in general, like because Django obviously is improving that story.
Have you found actual production uses for uses for uh async capabilities in Django?
Yeah, like um background async web socket stuff.
Um yeah, I had one client that was connecting via WebSocket to thousands of electric vehicle charges a few years ago.
So that's when I really dug into channels.
Um Carlton's
overuse overuse maybe of of async.
Yeah, I think people jump to async for because it's like cool, basically.
It's like,
oh, it sounds good.
It unless you need a long-living, long-lived connection, you almost have no business dealing with it.
And then once you have once you need a long-lived connection, then okay, let's talk about async.
And then okay, your deployment policy and you know, and move things slowly.
But people are like, oh, we must replace the IRM and with a fully async.
But the database connections, they might have async Python wrappers, but they're still serialized over the actual wire to the database.
So it's not async in you're not getting massive concurrency in your throughput for you with your connection to the database.
So you're still blocked in exactly the same prices as you always were.
And it's it's that communication message about that async isn't an end in itself.
It's a it's a specific tool to use for specific cases.
Um yeah.
And I I think Go on now, go on.
I think there's this um this kind of surface level learning when you're like, what's the difference between sync and async?
And like async means that one process could do multiple things at once.
And like that that appeals, right?
That's like I learned something more about how computers work.
Now I know async fast, sync slow.
You don't
realize that like the kernel was already doing the swapping of processes for for for free before.
So I'm
questioning the art.
Do you think the kernel is better at um the the swapping between active threads?
Or you is it more likely that the kernel's good at swapping between active threads, or that you're you got every await in the right place and didn't make a blocking function call somewhere without really realizing it.
Exactly.
Like I'd rather trust the kernel, you know, 99 and a half times out of
the Yeah, and Python code like often doesn't isolate between threads or between async tasks properly.
There's so much global states that like you know a big client like Rippling, it's almost impossible for them to turn on threading, let alone like async workers, because it's just sitting everywhere.
You know, there's one odd call to change a logger, logger's level temporarily.
Oh, that's global.
So suddenly every other thing in that process will stop logging whilst this viewers access, for example.
Flushing that out is almost impossible.
Yeah, and you just mentioned threading, so the the real threading, the the free threading, which I hope my mouth just refuses to go between the F and the TH there.
The what are your thoughts there?
Because in theory, that's gonna do Django a lot of good, right?
If we because we have a kind of threaded model and it would be nice to be able to do that.
Currently we we've spin up multiple worker processes to get around the gill.
But real threading should help us in theory.
Yeah, lots of bits of Django are are are thread safe already.
Like when you access a database connection, that's thread local, right?
So fingers crossed, you know, free threading plus Django is is uh becomes a sensible deployment strategy.
But as I say, it's hard to guarantee you aren't leaking state between threads because there's so much global state in in Python.
And it's still a while out, right?
We're still on, you know, three 312 being the minimum supported version.
Yeah.
It takes a while
for these new versions to come through.
Okay, good.
Um, are you uh able to attend DjangoCon Europe this year, Adam?
Yeah, I
should be there.
Yeah.
Looking forward to it.
Looking forward to the keynotes?
Uh yeah, I think that's a good question.
Sorry, that's me.
That's me.
Isn't that you plugging yourself?
No, not me.
Not me.
Well, that's it's a very indirect way of uh getting at a typing question, but Carlton's giving uh a keynote there and maybe announcing something.
Oh, cool.
Yeah, I'll be talking about I'll be giving I'll give be giving
a talk on um about um it's called uh static islands dynamic sea.
It's about you know the the relation between what where we want to use static typing and Python's dynamic core and Django's dynamic tool.
I mean Django was specifically built um by design to be a dynamic web framework, and it's very difficult then for us to bolt on or enforce static typing because it just wasn't built with the right patterns in play.
Um and so I'm gonna talk about that and yeah.
Exciting.
Exciting.
I love it.
Hopefully, we'll see.
Well, I appreciate it because I feel like there's a lot of momentum towards making it all static and turning Python into something else.
So if I may, Carlton, I think you're pushing back a little bit and showing maybe an in-between approach.
I mean, y
you know, if if stat if if we're in a place where oh, it has to be static and dynamics only for toy projects, then we're using the wrong programming language, basically.
We should be using you know Rust or wherever, where you've got an actual compiler that does actually enforcing other types and that actually guides you as you're writing your code in a way that Python's type checking, type pints, optional typing, static typing won't ever do.
Um, and you know, not only do you get the better compiler with something like Rust, you don't get the performance penalties of having to do the checks for the dynamic lookups at every operation.
The reason why Python's slow is because it's dynamic by nature.
So if we're not going to lean into that dynamic nature, at least sometimes, there really is a question as to why we, you know, why we're using Python at all.
Um and so yeah, I'll put I I want to push back on um this idea that um this vibe that actually static Python is the is the new um ideal.
Yes, there are cases where it's important, and yes, there are cases where it can help, especially large teams, it can be it can be useful to add a an extra layer of security.
But okay.
Yeah, well, TY for that.
Oh, okay.
Well on the on the PyCharm team, like PyCharm has long had its own type checker, and now there's TY and many others, and so there's a question of which one do we use, how do we implement it.
But um certainly anything from Astral is pretty strong candidate as a default these days.
It it you know I'm not I'm not saying we shouldn't do typing.
I should not say we shouldn't use them, but this that there is, I think, like all these things with you know, you have these pendulum effects where we swing too far.
I think there's a certain um vibe that you know dynamic code should be askewed at all costs now.
Um and that's wrong.
Um anyway, wait for the talk.
Uh yes, sorry sorry, Carlton.
I'm excited on your behalf, but I know I'm giving away.
Um I did want to mention Adam, I'm I'm really impressed that you, you know, just because from writing the Django news newsletter and like seeing how prolific you still are, because you know, you're still writing very regularly on your blog.
You're still I'm just very impressed.
You still still seem to have your both the passion and also the time to to do new things, right?
To talk about new packages, to talk about Django things, to really dive in there.
Um I'm impressed by that balance.
And I'm I'm glad you're doing it too.
Because I think sometimes people come in and have a burst and then, you know, job or other things uh get in the way and they sort, you know, sort of die out.
But yeah.
I've kind of made it work where clients understand that if if they're hiring me, I might go write a blog post, I might go make a package for them.
And yeah, you know, with the ICU for Pi, for example, initially it looked like that might be something just internal to rip playing, like we're calling one function through C.
How hard could it be?
Uh turns out it's really hard to actually, you know, go build ICU and stuff.
So why why not do it in the open and actually be easier for me too?
Because I I can just run it on my own GitHub account and only for you to give me loads of permissions to all kinds of stuff.
I can just I can get on crack on with it.
So yeah.
But it sort of feeds the ecosystem as well, right?
Exactly.
There's this whole cathedral versus the bizarre thing.
If you can put your package out there then even if you only get a few contributors, those contributors are essentially um collectivizing the maintenance cost of that package.
And they'll find bugs that you didn't find, right?
Yep.
I mean it makes sense.
I d I did want to ask um you're you're still on the security team.
You've you've had many positions in Django over the years um but you're still on the security team.
How's uh any quick updates on how that's going these days?
Just about managing to sort of read my share of the issues and contribute back.
Uh that's definitely like low on priority with uh worrying about kids and stuff at the moment.
But yeah well I mean there's multiple members of the team but I know it's it's sort of hidden hidden hidden work so I always want to like give it a little bit of sunshine on the podcast.
It's fun it's shared and you know I also I don't worry about reaching out to the security team when I have questions in my own projects.
I think it's very nice to have this kind of private community channel that's still like people I trust to take a look at some code.
Yeah very reassuring that you know without this would Django be secure in the age where it's so much easier to find these vulnerabilities like people using AI tools like there's a lot of slut but there's also people grabbing lots of high profile issues on these projects.
Yeah we should we should link in the show notes to Jacob Wells put a um a post up on the Django blog recently about um the recent work in the security team because um I think they found um quite a lot of the level of reports rising with the with the new tooling available I think people are um taking existing reports and finding very similar ones elsewhere in the code base and you know that's causing a an increase in the volume of work for the security team.
I know we want to talk about books and projects is there anything else we should mention before switching to that?
Nothing from me.
All right well if I may I'll go first I'm enjoying this book The Coming Wave which is I think two years old.
It's written by one of the co-founders of um Deep Mind and yeah I'm really enjoying it.
I I thought I was burned out on these sort of AI prediction books but the author knows what he's talking about and does a really balanced way of talking about what LLMs will do and also AI generally especially in synthetic biology he has a real focus on that.
And it's interesting because I for me because here in Boston I have a quite a few friends who are PhDs and work at pharma and so they there's an in-between between he's like you know code can solve all the biology stuff and they're like it's a little more complicated than that but you know somewhere in the middle that will meet.
So I appreciate it's uh very well written and a lot to think about of like yeah AI is gonna do a lot of stuff right he's yeah obviously he's not negative about it right he's not a doomer but he doesn't seem unduly boosterish either.
So um yeah I highly recommend it somehow I missed it in the past but I'm enjoying it.
Okay, Adam
Sure I'll do um I sometimes watch Hank Green the Science youtuber and one of his his episodes that um caught my attention was on this book The Fabric of Civilization he's been doing this uh thing where he you know finds some interesting idea and he just like contacts that person does a uh an interview so the author of this book um whose name I didn't write down yeah she's really great and um it's about the history of
fabric textiles and how it's like almost an erased side of of of our history like we find the stone tools from the Stone Age we do not find the string they used to tie the stone to the wooden handle and all the way through you know and it's also very feminist like for most of of history women were spinning cloth to clothe everyone like the whole time it was like the the spare time activity until the invention of the loom and
then obviously that links into into computing um looms were the inspiration for punch cards were the inspiration for uh the woven memory that was used on the Apollo uh program and so many terms from uh the history of textiles make our way into the modern day and we also do not realize the abundance like t-shirts are like five ten dollars right like how how is that physically possible like before you'd own three pieces of cl
othing if you're lucky you know yeah yeah
it's interesting as well because the um the mention of the loom it sort corresponds with the Industrial Revolution and um the the massive um upheavals in life's lifestyles that people had then and we sort of face the same now all this you know lots of talk um are now similar with you know this wave of AI coming in and but I to think that um the loom is a bad thing you know to 200 years later it frees people from you know sp
ending all day every day you know all their spare time working on weaving materials suddenly that's not that's not something you have to do.
So it seems like that a lot of opportunity is freed there.
Whether or not it gets you know
well the problem is the politics it's not the technology it's the politics and it always lags there's some term for it um but obviously we conflate the two.
But yeah you know we it it's obviously everyone's worried at the moment or concerned at least at the moment about what the effects of the current thing you know the current changes would be but I I like to be optimistic about the technology technology being a liberator for um human um activity not necessarily
absolutely well we still need right there's a a glib saying right I want AI to cook my dinner and do my laundry and you know that's that's the one I really want.
Rather rather than it writing the poetry and doing the picture.
Yeah yeah exactly yeah exactly
yeah yeah yeah um so I'm gonna go um I need to introduce my my book and my project together because um my book is um the Beam Book um which is understanding the Erlang rank runtime by Eric Stenman and sorry I wasn't can you see that where is it there it is right I wasn't gonna talk about it on the show because it's um a sort of crazy um sort of thought I had about you know running um Python combined with Erlang and thinking well you know I could potter away
on that and it but it's just so sort of left field that I thought oh I I won't talk about it on the show that's a silly recommendation.
But then Bemochesno who's the maintainer of Gunicorn he's on absolute fire at the moment he's not only has he updated Gunnarcorn with the first new version in a couple of years and he's added HTTP2 support with um early hints and um trailers and for for WISGI and for ASGI and he's he's done all these things you think wow that's a massive upgrade for Gunicorn but now he's released this new Erlang um web server called Hornbeam where Python meets Erlang and it's a WISGI ASG
I WebSocket server built on the Erlang VM with interop between Python and Erlang and it's like oh wow my my crazy side project it wasn't totally crazy as well Benoir's gone and actually done it.
So my my my project of the week is Hornbeam which is this when Python meets Erlang web server um and my book is the Beam book about understanding the Erlang runtime system because it you know it really explains how Erlang's put together and why it's able to do the things it's able to do and if you are going to program in it understanding that runtime is you know worthwhile.
That's my book and project.
That's always been close to Django because obviously salary started as backing onto RabbitMQ always in Erlang.
Yes and there was always a mysterious beast to me you know this language that can hot swap running code and do like tens of thousands of connections per core and you're like it's wildly different.
Yeah yeah I mean
well the thing with Er Erlang is it does the concurrency bits um easily right it those are sort of baked into the language why would you use Erlang?
Because I w I want the those concurrency bits.
So if you are handling lots of connections and long lived connections and you could do that in Erlang and then your your kind of business logic in or your your web logic in the Python that you you know and love, that's for me is a very appealing story.
And you know the Benoit's just gone and actually produced this thing.
I'm I'm very excited to dig into that and see what's very good.
Um anyway, but yeah.
Adam, do you have a project?
Yeah, my project's part of the upcoming Python version.
It's tachyon, which is the uh the nickname for the new sampling profiler coming into Python 315 yeah yeah 315, yeah, sorry.
Um yeah, so I've used a bunch of profilers.
I recommended PySpy back in my speed up your Django test book, and that's kind of stood the test of time.
Uh it works well.
Uh I've written one profile just now for just single functions, as I explained, and I've used Python's built-in C profile.
Tachyon's like a brand new alternative profiler that's very low overhead, very high fidelity, they call it up to a million hertz.
So it can take a million samples a second from a single process, and it's got a fancy UI, T UI, right?
A terminal UI, and yeah, very excited to use it.
Waiting for projects to be on 315.
Profile some stuff that works already.
Come start profiling Django itself, right?
And yeah.
Take a peek.
Yeah.
Good.
Well, mine is quick.
Um it's actually DJ URL's panel, which I think one of you commented in the notes might be now this Django control room, but it's uh which one of you?
Was that you, Carlton?
That was me.
That was me.
So d go on, I mean, explain.
Well, no, that I I'd I'd I'd seen Django control room, but I hadn't realized it was the same author.
Um, but it seems like a nice visual way to, I guess, inspect your Django app in one place.
I've yeah, I've it looks really interesting.
I w I want to dive into it more.
I saw it, but I haven't given it a full playthrough-through.
So I think the thing there is that the DJ Um URLs panel is just like one option.
He's got a Redis one, he's got a Celery one, he's got, I don't know, signals errors.
And then he's he's packaged them all up into this control panel thing, which has just been released this week.
Um there's a nice website, Django Controlroom.com.
So Oh, cool.
Yeah.
But yeah, I was gonna mention that as my project until I I opened the notes and saw that you've got to be able to do that.
Oh, I'm sorry.
Well, it's okay.
It's okay.
I I went for
warm beam.
If I may, you uh you told me about the beam book, like was it Christmas or November, right?
Um this is Adam,
this is what he does.
He's like on the beach reading, he's like, the red book, I got the red book.
But yeah, it all ties in together in a way for you.
You know, I mean it's really I'm super excited by this.
It's um as I say, I I I just thought it was a silly, like, you know, create, you know, mad mad experiment on my part.
And Ben Modgon actually built the thing and it's like, oh wow, okay.
I I'm very happy to give that a play.
Uh yeah, that's exciting.
Um, I guess I'll I'll as we conclude, um, Adam, I'll ask you the the magic wand question, right?
So one one thing to change about Django or Python ecosystem, you know, as you sit today, what what would you pick?
Hmm.
I think last time I answered uh about adding the um what have become called model field fetch modes, and turns out I managed to get that done.
So for that's coming in 6-1.
So better be careful what I wish for here.
I wish there was an a a team, an army of people like throwing their profilers at their projects and and finding the 1% optimizations here and there.
I think Django could go twice as fast just on default Python if we if we if we were dug in and did that.
Yeah.
I think there's so much low-hanging fruit just sat there if we actually want it.
Um that's a Google summer code or or some some way we can
push that a little bit.
I'm interested with the work of Farhan and Adam Hill
and um
Andros who does Daniel Livey, they've been do, you know, benchmarking, you know, with different options and different you know approaches to doing APIs and shown that there are big changes, big, big speed-ups available, just you know, changing the serializers, say.
Or um Farhan has um just got a PR merged that will be in 6.1 as well to make the multi-part parser swap.
Oh, nice, that's done.
And then so we can use a third-party package from the ecosystem, right?
A very small wrapper layer to just make sure that it returns data in the format Django wants, and then use that in our with our request object.
And all of a sudden, we can, you know, big passing big multi-part requests, maybe get a 33% speed up EP benchmarked at just as an initial thing.
Even if you don't get even if we get half of that, that's still massive, right?
Um request bodies.
Um but there's just I think, yeah, I agree with you, Adam, totally.
There's just loads of these available if we want to
everyone do it a little bit on your own project and see what pops up.
And yeah, I'm sure it's different for each project too, like whether you're API heavy or form heavy, template heavy, yeah, it will it will show up different things.
Okay.
That's a good one.
All right, well we'll see we'll see when we have you on again in uh you know, whatever it is, 18 months, 24 months.
So Adam, yeah, just we'll be for sure to remind people how they buy their books, and there must be a bundle that they can get where they get all of them if they haven't got them, and just do for the best money you can spend.
So it's adamj.eu slash books, link in the show notes, I presume.
Um yeah, four books available, bundle of the 3DX books is is one option.
Um and there's the Git bundle too, that's Git and GitHub.
So if you're not using Django, don't know why you're listening to the podcast, but uh you can find that too.
It's generally interesting.
Wait, wait, I have to ask, if you if you if you do you have another book on the horizon?
Are you are you booked out?
You must have one.
Okay, fair there are there are the the little notes growing in like bullet points day by day.
Oh, that's a handy technique, you know.
Yeah, we'll speak to you again in a year's time.
Yeah.
Uh well, Adam, thank you for making the time, of course.
Um and and thanks for all the stuff you do for Django.
I mean Yeah.
It's just absolute one of the pillars of the community, both on the code and also writing about it, right?
Which not everyone who does the code part has a blog.
And so I appreciate it.
And thank you
for everything you're doing too.
I always love listening to Django chat.
It's like number one.
Like if it cut when it comes out, always first on the podcast queue.
Yeah.
I'm just happy to give Carlton a platform.
Try not to speak over him and sit sit back a little bit.
You should pick yourself up as well, Willie.
You know, sitting there with your, you know, complete got set of books and courses.
Well, Adam, you know, we we resisted making this like a lament about you know maintaining projects, but um yeah, that's the nice thing about tech books is they're useful, but then they they go out of date.
DjangoChat.com, we're on YouTube.
Thanks again, Adam, and we'll see everyone next time.
Bye bye.
See you next time.
Thank you, everyone.
Thanks again to Six Feet Up.
The Python Django and AI experts, you call for the hardest software problems.
From scaling applications to simplifying data complexity and unlocking AI outcomes, they help you move forward faster.
See what's possible at sixfeetup.com.