← Back to Show Notes

Transcript: Boost Your GitHub DX - Adam Johnson

Will Vincent

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.

Carlton Gibson

Okay, so welcome to another episode of Django Chat, a podcast on the Django web framework.

Carlton Gibson joined us over 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 time.

Let's dive right in because you've got yet another book hot off the press.

Adam Johnson

That makes it a DX trilogy, yeah?

Is it only three? I was thinking it was four now already.

There's four books, but it's the third in the Boost Your DX series.

Carlton Gibson

Before we dive in, what are the titles again? Because you've got the testing one,

which is super.

Speed Up Your Django Tests.

But that's not a DX book.

Adam Johnson

No, there you go.

Carlton Gibson

Right, okay.

Adam Johnson

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 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 a server too. And GitHub is the website that

basically popularized Git. They're kind of like Rosenberg.

They're kind of like the same 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.

Carlton Gibson

Well, what was always nice about GitHub was you could browse the code, right?

Yeah, it was much easier to browse. Like, it had a much...

Adam Johnson

You felt like, 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 with many different Git hosting providers,

GitHub, GitLab. Now things like CodeBug, free open source ones are rising in prominence as

GitHub is falling in popularity. Yeah, so I wrote this book on using Git better and to,

you know, 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. So, you know, it was deferred until, you know, I finished off this book last year,

between February and November.

Will Vincent

Okay, brilliant. And I think it's fair to say, even though it is a book on GitHub, you

can use a lot of these...

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 Git tool, because increasingly they're adding

things like the equivalent of GitHub Actions, and they're trying to 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?

Adam Johnson

It is. Like, I definitely think even if GitHub, like, you know, falls out of favor with the

general community, 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 these are the things that, like, still map into GitLab or whatever. Then, yeah,

I think there's something for everyone in there.

Carlton Gibson

Okay. I mean, let's dive in there, because you've mentioned it twice, the sort

of falling popularity of GitHub. And I... And yet, I feel that, because there's a lot of

new features that I just don't want, and there's also kind of a monoculture thing and, you know,

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?

Adam Johnson

I don't think so. There have been some prominent projects like Zig, which moved

off because of, 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 code,

the copilot button, or the slop or PRs that are coming through.

Carlton Gibson

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 hardcore...

Will Vincent

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 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 the only social that matters, honestly, is LinkedIn at this point, until they completely

muck it up. 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 now, and then

something else.

Adam Johnson

It's true. Now, you know, my posts used to do, like, quite big numbers on Twitter

before the takeover. Now, the only one that compares in that kind of scale is LinkedIn.

Will Vincent

Yeah. But let's plug the book. All right. Let's talk about why. What are some of the

key... You know, we want people to read the book. What are some of the top features that

you can learn in the book for someone who is using GitHub?

Adam Johnson

Yeah. So it's structured a bit like a run-through of GitHub, pointing out things

in the UI 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, you

know, now I can do pull requests in a few letters on my command line, and I think that's

pretty powerful.

I've always been a bit skeptical about the GH command. There was... I've had these

Carlton Gibson

old...

Adam Johnson

You've become skeptical about something.

Carlton Gibson

Well, no, but okay. But that's me down to a nutshell, right? Why would I use a new tool

when the tool I've got will do it perfectly happily? But, you know, there was a few things

like, I don't know, Fetcher PR, checkout PR, for which I had an alias and things. You know,

when the GH command came out, I already had those, so why would I, you know, why would

I change mine?

But you're not everyone, Karl, right? This is the problem.

No, I understand.

I'm not everyone, but this is why 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?

Adam Johnson

Yeah. Nearly every, like, daily button on the UI has an equivalent 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. So, yeah, it's a pretty nifty piece of kit and woefully underused, I would say,

from what I see from people developing, like, GitHub is normally 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 start focusing

Will Vincent

on the code.

But, so, are you using it more in a command line capacity, then? Is that the sense I'm

getting?

Yeah.

Adam Johnson

Yeah, definitely. More and more, and especially writing the book, like, made me look at some

of those corners I hadn't investigated.

Will Vincent

Well, this is your, sorry, I forget the tagline, right? Your, 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...

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...

Adam Johnson

A little bit of BDD here. I got a few pull requests into the GitHub docs, fixing it

in QC.

I did look at the CLI, but everything I wanted was there. Yeah.

Will Vincent

So, the main idea, though, is... Sorry, I'll just go Carlton. 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 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?

