Django Chat

Django Forum - Ken Whitesell

Episode Summary

Ken is the 2020 Malcolm Tredinnick Memorial Prize winner for contributions to the Django community, a familiar presence at DjangoCons, and an active participant on the official Django Forum. We discuss his long programming career, making the move to Python, and why Django is his favorite community.

Episode Notes

Support the Show

This podcast is a labor of love and does not have any ads or sponsors. To support the show, please consider recommending a book from LearnDjango.com, signing up for the free weekly Django News newsletter, or learning more about Button a simpler deployment story for Django.

Episode Transcription

Will Vincent 0:06
Hi, welcome to another episode of Django chat fortnightly podcast on the Django web framework. I'm Will Vincent joined by Carlton Gibson. Hi, Carlton.

Carlton Gibson 0:13
Hello will.

Will Vincent 0:15
And this week we have Ken Whitesell to join us to talk about all things Django the forum and as long history with the framework. Welcome, Ken.

Ken Whitesell 0:22
Good morning. Welcome. Thank you.

Will Vincent 0:24
So as ever, we try to think of how to introduce our guests onto the show, and it can't really narrowly put you in a bucket all the things you've done to contribute to Django. So maybe we could start with how did you get into programming, and then we'll work our way into how you became so involved in the Django world.

Ken Whitesell 0:40
Oh, my goodness, we're trying to keep this at under an hour, right? Let's try to give a condensed version here. actually got started with programming with a programmable calculator. Old tea is our 52. from back in the late 70s. The time that had the little magnetic card strips that you would feed through the calculator that would store the programs, and the thermal printers that you could attach to it. I had a friend of mine in high school who had one of those and we just spent hours mucking around with that writing little programs really was my introduction. That's what gave me the bug. And then from there, everything just kind of mushroomed. My senior year of high school, we had moved, and I moved to a high school that actually had access to a mini computer at the time, an old HP 1000. Yeah, running the old timeshare basic. And that was, that was my first actual education. And I caught the bug immediately. I knew right then and there within, like my first week of that class that I knew what I was going to do for the rest of my life.

Carlton Gibson 1:56
Fantastic. So that's that that trumps the usual questions we always like, so did you learn at university Do you know? And you're like, No, I don't know high school,

Ken Whitesell 2:05
or at least got exposed to it?

Will Vincent 2:06
Well, that's great that you both had access to a real computer. And then with the calculator in games, you could sort of have some sort of hands on experience with it. Because I think games for a lot of people was one of the first entryways for me, because I'm a little bit younger, it was sort of the web. The web came around when I was in high school. middle school, high school. So that was the first like tangible using technology. Oh, what is this thing? Kind of? That got me and a lot of people involved? Well, of course, I had a ti 8283, which is sort of the, you know, a couple a little bit later. And I remember, you could play Tetris on that, you know, Mario Brothers. I don't think I actually programmed it. I thought his programming is more like copying things from friends, but it felt like programming.

Ken Whitesell 2:52
Well, it's one of the best ways to learn, you look at somebody else's example. And you decide to tweak it, modify it, and then you end up with something that's, you know, kind of yours and kind of what you drew from.

Will Vincent 3:03
Yeah, I know exactly. And you need some sort of hands on aha moment with, why am I going to dive into the details. So it's interesting to see what it is for people, whether it's a calculator or games or the web, or something else there, you have to have to kind of have that first write like, because otherwise, programming for the sake of programming doesn't make any sense. Unless you have a goal in mind.

Ken Whitesell 3:25
You definitely have to have the why.

Will Vincent 3:27
Yeah. So after high school, then where did your passion take you?

Ken Whitesell 3:33
Well, family moved again, left me in a small town in Pennsylvania. With really no prospects I missed the registration period for college actually did not get into college at that point. And so I decided to join the airforce joined the Air Force to see the world spent three years in Biloxi, Mississippi, and three years of Washington DC.

Will Vincent 3:59
That's one part.

Ken Whitesell 4:01
Yeah, well, especially since born and raised in Baltimore. It's not like, you know, Washington was all that unfamiliar to me. So

Will Vincent 4:09
yeah, well, I see that. I mean, skipping ahead, because we have our notes. So I think the first time Python came in the scene for you was was 99, I think, which is very early on in Python, sort of in pythons history. How did you how did it pop up in your radar?

Ken Whitesell 4:23
So I was working on a project at the time we were migrating some servers from Windows NT two Linux. We were using a very early distro, I don't even remember which one now. And we had a need for a process that would monitor a directory to see when files showed up. So there would be people who would FTP files to this box and the process needed to detect the changes in the directory and then process the files. And I found a snippet out On the internet wasn't all that big 2025 lines of Python that would monitor the directory, and then do something with it. And that something was what we needed to do with it, you know, run run another script as a result of it. And I first took a look at Python and it's like, Okay, this is different than anything I've ever seen before the syntax significant whitespace and, and it was certainly more verbose than the other languages of the time that I'd worked with other than COBOL. And it just really appealed to me, actually, I won't say I ever really had a fondness for COBOL. But I certainly had enough proficiency with it that verbose languages were not a problem, per se. But something just with the the requirement that the code be laid out in a structured way, unlike C, you know, with all the the hidden gotchas with the braces, missing semi colons, whatnot, it really resonated, that the layout of the language just helped make the structure of the program so much clearer than trying to pair up braces or parents or

