← Back to Show Notes

Transcript: Contributing to Django - David Smith (Ep97 Replay)

Carlton Gibson

Hi, welcome to another episode of Django Chat, Fortnightly Podcast on the Django web framework.

I'm Carlton Gibbs, joined as ever by Will Vinson.

Hello Will.

Will Vincent

Hi, Carlton.

Hello, Will.

Carlton Gibson

And today we've got with us David Smith, who's um maintainer of Crispy Forms, contributor to Django and all sorts of other packages in the ecosystem.

Hello, David.

Hi, Carlton.

David Smith

Hi Will.

Carlton Gibson

Hello, thanks for coming on.

Thanks for coming on.

So I want to I want 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 the 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 onto how you got into contributing.

David Smith

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?

Carlton Gibson

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.

David Smith

Absolutely.

I I I think that's where the industry's 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,

Carlton Gibson

they've got the what's this thing that this Lambda thing they're doing?

David Smith

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

Will Vincent

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, ooh, 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 um across the business world.

David Smith

Absolutely, and I think there's an evolution of data teams becoming um part of that kind of corporate ecosystem.

And I think accountants have got a weird fit of a lot of what we do is um data and analysis and looking at the future, and therefore you need to look at the the data on one hand to you know what does it mean, what can I inform the business, and 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 industri

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

Carlton Gibson

And Python's the glue, right?

Or is it this I guess this is Python is the glue?

David Smith

I I I I think so.

Um you can get so far with SQL, but typically data's not in as good a format, or you know, you might have text files or Excel files or you know, pieces of paper people have written in, and yeah, you need that glue all to be able to mash everything together to get that understanding and insight.

Will Vincent

But so Carlton's gonna do most of the questions uh today, so I'll just put 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, is very similar to programming, and then it when you first learn it, it seems very binary and and then as you progress, I 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.

David Smith

I think there's a different spectrum.

You can get real technical accountants, and you know, 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 gonna 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.

Carlton Gibson

Yeah, I mean that that's gotta be fancy graphics with no real numbers on and stuff like that, you know.

Just up and to the right, yeah.

David Smith

Yeah, lots of power lots of PowerPoint.

Carlton Gibson

Okay.

Um, so I've we kind of jumped right in because it's really interesting because that that the um it from inside the Python world, it really looks as if Python's gaining massive ground share out you know in the in the quote unquote real world, right?

Um but so you're an accountant and do you you're using Python at work really, or is it still VBA and it's

David Smith

still VBA?

Um, I think there's still some reluctance to be able to, you know, working in financial services, you know, rules and regulations, it's not something that you know teams are you know 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 is a is a big risk for an organization.

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 you know end users, um, end user computing to be able to really use the power that that Python has, really.

Carlton Gibson

Okay.

And so how did you what is your path into Python then?

What because

David Smith

yeah, so I guess I've always had an interesting computing and websites, helped run a website maybe early 2000s, um, back when it was here's an FTP server, upload some files and

account a bit.

David Smith

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 their charity for a while, so I built them a yeah, a single page application and um use Bootstrap for the styling of that.

At the same time trying to think about Python and trying to learn that sort of potential benefits at work.

And I guess at that point the the two kind of meet, right?

So you've got web and you've got Python and there's Django.

Carlton Gibson

Right, okay,

David Smith

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 Crispy Forms could do 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 there's Python, but that's not where it's

mostly the templates.

Yeah, absolutely.

David Smith

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, you know, 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 would 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.

Carlton Gibson

Yeah, and you've been an absolute you know, stalwart there.

I mean, you've just come in and now you're yeah, 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 a little bit?

David Smith

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 it's so different 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 we're getting there with here's uh an opinionated tailstrip 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 do that in a slightly easier way than writing lots of classes into templates yourself.

Carlton Gibson

Yeah, because I mean the traditionally with Crispy Forms, the way you would cut 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-template pack.

It's not a subclass where 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.

David Smith

And then Bootstrap 5 is kind of 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 keep up to date with the the latest changes, being it 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 um keep up to date to keep your package current.

Carlton Gibson

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 two template packs, which are probably time to say goodbye to those, and bootstrap three probably time to say goodbye to those, not necessarily delete them, but move them into a separate package, and then I don't know.

What have you got thoughts in that direction?

David Smith

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 2?

Carlton Gibson

Yeah, that's a good question, isn't it?

Anyone use answers to on the postcard, folks.

David Smith

And I guess I don't know what changes are backwards compatible, or you know, are we making a decision that's too strong?

I I don't know, I can have my have my view, but I guess we don't know until we we put it out there and somebody says, Oh, I'm I'm still using that.

