Django Chat

Learning to Love Django Tests - Lacey Williams Henschel

Episode Summary

Lacey is a former DjangoCon US conference chair, prolific speaker, teacher, and works as a consultant at RevSys.

Episode Notes

SHAMELESS PLUGS

Episode Transcription

Will Vincent  0:06  

Hello and welcome to an episode of Django Chat. This week we're joined by Lacey Williams Henschel to talk about all things Django. I'm Will Vincent joined as always by Carlton Gibson. Hi, Carlton. Hello. Hi, Will and Lacey. Welcome to the show, Lacey.

 

Lacey Williams Henschel  0:18  

Hi, thanks for having me.

 

Will Vincent  0:20  

We're thrilled to have you on. So I think I first met you at Django con because you were running it. You've run it multiple times. Right. As a conference chair, maybe we could talk about jump in and talk about that. How did you get roped into being a conference chair at Django con?

 

Lacey Williams Henschel  0:35  

Yeah, it's funny. I was kind of reliving this story recently on Twitter, and thinking about how fast it sort of all happened. So my very first Django con that I attended was in 2012. And then in 2015, I started organizing it but it all started because I was organizing a Django girls workshop in Portland. And then I went to pi con that year which was in Montreal and While I was there, Jeff Triplett, who was that years Django con chair was asking the Django girls booth if they would organize a workshop to happen at Django con that year. And they said that, you know, they could not do that. But maybe maybe someone else could, and maybe that person could be me. They knew that I worked for the University of Texas, but they didn't know that I actually lived in Oregon. So they thought they were asking an Austin local to do this. But because I don't really have it in me to say no, I said, Sure. That sounds like fun. And then me organizing the Django girls workshop as part of Django con wound up, me becoming part of the organizing team for the whole conference. So things just kind of grew from there. I went from being the what the diversity chair and the financial aid chair in 2015 to being the co chair in 2016, and then the chair in 2017. And then the past Two years last year and this year, I've been just sort of an advisor for for the conference just helping the other people who are running it, run it because I've got a few years of experience doing it now. Okay.

 

Will Vincent  2:10  

And it is something that I don't think people usually do multiple years of being conference chair because it is a ton of work.

 

Lacey Williams Henschel  2:16  

Yeah, I know pi con does that every them formal every two year rotation,

 

Will Vincent  2:22  

right, Ernest is that Yeah,

 

Lacey Williams Henschel  2:24  

yeah. And I can't remember who the 2020 pi con chairs will be or chair will be. Django con has never had that kind of a formal arrangement. So it's it's had different chairs in different years or different combinations of terrorism. Different years, Jeff Triplett and I kind of switched cheering and co chairing for two years he chaired and I co chaired and then I chaired and he co chaired. So yeah, but i i think it's it's a lot of responsibility, and it's a lot of work to wrangle everything that needs to be done and to keep track of all the different things that Have to happen to make the conference happen. So I think that a lot of people don't really want to do it for more than a year. And I think two years is a really good max to be responsible for all of that. Otherwise, I think your energy for that kind of thing gets sapped like I think that for Django con Europe, most of the team turns over every year.

 

Carlton Gibson  3:19  

Yeah, definitely. And there's Yeah, it's like, who's gonna be the team for this year? Right. There you are. And there's some people that hang around that's like in the role that you and Jeff might play, though experienced, and they, they know how it works. But yeah, yes. fresh blood each year. So

 

Lacey Williams Henschel  3:34  

yeah, I think that Django con is Django con us is an interesting kind of hybrid of the way that you know, Django con Europe works, which is like you You sort of change over everything every year almost. And then pi con where I think it's sort of more formal like two year terms where we just sort of we lose a few organizers every year because they go on and do other things. Or they get burned out or or people have different reasons and but then we also gain a few people every year. So it just sort of feels like this wonderful revolving door of community members. You know, we're always finding new people and getting them involved in the conference, which is really nice, because then you get that fresh energy, those fresh ideas, that people who are really excited, but then you also have this contingent of people who've been doing this for a minute and who understand how things need to work who have that historical knowledge.

 

Carlton Gibson  4:28  

Yeah, I mean, one one area that I've seen that that's really important is with like the Code of Conduct enforcement, because it's actually really difficult to know how to do that properly. And so the experience of those people that have over the years learned what the code of conduct rules are and how to enforce them and and how and what preparation needs to be. I've seen that Django con Europe it's it's really vital. I don't think a new fresh team could could pick that up at the quality that it's done. Yeah, it's without the input.

 

Lacey Williams Henschel  4:58  

Absolutely. And it's it Something that's really vital to having a successful conference is having an effective code of conduct. And effective means effective enforcement of that code of conduct. And a lot of things are really having an effective Code of Conduct team that's prepared to respond to things that happen is is really important. And for new organizers, it's a really scary thing to be part of. So you, I think that Django con us is really lucky to have people who respond to code of conduct incidents, who have done it before and who have had some training, and then also to have these these new people coming in who sort of get educated about this and can make use of that experience in future year so that we're always expanding the group of people who are familiar with that, even if it's not, I think it's a good position to be in to have more people who know how a code of conduct response team should work, then are like actually responding to code of conduct incidents at the conference, you know, yeah, if that makes stance,

 

Carlton Gibson  6:01  

you know, entirely entirely India and as well, it's about setting the what's the right setting the mood setting the environment at the conference. So when you first first arrive, that the Code of Conduct is very visible, and that's it through experience, I guess that it's known that, hey, if we make this announcement at the beginning, and we make it a bit lunchtime, and we make it in the afternoon, and we let people know, then actually the the, the incident, the number of incidences will will be lower.

 

Lacey Williams Henschel  6:29  

Yeah. And yeah, I think I think definitely, I think that making your code of conduct front and center is really important to having a successful conference, because what you talk about how important it is to set the tone to set the expectations for for everyone's behavior. And I'm really happy that over the last several years, there's just more and more emphasis on the code of conduct, especially as a serious thing. I've been to conferences outside of the Python Django community, where they mentioned the Code of Conduct but kind of off Hand like but we don't have to worry about that everything's going to be fine. And that's, that's not setting an expectation for me as a conference attendee that if something does happen, it will be taken seriously, right? That's setting me up to feel like well, if I if I do encounter something, I don't know what to do, I don't know if this group is is trustworthy will handle this in the way that I would need them to. So that's, that's an uncomfortable place to be in as an attendee to feel like you don't really trust something would be handled well. So by approaching it seriously, which doesn't mean that you can't have a sense of humor about things too. But I think more important, though, it's it's just codes of conduct. You're just kind of hard to talk about. Yeah.

 