Carlton Gibson 6:23
whatever. And can I ask that time? What would you say about the kind of abstraction level that the language operates at because you said 25 lines of Python, it's kind of like, the archetype of situations I need to script something up, I do it in Python, oh, it's 25 lines, it's always 25 lines, it doesn't matter what you're doing. Compared to say, the other language imagined see you it's like, it's gonna take your loads more than 25 lines to do it and see, like, so ours, the abstraction level, compared to what else you had to buy,

Ken Whitesell 6:49
mostly, it was the strength of libraries. So the language is what attracted me at first. And then I started looking at the standard line. And, you know, seeing the comments about being batteries included, and just starting to read through the library documentation, and it's like, wow, you know, there's a lot here, it's not, okay, perhaps a bit pedantic of me, it's not so much that the abstractions were at a higher level, but that the libraries were so comprehensive, that I didn't need to go hunting for a library to do X, or to, you know, find a code snippet somewhere else, that that x, is that, okay, there's a function for that. And I just call this function, that it's there. Imagine that?

Will Vincent 7:45
Yeah, but that was, I had to look it up. I think that was around pi. Python was 1.5 or so. So it was it was one point stable and stable enough to, you know, have the ecosystem that makes it so powerful of libraries and all the rest? Definitely. Yeah. That it's it's so interesting thinking about when people first see Python, what their reaction is, because, you know, many programmers, like you come from much more less abstracted languages. But when I was teaching college students, I would who didn't know much programming at the time, I would just lay out I'd say, Here's Hello, world, and, you know, Java, C, Python, just like you don't know anything about programming, which one do you think is easier to use? Right? I mean, you just look at it and you know, right. Oh, yeah. So it's sort of interesting, you know, whatever level of programming ability, you can just look at it and say, Oh, you know, yeah, whitespace is very helpful. Oh, it's nice that something is shorter. And also that if I want to print something, it's called print. It's not 13 lines of gobbledygook. So

Carlton Gibson 8:47
can I ask that stage at the, you know, the 1.5 stage where they're third party libraries that you ran into quickly? And what were they because, you know, later on, it was Django and requests and, you know, these other big stalwarts of the ecosystem, but what about them

Ken Whitesell 9:01
at that stage? No, I really wasn't aware of the third party ecosystem. My needs at that time. I mean, at that point in time, let's see 99. Yeah, 99, I was still I was still doing a lot of low level work with server server management. The company that I worked for, at the time, was an insurance firm. And they had 300 offices scattered around the United States. And so what we were doing is that we had this rather intricate dial up system, that we would distribute updates from the home office, we would dial to their local network, send files to them. And that was the purpose of this code is that we would send data updates to them, whether they be rate changes, or customer updates, whatever, we'd send these update files. out to them. And then the system would receive the files, unzip them, and add them to the local copy of the database. Because at that time, there was no wide area network that we could afford to implement through these 300 offices, broadband internet was still a dream in the future, everything was dial up. And so it was do the processing in the home office, distribute the files overnight. They come in in the morning, and they've got refreshed data

Carlton Gibson 10:30
over the wire updates. That's, that's, you know, they're still doing that with iPhones now, you know, I get a little message. That's true. Ulysses has been updated to the latest version. That's cool, though. That's really cool.

Will Vincent 10:40
And that's so funny to me, too, because my brother in law uses Django at a health insurance company called Safari that does exactly that, you know, with Django 20 years later. So sort of the tools have changed a little bit, but the problem is still there about, you know, collating all this health insurance data.

Ken Whitesell 10:59
Yeah. Yeah. You know, how do you keep 300 computers in sync that aren't directly connected to any sort of internet or direct networking? It's an interesting problem,

Will Vincent 11:11
right? Yeah. So Django, speaking of the web, when did when did that emerge for you?

Ken Whitesell 11:17
So I first saw Django, it was pi con 2005, I believe it was, in my mind, I've dubbed that the PI kind of web frameworks. Because that was like the time period, the 2004 2005 time period, where the saying was, you know, you haven't worked in Python until you've at least written one web framework. And there were dozens of them floating around, some better than others, you know, and, and a number of them just kind of faded off rather quickly. But all of a sudden, out of the blue, there's this new one that poked its head upset. Hi, I'm here, Django. And I remember at the time ghido, making some comment. I don't know whether it was a keynote or just a talk or even possibly just an offhand remark that he was expressed an opinion, personal opinion, that, you know, he felt that there was going to need to be some sort of Shakedown of this plethora of web frameworks, you know, that there really doesn't need to be 10 different web frameworks, all receiving a lot of attention. And he kind of thought, you know, had a very favorable impression of Django at that point. So it's like, Okay, if guidos leading in that direction, it's worth taking a look at it. So I did them properly, had a position change, Job Change, same company position change, and completely left the Python world, I had nothing more to do with Python, from a job perspective for about 10 years. So I kept my eye on it, you know, I always kept my fingers in the PI Python world as a hobbyist more than anything else. But over the next five years or so I saw where Django as a complete web framework really kind of gained the mindshare, but it never had a reason to work with it. Then I actually did change jobs. In 2014, I had a company, another insurance company hire me as a Python, Django developer. And while I acknowledged that I had no direct Django experience, apparently, my Python knowledge was adequate for him to say, okay, you know, Python, you can learn Django and dropped me into the deep end of the poll.

Will Vincent 13:56
I just want to point out that Python 2005 was, I think, only the third one and it says on Wikipedia, there are only like, 400 people there. So you were pretty early, I guess it was in DC was that you based? So maybe it's local, but