Adam Johnson

Yeah, that's the basic thesis of these books. It's 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.

Will Vincent

Or even an open-source project like Neapolitan. We had a previous...

Why would you read the docs? Why would I read the docs?

We had Velda on right before you who was talking about using Neapolitan for client work and

admitted to not directly reading the docs, so...

Yeah, nice. Yeah.

Why would I read those? Like, you know...

Well, but I do think at a meta level, the Git and Git... Like, what's going to remain

if AI truly takes over? Like, you're still going to need Git. You're still going to need

a way to look at... Compare pull requests. Like, I think 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 going to stay.

Adam Johnson

Yeah, that's a key thesis here. It's like, my book is about the...

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 little secret

tools on GitHub that will help you navigate quicker.

I think it's true of, like, all your books is that if you... If you're an experienced developer, you may know, say,

Carlton Gibson

60% or 70% of whatever, but 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 going to learn an awful lot. Like, just, you know,

every chapter, bam, bam, bam, bam, bam. And 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.

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 they're... You know, I remember 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 book.

Just go and buy the set because, you know, that's an investment in your career.

I noticed you talked about markdown and writing.

Yes.

Go on, that's the system.

Adam Johnson

Is there a question in there?

Kind of a sneaky, almost Trojan horse right in the middle of the book. Like you're learning about

how to click around GitHub and suddenly you're learning how to write better 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 text. It's better to know what good writing looks like. LLMs can write

a lot and it can be cogent, but it can be 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.

Carlton Gibson

It's like the comment where it's like, you know, open the file and then, you know, file equals open sort of thing. The comment that just said what the code line for it is.

Will Vincent

Well, but I think this is, sorry for this light lag. I was just going to 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 system.

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 got to know the basics and you got to go to experts and they still out there, you know, but sorry, you were going to say something on Django though, Adam.

Adam Johnson

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.

Fantastic technical writing. And once you get perhaps into Django, read a few commits as well as the docs, you might realize that, you know, 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. Like, why did you do that?

this we don't know fix it oops yeah yes

Carlton Gibson

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 back or you know whatever formatter they're using oh 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 tasks 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 another reason to you know be interested in these techniques i

Will Vincent

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 other things and then they 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

Carlton Gibson

your day-to-day adam right yeah

Adam Johnson

yeah well it's 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 well yeah you're making it work you're making maybe not making it better yeah yeah

Carlton Gibson

so we talked about um lms and um you know you've been using them a bit yourself and how's your

Adam Johnson

yes um 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 lm 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 lm 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 um and i think it's a good thing that i've been able to

so yeah that's tools like like that are more deterministic to like linters and formatters

the 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 lms are like a good boost but they're not

they're not like as revolutionary as people are saying i think i'm in the middle of the bank

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

the blank page of the scarer of the blank page though maybe exactly exactly like there's

something so i can start fixing it editing it yeah okay i i do think that for like lms to me

Will Vincent

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 you're a 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 lm 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 like you might know you know you might be an

Carlton Gibson

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

whatnots and you know they can give you a good first first like if you're if you're new to

Will Vincent

something i think there 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

Carlton Gibson

that have this policy of not inspecting the code that's generated i'm like i can't i couldn't i just

like the the rubbish that is generated like it's fine you know it can work and 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 still not quite there i'm just letting them run and i don't feel comfortable there either

Adam Johnson

the what is it the malt book the ai social network

they uh they had just an open database of everyone's api key and the security researcher

who submitted to them hey i found this he's like well i'm gonna fix it but i'm gonna vibe code that

fixed too so i'm not gonna look at the fixed code either so it's fixed now the ai says it's fixed

Will Vincent

it's like okay is it really like but i mean i i think part of the problem i mean like you know

so anthropic right cloud code they still they have something like 300 open positions to pay

developers you know five hundred thousand dollars right even as they say that no one actually writes

you know i think the problem is the people talking about this are generally the people making the

models so 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 lom 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 are all

on agents i still think yeah i can't help but be suspicious as much as i want to be open-minded

Carlton Gibson

about it i'm like really really yeah 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 big cleave between people

who are very pro very anti and a lot a breakdown of the community there in that you know if as soon

as we become tribal it becomes difficult to yeah and what's acceptable to send as a pull request

Adam Johnson

for example to jango like is it okay to open 100 things that your ai agent found it yeah no i mean