Will Vincent  7:50  

Well, that sort of thing. Where if you, you only need it when something goes wrong. So if it doesn't come up, right, so it's like a defensive thing, right? Like you don't usually talk about It's like insurance in a way. But it really is one of these things where you have to stay on top of it and make it important because if you don't, then things will crop up. And and you know, Django in particular, is a wonderfully supportive community, in part because everyone takes the Code of Conduct so seriously, and because of that, there's, you know, there aren't the same number of incidents that can happen at your standard tech conference.

 

Lacey Williams Henschel  8:23  

Right? And it's, it's never, I've been on a code of conduct response team before, that's part of their responsibility, as the chair of the conferences to be involved in that, and it's, it's never fun, it's always difficult. It's, it's, there's a lot of concern and attention that goes into how we're responding to these these issues. And it does get very, very complicated to do which just highlights how important it is, you know, and how important it is to do it well, so I'm really happy that I'm seeing more people who have other kind of more professional training Code of Conduct responds who are now giving that training. Like, I know that there are some people who will go around and offer training to conference organizers about how to respond to codes of conduct. And that was not something whenever I was chairing that we, that we did, and I'm wishing that we had, and what something that I have as a goal for myself is to participate in one of those trainings. But I know that we have a couple of people on the Django con US team that have done trainings through other organizations, which makes me feel really good about those conference organizers being on our team, but yeah, I'm happy to see more attention to like, I'm happy to see more attention being paid to to not just having like written materials that tell conference organizers what to do, but actually encouraging organizers to hire people to really walk them through in a detailed way how they should respond to this and I think that that effort is going really well. And I'm I'm excited to see more conferences be part of that

 

Carlton Gibson  9:55  

super and one thing that that won't solve the puzzle for me, I guess you It ties into the work that you've done as well is one of the benefits of having a strong Code of Conduct is it leads into a more diverse community in Django really does have a wide, more diverse community than your average tech conference. And you know, for me, do you think that the code, the strong Code of Conduct enables that is part of enabling?

 

Lacey Williams Henschel  10:21  

I think so. I mean, I know that I feel more comfortable at Python and Django conferences than I feel at other conferences, because I know that there's a strong code of conduct and I trust the people who are responding to code of conduct incidents. And as an organizer to I've seen behind the curtain a little bit. So I know, you know how incident response can go. But I also think that kind of making it clear what the expectations are, we, we do get, like, it's not necessarily that we had a particularly good year if we don't get very many Code of Conduct reports being made, or we had a bad Hear if we had several of them made right like, Well, sometimes we might receive several Code of Conduct reports in a year. But most of them were about the language that people were using, you know, and that's, that's an excellent opportunity to educate people on how to participate in, you know, conversations with people, without making jokes or comments that are exclusionary, and some sometimes people have, it's, maybe they it's really never occurred to them before or, you know, this is like this is, most of the time, whenever we've had to talk to someone who has made a joke that was inappropriate or made a comment that they shouldn't have. They've been receptive to learning about that. And that's a wonderful opportunity. But you, you have, you know, a few incidents like that, and you didn't have any the year before. That doesn't mean that those incidents didn't happen the year before. It means that this year people felt comfortable telling you, you know, so I think it's important to to share those incidents whenever they happen, which is why I'm happy to see more conferences to doing like transparency reports, either daily or at the end of the conference that tell people while preserving anonymity, we had this this kind of incident get reported. And this is the action that we took, because it lets people know that the response team is in effect, they are taking action, they are taking things seriously. And it also lets people know that if you make a comment that you shouldn't have made, that doesn't mean that we're going to kick you out of the conference immediately. Right? That's a The first step is a conversation for something like that, you know, obviously, you have two more severe Code of Conduct issues and very different actions get taken. But most of what I've experienced has been incidents where it's really been an issue of needing to educate that other person and the end they've been receptive to that and that's been that's been nice to see. So the hope is that then they go forth to you know, other conference And come back to our conference. And this is the thing that they they know about now, they don't need to be educated about this again, they won't, you know, repeat this particular error and put someone else in the situation of having to report something like that.

 

Carlton Gibson  13:13  

Yeah, I think that's super. A lot of times we we have these for one of the above biases that we don't we may not even know about. And you know, just until someone says, Hey, did you notice that you use that language and use that? It's like, No, I didn't notice but Thanks for pointing that out.

 

Will Vincent  13:33  

While staying on the topic of Django con conferences one and how they evolve. One thing I'm excited about this year is there is a conference is coming up in a couple weeks. There is a there's three days and there's an entire day dedicated to advanced talks, which I think is reminiscent of Django under the hood which used to exist, Carlton, I were just speaking about that before we came on air because he's speaking on that third day advanced day. I was speaking on one the earlier days Did you? So I guess a question for you as a former organizer are what are sort of them some of the things that you've seen change or you know, if you ran everything what what kind of works well, in terms of the conference in terms of structuring things, or what were bad ideas, I'm just kind of curious behind the curtain because I've only, you know, most people are like myself just attend. I have no idea of maybe the code of conduct, how important that is how much effort that takes scheduling, I guess, are there any stories you want to share about being in that position?

 

Lacey Williams Henschel  14:30  