Ken Whitesell 14:10
it was so that's the point. It was I was living in Baltimore, working in Baltimore at the time, and you know, said to my boss, hey, there's this Python conference that happens to be local. And he said, Sure, no, travel expenses. No hotel expenses.

Will Vincent 14:25
Exactly. buy you lunch, maybe because now Python is you know, 4000 people and but it's funny that you mentioned keto, because I went to my first one 2019 2019 after going to Django con twice, and I was like, Oh, it's gonna be like Django con but a little bit bigger. And it's, you know, orders of magnitude bigger. But at lunch the first day, I looked up from the buffet, and it was ghido right across from me. I was like, oh, man, like, ah, I guess. It's sort of like made it real in a way. Anyways, just to get my anecdote in there, but I just want to point out yeah, it wasn't. It wasn't like everyone's Going to Python and 22,005. It's also interesting because when we interview people, there's quite a lot of people who, when they move away from Python, and Django, professionally, their personal and community interest spikes, almost as like an antidote to to their day job. And, you know, eventually they they find their way back to the fold professionally, but it can take a while. That's, that's not unusual?

Ken Whitesell 15:24
Well, I've been I've been involved in a number of different hobbyist communities through the years. And what really struck me was, how wonderful the people were at that first pie con. I mean, I met some people that they may not even remember meeting me. But the impression that they left on me, you know, the attitude towards people at that point, of course, again, you know, as you're saying, 400 people, it's much more intimate setting. And I walked out of there, you know, knowing this was a group of people that I wanted to continue to associate with, which is something that I found lacking in a number of other professional conference environments. I'll put it that way.

Carlton Gibson 16:22
Yeah, very, very different.

Will Vincent 16:24
But it's rare to have conferences built around learning and sharing, as opposed to sales. Maybe especially in technology. I think about, you know, that's something sort of take for granted go into Python and Django con, but most tech conferences are a monstrosity of sales. effectively.

Ken Whitesell 16:42
I don't doubt that. But that's, you know, I was thinking in terms of other hobbyist type organizations, other PC based groups, or microcomputer groups that I have been affiliated with in the past, more so than than the professional type conferences, because those at least I know what I'm getting into. Yeah, you know, you go, you go to share? And are you either you familiar with what share is? No, no, no, no share is the international IBM users. community, if you will, dates back to the late 60s, back when IBM operating systems were effectively open source because you'd get, you'd buy your IBM mainframe, they'd send you the tapes with a source and you had to actually build your operating system for your hardware configuration. And so share as a user community grew out of that, as what sits in my mind as really the first open source community, even though it was not known by that name at the time. And so share was an opportunity for mainframe owners to get together and share patches and updates and things that they had done with the operating system to make it work better. And so but share grew in the 70s to being as you describe these these ultimate huge commercial endeavors as much as anything else, yet, they still at their core, tried to be focused on the community, the fact that it's users helping users rather than, you know, under the sponsorship of IBM rather than being an IBM conference. Yeah, I

Will Vincent 18:33
mean, I used to live in San Francisco where they had dreamforce, the Salesforce version, which is sort of my main experience with something that would just overwhelm the city for a week at a time. And, you know, they'd have you to play shows, and it's just like that show Silicon Valley, where you'd have tech people on stage with musicians. rings, very true. But anyways, so Django cons, let's talk about those. Yeah, Django cons, because

Carlton Gibson 18:59
that's where I met you can like you came out to the US and massive, long way and then come to the stagger to the desk, get there like I've arrived. You're like Hello, and I met you like the first face of Django con that I saw. So how did you get involved and wish you story that

Ken Whitesell 19:15
I like to think of myself as a very selfish person. I know what I want. And I'm willing to do what I think's necessary to help achieve that. I want good conferences. I want good pie cons. I want good Django cons, because I get more out of a good conference than a poor conference. I also know from having been on the other side of the desk in the working at and administering and running conferences. What a pile of headaches that is. You know, I believe that every tech person should be required to run at least one conference If nothing else to gain an appreciation of what that really takes, and I've done my fair share of work on that back end, I know the headaches that come with it. One of the most serious headaches is wrangling the cats. Volunteers actually show up on time when they say they're going to be somewhere to get things done.

Carlton Gibson 20:24
See you like the sergeant major, absolutely,

Ken Whitesell 20:27
absolutely critical roles is that person at the front desk, to make sure that the people coming in, don't feel lost, know that they're in the right place, and are to some degree acknowledged, you know, hey, you're here, welcome. We're glad you're here. That's something I can do. And I know by doing that, than the people in the back office, who have more important things to worry about, than greeting the people at the front can continue to take care of that. And I can do that, quite frankly, it's really easy to do. It's not that it requires a significant amount of effort. It requires zero prep time. I just show up, and I do my job.

Will Vincent 21:18
You gotta wake up early in the morning, though, right? Because like, let's be honest people, you know, the first day they're, they're at, like, 7:30am. And by the last day of a multi day conference, it's you know, more like 10am and people roll in, but they're already registered, so less to do. Yeah.

Ken Whitesell 21:33
Yeah, and the workload tails down that first morning rush is always entertaining. But I'm a naturally early riser. Anyway, I've worked. I've worked for many, many years, like a six to two, six to three shift. So it's not not unusual for me. And then when you think about conferences, being on the west coast, that does not help matters. And he because you know, I'm waking up at 2am in the morning, first couple of days. And again, you know, 3am 4am in the morning, what else are you going to do while you get up, you have breakfast, got nothing better to do go downstairs, start pulling out tables, setting stuff up, and you're ready to go? Well, I