Carlton Gibson

not really i'm really struggling at the moment in that you know it it's always been hard to keep

the balance between contribute 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 projects adam so

how's it going for you i feel like i've been lucky

Adam Johnson

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

yeah that i've sent and like the underlying issue is somewhat legitimate but is

is this a great way to receive it you know two pages of text that are like

Carlton Gibson

out of a chat prop not really no i mean as well like if it's some if it's like somebody doesn't

speak english to use a a machine tool to aid communication that seems like a positive but

Will Vincent

i don't know if i can go i don't want to skip over the icu for pi like could you talk a 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 this library

Adam Johnson

so yeah i'm i work as a a django consultant i build it so part of the time writing the book

writing the blogs part of the time i'm 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 so 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 their 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 get text um this is a gnu project i believe

that um you know can gather your strings and you can write translator 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 different format of messages it can express more complex things like

pluralization rules between languages change so like there's no plurals in chinese and korean

for example there's more many plurals in uh i think

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 there they were desperate to start using this

because their 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 i'm not sure if they're

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 architecture and you know it turns out that

if you install one of these libraries uh those python ones they're going to 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

into the python wheels for each platform architecture so it 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

Will Vincent

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 that's that's fun to do right it's fun to do something new right rather than definitely

Carlton Gibson

in addition to everything else so is that something we'll we might pick it not you know

i've seen that we're never going to do anything quickly but is that something we might pick up in

Adam Johnson

the django ecosystem yeah 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 and then i think it could be useful

um maybe you know um a management command like the existing one to compile messages you might

want something else to extract your strengths for translation so it's a bit early days there

rippling have yet to deploy it to production okay we'll see okay okay cool i have stuff i'm just

Carlton Gibson

trying not to speak over you carlton which i tend to no no the question i came i wanted to ask you

was about um so performance um and in the news recently it was about uh lazy imports being

coming in to python i wonder you know if you've got that's going to make quite a big difference

Adam Johnson

i would imagine yes that'll make huge difference especially for rippling whose 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

315 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 far yeah yeah it takes a while okay so the other work you've been

Carlton Gibson

doing is on profiling and that you've got the t prof project so tell us about it because my

favorite my absolutely favorite chapter of your testing book was the one about profiling and oh

Adam Johnson

yeah yeah t prof 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

where it's 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

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 t prof 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

Carlton Gibson

and then it will a three night a three a three drink naming session

Adam Johnson

uh yeah 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

Carlton Gibson

a nice table at the end yeah well anything using rich we're gonna support yeah well if if i may uh

Will Vincent

i'm curious um because you said in an interesting position adam because obviously

django background but also doing work 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 pie charm 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 does make sense in client work

Adam Johnson

for django or or yeah what do you make of it i don't know i don't really think about it um

okay i'm hired to work on django stuff and it's it's it's always like well we're not going to

Will Vincent

change it out of django okay because they already have they are i guess they already have a django

Adam Johnson

setup so they're generally established projects yeah um well let me change that slightly then

Will Vincent

oh sorry i like with asynchronous in general like because django obviously

is improving that story have you found actual production uses for

Adam Johnson

uses for uh async capabilities in django yeah like um background async websocket stuff um yeah i had

one client that was connecting via websocket to thousands of electric vehicle chargers a few years

ago so that's when i really dug into channels um carlton you're familiar with channels overuse

Carlton Gibson

overuse maybe of of async yeah i think people jump to async for because it's like

basically it's like oh it sounds good it unless you need a long living long live connection

you almost have no business dealing with it and then once you have once you need a long live

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 orm and with a fully osync but

the database connections they might have async python wrappers but they're still

serialized um over the actual wire to the

database so it's not async and you're not getting massive concurrency in your throughput feed 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 there go on i think

Adam Johnson

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 free before so

Carlton Gibson

do you think the kernel is better at um the swapping between active threads

or you is it more likely that the kernel is good at swapping between active threads

or that you you got every await in the right place and didn't make a blocking function call

somewhere without really realizing exactly like i'd rather trust the kernel you know

Adam Johnson

99 and a half times out of them yeah and python code like often doesn't isolate between threads

or between async tasks properly there's so much global states um 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

loggers level temporarily oh that's global so suddenly every other thing in that process will

stop logging whilst this view is access for example you're like flushing that out so almost

Carlton Gibson

impossible yeah you just mentioned threading so the real threading the free threading which i my