Um, you know, it's it's interesting cuz I feel like we've we've tried like slightly different things every year. And what what I've really enjoyed about being part of Django con us over a several year period is seeing how we've been able to expand different things. So the Opportunity Grant Program has expanded just in terms of the amount of money that we have available to give to people who need some extra financial help in order to be able to come to the conference a few years ago, we were able to add some subsidized childcare. This year, we have a nursing room. And we'll also have live captioning. And in years past, we've had the YouTube videos of the conference talks captioned once they were posted, but we haven't had live captioning. And then this year where, from a programming perspective, we're adding this, this deep dive day. And I do want to just to make sure that that beginners who are listening to this and attending Django con don't think that the deep dive day isn't for them. I don't want to refer to it as an advanced day. It's just whenever we're going more in depth into some Django topics. So there's there's some my experience as a beginner at some conferences was that even if a talk was maybe a little bit beyond what I was currently using, or what I was currently ready for, even like having a little bit of exposure to that idea and made it make more sense later on, you know, but But yeah, so we're really looking forward to the everyone who is there is looking forward To the deep dive Day this year, and we'll kind of see how that goes. We've done interesting things, too, with our keynote schedule. And I think that this year, the keynotes start at the same time every day, but for a couple of years, we were pushing them like half an hour later every day because we notice that as people are spending more days at the conference, they're going out to dinner or they're socializing with their their friends that they don't see as often. You know, maybe, for various reasons. They're sleeping a little bit later every day. So keynote attendance was like dropping a little bit every day. So we, we experimented for a few years with pushing the start time back a little bit. And I think that this year, the keynote starts at the same time every day. It's just a little bit later. Our conference starts at 10am as opposed to nine just to kind of give people a little bit of extra, extra time in

 

my day three, I think he is got extra time?

 

Carlton Gibson  17:01  

Yeah, day one, you'll be like, well, when's the kickoff, but you need it.

 

Lacey Williams Henschel  17:06  

I think that I think day one people are showing up early, they're getting in line to get their bags, they're heading over to breakfast. And having that extra time is extra time that you can, you know, run into people that you haven't seen in, you know, maybe since last year's conference. But yeah, people are getting a little bit anxious to get the show started. And by the third day of the conference, you know, people are really doing well to arrive on time at all. Breakfast attendance drops off a little bit.

 

Will Vincent  17:32  

That applies to girls too, right, Colton because you told me you keen at Django con Europe. This year?

 

Carlton Gibson  17:40  

Yeah. No, I went to the sprint. So I was the opening talk of the in Copenhagen and I went to the Sprint's venue, which was like a 40 minute walk away and I just I've rocked up and like I'm looking for the conference. It's not here and because I just went to the conference homepage on my phone and saw an address type that into Google found a pin went to the pin itself. He Yeah. And so I was quite late. I was there on time, but I didn't. I didn't have time for the coffee in the cold and you know, the five minutes meditation beforehand, so it was a bit hectic.

 

Lacey Williams Henschel  18:12  

Yeah, I know, especially whenever I've, like traveled to a conference, any conference that I'm helping organize. I'm kind of tired the whole conference because I'm running around and helping helping do things but like the couple of times I've been to Django con Europe, I've been tired because of jetlag. But also because it's, I'm in this exciting city in this part of the world I don't often go to and I'm staying out late and these are you know, I'm with people that that maybe I only see once a year, maybe twice a year, maybe I haven't seen this person in two years. And so like I don't want to, I don't want to go to bed. I want to you know, stay out with these people. And by the last day of the conference, it's a it's more difficult. Yeah, it's more difficult.

 

Carlton Gibson  18:53  

It's a marathon, not a sprint. Right.

 

Lacey Williams Henschel  18:56  

And then you get to the Sprint's you know, like, how does anyone have the energy to sprint I almost never really sprint. Sometimes I hang out at the sprints. I think I've actually sprinted once. But unlike how Oh gosh, people who really attend the Sprint's and focus on things and get things done in the sprint, I'm just incredibly impressed by because how do you have the energy at the end of the conference to be that focused and

 

Carlton Gibson  19:19  

productive? Sasha Roman gives out these little Dutch biscuit waffle things, or whatever they called, just like sugar bombs that keep you going.

 

Lacey Williams Henschel  19:30  

Yeah, I might do better if I had an endless supply of the stroop waffles. Yeah,

 

Carlton Gibson  19:35  

yeah, those. So you've mentioned Django girls a couple of times. So you you because you you've mentioned how you got into Gen Con from that. So how did you get into doing Django girls? Because that's a really important thing. I think well,

 

Will Vincent  19:44  

and also Django because I totally skipped that over usually we asked that we didn't give you a chance to mention how you got into programming. Oh, just tie those all together for us.

 

Lacey Williams Henschel  19:54  

Yeah. Um, so I got into programming. I don't want to say accidentally but not really on purpose either. I have a bachelor's and a master's degree in English. And I was working at the University of Texas in an unrelated role, I was just working in an admin job. And the University of Texas at the time had this centralized software developer training program, where they would hire you for six months to train you how to be a software developer for the university, which involves training you in Python and Django, but also in this very old mainframe language called natural because that's at the time, that's what most of the university's code ran on was natural. And it never occurred to me that this would be something that I could do or would be good at. But one of the other developers that I was, I guess I was her client, you know, her team was was building something new for the department that I worked with, took me aside after one of the meetings and said, Have you ever thought about doing this, I think that you'd be really good. I'd like to You have to stay in meetings. And I think you should do this. And so the the process to do this was I had to take an aptitude test. And then I did a couple of interviews. And yeah, sure enough, I got hired. And so it's a really it was an amazing program. They don't have it centralized anymore. But different departments at the university will do their own, like internal training programs. So you still see software developer trainee positions posted at the University of Texas, but it's really unique. I haven't heard of too many other organizations that will pay you and give you benefits to teach you how to write software. So I had been doing that for a few years. And then I wound up relocating from Texas to Oregon. And whenever I moved up to Oregon, I wanted a way to kind of meet people and to make some friends and just through Twitter, I had learned about Django girls, and I asked on Twitter if anyone wanted to help me organize a workshop in Portland for Django, girls and Canada. have raised his Twitter hand and volunteer. And so we organized the first Django girls in Portland in 2015. And we did a couple more in Portland after that. And then of course, I did the one in Austin to with Barbara charrette. And after I had done I think for total, I decided to sort of stop organizing them. I've coached a couple since then, right? Yeah,

 

Carlton Gibson  22:25  

cuz I've coached one way to organize it's a whole nother level of

 

Lacey Williams Henschel  22:30  

commitment. It's, it's funny, I was more scared to coach than I was to organize like, organizing is you know, is just kind of event planning in a certain sense, you know, like, you don't have to know the code very well. You have to like recruit people and talk to the sponsors and make sure that you know, everyone has something to eat and somewhere to sit and enough outlets. You don't have to know any Django to do that. You know, that's that's not really dependent on your your level of software knowledge coaching. That was really scary because because people are gonna ask me questions and I need to be able to answer them and I had a lot of imposter syndrome. The very first time that I coached, I was way more nervous about coaching than I was about organizing.

 