Carlton Gibson

Oh, you broke me.

You broke me.

We'll pinned to the old version.

Yeah, we don't.

Will Vincent

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

Carlton Gibson

I think for for for crispy forms, I think we could say take the boot chat too, but the inbuilt put package um template packs, and we could say these are now all external from this version because I think that the 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, or if they're gonna upgrade, they can just add an extra dependency and maybe change a line in the settings file.

And if there's a Wii breakage, well, sorry, but it it this this isn't a big package, it's maintained by David.

I'm still helping out from where where I can, and there's one or two other people who you know pop in from time to time.

There's not capacity there to maintain some sort of API stability policy of the likes of Django's.

You know, we've got a crispy forms long-term.

No, we haven't got a crispy terms long-term support.

If you 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, look, can we 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 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 um a nice sign Heinick put on that that open source is is like um it could have been Brett Gan.

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 obligation beyond that.

David Smith

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?

Carlton Gibson

No, no, there's not.

Will Vincent

Well, Carlton, is there a case when you wouldn't pin it when you just straight nuke it just to the larger question that David was bringing up?

Carlton Gibson

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 Mateus uh had to say, look, this is now one maintained.

And sorry if it's unmained 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 bid, tree bid, okay, yeah.

Um and he's he's he's just simply not in a position to and he was like, I can't I 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 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 no again, no company comes forward with any money to sponsor it.

So that point, let it die.

Will Vincent

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 it just need need to hear that you know, yeah, it's you know, do what you can, but if it really matters, someone will raise their hand or they won't.

David Smith

Yeah, and it's not just somebody to do it, it's somebody else to be able to review and merge and do the maintenance of it as well and you know, issue a new release and all of that other work that goes along with maintaining a package, it's it's much more than just opening a PR with a one-line change that that fits your needs, right?

Yeah, yeah.

Yeah, not entirely.

Will Vincent

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 Django repo, which I started, I was pretty much, you know, that's not even used, that's just a resource, but it 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 it's sort of an equivalent to you coming in on Crispy Forms, which I believe um uh Daniel and Audrey started it, right?

Or they were initially worked on it, right?

Because we had him on to talk about that, and then you you you kind of took it over, which he didn't really realize.

And you know, there's this recycling of uh energy in a way.

Carlton Gibson

Yeah, I mean, uh there was um Crispy Forms was maintained for years by um Miguel Araújo, 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 I'm depending on this, I'm using this in my my real life.

So, you know, jumped in and I I got a release out for um 1.8 and then um this the this coder came along.

Uh the Dimitri's name is in real life, met him years later at JangCon, but he was just stranger, 666, and he just made about you know 100 um PRs to fix various issues and bring it up to date, and it's like, oh thanks, really you know, helping.

I didn't never knew who this guy was, and then he was like, Hey, I'm so uh nice to meet you.

That was so that was really nice many years later.

But so I was on I was maintaining crispy forms for I don't know two, three, four years, and then um 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 Crispy Forms was just I just needed help.

And so when I gave my I think it must have been at DjangoCon Europe in 2019, um, the feeding the pony talk.

I'm not sure what it was.

David Smith

I think that's right.

Carlton Gibson

Yeah, because I think that's the one I think I called out for um Crispy Forms.

I was like, 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.

David Smith

And I think that's a good way for new people to get involved with uh the Django ecosystem.

Is it 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 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 there's 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.

Um 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 the wood through the tree somewhat.

Yeah.

Carlton Gibson

But you but have been digging into Django, right?

David Smith

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

Carlton Gibson

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'm making sort of half making it 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 the 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 it.

I mean, you can you remember any particular issues?

David Smith

Yeah, there was certainly one where we were using multi-widgets, and uh the field can have many widgets.

Um so you've got multiple fields and multiple widgets, um and what should be the um required class if certain fields within that multi field are required, um

Carlton Gibson

or not, or

David Smith

or or not, or or partially.

Yeah.

Carlton Gibson

Um but the point is, yeah, I mean the point is it's complex, right?

And you so you end up thinking like in terms of a truth table, and you end up, but you you would do you did a massive amount on on several of these issues, a massive amount of sort of thinking it through and taking the time.

David Smith

Absolutely, and 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

Carlton Gibson

not worth it.

David Smith

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 it the behaviour 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.

Carlton Gibson

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 what's your take on that?

David Smith

I think Django's big and complex and mature, and the the quality of Django 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, you know, 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 aside a reasonable amount of time to really understand the issue and be able to explain why it needs to happen in a certain way or or why or change um needs to take place.

Um, particularly for the older issues.

I I I've fallen guilty of this of here's a ticket from five years ago.