mouth just refuses to go between the f and the th there the

what are your thoughts there because in theory that's going to 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 we're currently

we we've spin up multiple worker processes to get around the gill but real threading should help us

Adam Johnson

in theory yeah lots of bits of django are are thread safe already like when you access the

database connection that's thread local right so i think it was crossed you know free threading plus

as it 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

Carlton Gibson

while out right we're still you know 3 312 being the minimum supported version yeah it takes a

Will Vincent

while for these new versions to come through okay good um are you uh able to attend django con europe

Adam Johnson

this year adam yeah i should be there yeah looking forward to it

looking forward to the keynotes uh yeah sorry that's me that's me is that you plugging yourself

Will Vincent

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 a keynote there and maybe announcing something oh cool yeah i'll be

talking to you i'll be giving i could be giving a talk on um about um it's called uh static islands

Carlton Gibson

it's about you know 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

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 going to talk about that and you know exciting exciting i love it hopefully we'll

Will Vincent

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

Carlton Gibson

and showing maybe an in-between yeah i mean 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 actual enforcing of the types and that actually guides the programming language

you as you're writing your code in a way that python's type checking type hints 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 put i i want to push back on um this idea that

um this vibe that actually static python is that 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 okay well i mean uh

Will Vincent

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 you know as a default these days you know i'm not

Carlton Gibson

i'm not saying we shouldn't do typing i'm not saying we shouldn't use them but this that there

is i think like all these things would you know you have this pendulum effect so we swing too far

i think there's a certain

um vibe that you know dynamic code should be eschewed at all costs now um and that's wrong

Will Vincent

um anyway wait for the talk yes sorry carl 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

running 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

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

i'm glad you're doing it too 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 of you know sort of die out but

Adam Johnson

yeah i've

kind of made it work where clients understand that if they're hiring me i might go write a

blog post i might go make a package for them and yeah you know put the icu for pi for example

initially it looked like that might be something just internal to rippling like we're calling one

function through c++ how hard could it be uh it turns out it's really hard to actually you know

go build icu and stuff so why why not do in the open and actually be easier for me too because i

i can just run it on my own github account no need for you to give me loads of money

loads of permissions to all kinds of stuff i can just i can get out crack on with it so yeah

Carlton Gibson

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 did i did want to ask

Will Vincent

you're still on the security team you've had

many positions in django over the years but you're still on the security team how's uh any

Adam Johnson

quick updates on how that's going these days just about managing to 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

Will Vincent

the moment but yeah well i mean there's multiple members of the team but i know it's sort of hidden

hidden work so i always want to like give it a little bit of sunshine on the podcast it's fun

Adam Johnson

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

um 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 slot but there's also people who are not able to find these vulnerabilities so i think it's

grabbing lots of high profile issues on these projects yeah we should link in the show notes

Carlton Gibson

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 lot of problems and i think

that's causing an increase in the volume of work for the security team i know we want to talk about

Will Vincent

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 deep mind and yeah i'm really

enjoying it 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 quite a few friends who are phds and work at pharma and so

they there's an in-between which where 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 um 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 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

Adam Johnson

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

thing where he you know finds some interesting idea and he just like contacts that person does a

an interview so the author of this book um whose name i didn't write down yes 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

all the way through you know and it was a very feminist like for most of of history women were

cloth to clothe everyone like the whole time it was like 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

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 know three pieces of clothing

Carlton Gibson

if you're lucky you know yeah yeah it's interesting as well because the um the mention of the loom

so corresponds with the industrial revolution and um the the massive um upheavals in life

yes lifestyles that people had then and we sort of face the same now or the you know lots of talk

are now similar with you know this wave of ai coming in and but i do think that um the loom

is a bad thing you know two hundred years later it frees people from you know

spending 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 a lot of opportunity is freed there

um whether or not it gets you know well the problem is the politics it's not the technology

Will Vincent

it's the politics and it always lags there's some term for it um but obviously we conflate the two

Carlton Gibson

but yeah you know we 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'd like to be optimistic about the

technology technology being a liberator for um human um activity not necessarily

Will Vincent

absolutely well we still need right there's 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

Carlton Gibson

rather yes rather than it writing the poetry and doing the picture yeah yeah exactly yeah yeah um so i'm

going to 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 runtime by eric stenman and so i wasn't can you

see that how where is it there it is right i wasn't going to talk about it on the show because