Carlton Gibson  23:15  

I was glad you said imposter syndrome. So I was gonna say like, surely that's imposter syndrome, though, right? You've been trained. You've been working in this for years, you know, the software well, and yet you've got this nagging doubt.

 

Will Vincent  23:26  

Yeah. Well, I think of that as a sort of a hill where you start off You don't know anything and then you get to a point where you sort of know stuff, but you feel like you should know everything so you feel bad if you don't know something. Yeah. And now at least for me, Carlton, maybe in the same place I feel, I just assume I probably won't know off the top my head. So it's like, I don't know, like, let's google it together and we'll figure it out. And you know, that's actually more valuable going through that. This is how I would break down this problem. That's probably more valuable to the person then just giving an answer I've given a bunch of times. Yeah,

 

Carlton Gibson  23:57  

but no, but nobody knows. It. by heart, right you every time you code, you've got the docs open, right? You're looking

 

Will Vincent  24:03  

up everything. I don't even remember my advice. I mean, people ask me questions. I'm like, I have to go look it up. It's like, I don't know, I wrote that, you know, two months ago, why would I? Why would I know? Something I wrote?

 

Lacey Williams Henschel  24:14  

I refer to the docs all the time, I refer to like, code in other projects that I've written, like, I will open up old projects to kind of look how did I solve this before? Oh, yeah, totally. I use this totally.

 

Will Vincent  24:26  

But I guess the difference is, you know that you're like a kind of, sort of No, you have the abstract idea of how it all fits together. And then you know that you've done it once before in some capacity. So there isn't quite the like, blind fear that you get with like, I have no idea how this works.

 

Lacey Williams Henschel  24:41  

Yeah,

 

Carlton Gibson  24:42  

but this is why like, live coding interviews are such a bad idea. Because in reality, if someone wants you to do something, you go, Okay, give me half an hour. Go look it up. We're gonna have a little thing that here's a solution. But if they want to watch you do it, it's like, oh, no, no,

 

Lacey Williams Henschel  24:55  

I'm very fortunate that I've never had to do a live coding interview my interview for the interview. of Texas, because they're training you how to write software, they don't expect you to be able to write any, that would be silly. Um, so it was kind of like some logic problems or like, how would you go about solving this this particular, you know, problem, or just kind of the standard interview questions about, you know, strengths and weaknesses and things. And then for the job that I have now, at RevZilla, I wound up just being offered the job, they didn't really interview me.

 

I'm not sure if they would want me to say that.

 

Will Vincent  25:34  

They knew who you were. Yeah, like they

 

Lacey Williams Henschel  25:36  

say, you know, they had worked with me on Django con for a couple of years. So they, not everyone at the company, but a few people at the company knew, I think what it would be like to work with me on a day to day basis. Jeff and I had worked together on Django con us for a few years at that point. So I think it helped that I was a little bit of unknown quantity that Yeah, yeah, I think every step I've taken in this in this career, you know, like organizing Django workshops, organizing Django con coaching, writing, you know, tech articles getting a job. Rob says, I've had just massive impostor syndrome about every single one of those steps. And they've all turned out, okay. And so it feels over the past year or so that I'm finally learning like, well, if I take this leap, if I do this thing, it will probably be fine.

 

Will Vincent  26:21  

Yeah. Well, speaking of working with Jeff Triplett, he mentioned when he was on the podcast that you are a fiend about test. So I'm wondering if you could talk about that, because testing is something that we're often asked about. I think it's a very gray area. And Jeff mentioned, actually, he hates writing tests, but he said you love tests.

 

Lacey Williams Henschel  26:40  

Oh, gosh, I do love tests. And I love I think I have such a deep love for testing. Because testing is also how I learned things. I when I was at the University of Texas, we at the time, we weren't really writing a lot of tests for our pythons. code because we were using natural on the back end. So most of the business logic was in natural, and we're just kind of, you know, serving up templates and stuff. And then natural, it turns out, it's actually very difficult to write unit tests for them. So I didn't, I came from a strong manual testing culture, but not a strong unit test, you know, background whenever I started working for websites, and my very first project at websites, I was using Django rest framework, which I had never used before. And I was writing production unit tests for the first time, which I'd also never done before. And figuring out how to use like, the debugger, like how to like set trace and then kind of inspect different things. And the response that I would get from Django rest framework taught me so much about how it worked about how it behaved, you know, so I would figure out, okay, like, this is where the status code lives. This is where the actual data that I'm getting back in the response lives. This is how that data is struck. Whenever I'm, you know, getting a single record versus a list, this is how I can loop through those. So it testing is how I learned how to code in DRF. Really. And then I just, it just kind of grew from there. Like I just wind up wanting to, I wanted to write a test for everything, so that I could learn more about how that particular thing worked. And it was also a comfort thing to like, well, I because I this was a new job, and I wanted to do it well. And I had some imposter syndrome about whether I would be able to do that. Having good tests for my code made me feel a lot more comfortable about shipping it to, you know, so like, I, if I have a test for this, then I will know if it breaks and like then it's this like security blanket. It's this extra layer of protection that I have, you know, so. So yeah, that's kind of the source of my deep and abiding love for unit tests.

 

Will Vincent  28:59  

So what were their Well, Carlton, you have some opinions on tests that we were talking about before we went on air. Do you want to share your standard out? Thoughts?

 

Carlton Gibson  29:09  

Oh, that was logging, no logging? Oh, I'm getting confused. Yeah, use me Well, okay, so the thought we were talking about these, like, I always log to standard out. And then I use a process manager to run Django, say, and then I capture the logs by the Process Manager, and they pipe them wherever I want. And, for me, it's a really simple pattern. It's much more easy than, you know, configuring log files. And it's just like, log it standard out, and then you know what,

 

Will Vincent  29:33  

but that's how I I'm sorry, guys.

 

Carlton Gibson  29:36  

No, no, no, listen, we'll come back. We'll do another episode on that. But the more interesting was what you said about the debugger Lacey is that you could if you write a test harness and you've got you know, you've got the unit test, and it's kind of exercising your code and then you couldn't stop it. You put a breakpoint in somewhere you can, you can really like start digging around. So what does exactly look like that? I think that for me, that is

 

Lacey Williams Henschel  29:55  