Does anybody know what the answer is?

Um I've fell into that trap and it's so easy to do.

And the 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 I think it's a 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 nobody knows is the answer.

Will Vincent

I think it's interesting too that you're diving into sorry to interrupt, Carlton, that no, 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?

Carlton Gibson

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 has this got tests?

And yeah,

Will Vincent

it's already throws the throw throws the body over the wall to you to

Carlton Gibson

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 got 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?

Right 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 uh but a lot of tickets are I've hit this issue, and a lot of contributions are kind of one-time contributions on I've hit this issue, and someone might make two or three over the of 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 to look at the open tickets and to take a bit of pick, narrow it down my component, that's what David said, and then you've 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?

David Smith

For me, it's 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 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 on documentation for a second now now that now I said the words.

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 a theory called Dietaxis, um, and it explains that documentation is a variety of things from some things that will be useful whilst you're doing the job versus studying.

Um so on one extreme you might have um 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 the what.

You might need some reference documentation of um 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 yeah, what happens if something new comes along?

I don't know, I just do it this way.

Um, and you need that reference material to be able to understand what what's going on.

Um, and I think that's really valuable to organisations to to think about documentation in a much more holistic manner than just process notes.

Carlton Gibson

Yeah, so I mean um the dietis framework there is by uh Daniel Proteta, 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 like that you take that back to work and if you can wield it into the office and say we need these kind of docs.

David Smith

Yeah, and that and that 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, and 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.

Carlton Gibson

Yeah, and so you've been um you've been massively active um doing reviews and on on other people's PRs as well, in particular docs change.

I remember the season of docs project you were um active on the PR there to help you know improve the contributing contributing guide.

David Smith

Yeah, I think that's somewhere where I can add some value isn't you I'm never going to be able to go and solve a RM ORM ticket but if there's a R ORM ticket um and it's got docs changes actually I can 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 the quality high it's so hard to review your own work it's just

no it's impossible it

David Smith

's just impossible isn't it um and nothing like coding shines a massive light on that.

Carlton Gibson

So one thing one thing I do have to say here is that um as part of the um depth em changes and the change to Django's governance and the change to Django core we've created a um a 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 GitHub's 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 for his work not not can 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 Smith

David and I think that's part of you know if 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 the futures Eurosta 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 you know is that a way that you know younger folk can you know get into coding and you know make that a professional career?

I you know 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 a jump for my career to kind of jump into that as a yeah a full-time role.

Carlton Gibson

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 C V that can really it can make the difference in a hiring conversation why should we give you the how can you demonstrate you you these abilities well do you know what I'm a regular contributor to this smaller package in the in the Django's ecosystem and I've got one or two PRs on Django itself and you know if you can say that.

Will Vincent

Yeah you're top of the queue automatically yeah because it's yeah as 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 cue um and as as you said David it's not it's there to be done.

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.

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 like how do we open it up so it doesn't require this extra level of commitment that you've you know devel 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 um explaining myself very well so I think some of the documentation issues it might be I don't know the the I fell into this trap recently but let's talk about it.

David Smith

CR 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 an 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 part way there it just needs that last little polish to to get it over the line you're not starting from rewrite the whole documentation.

Will Vincent

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.

I I like that's a pretty that's as good as we're we're at right Carlton in terms of getting new people into contributing?

Carlton Gibson

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 DjangoCon US 2019 where we did a contributing to Django workshop we had like four tables of people and everyone was helping each other and all going through the the getting started and getting set up with the it with the unit tests and all 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 a sprints sprints is a good opportunity to get started I think um

Will Vincent

yeah I'll I often think to

o like how could that be extended to regular Django meetups so here in Boston there has been and hopefully will be again a 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 then well I don't know how to do that.

So there if there was I don't know every quarter or something some sort of um way to do that that would help

David Smith

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 it's something different it's like you know doing Saduca

or what have you and yeah you hear a lot of people going doing woodworking that's that's something that's not their day job or I don't know what do you think?

Carlton Gibson

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 do something else.

Will Vincent

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

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.

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?

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 and I learn and so that's self-sustaining in a way that something more transactional wouldn't be.

So I I love that answer that you gave.

David Smith

Yeah I think the interest thing is um important um you know I'm an accountant but I don't go out finding people's text returns to do in the the evening um yeah because it's not interesting to me.

Carlton Gibson

I think code coding it expenses people are 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 but you know but when you're really structuring this off where it's like yeah this is

pure creation in a way yeah

Carlton Gibson

and that's what programming's about at its best and so like yeah that's why I think people people do it.

I 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

David Smith

yeah um full time job two kids um which is just yeah a bigger job than the 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 the computer that just doesn't happen but you