Will Vincent 22:16
Carlton, and I felt we felt quite pleased with ourselves with our strategy at the last Django con where you know, because Carlton is coming from Europe, and I'm just from the east coast, and you know, so we got up and we did bike rides every morning. I think we're out the door by six Carlton, right. We got

Carlton Gibson 22:31
it was it was quite a

Will Vincent 22:33
Yeah, it was good, though. I

Ken Whitesell 22:34
mean, sounds too much like exercise.

Carlton Gibson 22:36
It was quite a lot like exercise. Well, we'll we'll obviously goes to the gym or something is normal life for us. I'm a bit like, what's that? I remember those from childhood? It's a bike. Yes.

Will Vincent 22:48
But But both of us met you at the registration desk. And then I volunteered the ones after that both the Python Django con and and you're right, it is it's so overwhelming the first conference you go to because you don't know anyone you don't know what's gonna happen. And then to have a friendly face faces, sets the tone for the rest of the conference, for sure. I mean, I was, you know, in that bucket, my first Django con, and first Python as well. So it's a great way to meet people, as you said, I mean, you know, if you go to conferences to meet people, instead of having to, you know, chit chat at a table, if you work at the conference desk, you're just bound to meet all I'm horrible with small talk.

Ken Whitesell 23:23
Yeah, absolutely.

Will Vincent 23:24
Yes, sir. It solves that problem.

Ken Whitesell 23:28
It really does.

Will Vincent 23:30
So maybe I can ask, since you've been to way more icons and Django cons than either of us, what's your sense of how the Django cons in particular, and just the community has developed over the last, you know, five, 510 years in particular, what's your sort of broad sense of all that?

Ken Whitesell 23:48
Um, I mean, the Django con community just continues to amaze and impress me. Because of the the focus and the attentiveness on the user experience, the the customer experience the attendee experience, however, you want to want to phrase that, you know, for really putting that focus that emphasis on trying to make everybody feel welcome and accepted. And hey, you are one of us. It doesn't matter where you're from, it doesn't matter what you do in your job or not, do you know student hobbyist, whatever. You took the effort, made the initiative to come here. You're one of us now, and we're gonna do everything we can to take care of you.

Carlton Gibson 24:44
Now, that includes briefing like the other attendees right there so that when the when the conference starts, there's always that kind of half hour presentation about you know, what is it Django con and why is it so welcoming? And you know, that they have this idea about standing in the Pac Man rule? Where do you always leave A gap for someone to come and join. And then, you know, this idea that how n is the number of Django cons you've been to? Well, you know, n plus one, you've got to meet that many people each day. So you know, if it's your first one, you've only got to meet a couple of people. But if you've been to 15, then you got to get out there and you know, really get to know folks. It's just little things like, you know, they're not little, they're massive, but they really structure the day for me and the structure of the conference and structure the mood.

Ken Whitesell 25:26
I think that last point there really hits it for me, you know, striking that mood setting that mood for the conference. That Okay, yes, it is Django con. It's not that it's not about Django, because it very definitely is about Django, but it's about the people working with Django. And that's a mood that's that's, I think, can't be overstated, because it's just so absolutely critical to the, to the experience of the people attending.

Will Vincent 25:58
And I do want to note, I mean, specifically for the US Django cons, there's, there's definitely the Django events foundation in North America, which is a nonprofit that exists to support. Django cons, because each one requires a lot of work by people on the ground, but to have an overriding organization that helps with everything makes it a lot easier. They also they contribute to the Django Software Foundation every year, whatever proceeds they have from the conferences, so certainly for the US one having having that organization that people on it, Jeff Triplett, Craig, Bruce, Adam, fast, there's some others that's in a way thankless work, but hopefully people, you know, you go to the conferences, and you meet them, because they're the ones running around, not at the conference desk, not speaking but doing everything else to make it a great experience. Absolutely, yeah. Well, let's get to the forum. So this is, actually, before we get that congratulations on winning this year's Malcolm tredinnick Award. Like you. That's no small thing. And that's an annual award for contributions to the larger Jenga community. And I think in particular, a lot of the people who nominated you mentioned the Django forums, this is something new, and you are, I think, far and away the biggest contributor, so maybe you could, let's talk about what the Django forum is. And I'd be curious to hear about not just your involvement, but what you've learned, engaging with so many people this past year. So on the forum,

Ken Whitesell 27:21
I must confess my initial reaction to your statement there, I may or may not be the biggest, but I'm probably the most frequent.

Will Vincent 27:31
But you pick the metric metric you want, you know,

Ken Whitesell 27:38
I am probably larger than the average member. Anyway, but leaving that aside, trying to become serious here.

Will Vincent 27:48
So on the forum, there's all sorts of questions. There's more advanced topics around where to put the logic favorite third party packages, but there's a lot of people new to the community who have questions on getting started and more fundamentals in in particular in that area, you've been very active. So I'm curious what, how those how those interactions have been, like, what is that? Because sort of like being the registration desk in a way that people ask a question. And, you know, they don't go to Stack Overflow, they go to the forum, which is really has experts. And, you know, but so what sort of patterns Do you see, right? Because a lot of times, it's kind of the same question over and over, that beginners have around getting started in Django.