magical, really valuable. Yes. That is that feels like Magic being able to like set a point, you know, somewhere in the view or somewhere in this method that's on the model or somewhere else to see, like, what are things doing because sometimes you you're getting, you've done something wrong, like you're getting results that you don't expect, or you're getting this error that you don't really know what it means you're trying to figure out, like, out at what point does this start to happen? Because, you know, I think we've all had that experience in Django, where you're getting this error. And the place that Django says it's coming from, is maybe that's technically true, but really, it's like five lines above it or something, right? Like the error occurred before, but it didn't matter until you know, it was tripped in this later place. And so sometimes it's really difficult to to debug those situations and being able to set those points and kind of inspect Okay, like these are, this is what all my variables look like at this point. This is what's happening and then to be able to hop into a console and say like, okay, I want to say Sometimes I'll like run the next line of code just like manually or like, I'll just like type it in, or it's a good way to test to like, well, if I, I think the mistake is maybe in the way that I have written this query set. Now that I'm in my console, like, well, what happens if I just make this change to the query set? And then try to do this thing? Okay, that was it. Right? Like, so it's just, it's a really useful tool to have.

 

Carlton Gibson  31:26  

Yeah. And do you use an ID for that use PI charm or this code? Or do you use a command line? I

 

Lacey Williams Henschel  31:32  

just use the command line, I use Sublime Text and I use the command line. Yeah, I'm curious about like pi charm and some of these other IDs, but I've I'm a very habitual person, you know, I just I have the way that I do it. And I'm, so far I haven't been curious enough to actually take the time to set it up and

 

Carlton Gibson  31:52  

try the new tool. So, so Okay, but one thing that comes up then is So what advice would you give to somebody who perhaps doesn't use it before? Anything How? Because it's a bit like p p o p p p? What are the commands? How do you get into debugging? Yeah,

 

Will Vincent  32:07  

what resources? Did you find that were any good?

 

Lacey Williams Henschel  32:10  

So I am I am not like a fantastic debugger. I'm, I'm I'm good at writing tests. And I'm good at putting like the set trace statements at various points in my code. But in terms of like, actually like running, you know, debugger commands. This is not something that I'm super comfortable with. Nina. Her her handle on Twitter is n and J. I do believe. But she has a talk from a recent conference. I'm going to get all of the details about Django.

 

Will Vincent  32:42  

Are there things

 

Lacey Williams Henschel  32:42  

show notes for the podcast?

 

Will Vincent  32:44  

Yes, yes.

 

Lacey Williams Henschel  32:46  

When talking I will say so that it can be in the show notes. But Nina has,

 

Carlton Gibson  32:50  

I think also she's giving you an updated version of Django con.

 

Lacey Williams Henschel  32:53  

Oh, I tell me all right. Oh, even better. Yes. Yeah. But no, she has a talk that I'm really looking forward to. Seeing I haven't made the time to watch it yet, but I've just heard wonderful things about it. And every talk I've seen, I've heard before has been really useful and really interesting and really clearly communicated. So yeah, my advice even having not seen this talk yet would be to watch this don't assume that it will teach you things because I'm really excited to be able to take my my debugging skills in a debugger, you know, to, to kind of the next level because I still feel like putting a set trace at different places is just kind of one little half step up from like putting print statements everywhere, which is also a thing that

 

Carlton Gibson  33:37  

is such an important half step because you can you can type type things in and then print the

 

Lacey Williams Henschel  33:42  

print statement is still like, you know, a beautiful thing to me. But there there are other things that maybe are better.

 

Will Vincent  33:52  

Well, that's the name of her talk. I was gonna say you can see it's called goodbye print. Hello, debugger. Yeah, that's okay. They will link To that, and then I'm always telling people that conference videos are up very quickly soon thereafter, you know, pike Australia was up high con. And nobody watches these videos. I mean, if you look at the count, it is hundreds, if a couple thousand tops, and these are just gold mines, all the chamber con talks,

 

Lacey Williams Henschel  34:19  

and Django con us we don't get our sometimes we don't get our talks about this quickly as some other conferences, because we generally don't post them until we've we've gotten them captioned. So you do wait a little bit of extra time for the Django con us videos, but I think that time is worth it. Because I really love to watch, especially technical content with captions whenever I can, because sometimes it just, I'm a person that absorbs information really well in a written format but also likes to see examples and so seeing someone work through an example live and being able to see what they're saying kind of hits my brain in a few different ways and helps it really

 

Will Vincent  34:59  

stick. I agree Speaking of teaching, you've taught some courses at treehouse on I think the Django admin I think actually I took your courses Oh fine there's a back set back several years ago. So I'm just curious what how was that experience and what did what did you take away in terms of presenting in a video format content you know because you you write quite often now on the refs if refs this blog and on your own personal blog and actually and what open source what's open source you and Jeff do a whole bunch of articles

 

Lacey Williams Henschel  35:28  

Yeah, last year, Jeff and I did monthly Python column on open source.com and then yeah, I write relatively frequently for the rest is blog and my my own personal blog has taken a little bit of a break which is okay, that happens sometimes but

 

Will Vincent  35:44  

no, okay. Um, but no, it's Oh, yeah, so I guess so video versus print. How do you because I'm, you know, selfishly curious about this because I'm going to start doing some videos what what, what did you learn doing that

 

Lacey Williams Henschel  35:55  

video is so much harder. That's what I was afraid I really sorry, I have bad news for you. For me anyway, video was harder. And this is, you know, I had like the treehouse team, right? Like I, I had like graphics artists who were making cute little animations for the things that I was doing. And I had sound engineers who were making sure that my levels were ride and who were editing things out for me. And for the video portions, I had, you know, video engineers who were doing different takes and like making suggestions for how I would vocalize different things. So in a lot of ways, it was really wonderful because I, I did a lot of theater in high school. And so it felt like this wonderful convergence of my theater experience and my English background, and then my technical knowledge. It was like this. It doesn't get more interdisciplinary than doing a video programming course. Right,

 

Will Vincent  36:51  

right. Right.

 

Lacey Williams Henschel  36:53  

But even with all of this external support, oh gosh, it's really hard. Sorry to tell Do that.

 