know and half an hour here and an hour there in the 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 mean I've been trying to get into running a little bit this year and couched 5k, 10 minutes, 20 minutes, a few times a a week.

Um, and then suddenly after a few months, you 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 regular, and that really makes the the the difference.

And I guess it's the same for the contributions that 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 at.

But to just sit there and do all of that work in a day, a week, a month isn't sustainable.

Carlton Gibson

No, it wouldn't, yeah, it wouldn't happen.

Wouldn't happen.

Will Vincent

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

David Smith

I've started to find myself recently, I don't know if it's help helpful or not, I'll 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 you 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.

Carlton Gibson

Yeah, no, I mean small like 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, supposing when I was starting on Rest Framework, it would be, you know, how do I get the serialized?

Oh, I can I can tell you how to do that.

That's a you know, and that it was just a a little bit, instead of playing Candy Crush on the loo, I could answer you know, GitHub issue.

Will Vincent

Just do PRs on the loo, right?

Carlton Gibson

Well, no, I did unfortunately I still haven't got the editor on the phone to do the autocomplete, and I can you know I can never remember the method names otherwise and parameters.

David Smith

So so a good example of this is there's a PR open for DRF to move the um the website, the API.

Carlton Gibson

Um browsable API.

David Smith

There we go.

Um to Bootstrap 5.

It's currently on Bootstrap 3.

Um that's a piece of work that I've completed over the last year or so.

Um, and there's still work to be done on it, but a few templates here and there over a you know 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.

Carlton Gibson

And I mean, yeah, it's uh I've we've milestone that for the hopefully for the next sort of um DRF speecher release to get fully reviewed, and that that would be an amazing contribution.

But see, this is the thing, David, it does add up.

See, I can think you've been on uh 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 around the the jazz, you're everywhere.

Like, are you building a secret super app using all these packages?

David Smith

I think that's probably the the bit that amuses me the most is I don't really know how Django works.

Will Vincent

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.

David Smith

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 make be made to packages across the whole ecosystem.

So, for example, a year or two ago we deprecated the um URL um function and moved to path and RE path, um, 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 what what the change is, that's something that I can add value to.

Um it's not a massive task, it just takes a a little bit of time.

It's um, and I feel I can add some value there.

Carlton Gibson

Yeah, and and and and some, yeah.

So there's one more thing I really wanted to talk to you about was um your work on Django Bench, which is the the benchmarking framework.

You've got this, you've been doing some super things there, creating benchmarks left, right, and centre, and you've got some some interactive dashboard that was showing regressions in you know this particular commitment.

What's going on there?

What do you what's your work on that?

David Smith

Yeah, um maybe my approach is a little bit scattered, a bit here and a bit there, and maybe not completing anything, but um yeah, the the Django bench is really interesting.

So there's a an existing Django Bench um repository that's part of the 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 an SQLite database.

That worked quite well for a little while until the database got so big that it 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 in Victor Steiner.

Um core commit.

David Smith

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 a 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 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 ASV Velocity.

Yeah, yeah, and 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 set 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.

There's a big set port 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.

Carlton Gibson

Yeah, that's kind of cool.

David Smith

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 we're able to catch and um fix, and there's probably quite 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?

David Smith

So I could write a benchmark for um, I think there's a function in the utilities that takes a word and translates it into a telephone number.

Yeah, I could write a benchmark for that, but that's not really gonna make you know Django faster.

Which are the the functions that get called the most times and how do we get the most bang for the book?

Because there's there's things we can do to make Django faster, but may make the code more unreadable and less maintainable.

And where are you willing to make those judgments versus versus not an

Carlton Gibson

if it's inside the core request response handler then?

David Smith

Exactly.

Um and do we have good benchmarks for each bit of that?

I'm not so sure.

Um, and that's my lack of knowledge of not having an understanding of how Django works.

Yeah, yeah.

Will Vincent

I was just gonna say that would be a cool talk.

Sorry, Carl.

If you if you're inclined to to give a Django Con talk, which you should if you're open to it, um just just what you've said would be an amazing 20-minute talk.

David Smith

Say, Well, you're not the first person to have um said that to me.

Will Vincent

We'll just chip away at it.

We'll just chip away at it.

Carlton Gibson

Come on, we'll get we'll get you up on the on the stage.

Um so do you need because the like it's there, but do we need to be hosting the the Dango bench somewhere?

Do we need to be ho because you you set it up on a roco or something on your own account?

Do we need to be stepping in there and it wasn't that provisioning advance?

David Smith

I was running it on my Raspberry Pi.

Right, brilliant.

Carlton Gibson