Ken Whitesell 28:27
It is or it isn't. Although I do tend to kind of paint a broad brush for some of the real recent people who are diving into it. I know that I emphasize a lot. The two, what I consider the two most frequently used are reference tutorials being the official Django tutorial, and the Django girls tutorial, which I think both are very excellent. They both cover a broad span of subjects from slightly different perspectives. And I recommend both highly, because they'll give you two different angles on something. I know for myself, when I'm learning something new, I can't just look at it from one angle and expect to understand, I typically need to look at something from two, three, or even four different angles before I start to build a mental model that resonates. And I still remember from seven years ago now, what my sticking points were with Django, and the difficulties that I had in learning it and moving from the other frameworks that I'd worked with. And I know I have detected that for the people coming in who are new to Django. You know, you can divide them into two very broad categories. They're the people that are new to web frameworks in general. And they're just learning Python, and they're just learning Django, and it's, hey, I want to produce a web page and they have one mindset are one perspective that they're coming from. On the other hand, you have people that may have experience in other web frameworks, whether it be spring or dotnet, or one of the PHP frameworks, Drupal, WordPress, whatever, that are moving to Django moving to Python. And they come at it from a very different perspective. Because the first group is I don't know how to do X, how can I get to point x, and those are the ones that I try to steer to the tutorials initially, because you know, they need that foundation, something to build on, you know, here, build these basic building blocks, then if you still have problems, we at least have a terminology a common terminology that we can work forward from. But let's get some basics out of the way, let's make sure that we're using the same words for the same things. Then on the other hand, you've got the people that are coming from a different framework. So they already have some idea of I want to do X. And this is how I would do x and framework.

Will Vincent 31:09
Exactly.

Ken Whitesell 31:10
Now, how do I translate that to Django?

Will Vincent 31:13
Yeah, where's the controller and

Ken Whitesell 31:15
that? Yeah, and that is, can be a much more challenging issue, because they actually have to unlearn the familiar patterns of how they would do things in that other framework. And recognize the fact that Django has its own patterns, its own ways of doing things that aren't a direct translation from a different framework. And the phrase that I use most often on that is don't fight the framework. Don't try to make Django work like WordPress, don't try to make Django work like spring, you're going to create yourself headaches, don't change the framework, change your mindset

Carlton Gibson 32:04
that applies at every level, I mean, quite often I do client work. And I'll go into a project where they, you know, got me in because they, they got a project that's struggling, they've got to the point where they kind of can't progress further because of, you know, technical debt reasons, essentially, and more than nine times out of 10, that the issue is they're fighting the framework, they're trying to push it into the wrong way. And so you spend a lot of time moving things around. So it starts to look like a Django app again, and then all of a sudden, they can breathe, and it's like, ah, we can make movement now. And we can and so it's not whether you're a beginner or not go with the grain of what it's trying to do for you. And

Ken Whitesell 32:43
achieving that mindset, actually, is one of the best benefits of attending a conference, such as Django, Khan, or, you know, whatever, again, whatever framework, it doesn't matter. The documentation can only take you so far, the document, documentation can tell you how to do X. But most documentation for pretty much any framework I can think of does a pretty poor job of saying, this is how you should think about x. You know, this is how you need to approach the problem show that the solution you're trying to implement makes sense.

Will Vincent 33:25
Yeah, it's how versus why I think it's harder, especially for a fit official Doc's which are typically written by a community to maybe agree on that is one piece. But it's also the case that I've thought a lot about the fact that there's a difference between docs and tutorials. And people confuse that and want both, and I understand that, but they're separate for a reason. And a lot of the times when they're complaining about the docs, what they want is a tutorial that provides that, that sort of top level, you know, perspective, as well as the details which the docks can provide, because the docks can't be a tutorial, it's already a massive, well documented thing to to be what it is. But yeah, so the forum in particular, like some of the questions I've engaged in, are, I think a little more in that top down perspective, were around like, like one of the ones I think that a lot of people respond to was where to put the logic in Django, because as you progress in your Django journey, that's a very confusing thing. And I think maybe, especially if you're coming from another framework, because the reality is you can do it a bunch of different ways. And there are some best practices, but it sort of does depend on how not to fight it. So I guess I'd be a tee that up to both of you. Someone says where to put the logic in Django. I might. So my quick take is I would say if you can put it in the view, that's great. The model is probably better. I would wouldn't dive into model managers, unless you really have to, and I would keep it out of the templates? That's my really quick take. But there's a lot of ways to do it. I know, not an easy question that there's a lot of response, we'll link in the show notes to the there's a lot of responses in the community to this question, because there isn't a simple answer.

Ken Whitesell 35:19
There is not and it is so context sensitive. You know, there are cases where model managers are the right answer. There are cases where model managers aren't the right answer, you know, for any of those locations that you identified, there are specific situations where they are or are not the right answer. And so I don't think you can make a blanket statement that your logic always needs to go here.

Will Vincent 35:49
And yet people want to know where to start though, right? I mean, that's the thing is like, that is the correct response. But they still say, okay, but, but how, and part of it I've seen too, is sometimes people, depending on what their background is not understanding what Jango can do what Django can't do. So a lot of times, they want to like pull in data from somewhere else, an API or a database. And they don't really know where to do the logic on that. So a lot of times this will, Django is not going to clean your data for you. Or I even had a long back and forth for someone who's like, What does Django even do for me, I was like, it does the web part for you. But you know, because this person want, you know, I love the projects that beginners have, because they're just, there's, they're so you know, for those of us with experience, it's just like, that sounds awful. Like, that's gonna be impossible, but they're like, well, I want to pull in this and this and this and make it real time. And, you know, they're sort of unencumbered by by reality, which is good, because it makes makes us think about, you know, what could happen, but so much of it is an outside of Django scope wanting to apply logic to things, which is like, yeah, write a Python script. You know, Django is not gonna Django can't help you with that, is some of the some of the emails I get with Carlton, what's your response? You've been quiet. Yeah. Okay.