And part of what makes it hard. So this this screencasting portion of the treehouse videos was, was really hard because like, on the one hand, I think that you might, you might think that doing a video course, or a video tutorial might be similar to doing like a conference talk, but you're not using slides. You're like, you're live coding. And so well, if you, you know, you can watch your students like, you know, watch you recover from a mistake, but it also depends on how long it takes you to recover from that mistake or like, you know, yeah, so there's, there's that kind of concern. And then there's, if if your machine just sometimes sometimes things just go really weirdly wrong. And that takes a while to kind of recover from but then you are explaining something as you're doing it, which is what makes live coding so difficult. And so it's it was This this thing of trying to like touch the mouse and the keyboard as little as possible. And like maybe keep those movements separate, you know, from from the microphone so that it would be easier to edit. And the treehouse sound engineers would have me do this thing where like, if I if I needed to re record something, they would have me clap into the microphone so that they could see it on their own. Yes. And they will know like, okay, there was a huge spike here. Now I need to I know this is a place where she wants me to do some some editing. And I felt like the courses from that perspective always came out really great, but because they they just had a really wonderful, wonderful team. But yeah, it's, it's, I find, I find writing to probably be the the easiest for me personally. And part of the reason for that is I can kind of do it at my own pace a little bit and I also have the opportunity to have people look over what I'm writing and Give me some feedback on it or make some suggestions, which I find really helpful. And then after that I really enjoy speaking because I there's a, an energy that goes into giving a conference talk that is, that's really fun. Like, I'm always very, very nervous before I give a conference talk, the stage fright never really goes away. But that kind of disappears after I've been on stage for a minute or two. And that that feels really good to like, have people in front of you and you, you get some energy from them. And then you get to kind of make fun little pop culture metaphors. Like I've used Harry Potter a few times. I've used Jane Austen a few times. You know, that's, that's really fun to do. I think that and for me, that makes the conference talks kind of more memorable to write like, whenever it gets a little hook in there, that's a little bit more, more fun. And everyone has like different ways of doing talks, you know, like, there are some really great speakers that approach this in, in very, very different ways. And so I've been trying to kind of pay attention to the speakers that I have Then I really like, like, what do they do? And like, Are there things that they do that I could incorporate into what I do? You know?

 

Will Vincent  40:08  

So in terms of what you're doing with Django these days, I noticed you've been writing a lot about wagtail. Could you talk about what that's been like? Because that's I haven't used that myself, though. We've had Tom Dyson on to talk about it.

 

Lacey Williams Henschel  40:19  

Yeah, I find wagtail to be really interesting. I've enjoyed using it and getting to know it. And it's, it's one of those two, where it what it feels like, there have been a lot of opportunities for me to. So I feel like wagtail has pretty good documentation, which is really helpful. But it also has some features that I feel like are kind of hidden, and a thing that I could do about that would be to write documentation and submit a pull request, which I should do. But there there It has presented me with opportunities to kind of go into the code base and read the code a little bit to sort of figure out what wagtail is doing behind the scenes, which has been really helpful for me growing as a developer like I have going in and kind of reading the Django source code or reading the wagtail source code has taught me a whole lot. But when I tell is so powerful, and it's so it's so specific in the way that it behaves. So like it kind of it took me it feels like it took me a little while to really understand how wagtail worked. I'm to the point where I am a solid intermediate at wagtail. And that feels good.

 

Carlton Gibson  41:26  

Yeah, right. Good. I mean, cuz it is there is a learning curve. I mean, I've taken it on a couple of times. And yeah, getting there. But it's really like the the whole the way that you define the page models and how they fit together and how they slot into the site. And I've struggled personally. So what's your

 

Will Vincent  41:43  

rule of thumb now for wagtail versus straight Django on a project for folks who are listening, right, because it's a it's a powerful CMS. How do you think I always find that sort of question right, when? When do you switch over to wagtail? What what makes more sense with it versus raw Django

 

Lacey Williams Henschel  42:00  

Yeah.

 

I don't know that I have a fantastic answer for that yet. But so far my role has been to look at the fields that are available on the wagtail page model and think about, does this other model need these fields? You know, like, Am I gonna wind up using? Am I going to wind up using the things that wagtail provides on this particular model? So for example, like the refs website is a hybrid of some wagtail models and some Django models. And we were having this sort of philosophical discussion a few weeks ago about, well, should we make some of the Django models into formal wagtail page models? You know, like, should we sort of migrate them and convert them? And I looked at it, and I thought about it, and I thought about how that would mean that that we would use those models differently. And I just didn't feel like in our particular case, that we gained a lot from that and I realized that What we really wanted was to not have to go to two different admins. So I just put those models into the wagtail. admin. And then I wrote an article about it.

 

Carlton Gibson  43:08  

Yeah. Which came out this week. I

 

Will Vincent  43:11  

saw that. Yeah. Well, we'll link to that in the show notes.

 

Lacey Williams Henschel  43:14  

Yeah. Thank you. Um, so, so yeah, I think that that's, that's one of the things that I think about is is what fields that the page model makes available to you. And then whenever you're looking at the page model in the wagtail admin, looking at the kinds of things that are available to you in the different panels, like there's the settings panel, there's the Promote panel, are these things that you feel like you would wind up wanting to use in this particular model? And I think a lot of times, the answer is not really, you know, like the wagtail page model is really great for what it's intended for, which is this.

 

Carlton Gibson  43:51  

It's a full scale page builder, right?

 

Lacey Williams Henschel  43:52  

Yeah. And now I'm kind of thinking like, well, gosh, how to describe what the paid model is intended for. And I realized as I started the sentence, I don't have like a Clean answer for that, which is a, it feels like something that I should have now I feel like oh, this is an opportunity for me to deepen my understanding of wagtail is really think about what is the page model for. But yeah, like, I think that there are corollary models that you would want to use with a page model, for example, but don't necessarily need to be paid models themselves. One thing I was going to ask you,

 

Carlton Gibson  44:24  

yeah, I was about to as an English major, and one thing we have in Django, one of the like, so if you look at Django is bug backlog, the biggest issue is the biggest areas, the ORM. And then next to the O RM is the admin. And then the third biggest category is documentation tickets, right? And then there's a whole load of tickets with prs, where it's like needs documentation. And we have a whole load of prs that come in where there's code but often it's like, what holds it up is documentation. And one thing that I've sort of, it's been on my mind is to try drum up a bunch of people who, you know, good with the written word who can kind of come in and help with those prs, where it's like, Hey, can we work on the docks here and perhaps the original author? I wonder if you think that might be a good idea. And if you think people, if there's lots of people in the community who are perhaps reticent to contribute to code who might come in and join in on a PR that's open that needs some help on the dock.

 