That's the sub theme of this podcast is that Raspberry Pis are great.

David Smith

I do all of my development work on my Raspberry Pi.

Yeah, yeah, you don't need a you know fancy whatever it is device.

It's yeah.

Raspberry Pis work work great.

Will Vincent

That's a pretty deep statement though.

That's that's like saying, you know, Jimi Hendrix could make any guitar play well.

I mean it's true, but yeah.

I like the statement, but you know, I'm 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 you're there.

It doesn't change around as much as Mac or Windows would.

David Smith

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 virtuenv and 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 to overcome.

Will Vincent

I think that's my next talk, by the way.

Like I've I have sketched it out.

Like what just 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.

Um, and that's actually the larger goal of I have this Learn Django site, which I'm 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 you know JavaScript.

And um, but just to say, like, you know, here's the here's the path, broadly speaking.

Um, I think that would add value.

Also to, you know, someone who's someone approach, you know, if you're 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 a what chips away at me doing that uh doing that talk.

Carlton Gibson

So so there you are, we've got a talk for each of you lined up.

You know, I'm just gonna end the podcast quickly before you come up with one for me as well.

David Smith

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

Carlton Gibson

But but we could equally we've got servers available, we can run it on one of those, and it just I think an email to Django developers would, you know, like uh there's been a lot of interest in your PR there on Django bench and an email to Django developers saying, hey, these are the to-dos here.

I think that would be a great discussion to have.

David Smith

Yeah, I think we've tried it in CI, like I said, and that that was noisy, but um it needs some, like you 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 yeah, here's a PR that we're you know a little bit concerned about.

Does it impact performance and ask the automation system to to benchmark that specific PR for you?

Carlton Gibson

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, to the issue, you could we could run it on every commit to every PR, but that's a lot of trees.

So we try, you know, the these heavy things we try to limit the number of CI runs.

We have such a big matrix.

Yeah, but to do it on main once a day is not a problem.

Will Vincent

Seems like a nice feature for button.dev for your own deployments, Carlton.

Carlton Gibson

No, that's not quite in the ballpark, but you know, we'll see.

We'll see.

Carlton Gibson

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?

David Smith

I think we've covered everything that I I was thinking of.

I just want to say, you know, thank you to you both for having me on.

Um, yeah, it's been a great chat.

Um actually I've got I've got one question for for Carlton.

We kind of touched on it a little bit earlier.

Is how do you as fellows manage the uncertainty that comes with that that role?

So yeah, I wake up in the morning and I know broadly what's going to happen this week, next week, um, but with a fellow role, it's you know wake up and you know how how how do you know where to start?

Carlton Gibson

Well, yeah, it's a good question.

Um it's like a fire host, it's on, it's it's it's beautifully unending.

So in to 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 jangroject.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 uh 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 the review 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 data pretty.

Oh, there's a security release that takes priority.

Oh, there's you know the the Jenkins servers needs rebuilding because something or other that so this it's you just take it on.

David Smith

But 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 you know, that's bit 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 manage to manage that.

Carlton Gibson

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 at you know um monitoring itself.

The community the the community is fantastic, and fortunately we're Django'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 Django.

But with a you know, but Django'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.

Will Vincent

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 there's a chance to 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 um in practice, um, even at the organizational level, because there's still some of that, and um, it's very rare.

And when it happens, um, it's handled pretty well, I think.

But I I but I love your question about how do you tack how do you bite off an elephant?

Because Carlton is very zen about this.

I I have the same thing.

I get overwhelmed with all the things to do as opposed to discreet.

Carlton Gibson

You just need to have more children.

You just need to have more children.

That's the solution.

Will Vincent

So the answer to seeking control is just totally give up on control.

Carlton Gibson

Yeah.

There is no spoon.

Um anyway, let's start up with that zen right.

Will Vincent

You're on you're on Twitter, is that the best way?

Or or I guess on the on the the Django track.

Um, if anyone wants to reach out or or help with something, what what's the best way for someone to do that?

David Smith

Yeah, I guess um Twitter, um Smith DC1.

Okay.

Will Vincent

It's yes, David underscore Smith86, right?

Carlton Gibson

Yeah, no, Smith DC1 is on GitHub.

That's good.

Will Vincent

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

David Smith

That's fab, and thank you for having me on.

Carlton Gibson

Thanks for coming on, and thanks thanks for all your cute um contributions to the you know Django itself and the wider ecosystem and of course crispy forms, which you're still hopeful.

Thank you very much.

Okay.

Carlton Gibson

Well, that that's it, folks.

Thanks for joining us with um this is Django chat with Chat Django on Twitter.

Join us next time.

Bye.