Carlton Gibson 37:03
So you know, Ken's right, it depends. But one, one analogy I always go back to is this idea of application layers, right, where you've got, say, the model layer in the middle, and then, you know, a validation layer around that. And then you've got a view layer, perhaps, and then some, some UI bits around that, perhaps, you know, this is an old software architecture, way of thinking about it. And I think that works quite well with Django in that you've got the model layer for, you know, business logic. And so one thing I do use managers for is it create a custom, say, create method where I need to pass in a couple of parameters. And there's a bit of special hunky dory logic there, I want that inside a manager not or inside something, I want it encapsulated so that the rest of my code doesn't have to see that nasty. And so I quite often use managers or custom query set methods for that kind of logic, because they, the view, then can pass in to the model manager does what it needs. And then the model manager does that, that business logic. And then what does the view is left with? Well, the views job is to take an HTTP request and turn it into an HTTP response. So is, is this logic related to view handling HTTP, if it is, it belongs in the view, sometimes you get some data from the view, and you want to pass it to the model layer. But that's you can't just pass it straight in you want, you don't want the bottom layer throwing out the DB errors because you passed it bad data. So that's what we'll have a form. And sometimes formula logic can be quite complicated. And a particular model form when you hit save, it gives you back an instance. So any kind of logic about validating the data and getting it ready to pass to the model layer that lives in the form. And then I don't know, you might have an HTML button, that you It has different values, and depending on I don't know what's going on on your site. And so you might create a template tag for, you know, sign up button, and then you might pass it parameter, and it does all the fancy logic to generate the HTML that you don't really want to put in get context data for. I mean, you could call it from get context data, but you know, then you'd need a little helper function to keep it tidy. Well, it could just live in a custom template tag, which is really easy to write folks, you know, you know, the details actually super powerful. So, again, it depends, but I that's how I kind of think about it, try and think of what layer does is and and what I don't want is the model layer having to reach out and do something for the view that I don't mind the view layer reaching down to the model layer and saying, hey, please, can you provide this service for me? But why don't want to Is it the other way around and try and keep some sort of cleanliness like that. But beyond that, it's impossible to say without a concrete example.

Will Vincent 39:42
Well, that what you just said, Carlton, you've referred me to will put in the notes Tom Christie has a post from 2014 sort of your point on you Django models and capsulation and data integrity.

Carlton Gibson 39:53
Yeah, no, I will. I will link to all that to the heat death of the universe. That is such a great post. It's just amazing and more or less that I don't quite agree with him about mortal forms at the very end, but the rest of it is dead. Right? And there was a debate recently, somebody wrote a book about I can't remember the exact title is about creating a service layer. And they were very anti. Oh, yeah, Django and the ORM in it. And there was a couple of posts one by James Burnett and another one by Luke, who's and surname escapes me momentarily. Yeah, reply, yeah, replying about, you know, how you create a service layer in Django, or how you avoid creating a service layer using the ORM the way it wants to be used that. And again, this goes back to cutting with the grain of the framework.

Will Vincent 40:39
Well, and in the forum discussion, Andrew Godwin and some others talk about that services. argument, because I think it was timely Yeah, when that was brought up. But I think part of the thing is, you know, we look like if I was going to teach someone this, you almost want to show them? Well, here's the five ways you could do that same, you know, save method, so that they have the context to understand why one is better than the other because a lot of times, they don't know how to do any of the five. So to talk about, well, this goes here that goes there, they sort of need the reps to understand how the pieces fit together, I think, right? Like I've thought about, like, how many different ways can I do it? To do app or even hello world, actually, I have a post on hello world done five different ways, which I think is quite clever. But I think I haven't explained it well enough to get it kind of get it this, you know, multiple takes on the same issue to show how the pieces fit together. Because it does take quite a while to understand how the pieces fit together in Django.

Ken Whitesell 41:38
Does your do your ways include Carlton's single file? Doing a Hello World? Show that Django con that,

Will Vincent 41:47
you know, I'll link to that too. I made a I made a whole GitHub repo for that. And there's been discussions. I don't know if I do. I'll put the links in. I can Yeah, cuz I think it's, the thing is, is that by the time you get to showing how to do one thing, five different ways you've lost most people. So you know, like this Hello, world one. I think it I almost don't, I don't mention it to beginners, because I know it's just gonna confuse them. When I'm like, you don't actually need to have a views.py file, like you can stick the view in there. And you know, and then Carlton's thing is just you know, that's mad scientist realm. But I'll put the link

Carlton Gibson 42:25
does just to show how it all fits together. Right. I would have created and do create single folder. Django apps, right. But a single file Django app.

Will Vincent 42:37
Yeah. Okay, so I see. I'll add it actually after this. So I have it. It's too late. Django, hello, world five different ways. And I'll put a link to Carlton's talk. Yeah, cuz I have a whole repo with the code cuz Carlton put the code up on his slides. But yeah. How quickly? Can you lose? Can you lose? Uh, no. Someone asked me a question about Django.

Carlton Gibson 42:58
The point you made just there was about reps like, and that's why I like books, like, you know, guides around, I think we can't have it all in the Django Doc's, as you said. But like books like yours, where you can go pick it up, and you can go through it. And there's several different projects, and there's different things, and they teach you the different aspects, I think that's an essential resource on the side, you can't just have it all in the Django, Doc's because they've become unmanageable. They're already, you know, massive.