So I think

 

Lacey Williams Henschel  45:22  

it's a good idea.

 

And I think that it's something that I probably wouldn't do. Like, I probably wouldn't go into an open PR that has a flag that says needs documentation, and just provide documentation because I would wonder, am I stepping on like the original opener of the PR? Am I stepping on their toes? You know, is this is this something that that person is supposed to do or is working on? Is it presumptuous of me to just assume that this isn't forthcoming? And I'm sure after a certain point, you do have to assume that it is not forthcoming.

 

Will Vincent  46:00  

Except a little while

 

Lacey Williams Henschel  46:01  

this PR without the documentation or you're providing it yourself or whatever.

 

Yeah, I do think that that's that's a good a good idea. I think that do you? Oh, go ahead.

 

Carlton Gibson  46:14  

Google. Do you think that if we like, if we structured it, and we were worked out how to phrase it, we put the docs team together and we said, Hey, there is there is an opportunity to contribute here in these ways. Do you think that would get picked up? Do you think people would? I mean, there's one way to finding out is to try I guess, but

 

Lacey Williams Henschel  46:33  

yeah, I think it's certainly possible that a Doc's team aimed at that could could get picked up. It's so I'm such a bad joiner, you know, because like when it comes to like things where there's a deadline, you know, like a conference will eventually you're gonna have to show up for the conference. So there are deadlines, which is helpful, but I've not been nearly as successful at like code or documentation contributions because it's all self paced. There's no like external deadline, which keeps me from contributing a lot of code or documentation, because I mean to and I just never get around to it, which is so many of us in so many ways, I think. But no, I can i think that that's a really intriguing idea. And I can I can see that working out. And I think that the the key to making something like that successful would be to create, like, pretty actionable goals for it, you know, like instead of kind of

 

Carlton Gibson  47:31  

ended well, I mean, but there are these tickets. Yeah, exactly. There's a dashboard and we could say, look, there's there's 200 documentation tickets. Could we get that number down?

 

Lacey Williams Henschel  47:41  

Yeah. And I and I think and this is, this puts more overhead on somebody else, but like ticket selection, like out of out of 200 tickets, well, like how do I know which one is like a higher priority? You know, like, maybe this ticket has like problems that are other than the documentation. So if there was a list of like, You know, 50 tickets or 15 tickets, that the only thing missing is documentation and like, you know, and the expectation for that documentation is is relatively minor. Like, we need a couple of sentences on what this does. We don't need a page of instructions.

 

Carlton Gibson  48:16  

Ya know, often it's just a little rephrasing, but sometimes it's a contributor is that the native language isn't English. And so it's really difficult to get the phrasing exactly so and but there are a lot of people who have that English language ability who could perhaps come in and,

 

Lacey Williams Henschel  48:32  

and that's, I did I almost feel like that needs to be a an additional tag, like there's documentation where the documentation doesn't exist and needs to be written. And part of the challenge is identifying how much documentation needs to be written for this, where should that documentation go, you know, things of that nature. And then there's situations where the documentation exists, and it just needs to be copy edited. And I would I would do, I would do 10 of those right now. You know, like, just

 

Carlton Gibson  49:02  

All right, well, good. Thanks. Yeah, well, that's been on my sort of back burner for a while I've been thinking about this. I mean, you talked about finding tickets, we've got 1300 open tickets. And if you just approach that it's really it's really all actually only 1200. Now we're getting it down with super. But like, if you just approach that it's too big. So you break it down by component, then there are ways and means of breaking it down, and it's on my list of right out. But yeah, I'll

 

Will Vincent  49:24  

push this forward as well.

 

Lacey Williams Henschel  49:26  

And I don't know if other people would, would agree like I'm not a maintainer. I don't know what a successful when it comes to how you tag different tickets in a way that gets people to pick them up. But for me, personally, if I heard, you know Django needs help with documentation tickets, specifically these tickets that have documentation, but it needs to be copy, edited, you know, and rephrased, maybe like punctuation or spelling needs to be corrected. But it just it just needs to be the documentation is there and it needs to be made ready. You know, then I think I can do that. I can take what is there and make sure that it makes sense and, and is grammatically correct, etc.

 

Carlton Gibson  50:08  

Yeah. And the the phrase you use there, which is really handy is copy editing because it kind of just needs to rephrase.

 

Will Vincent  50:17  

So Lacey given that you've learned Django, through Texas, Austin, and you're involved with Django, girls, if someone comes to these days and says they want to learn Django, but maybe they don't know Python at all, or very well, how do you direct that person in 2019?

 

Lacey Williams Henschel  50:32  

I still think the Django tutorial is one of the best beginner Django tutorials like true beginner Django tutorials that's out there. And part of the reason for that is because it doesn't assume that, you know, other kinds of programming, it doesn't assume that you know, Python or HTML or CSS, it doesn't assume that you know, what a virtual environment is or how that works. It walks you through everything. And my big complaint about a lot of technical writing content is that there's a It feels like there's almost always something that they're assuming that, you know, there's background knowledge that they're assuming that you have. But they're not stating that they assume that you have that knowledge. You know, it's one thing if, if, if they say we expect you to know XY and Z. But it's another thing to just write it as if everybody knows XY and Z. And then if you don't, you're it's hard to even identify why this is confusing for you. It's hard to identify what it is that you don't understand. And you don't even know what to Google at that point, you know, so it can be really frustrating, especially when you're a real beginner at something. So that's one of the things that I really love about the Django girls tutorial is that it doesn't assume really any prior knowledge, which makes it really really great for learning Django, but also learning just kind of some basic like programming concepts or some basic you know, how to set up your computer to do any kind of programming,

 

Will Vincent  51:56  

right? Yeah, I agree with that. I mean, I think that you often Forget what you've learned. I mean, because it was painful. And also Django is really pretty high up the spectrum of, of skills. And it's a little bit like math, it all compounds I mean, I mean, I'm constantly reminded this as an educator, because to do Django, it's like, Okay, well, use your computer, use your computer, use the command line, understand Python, understand virtual environments, it'd be nice to understand relational databases, it'd be nice to know how HTTP works. I mean, the list goes on and on and on. So it is in some ways, I, you know, for me, I sort of both look at going into more advanced Django topics, but then also being like, well, it's really hard just to install Django.

 

