Transcript: Contributing to Django - David Smith
Hi, welcome to another episode of Django Chat, a fortnightly podcast on the Django Web Framework.
I'm Carlton Gibson, joined as ever by Will Vincent. Hello, Will.
Hi, Carlton.
Hello, Will. And today we've got with us David Smith, who's a maintainer of CrispyForms,
contributor to Django and all sorts of other packages in the ecosystem. Hello, David.
Hi, Carlton. Hi, Will.
Hello. Thanks for coming on. Thanks for coming on. So I really wanted to get you on because
you um sort of for me you've kind of appeared over the last year or so and been and dived into
the contributing world and i wanted you know for you to tell that story because you know come and
contribute to django like that's that that's the thing right but um let's so let's get into that
but let's start how did you get into django how did this we always ask what's your backstory and
then we can get on to how you got into contributing yeah so i think straight away my backstory is
probably a little different to most people that you have on the on the podcast by profession i'm
an accountant i do strategic planning um so nothing to do with coding as part of my day job
um a little bit of vba here and there but right if i can get away from vba then yeah there's got
to be a better way right right so so do you are you into this whole python for financing because
you can load excel spreadsheets into finance into python and you know there's books on this
absolutely i i i think that's where the industry is going and um it'll become a bigger part of
an accountant's kind of toolkit to have um some python knowledge especially um you know looking
ahead we're starting to hear microsoft may be putting python into excel um yeah they've got
it was this thing that this lambda thing they're doing um yeah i've not used that i think that's
within excel itself and you can write small functions that that call itself um but that's
not so helpful for writing scripting a lot of what we do is quite basic really it's you know
here's some data i need in this format or i need to look at it like this and um vba is a tool that
we've got today but like i say there's got to be a better way than go to's well it's it it reminds
me of um i have a mba and in the mba python is now a core class in most curriculums and um
and certainly in the marketing courses like i remember taking them 10 years ago but it's all
you know macros in excel when everything can be done in python and so it is interesting how it
does seem to be programming by extension python is a necessary toolkit even if it's just scripts
across the business world.
Absolutely.
And I think there's an evolution of data teams
becoming part of that kind of corporate ecosystem.
And I think accountants have got a weird fit of
a lot of what we do is data and analysis
and looking at the future.
And therefore, you need to look at the data
on one hand to what does it mean?
What can I inform the business?
all part of that story that you're trying to tell and where it fits within an organization across
it data finance business units and i think the industries are still trying to figure out how
that all kind of joins together and on one hand you've got data and you know enterprise databases
that maybe the it teams will own and develop on the end of the spectrum you've got tools like
power bi which are very much you know end user you go and tell us what it means with this you know
analytical tool and python's the glue right or is it they say i guess it's yeah python is the
i think so um you can get so far with sql but typically data's not in as good a format or
you might have text files or excel files or you know pieces of paper people have written in and
yeah you need that glue to be able to mash everything together to get that understanding
and insight but so carlton's gonna do most of the questions today so i'll just get one in there and
then let you two go i was just gonna say i recall from learning accounting um not at a cpa level uh
it's very similar to programming and then it when you first learn it it seems very binary and
And then as you progress, I think specifically of like managerial accounting, it's just wildly
subjective in the same way that programming, there are some things that are sort of black
and white, but it's way more subjective than it seems on the surface.
So it seems like a pretty natural overlap, actually, if you have a brain or training
in one or the other that they would apply.
I think there's a different spectrum.
You can get real technical accountants and tax is a good example of this, where it's
very rules-based um on the other end of the spectrum i work for a strategy team what's
going to happen in the future where's the business going what does the world look like in five years
um and that's very much you know blue sky thinking yeah i mean that's got to be fancy
graphics with no real numbers on and stuff like that you know just up and to the right
yeah yeah lots of power lots of powerpoint okay um so i've we kind of jumped right in because
it's really interesting because the the um it from inside the python world it really looks as
if python's gaining massive ground share out you know in the quote unquote real world right um but
so you're an accountant and do you're using python at work really or is it still vba and
It's still VBA. I think there's still some reluctance to be able to, working in financial services, rules and regulations, it's not something that teams are here, have this thing and go do with it what you want, but we don't really know it and we can't really control it.
is a big risk for an organisation.
So I think if, kind of touching what we said on earlier,
if it's an Excel, that's a much more controlled
and structured environment for end users,
end user computing to be able to really use the power
that Python has, really.
Okay, and so how did you, what is your path into Python then?
Yeah, so I guess I've always had an interest
in computing and websites, helped run a website
maybe early 2000s um back when it was here's ftp server upload some files and yeah um
arson can account a bit and then it goes wrong and that's the end of that
um yeah so i did a bit of that and um more recently of what else can i do
what do i have some interest in can i pick up a hobby and i started to build a website my wife
was helping with a charity for a while so i built them a single page application and
use bootstrap for the styling of that at the same time trying to think about python and
trying to learn that so potential benefits at work and i guess at that point the two kind of
meet right so you've got web and you've got python and there's django right okay and then the step for
me was seeing colton's talk from maybe three or four years ago um one of your you know django needs
contributors um talks and at the end of that you said by the way crispy forms yeah good deal with
some help and yeah here's the thing it's it's bootstrap which i know and python which i'd
like to know but actually crispy forms is mostly bootstrap really there's there's python but
that's not where it's mostly the templates yeah absolutely it's it's a template issue it's always
a template issue um so there was a neat fit for me to start taking little steps towards using python
in a real world um as you're a beginner and you can do some courses and some training and you can
learn about all the various functions and classes and all of that but how do you take that first
step of here's a real project that you can work on yeah um and crispy forms is where i ended up
yeah and you've been an absolute you know stalwart there i mean you've just come in and now you're
now you're the lead maintainer and you've been you've added um template packs for bootstrap five
which is just just about ready and for tail crisp for tailwind as well there's a there's a pack
there um i mean do you want to talk about those uh yeah absolutely um so bootstrap four we got to a
fairly good state maybe two or three years ago standing on the shoulders of giants really of um
who came before and then looking what else there is you know tailwind here's this new thing that
everybody's using okay we can build a template pack for that that would be an interesting project
to work on and what's really interesting about tailwind is it's so different to to bootstrap i
guess bootstrap you've got certain classes certain styles you use the right name and you get your form
with tailwind it's much more choose your own adventure and there's far more flexibility and
therefore how do you allow the users to have that flexibility within that environment where
templates tend to be very structured and trying to find a few different options um which i think
we're getting there with here's uh an opinionated tail strip tailwind um layout it'll get you going
up to speed quite quickly but if you want to go fully custom there's some capability to to do that
in a slightly easier way than writing lots of classes into into templates yourself yeah because
i mean the traditionally with crispy forms the way you would take it beyond the built-in template
packs is well you override the template and you create and you basically end up creating your own
template pack which is like your custom in-house sub sub template that it's not a subclass you've
just overridden the individual ones but you know there's 30 odd templates in the template pack
right you don't necessarily want to override them all but you just i guess you do one at a time i
don't know and then bootstrap five is the evolution to bootstrap four um and just keeping it modern
and current and i think that's the big challenge for a lot of packages isn't it it's how do you
have that sustainability to to keep up to date with the latest changes being in django or python or
we're using um css frameworks and they'll come along and they'll evolve and you've always got to
keep up to date to keep your package current yeah and i think at some point with crispy
forms we've got to start taking things out because i think um the the new template packs
are built as additional as add-ons they're separate packages so that makes them easier
to maintain but in the core package we've still got i think bootstrap 2 template packs which are
probably time to say goodbye to those and bootstrap 3 probably time to say goodbye so not necessarily
delete them but move them into a separate package and then i don't know what have you
have you got thoughts in that direction i guess that's where my lack of knowledge comes and
actually where Carlton can provide is insight and guidance to me um is anybody using bootstrap too
yeah that's a good question isn't it anyone you answer still on the postcard folks
and I guess I don't know what changes are backwards compatible or are we making a decision
that's too strong I don't know I can have my view but I guess we don't know until we put it out
there and somebody says i'm still using that oh you broke me you broke me we'll pin to the old
version yeah we don't i mean that's a that's a django thing we don't we don't track really
anything so sometimes these questions we don't know i mean it's relevant because we had the
django surveys coming out um this summer um which we just started doing in part to kind of get
these questions so i wonder yeah i wonder if there's specifically on a package yeah how do
you how do you find out i mean we could i don't know we could put something in the django news
newsletter but django itself doesn't really you know doesn't track and doesn't have an easy way to
to do a quick survey um other than yeah you don't want to you know change it and then people raise
their hand afterwards i think for for crispy forms i think we could take take the bootstrap
to the inbuilt packet um template packs and we could say these are now all external from this
version because i think that the people coming forward they're using the external packages
already so those those who are on an old version they can either stay where they are if they're
going to upgrade they can just add an extra dependency and maybe change a line in the
settings file and if there's a wee breakage well sorry but this this isn't a big package
it's maintained by david i'm still helping out from where i can and there's one or two other
people who you know pop in from from time to time there's not capacity there to maintain some sort
of api stability policy of the likes of jango's you know we've got crispy forms long terms no we
haven't got a crispy term for long-term support if if you want to use it you can either pin to
the old one which was working or you can update and you might have to make a few changes sorry
we can't do more and if you're a company that's relying on it you can stump up some money and say
like, look, can we fund some time on it?
Which has never happened in the history of the project.
So I don't think we need to be, you know,
obviously we don't try and break,
we try to do the right thing and give an easy update path,
but we're not under any obligation to, you know,
there's a nice line Hynek put on that open source is like,
it could have been Brett Cannon,
I don't know, somebody put on the,
on their blog that open source is like putting stuff on your lawn and saying help yourself
right there's no no obligation beyond that you mean there's not thousands of developers watching
all of the open source packages just ready to jump in every time there's a there's there's an issue
no no there's not well carlton is there a case when you wouldn't pin it when you just straight
nuke it just the larger question that david was bringing up if it's really old you could just say
look this is no no longer maintained i mean like so um uh no there was one recently is it m django
mptt i think that's now been i think it's that um matthias had to say look this is now unmaintained
and i'm sorry if it's unmaintained and sorry if you're depending on it but i can't do it anymore
and you should be updating to django tree queries which is the new the newer library and it's
maintained and but he's tree beard tree beard okay yeah um and he's he's he's just simply not
in a position to and he was like i can't you know he actually said i don't know what to do and i was
like look you just have to declare it as as bankrupt you have to say look we can't do this
and if somebody needs it if a company needs it a company can fund the develop the really small
amount of developer time it would take to keep it on the rails but not again no company comes
forward with any money to sponsor it so that point yeah let it die yeah carlton's a great
sounding board for me on these things because he's has many more years doing this stuff and
again it's the same advice and just need need to hear that you know it's you know do what you can
but if it really matters someone will raise their hand or they won't yeah and it's not just somebody
to do it somebody else to be able to review and merge and do the maintenance of it as well and
issue a new release and all of that other work that goes along with maintaining a package it's
much more than just opening a pr with a one-line change that fits your needs right yeah yeah no
entirely well that's why new blood is so nice because sometimes someone has to step away or
they just need a break or they just need help i mean like a third-party package you know like
crispy forms i mean even the awesome jango repo which i started i was pretty much you know that's
not even used that's just a resource but has a lot of stars and i was just like getting overwhelmed
and um jeff triplett stepped in which is nice um so that's you know that is sort of an equivalent
to you coming in on crispy forms which i believe um uh daniel and audrey started it right or they
initially worked on it right because we had him on to talk about that and then you you kind of took
it over which he didn't really realize and you know there's this recycling of energy in a way
yeah i mean uh there was um crispy forms has been attained for years by um miguel
and he but he had to drop away and so 1.8 came along and it was about to be released and crispy
forms was about to break and it was like i'm i'm depending on this i'm using this in my real life
So, you know, jumped in and I got a release out for 1.8 and then this coder came along, Dimitri, his name is in real life, met him years later at Jankon, but he was just Stranger666 and he just made about, you know, 100 PRs to fix various issues and bring it up to date.
And it's like, oh, thanks, really, you know, helping. I never knew who this guy was. And then he was like, hey, I'm so nice to meet you. That was so that was really nice many years later.
So I was maintaining CrispyForms for, I don't know, two, three, four years.
And then I was finding I hadn't got time to maintain it.
I was working on REST Framework.
I was working on Django.
I was working on other packages.
And CrispyForms was just, I just needed help.
And so I gave my, I think it must have been at DjangoCon Europe in 2019,
the Feeding the Pony talk.
I'm not sure.
I think that's right.
Yeah, because I think that's the one I think I called out for CrispyForms.
look if you want to get involved it's a great learning opportunity it's a great way of getting
involved in the community it's you know feeds feeds back into the the cycle and i could do
with a hand and you know there david was and i think that's a good way for new people to get
involved with the django ecosystem is here's a package that's fairly small in its scope that
you can understand what it's doing end to end whereas Django it's this great big thing and
where do you start and there's so much of it that's connected and to try and piece it all
together as a challenge there but a smaller package I was able to learn about what the
how forms work in Django in a little bit more detail and really understand that and that was a
a great learning opportunity for me to have that narrow scope and not get completely
sidetracked and um able to see the wood through the tree somewhat yeah but you have been digging
into Django right so yeah so looking into Django itself probably about six to nine months after
getting involved with crispy forms I started to look at the Django issue list and again you can
go onto the website and you can filter by component pick forms obviously um and hang on
here's a a few tickets that are in areas that i'm sort of familiar with i i know what a bound field
is and i know how it works and i know what a widget is and here's a problem that i can piece
together and go away and solve and started to make some prs on django itself eventually can i
because i remember a few of these right and these were like you did an amazing detective job on
something because some of the issues are like that you know django's 15 years old and some of them are
like what's the just as i make sort of half making up and half remembering the issues that david
worked on when i say this but like um when i've got null defined on my model field and then it's
you know but i need it's not required at the form level and then you know what should be the
the correct rendering of the html that issue could have been open for half a dozen years
simply because it's it takes a bit of effort to to dig down to i mean can you remember any
particular issues yeah there was certainly one where we were using multi-widgets and
the field can have many widgets um so you've got multiple fields and multiple widgets um
and what should be the required class
if certain fields within that multi-field are required.
Or not.
Or not, or partially.
But the point is, it's complex, right?
So you end up thinking in terms of a truth table,
but you did a massive amount on several of these issues,
a massive amount of sort of thinking it through and taking the time absolutely i think some of
my best work is actually in those tickets that came to the conclusion we shouldn't do this or
be it for it's too technically complex it's not suited to django or not worth it it's not worth
it or actually the um i think the ticket we're just talking about with this massive truth table
um eventually we came to the conclusion was that the behavior that we've got today is right um
but you've got to go through a quite a significant piece of effort to
come to that conclusion and understand the reasons why it's working like that um okay so
so what would you say to so say someone's listening to this as a prospective um contributor
and what what kind of conclusion would you draw about how to approach a ticket or you know what's
your take on that i think jango's big and complex and mature and the quality of jango is very high
so there are no real we've got this easy pickings flag right and there's hardly any tickets that are
trivial yeah um that's a five minute job all of the tickets require some time and some dedication
to take an issue and really understand what's going on here so be prepared to put a side a
reasonable amount of time to really understand the the issue and be able to explain why it needs to
happen in a certain way or way or change needs to take place particularly for the older issues
I've fallen guilty of this of here's a ticket from five years ago does anybody know what the answer
is I've fell into that trap and it's so easy to do and the honest answer is nobody knows and that's
why you need to take a bit of time to understand it and understand what's going on and I think it's
phrase that you've used a few times carlton is as soon as you've picked up an old ticket for
a little bit of time you're the world expert in that ticket because nobody knows is the answer
i think it's interesting too that you're diving into sorry to interrupt carlton that no no no
looking at the issue tracker and seeing what you what you can pick up as opposed to people who have
as carlton did initially with 1.8 like this is a real world problem i have and i need to solve it
or i did solve it and i want to apply it back to django i wonder carlton anecdotally what what do
you think the mixes of that of people sort of taking the academic challenge as opposed to
a real world fix i think we see a lot of tickets come in where it's like i've got this bug and it's
it's clearly a bug in django and here's the the two line change to django that would make my use
case work um and that's that's okay uh but then it's like okay but is this really a bug and have
this got tests and yeah it sort of throws the throw throws the body over the wall to you to
yeah yeah and it's and that's so a lot of the fellow work is triaging tickets and it's like
well that can't be that hard no it's really hard you you wake up on a monday morning you haven't
quite had your coffee and you sit there and you go uh test client doesn't read direct correctly
if x and you're like doesn't it okay and then an hour later you're like i still have no idea
what's going on um so triage is actually really hard and but a lot of tickets are i've hit this
issue and a lot of contributions kind of one-time contributions on i've hit this issue and someone
might make two or three over those over a couple of years and then you know they might come along
and make a few more contributions and whatnot so it's not that they're one-time contributors but
that's a kind of one-off you know thing and then the other approach is to to look at the open
tickets and take a bit of to pick narrow it down my component that's what david said and then you
got to focus on one or two and really get a feel for them and that's like other than fixing the
issue what's the payoff david for me why would you do this yeah for me it's that learning experience
of here's how a large project works here's how it's structured and the programs run and tickets
and what that process is and tests are really important and why tests are really important and
how to write really great documentation um is what i take from it and i just want to pause and
documentation for a second now now i've said the word yeah so um documentation that is one thing
that i've taken from my experience of django back to the real world in my in my job um and that's
the way that django structures its documentation and there's a theory called diataxis um and it
explains that documentation is a variety of things from some things that'll be useful whilst you're
doing the job versus studying so on one extreme you might have classic procedure notes here's a
process you click on this button and then you click on this that's great whilst you're doing
your work but doesn't allow you to understand the how or the what you might need some reference
documentation of what do all the fields mean or how does this whole system fit together and to
create a sustainable process you need that knowledge to be able to understand the bigger
picture not just do your your process that you've got today because you'll never be able to change
and innovate and what happens if something new comes along i don't know i just do it this way
and you need that reference material to be able to understand what what's going on and i think
that's really valuable to to organizations to to think about documentation in a much more holistic
manner than just process notes yeah so i mean um the diet axis framework is by daniele prothida
who was part of the django team and who really helped put the django docs together into that
structure it's got like the tutorials the guides the how-tos and the reference right and um i like
that i'd like you to take that back to work and if you can wield it into the office and
so we need these kind of docs yeah and they're not technical documentation um it's much more
focused on the end user but the the theory can still apply um and it's not something that i've
really thought about until i've um been working with django i guess you get taught a certain way
in this is how we do things around here and you do need that wider experience of what's going on
in the in the wider world and what's relevant and what can i apply to my own situation yeah
and so you've been um you've been massively active um doing reviews and on on other people's
prs as well and particularly docs change i remember the season of docs project you were
active on the pr there to help you know improve the contributing contributing guide yeah i think
that's somewhere where i can add some value isn't it i'm never going to be able to go and solve a
rm orm ticket but if there's a rr orm ticket um and it's got docs changes actually i can read that
and spot typos and oh that bit doesn't read quite right and it's another step to getting that pr
merge and keeping the quality high it's so hard to review your own work it's just no it's impossible
is it just impossible doesn't it um yeah and nothing like coding shines a massive light on
that so one thing one thing i do have to say here is that um as part of the um depth term changes
and change to django's governance and the change to django core we've created a um a triage and
review team which are for regular regular participants on the um on the github repo
they just they get a few extra permissions on github like to manage help manage the tickets
get cuts got this triage role but hopefully um we can help um give people a bit of recognition
for some of the effort that they put in and david was invited onto the triage and review team for
his work congratulations not not contributing at all to running a third-party package to
contributing to Django itself to being on the triage and review team in a few years time you'll
be on the technical board David and I think that's part of you know if if I can do it I'm not a
professional in this area um a bit of time and attention and you know the future is your oyster
really um I guess what might be interesting is you know if I was a lot younger that would be
interesting for all of us i think um yeah is that a way that you know younger folk can you know
get into coding and you know make that a professional career i yeah for me in my
personal circumstances it'd be useful to apply it to my own job but it would be too much of a
jump for my career to kind of jump into that as a yeah a full-time role i think if you're a junior
it's a real it's a really good way of um building up a few points on the on the profile or on the
cv that can really it can make the difference in hiring conversation why should we give you
how can you demonstrate these abilities well do you know what i'm a regular contributor to this
smaller package in the in the django ecosystem and i've got one or two prs on django itself and
you know if you can say that yeah you're top of the queue automatically yeah because it's yeah
we've talked about there's selfish reasons to contribute to open source and if if you're able
to do all those things you've proven your technical ability you've proven your ability
to communicate you've demonstrated interest it's just a absolute top of the queue um and as as you
said david it's not it's there to be done um so one of the you know carlton does these talks trying
to say to people hey like what's the next step for folks it's like you know find a way to contribute
um so it's i i wanted to ask you david about you mentioned that leap from to looking at these
issues where there aren't these easy pickings i sometimes think well maybe you know docs should
be the easy pickings because that feels kind of like an easy pickings but but that leap that you
made i think a lot of people don't um and that's something carlton's been working a lot on trying to
have a path like is there a way to have like a to do a pr that doesn't count but kind of gets you
in the process like how do we open it up so it doesn't require this extra level of commitment
that you've you know um done and now you're on the other side of it i think that's um
just just picking up your point about easy documentation tickets i think
that sounds easy but well yeah sorry i'm not explaining myself very well so i think some of
the documentation issues it might be i don't know that i fell into this trap recently but let's talk
about it it's crsf documentation needs a bit of review um it's a documentation ticket but actually
it's a security issue um rightly or wrongly i flagged that as a easy pickings recently and the
reason i did that was actually there's a patch already there that's been written by somebody
who's probably fairly knowledgeable had a couple of reviews but has then got stalled so i was
thinking maybe that's easier because it's partway there it just needs that last little polish to to
get it over the line you're not starting from rewrite the whole documentation you almost need
need like a hype man or woman to sort of tee it up and say hey this is actually relatively an easy
picking um but that requires extra work as opposed to just doing it yourself i mean well because they
have this they have the sprints at django cons um i i like that's a pretty that's as good as we're
at right carlton in terms of getting new people into contributing so yeah i think that the sprints
are the best we have at the moment is that you know at least then you've got a group of people
together and we have well pre-pandemic you have a group of people together we had um we had a great
workshop at uh django con us 2019 where we did a contributing to django workshop we had like four
tables of people everyone was helping each other and all going through the the getting started and
getting set up with the with the unit test and and then that great difficulty of finding the
ticket of browsing but you know that we can make that better we can make that flow better but
yeah sprints sprints is a good opportunity to get started i think um yeah i often think too
like how could that be extended to regular Django meetups so here in Boston there has been and
hopefully will be again a monthly meetup and um all the time I meet people who use Django
professionally who solve some bug and they say I'm like that's great would you submit a PR to
Django and well I don't know how to do that um so there if there was I don't know every quarter
or something some sort of um way to do that that would help but i guess that's my question maybe to
both of you what why do you think what what stops people contributing more is it i don't know how to
do it or part of me wonders if it's a bit like um a bus driver's part of that you know i contribute
because it's not my day job it's something different it's like you know doing sudoku or
what have you and you hear a lot of people go and doing woodworking that's something that's
not their day job i don't know what do you think yeah i think there's something in that like i've
been on the computer all day why would i spend all evening on the computer too that's that's insane
do something else i think if you if you don't have the community aspect it's a lot harder
i think once you kind of get into the community in some way then it becomes a lot easier um
um but yeah i mean i look at a computer all day it's it is the last thing i want to do
in my spare time um though to your point though in terms of like carlton asked you why do you
contribute i loved your answer about learning because i think that's that's kind of like the
highest goal that's self-sustaining around why why do anything um i mean for me being on the
board doing this podcast all these things the biggest takeaway is it's interesting and i and
i learn and so that's self-sustaining in a way that something more transactional wouldn't be
um so i love that answer that you gave yeah i think the interesting is um important um
you know i'm an accountant but i don't go out finding people's tax returns to do in the
the evening um because it's not interesting to me um i think coding is people like why do you code
it's like i code because it's like literally crafting reality out of pure thought at its best
you know sometimes yeah oh god i've got to type out these fields of this form again like surely i
shouldn't have to do this but those there's mundane bits in everything but when you're what you know
but when you're really structuring the software it's like yeah this is yes it's pure creation in
a way yeah and that's what program is about at its best and so like yeah that's why i think people
people do it i don't know i want i want to ask you david about how you find time
for it because you've got you've got a full-time job right you've got kids yeah um full-time job
two kids um which is just yeah a bigger job than the job um so it's just time when you've got
little pockets of time here and there you know i can't just say i'm gonna spend the day looking at
the computer that just doesn't happen but you know and half an hour here and an hour there in the
evenings um and those little bits of time add up if you do it regularly I find it a little bit like
exercise I've been trying to get into running a little bit this year and couched 5k 10 minutes
20 minutes a few times a week um and then suddenly after a few months you're running
5k and you can't believe you got there and it wasn't that it was a massive time commitment it
was just a little bit and regular and that really makes it the difference and i guess it's the same
for the contributions i've made over i guess we're coming up to a few years now a couple of years
probably q3 2019 i started contributing um and over that length of time it starts to build up to
something substantial that you can start to point out but to just sit there and do all of that work
in a day a week a month isn't sustainable no it wouldn't yeah wouldn't happen wouldn't happen
i like how you said pockets of time because i think i sometimes get in the trap of thinking
if i don't have two to three hours uninterrupted which i haven't for a year i can't do anything
when you know if you do find these moments it does you know it is percolating in your brain and
um in some ways it's an excuse for me anyways around stuff um but any amount of time does add
up on an issue i've started to find myself recently i don't know if it's helpful i'm not
probably get carlton's viewers is almost half commenting so a patch might be a reasonable
change but actually if i just review a little bit and i talked about the docs earlier but maybe it's
a test or a bit of a code um and just making a few comments here and there is another
step forward you don't have to review the whole thing it could be iterative yeah no i mean small
i always made the joke like some people play pokemon go i play github it was like you know
to what to answer you know but supposedly when i was starting on rest framework it would be
you know how do i get this serialized oh i can i can tell you how to do that that's it you know and
And it was just a little bit.
Instead of playing Candy Crush on the loo, I could, you know, get up.
Just do PRs on the loo, right?
Well, no.
Unfortunately, I still haven't got the editor on the phone to do the autocomplete.
And, you know, I can never remember the method names otherwise.
So a good example of this is there's a PR open for DRF to move the website, the API.
The browsable API.
To Bootstrap 5, it's currently on Bootstrap 3.
That's a piece of work that I've completed over the last year or so,
and there's still work to be done on it,
but a few templates here and there over a period of time,
and you start to get there, which something's starting to take its end shape
and is heading towards being ready for a review.
i mean yeah it's i've we've milestone that for the hopefully for the next sort of um drf feature
release to get fully reviewed and that'll be an amazing contribution but see this is the thing
david it does add up see i can think you've been on crispy forms maintaining that um drf you've
definitely contributed to i think i've seen you on channels as well and django filter and you know
various things about the jazz you're everywhere like are you building a secret super app using
all these
packages
I think
that's probably
the bit that
amuses me
the most
is I
don't really
know how
Django
works
well now
you know
you're an
expert
when you
can say
that and
mean it
but everyone
looks to you
for the
answer
that's like
the highest
level
I think
you're there
made small
contributions
here and
there but
it's not
like I've
sat down
there and
you know
built a
functioning
web app
so
you know
I'm not
an expert
in ORM
and databases
um
But there's small changes that you can make to a number of packages.
Django comes along and deprecates a feature.
That change will then need to be made to packages across the whole ecosystem.
So, for example, a year or two ago, we deprecated the URL function, moved to path and repath.
And there's dozens of packages that are still using the old function.
It just needs somebody to go and make that relatively small PR
to keep that package up to date.
And when it's quite bound in terms of its scope
and the warnings and documentation for Django are quite clear
what the change is, that's something that I can add value to.
It's not a massive task.
It just takes a little bit of time.
And I feel I can add some value there.
Yeah, and some, yeah.
One more thing I really wanted to talk to you about was your work on Django Bench, which is the benchmarking framework.
You've been doing some super things there, creating benchmarks left, right and centre.
And you've got some interactive dashboard that was showing regressions in this particular commitment.
What's going on there? What's your work on that?
yeah maybe my approach is a little bit scattered a bit here and a bit there and maybe not
completing anything but um yeah the django bench is really interesting so there's a
an existing django bench um repository that's part of the django organization and you can run that
and it will tell you whether there's a regression in a certain commit against a set of benchmarks
that already exist that's great um but you have to work quite hard to understand where the commits
are and um where the regressions fall so i looked at the problem in a couple of ways the first one
was how can we automate this so step one was to get it running in a github action and save it into
a sqlite database that worked quite well for a little while until the database got so big that
it's stopped working we hit the size limit eventually um and actually what that exercise
proved is there's a lot of noise when trying to run benchmarks in a ci system um they go up and
down all over the place and every other commit is marked as a regression so i looked at what
else i could do and victor steiner um cool commit python pokes yeah he's got a series of blog posts
on um benchmarking python we'll get a link for those in the show notes um and he's got um
i think he built pyperf i think i'm right in saying that um which is a little tool to
write some benchmarks and run them much more reliably um with cpu isolation as well
so i started to have a look at that and actually made some progress on that and
along that expedition i came along a package called asv which is asb philosophy yeah yeah
there's a few um packages which use this to benchmark their um their projects and it's a
fantastic tool um you can point it at your repository and write some benchmarks and you can
run those sort of tests to see regressions over time and at the back of it it automatically
generates a website that tracks the performance of those tests over time and then you can zoom in
and there's a big step up here what's going on there and yeah you click on it and then it takes
you to the commit on github that calls that regression that's kind of cool hey it's fantastic
um so we've built that we've migrated most of the existing django bench benchmarks over to that and
it did highlight a few regressions that were able to catch and um fix and was probably caught a
couple that are much more harder to but the point is we know that we know it's there
um i think what is next for that package is what should a django benchmark be and what
do we need to make fast so i could write a benchmark for um i think it's a function in
the utilities that takes a word and translates it into a telephone number you know i could write a
benchmark for that but that's not really going to make jango faster which are the functions that
get called the most times and how do we get the most bang for the buck because there's there's
things we can do to make jango faster but might make the code more unreadable and less maintainable
then where are you willing to make those judgments versus not?
If it's inside the core request response handler, then...
Exactly.
And do we have good benchmarks for each bit of that?
I'm not so sure.
And that's my lack of knowledge of not having a good understanding
of how Django works.
Yeah, yeah.
I was just going to say that would be a good talk.
Sorry, Carl.
If you're inclined to give a DjangoCon talk,
which you should if you're open to it um just just what you've said would be an amazing 20
minute talk i will you're not the first person to have um said that to me
we'll just chip away at it we'll just chip away at it come on we'll get you up on the on the stage
um so do you need because like it's there but do we need to be hosting the dango bench somewhere
do we need to be because you you set it up on aroca or something on your own account do we need
to be stepping in there and it wasn't that provisioning advance i was running on my raspy
pi that's the sub theme of this podcast is that raspy pies are great i do all of my development
work on my raspy pi they are yeah yeah you don't need a you know fancy whatever it is devices you
know raspy pies work work great that's a pretty deep statement though that's that's like saying
you know jimmy hendrix could make any guitar play well i mean it's true but yeah i like the
statement but you know i'm still struggling with windows like i've dived more into windows recently
and i'm just like really frustrating so but i suppose once you you know once you go pure linux
it's it's you're there it doesn't change around as much as mac or windows would so yeah i think
um sorry jumping out about a little bit but um just just on the raspberry pi thing i think
that's part of the journey of being a beginner it's right so you want to learn django but you
need to learn pip and virtual and then what sort of this other stuff and oh git and
how do i fix my git history that i've completely broken and um there's there's so many problems
that beginners can face
and just that can take a long time to overcome.
I think that's my next talk, by the way.
Like I have sketched it out.
Like just to say like here's the pathway
that we all find our way through one way or another,
but to just say this is what it takes
to do a simple Django site
and there's quite a lot of things.
And that's actually the larger goal
of I have this LearnDjango site,
which is a long, long-term project for me
of trying to have some sort of
syllabus and hold someone's hand through that instead of Googling around where it can feel
like endless deep holes of Git and then SQL and then JavaScript. But just to say, here's the path,
broadly speaking, I think that would add value. Also, if you're a Django developer, someone will
come to you and say, how do I learn Django? And you don't always have a good answer because you
haven't thought about it as a beginner and things have changed so um anyways that chips away at me
doing that doing that talk i say so there you are we've got a talk for each of you lined up
i'm just going to end the podcast quickly before you come up with one for me as well
so just jumping back to asv um i think the bits that take that project forward are looking at
those benchmarks and do we have the right coverage of the core pieces of django are we covering that
and are there any regressions that we've missed in years gone by and then also how do we make that
project sustainable i can run it on my raspberry pi at home and that's okay but but we could equally
we've got servers available we can write on one of those and it just i think an email to django
developers would you know there's been a lot of interest in your pr there on jango bench and an
email to jango developers saying hey these are the to-dos here i think that would be a great
discussion to have yeah i think we've tried it in ci like i said and that that was noisy but um
it needs some like i say a server that doesn't have any noise on it to get those reliable
benchmarks to to have those run regularly and then you could have it run with each pr or
here's a pr that we're you know a little bit concerned about does it impact performance and
ask the automation system to benchmark that specific pr for you yeah i mean we could
certainly run it on the main branch daily and then for specific commits or prs would be
you know i mean the issue you could we could run it on every commit to every pr but that's a lot
trees so we try you know these heavy things we try to limit the number of ci runs we have such
a big matrix so yeah but to do it on main once a day is not a problem seems like a nice feature
for button.dev for your own deployments carlton no that's not quite in the ballpark but you know
we'll see we'll see anyway right so david brilliant thank you i think we're at time is there anything
else you wanted to um you wanted to flag out or talk about while you were here i think we've
covered everything that I was thinking of I just want to say yeah thank you to you both for having
me on um yeah it's been a great chat um actually I've got one question for for Carlton we kind of
touched on a little bit earlier is how do you as fellows manage the uncertainty that comes with
that that role so you know I wake up in the morning I know broadly what's going to happen
this week next week um but with a fellow role you know wake up and you know how do you know where to
start well that's a good question um it's like a firehouse it's on it's it's it's beautifully
unending so into that extent it is predictable every day you'll wake up you'll go to the dashboard
there'll be three unreviewed tickets there'll be there'll be a release blocker and there'll be an
email to security at jangaproject.com with you know something going on that's like um
and you just sort of have to breathe in take it slowly and you can't it's it's unending there is
no get it done there is no you know it's how are we going at the moment yeah we're doing okay at
the moment oh there's a bit there's a few queues up a bit more at the moment okay so we need to
try and prioritize that but there's these release blockers and you know they tell pretty oh there's
a security release that takes priority oh there's you know the the jenkins servers needs rebuilding
because something or that so it's you just take it on but but not only that it's in public right
you know if when i do something at work you have a chat with your manager and yeah that's between
you and them in this role that you have you know anybody in the world can come along and comment
anything on anything um and that's just incredible that you managed to manage that people are
generally nice and that's good and um maris and i work hard to support each other when people aren't
nice um and we're very conscious of what the other one is doing and if we need help we reach out to
each other to ask for it um generally speaking the fact that it's in public is totally fine um
and it's very rare that we have what i would call trolling um sometimes we get someone who's a
little bit cross um sometimes there are because you know it's a multi-language community sometimes
there's a um slight lack of communication that a tone doesn't isn't quite understood or and that
can be a lack of fluency or whatever it's like and it's very good but you know um monitoring
itself the community the community is fantastic and fortunately with jango's um old and mature
enough and unexciting enough not to draw the uh worst elements of the tech community towards it
um that's a big thing you know if you if you're in the exciting new hotness you get a lot more
flack than we get in jango but we've you know but jango's worked long and hard to build a community
and an environment like that so you know how much is chicken and how much is egg it's hard to say
yeah i would echo that it's it's a very nice community and it's a very small community so
on occasions when there's a bad actor or um there's a chance to confirm you know am i taking
this the wrong way or is is it really just someone like that but it it sorts itself out quite well
in practice, even at the organizational level, because there's still some of that. And
it's very rare. And when it happens, it's handled pretty well, I think. But I love your question
about how do you bite off an elephant? Because Carlton is very zen about this. I have the same
thing. I get overwhelmed with all the things to do as opposed to discrete tasks. You just need to
have more children. You just need to have more children. That's the solution. So the answer to
seeking control is just totally give up on control yeah there is no spoon um right anyway
you're on you're on twitter is that the best way or or i guess on the on the django track
um if anyone wants to reach out or help with something what's the best way for someone to do
that yeah i guess um twitter um smith dc1 okay i better check that it's yes david underscore smith
86 right yeah no smith dc1 is on oh that's yeah yeah yeah okay yeah well david it's very nice to
um to meet you you know that's django is such a large community that um i i didn't i'd seen some
of your prs but i'd never had a chance to meet you so it's been very nice to hear your story
that's fab and thank you for having me on no thanks for coming on and thanks thanks for all
your contributions to the you know django itself and the wider ecosystem and of course crispy
forms which you still
want for thank you very
much okay well that's it
folks thanks for joining
us with Jack this is
Django chat with chat
Django on Twitter join us
next time bye