Will Vincent 43:24
I mean, I almost think that another future book would literally be a book on the simplest crud site, done 510 different ways to as a intermediate level thing, just to illustrate all these kind of points, like just to show like, well, because I usually in the beginners book, I sort of, I talked about different ways to do it. But I show the way that I think is the most elegant, accurate way for a beginner to do it. I don't overwhelm them. But maybe for next book, you'd be like, Well, here's our URL here, you know, here are all these different ways you could do it. That might actually be an interesting thing, though. I feel like yeah, it's hard, hard to know what people will want, but they should, they should go through something like that, if someone felt inclined to make it. But speaking of Django, we're coming up on time, Ken, but one of the questions we wanted to ask you was ways to improve Django. In the broadest sense, you know, if you had a magic wand, what are things, you know, technical community, otherwise, what do you think are some ways that Django can improve itself going forward, so it stays relevant?

Ken Whitesell 44:30
I consider myself kind of an outlier in terms of usage in the Django community. I've known from talking to many people. How I use Django is really different from most people that I talk to. I'm not sure that I actually have a good opinion on that question. Because for what I do with Django, professionally and hobbyist out of the mainstream in terms of You know, you think about Django, it builds websites. And so what is a website, a website is designed to present information to people. Okay, I do that. But the appearance of the website, how it looks how a person interacts with that is much less important in my job than the actual data that I am retrieving and displaying to the user. My websites will never receive any awards other than possibly a Razzie for their appearance for the look and feel. Because I'm writing websites for internal company employees in very small numbers. You know, my average, my average website has two users. Yeah, right. That's, that's my average user base, per website. And look and feel just really isn't an issue there. I just need Django to be able to go out collect data from different sources, and present that in some way that an engineer can look at, for example, my current project that I'm working on, I'm decoding TCP dump pcap files, and I am decoding them and presenting packet level displays. So that it's, in a sense, it's Wireshark, through a browser, I was just about to say there is Wireshark in

Carlton Gibson 46:34
the browser. But

Ken Whitesell 46:36
yeah, but it's, it's even more targeted than that, because I am picking out particular fields, it's not presenting the full frames, it's highlighting specific data fields and organizing that so that an engineer looking at the network traffic, sees at a glance, what it is that they're interested in saying,

Carlton Gibson 46:54
I think this kind of thing is more common than you give it I

Will Vincent 46:57
think most people are doing, I think most engineers aren't touching the front end at all.

Carlton Gibson 47:03
But like low traffic, like it's an internal application, it's not, you know, you're not trying to serve 100 people concurrently, you're trying to serve 100 people a month, that sort of thing. And that that's very frequent. And, you know, these kind of internal data analysis type present, I think that's a lot. You know, obviously, the agencies that, you know, you go to the conferences are called we work on this big site, and that's user facing. But I think a lot of people are using Django in this way, for a while. But what so what would you what would make your use case easier?

Ken Whitesell 47:34
Honestly, I don't have an answer to that. You know, part of it is, I've gotten so used to Django as it is, I've become very comfortable with what I'm doing with how I'm doing things. I think the biggest improvements that I've seen over the past couple of years, has actually been in the tooling around Django itself. You know, had you asked me this question three, four years ago, it was like, find me something that lets me get rid of Eclipse, please. And with Visual Studio code now, eclipses, ancient history. You know, so it's all the tooling, that is, you know, maybe I'm just becoming more aware of it. But things like black, or Pepe, or, you know, other other facilities of tools around Django itself, that is making it a more complete environment, that I'm seeing the things now that I was used to working in a Java spring environment, or dotnet. You know, I'm seeing this type of first class support around Django. So it's not that I have any recommendations for Django itself. It's that I'm giving huge kudos to the people who are working around the fringes, you know, who are doing things that are adding on these external features, though, that make working with Django that much easier. And that more seamless in terms of keeping things moving forward? Yeah, super. Super.

Carlton Gibson 49:23
And so if to follow up, then what would what would you say say the last 12 months is your favorite package that you found that fits in a club?

Will Vincent 49:31
Oh,

Ken Whitesell 49:33
put me on the hot seat

Will Vincent 49:37
Wll we were just on Talk Python. And he always asked his guests that at the end. So

Ken Whitesell 49:46
I have to say what has changed my life most significantly in the last 14 to 15 months has been a much more aggressive use of Visual Studio code and getting it integrated into my workflow. Okay, no, I started out using it as a Eclipse replacement, you know, basic editing and putting projects together. But as I continue to work with it and learn how it works and understand how to do things with the different configuration files, like custom launch dot JSON files and, and using the debugger with it, I've just more integrated, I've gotten more in depth more comfortable with it more as a tool than just an editor. Yeah,

Carlton Gibson 50:37
no. Okay, that's a good.

Ken Whitesell 50:38
So that's been that's been my biggest improvement in my workflow over the last year.

Will Vincent 50:46
I think all all three of us, that's our primary editor these days, I know Carlton, you BB edit, right, you have one that you use, occasionally. But yeah, so

Carlton Gibson 50:53
I've been using BB edit forever, I have it open all the time. Because as great as vs. Code is, and it's Mali file search is very fast, when you're trying to pick through sets am trying to pick through a trace in Django, and I'm trying to have all the source files open and all the rest, BB edits. multifile search is just phenomenal. And you can you can have the different searches open in different results windows. And you know, VS code doesn't like you doing that because it's got to fire up a JavaScript it is basically gonna fire up a new instance of Chrome for every window you open with they, that's fine. But you can only open so many words VB editor native Mac App. And it's it's for that kind of forensic research through a big codebase. It's indispensable for me,