Lacey Williams Henschel  52:38  

Yeah, people. And I say that, like the complaint that I have about other tutorials is that they they don't identify the prior knowledge that they expect you to have. I'm not sure that in the content that I write, I'm doing an accurate job of that either. It's hard to do because you, you get used to no way more work. Yeah, like you will and you you just get used to knowing certain things and you know, I tend to Write about things as they confuse me, you know, like I have just figured out how to do a thing. And so now I'm going to write a blog post about it partly so that I don't forget. And I have a documented resource for myself in the future. But I'm coming at having been confused by this particular problem with all of the knowledge that I currently have. And I don't know that I'm doing a good enough job in my own writing, of identifying the things that I have prior knowledge of that, like I that someone else would need to have prior knowledge of in order to find this particular article useful. So now, now, I'm kind of thinking about like, well, gosh, for future things that I write, how can I try to be more mindful

 

Will Vincent  53:40  

of that? Well, I can tell you from experience, it's just a lot of work. I mean, so for example, like in my my three books, I have a prerequisites section and I provide links, and I'm often asked, okay, you know, you mentioned like Docker, we use Docker in my new book, and I spend some time on it, but you could go much deeper. So people say, Well, you know, what's the further study? Docker for, you know, all these different resources. And it's a hard thing to do. It takes a lot of time. And but I think to your point with like quick articles, I mean, I don't, I don't do that with all the articles I write though I do. I always start from scratch, I don't just go download this repo and then go from there. But it's, it's just a ton of work. And a lot of times, you know, you're not getting paid for an article, you're just doing it to solidify your own learning. So it's sort of, you know, is how it is, I mean, it's possible to do, it's just a ton of work. And then you have to update it, right? Like, I update all my articles, whenever Django updates and that's, you know, it's like a week of my life. And I can do that because I make a living teaching Django, but if you are like yourself, I mean, you're not gonna do it.

 

Lacey Williams Henschel  54:42  

Yeah, that's amazing dedication. I really applaud you for doing what I saw, I saw this tip from someone on on Twitter to put the version that you're working with for everything at the top of your article, and I have started doing that with my last couple. So that I can So that someone can identify like, Okay, well, this is about, you know, Django 1.8, you know, versus 2.2. And so this is not relevant to me. Because especially we're in a time right now, where like Python two is going to stop being supported soon. f strings appeared in a very specific version of Python three. So I had a friend who was wondering 3.6 Yeah, so I had a friend who was was wondering, like, why she was getting a syntax error when she tried to deploy. And it turned out the it was that where her deployment environment was using three, five and locally, she was using three, six, and she was using f strings. And so that's, you know, that's why

 

Will Vincent  55:39  

I've had readers out, you know, complained to me about things in the book, and that's why I know that cuz I'm like, Oh, are you on three? 699?

 

Lacey Williams Henschel  55:46  

Yeah, so the the versions really, really matter. And like we've, you know, Django 2.0 I guess it's 2.2 now is still like kind of new and there's some kind of new features that are Like, the way that we do URL routes is, is a little bit different now. And so whenever you're kind of looking for information on that, it's way easier to find the information from the Django one, you know than it is. So you have to be really specific. And so I'm trying to be better about putting all of my versions at the top of my articles, but I'm, it is not likely that I'm going to go back and update all of them with each new version of Genco.

 

Will Vincent  56:25  

Well, I think the challenge too, is sometimes it's okay to I like sometimes I can't, you know, I can't go into everything I'll say, you know, just trust me on this one. I'll explain what's I'll try to explain the thing, but I don't feel obligated to go into all of it. So for example, with with URL paths, right, I don't have to explain how it used to be done per se. I can just say, there was a change and was a 2.0. And like, link to the documentation. Yeah, it's like, where do you draw the line and then anyway, ultimately, with all this documentation, mostly blank, getting paid to do it. So the kind of gritty work like the Django fellows like Carlton Mario's to In the same way, you know, updating blog posts. So that's why so I sort of made a face when you saying to pin your articles, I think it's great to say up front and certainly definitely, you know, say it PIP installed the specific version of Django. But in terms of like for SEO, it's maybe not great to put that in your URL, your title. But these are, you know, secondary things. Also for the readers also for readers like

 

Carlton Gibson  57:28  

Django is so stable and has been viewed, I know, the URLs changed. And you know, the small things do change, but you can take code from a project eight years, eight years ago, and it will be

 

Will Vincent  57:39  

more or less the same while we don't write like a 1.0 is going to be totally stumped on these little things.

 

Carlton Gibson  57:49  

Yeah, yeah. Yeah. No, because if it Yeah, in the beginner environment, it is the case that if it doesn't work, if it's not exactly the same, it doesn't work. They haven't got the resources to work. Help whites don't work.

 

Lacey Williams Henschel  58:01  

And I think to that, because different different companies, different businesses and different, you know, people with whatever projects they're working on, are going to upgrade at different times. And so then they're going to still be encountering problems on older versions. So like, from that perspective, I think it's fine to have a lot of content out there that is about older versions of whatever library or whatever software that you're concerned with at that time. I do like the pattern personally of of having the, the version that you're working with, like in the body of your article somewhere, I don't know that I would necessarily go as far as adding it like to the title or, you know, I know that the Django documentation, like you have the version in the URL, but like, I wouldn't have different versions of this one, you know, technical article that was like maybe 1000 words long or something, you know, and I'm gonna have different versions of it for each version. I think that that's probably overkill in most for most kinds of content. But I do think in general, it's good to kind of let people know like, well, this this was working for me with this combination of versions, you know, like I was using this version of wagtail. This version of Django in this version of Python. I think we've

 

Will Vincent  59:13  

we've probably gone over our a lot of time. But thank you so much for taking the time Lacey to come and talk to us about Django and all the work you've done to volunteering. Thank you to help the community over the last couple years.

 

Lacey Williams Henschel  59:23  

You're welcome. Thank you so much for having me. This has been fun.

 

Will Vincent  59:25  

Great, and for people listening. You can find new episodes every week at Django chat comm where at chat Django on Twitter, and we'll see you next week. Bye, everyone. Join us next time. Bye bye.