it's um the 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 you know i could potter away on that but it's just so sort of left field that i thought

i won't talk about it on the show that's a silly recommendation but then um benoît chesno who's the

maintainer of gunicorn he's on absolute fire at the moment he's not only is he updated gunicorn

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 whiskey and for asgi and 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 wesky whiskey asgi web softkit server built on the erlang vm

with interrupt between python and erlang and it's like oh wow my crazy side project it wasn't

totally crazy little ben was gone and actually done it so 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 um that's my book and project that's always been

Adam Johnson

close to django because obviously salary started as backing onto rabbit mq 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 know it's wildly different yeah

Carlton Gibson

yeah i mean the thing that erlang is it does the concurrency bits um easily right those are sort of

baked into the language why would you use erlang because i want 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 web logic in the python that you you know and

love that's for me is a very appealing story and you know the ben was just gone and actually

produced this thing i'm very excited to dig into that and see what's very clearly going to happen

Adam Johnson

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 right yeah 315 yeah sorry um yeah so

i've used a bunch of profilers i recommended pi spy back in my speed up your django test

book and that's kind of stood the test of time it works well i've written one profile just now

for just single functions as i explained and often use 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 tui right a terminal ui and i'm very excited to use it waiting for projects to be on 315.

i couldn't stop profiling django itself right yeah take a peek yeah

Will Vincent

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 go on i mean explain it well no i i 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 want to dive into it more i saw it but i haven't given it a full place run through

Carlton Gibson

so i think the thing there is that the dj um urls panel is just like one option he's got a reddish

one he's got a celery one he's got i don't know signals and then he's packaged them all up into

this control panel thing which has just been released this week um so okay yeah there's a

Will Vincent

nice website django control room dot com so

Carlton Gibson

oh cool yeah but yeah i was going to mention that as my project until i i opened the notes and saw

Will Vincent

that you oh i'm sorry okay okay i went yeah if i may you uh you told me about the beam book like

was it christmas or november right yeah no 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

Carlton Gibson

but yeah it all ties in together in a way for you yeah you know i mean it's really i'm so

super excited by this it's um as i say i just thought it was a city like you know create you

know mad mad experiment on my part and then was gone and actually built the thing and it's oh wow

Will Vincent

okay i'm very happy to give that a play 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

Adam Johnson

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 six one so better be

careful what i wish for here um i wish there was an a team an army of people like throwing their

profilers at their projects and and finding the one percent optimizations here and there i think

django could go twice as fast just on default python if we if we if we dug in and did that yeah

Carlton Gibson

i think there's so much slow hanging fruit just sat there if we actually want it um

Will Vincent

maybe that's a google summer code or or some some way we can push that a little bit interested with

Carlton Gibson

the work of farhan and adam hill and um andros who does dangle ivy they've been 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 swapping yes

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 once and then use that

in our with our request object and all of a sudden we can you know big passing big multi-part repress

maybe get a 33 speed up he'd be benchmarked out just as an initial thing even if you don't get

even you get half of that that's still massive right um if you process request bodies um but

there's just i think yeah i agree with you adam totally there's just loads of these available if

Adam Johnson

we want just 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

Will Vincent

that's a good all right well we'll see when we have you on again and uh you know whatever it is

Carlton Gibson

18 months 24 months so adam yeah before we just say goodbye 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've got them and just

Adam Johnson

do exactly 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 a lot of

the get built bundle too that's good and github so if you're not using django i don't know why you're

listening to the podcast but uh you can find that too it's generally it's generally interesting yeah

Will Vincent

wait i have to ask if if you do you have another book on the horizon are you are you booked out you

Adam Johnson

must have one definitely on pause right now with a baby in the house but okay there are there are

the little notes growing in like bullet points day by day oh that's a handy technique you know

i will speak to you again in a year's time

Will Vincent

well adam thank you for making the time of course um and thanks for all the stuff you do for django i

mean yeah it's just absolutely 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

Adam Johnson

thank you for everything you're doing too i always love listening to django chat

it's like number one like if it when it comes out always first on the podcast queue yeah

Will Vincent

i'm just happy you're doing it

to give carlton a platform try not to speak over him and sit back a little bit you should

Carlton Gibson

bring yourself up as well will you know sitting there with your you know complete set of books

Will Vincent

and courses well adam you know 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 django chat.com we're on youtube thanks again adam and we'll see everyone next time

bye-bye you next time thank you

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