Will Vincent 51:36
I still use atom to I mean, sometimes I just want a different editor, I want something my atom config is very, very, very basic. And sort of, like, in a way my BB edit, because my VS code is all customized. And sometimes I just don't want to deal with any of that. I just want something simple. So

Ken Whitesell 51:53
Oh, yeah, it's I still use notepad plus plus for some things. nano on occasion, you know, if I just need to hop onto a server and make a quick patch or something? Yeah, you've got to be comfortable with lots of tooling.

Carlton Gibson 52:08
Are you on Windows? Can Can I just ask?

Ken Whitesell 52:11
My primary development laptop here is Windows. But I do a lot of my development in

Carlton Gibson 52:18
Ws. Yeah, I was gonna want to I using the Ws L. And

Ken Whitesell 52:22
so I'm stuck at Ws l one for the moment because Ws l two does not support ipv6. And that is absolutely required for the stuff that I do. So yeah, it's it's windows Ws l one. I do run VirtualBox for some local virtual machines. And then my server room, all of my servers are various shades of Linux. Okay, cool.

Carlton Gibson 52:51
Okay, go server room, I need to serve a room. That sounds like a nice thing to have.

Will Vincent 52:55
Well, as we as we head out, are there any any tips you have for people listening? Who can start to be as involved in the Django community as you have been? What would you say a good first steps for someone who's using Django but wants to get more involved?

Ken Whitesell 53:08
online? I'd say I'm obviously I'm partial to the forum more so than the mailing lists, I think it I find the forum to be more personable, more personal, more personable than the mailing list. Gengar users is a fine mailing list, I still read it, but I was never really active on it, because it just for whatever reason, that interface feels impersonal demand forms. So I very much appreciate the forum, because it feels more community, like than the mailing list ever did to me. And it's like, please join the join the forum, browse some messages. And if you've got something to say, to chip in to answer a question. People don't bite. You know, it's, I remember my first couple of answers, there was a lot of trepidation. It's like, well, if I answer this, who's gonna jump on me and say, you're wrong, you're wrong.

Will Vincent 54:09
And that's pretty rare. It doesn't happen,

Ken Whitesell 54:11
you know, have been corrected. And, you know, that's all part of the people that I will name, but they've been very kind and pointing out when I've made mistakes. You know, and for that I am grateful.

Will Vincent 54:29
Well, I think one of the nice things about the UI of the forum is that when you use the search functionality, if you type in a question, it will pull up if it's already been asked and answered, because I would say beyond not looking very nice. The my biggest issue with Google Groups is it's very hard to surface past conversations. So there's 10 2030 takes on the same thing. And the forum is nice to have it in one more of one place. And it's easier to read through and, you know, I think so similarly to stack overflow. It's there's sort of one place for certain questions around different topics. I think that's helpful. So what about offline?

Ken Whitesell 55:05
What about offline?

Will Vincent 55:06
when when when we're all able to meet in person? What would you recommend? I mean, obviously attend to Django con and sounds like, you know, put your hand up to volunteer

Ken Whitesell 55:15
or even the local Django meetup? Yeah, that's true. Oh, you know, it's I actually, we had met a person individual at a Django con three, four years ago. And we created a local Baltimore group to try and do some meetups. On unfortunately, that kind of faded away for a couple different reasons. Lack of a place to meet being a big one.

Will Vincent 55:46
But,

Ken Whitesell 55:47
you know, it's doesn't take much to actually try to form a local group. If you can't find something local. It doesn't hurt to say, put out some flyers, metaphorically, you know, go online meetup. What's it meetup.com that you can you can create local meetups or even show and tell in the forums probably a place that you could say, Hey, I'm looking to meet people in area XYZ. And try to find a local community and if there's not one close by even see if there's one that you can get started. But certainly, there's a lot to be said for meeting in person. You only need to have you.

Will Vincent 56:35
Well, that's what and then

Carlton Gibson 56:36
we have to have you in an open invite.

Will Vincent 56:39
Rachael Calhoun on recently who, who works the Django girls, and she was in Korea at the time, and it was two or three people who want to study Python. And that's how they got started. You just need a handful of people. And often it's a Python thing, because Django is obviously a subset. So you know, it's fine. If it's a Python meetup. In Boston, where I am, there's a lot of developers. So there's Python and Django, but usually the Python one, you can start talking about Django there too. So anyways, I think we're, we're at about an hour. Thank you so much for taking the time to join us. Yes. Congratulations again on the Malcolm award.

Carlton Gibson 57:17
Yeah, absolutely.

Ken Whitesell 57:19
Thank you very much. Hi,

Will Vincent 57:20
there any outgoing thoughts you want to share with anyone?

Ken Whitesell 57:23
No, just thank you both very much for hosting me this morning. This has been a pleasure. We'll Carlton. It's always a joy to be able to talk with either one of you. Looking forward to the day when we can all meet in person. Yes, yes.

Carlton Gibson 57:36
Touch 2022. No, but hopefully Fingers crossed.

Will Vincent 57:40
Yeah, virtual and then until. So. Thank you, Ken. Forever, unless you find us chat, Django on Twitter, and Django chat.com for this and future episodes. We'll see you all next time. Join us next time. Bye.