Paul Everitt is a Python advocate at JetBrains, the maker of PyCharm. We discuss what makes PyCharm a powerful Python IDE, its current “year of Django” focus, and why testing isn’t about eating your vegetables but joy.
Will Vincent 0:06
I welcome to Django Chat. I'm Will Vincent joined as ever by Carlton Gibson. Hi, Carlton. And we're joined again by Paul Everitt, who's a Python advocate at JetBrains. Welcome back, Paul.
Paul Everitt 0:17
Hi, Will Hi, Carlton.
Carlton Gibson 0:20
Thanks for coming on.
Will Vincent 0:20
So it's always a pleasure to talk with you because you've been in the community for a long time. And there's really interesting things happening at JetBrains, especially around pi charm, and Django, maybe I'll give that to you. You were just telling us before we started recording, there's some exciting stuff happening related to Django.
Paul Everitt 0:36
Sure, and I'll give the standard caveat that I am with JetBrains. On the other hand, JetBrains is so cool. I joke that I should be paying them, not them paying me but don't tell them I said that. We are we been around a while as Python IDE Django ID. In fact, I believe the original tagline for PI charm 15 decades ago was Python and Django IDE. So we're pretty good at analyzing the magic strings and Django the magic structure and all that and putting it into machinery the IDE can use. We are starting a year's worth of a lot of things going for Django. We've been doing a lot of things in different directions over the past few years past API and things like that. We're getting back to Django, and a lot of cool stuff coming down the pike in the product itself. But also things that we want to talk about and show and teach and patterns. And this whole idea of what is professional development look like for Django.
Will Vincent 1:52
And it's a bit of an open question. I mean, that's partly why we have this podcast is because unless you're doing the hallway track or or work at a company with people doing interesting things with it, there's no easy way to keep up with it all besides the different forums and mailing lists. So
Paul Everitt 2:07
well said just follow Carlton on Mastodon, I mean, that dude just can't stop typing.
Carlton Gibson 2:12
Well, I don't know about that. But in between where my tests are on and I've got throw some rubbish out there. So I wanted to hit you up all because this week, I've looked like over the summer, I've been using VS code, for whatever reasons. And literally like this week, I switched back to pi charm. And I pulled it out. And I've been having any number of squiggly lines all over the place. And that was going on with VS code. And I switched over to pi charm. And I had exactly the same squiggly lines, it's all about the typing. It's like the you know, because the static analysis doesn't, you know, pick up that you've overwritten the manager or something like that. And then I went into the PI charm settings, and I hit the Django integration box. And it just all those wiggly lines went away, and it picked up the reverse managers and, you know, just everything. And it's that depth of understanding of Jango, which, I think is pythons real strength.
Paul Everitt 3:06
Indeed, and we need to make it clear, that button you collect is the I'm paying for PI charm button.
Carlton Gibson 3:13
You know, that was that's in that professional edition. And that is
Paul Everitt 3:17
the first thing that people encounter when they take a look at us is, hey, we operate under this mode of you are our customer. And we will support you. And this is a normal kind of software relationship. Python professional has Django integration, you got it exactly right. When you say this is a Django project, then lots of things start to surface for assistance.
Will Vincent 3:50
Well, that's refer back to the we had Alexian, with you two years ago to talk about some of that work. And I know it's ongoing. So I'm curious, just internally, so what besides you advocating for it? Like? How do the powers that be decided this is the year of Django? Like what what's the forces that come together to make the is it just every year as a different major framework? Are there particular? You know, we were talking again, offline about changes in terms of JavaScript and server side rendering? Like, how does that all come together? Where you can publicly say like, this is our fault. This is the focus for the next year. So it's a good point.
Paul Everitt 4:29
In the past number of years, we with Python, we we got such a big scope, the surface areas huge surface area of Python is now huge. Python isn't a market anymore. Python is a collection of markets. And products can get into a mode of I'm going to do a little bit of everything. And then they go through a mode of I'm going to do a lot of something. And so we're just kind of decided that Django is a really good offense. Ready for us in a number of ways. We have a long and great relationship with Django. That's probably the best part of the prime part of it is that there is a relationship here. Second, Django is for professionals. And professionals who have a tendency to do larger projects where an IDE helps you. In teams, where an IDE helps you, people who have a psychographic profile where they value tooling, like testing, where IDE has helped you. And I'm saying it intentionally because the emergence of VS code and pi charm in the Python world over the last five years, Python lit a little bit behind JavaScript, but similarly is starting to value tooling type hinting as an example, raise your hand, if you would have expected JavaScript to be the one to get to really adopt casual typing.
Will Vincent 6:18
You know, who's on the board of the JavaScript foundation? You know, so that's right. Yeah, that's true. And it's not, you know, not saying that is a bad thing. But you know, it goes where things are, I mean, that's Carlton's often talked about being a Fellow and less so on the board, but just balancing that tension of like, the people, when you're in it, you're working with AR have the more complicated advanced use cases, but you still want to try to maintain friendliness to newcomers, and I'm sure you know, with PI charm as well, right? Like, sure, you can't, you don't have to necessarily turn to AWS, like you want to still be used as
Paul Everitt 6:52
well set in your point. If you extrapolate it past something like JavaScript into the web and web browsers. There's a lot of different agendas at that level as well. So for us, and our kind of year of Django that we're doing some really innovative product stuff that we're working on that we intend to roll out in the coming releases, content that we're working on teaching and relationships with folks like you
Will Vincent 7:21
and ongoing relationships. I mean, it was it five, six years, the annual partnership with Yep, do the do the Django Software Foundation in PI charm. I mean, and that's, you know, it's a sizable portion of the Django budget. Django really relies on that. It's a third.
Paul Everitt 7:39
Django con i was that said, it's 25% of the DSF. budget comes from the JetBrains. fundraiser
Will Vincent 7:46
event. Well, so I was treasurer for three years. And I guess I didn't do a good enough job of sharing the details, but it would vary, but it would be sometimes it'd be a little bit more, but it'd be around 25%. Okay. The DSF could be a little more open with our finances. Like there's nothing hidden, like there's spreadsheets on the board. But yeah, I mean, you know, PSF puts out an annual report. But again, they have a lot more staff than, you know, Pete, it's the people reading.
Carlton Gibson 8:11
It's not been put on the webpage, right? Yeah.
Will Vincent 8:16
Well, no, I mean, because a lot of the work I did was, you know, trying to with Catherine Holmes was to standardize it. But then I was at Django con, I guess it was just last year and talking with Simon Wilson, Jacob Kaplan moss and sort of being like, here's the nature of our finances, which are fine, but could be better. And they were shocked. And I was like, Wow, it really is hitting home. Like how could they know? Right? They're not at the Jacobs now on the board. But he wasn't on the board. So yeah, yeah, there's value in letting people know. All that. Anyways. Yes, Carlton, you had a question? The the?
Carlton Gibson 8:45
Well, the other thing that pops the mind is JetBrains, of course, is helping with again, with the 2023 Django developer survey, which is on Route, I don't know if it's going to be on if it's on as we record, I don't know if it's still gonna be open when this episode goes out. But if it is still open, folks go and fill in the survey, because we need those that it's people's. It's people's one chance to give us some feedback, right? I mean, I give the classic example is we asked her what people were doing for caching and like 90% were like, Oh, we use Redis. And so we were like, Should we have a Redis back end in core or a third party package? And so the Redis back end calls directly came out of the survey from 2021 or 2022 2001.
Will Vincent 9:26
Yeah, it's been a huge, I think there was one that Tim Tim did. There was a survey way back in the day, but when I joined the board as one things I wanted to bring back. And so the first one was just a Google sheet that I put together. And then from there, we've JetBrains has really helped both standardize it and now they do the translations, because they're already already doing it with the Python Software Foundation. So I'm very I feel like a grandparent I'm like, I feel you know, I saw it come out this year, and I didn't have to like do it all myself. Yes, girl. Well, I
Carlton Gibson 9:59
Well, I really like is the sort of meta analysis? Is that so JetBrains? Yes, not only help us put it together, but then they format it. And they do this nice infographic at the end. But there's some nice little they look for correlations in the data. I think there was one that was something it wasn't exactly. So it's something that organized. All the developers are more likely to use VMs. And younger developers will use containers or something like that. I can't remember the exact thing. But it was like, yeah, that's brilliant.
Will Vincent 10:20
It spoke to you. Yeah.
Carlton Gibson 10:22
Yeah, it did. You really did. And I guess
Paul Everitt 10:25
I should say, if anybody out there has a question we should have asked. Or as some of the choices of existing questions are dead projects, and we didn't notice. Let us know. Yeah,
Carlton Gibson 10:38
I mean, it's difficult to update between yours, right? Because it's just one person. So I've got to put the survey together. I need.
Will Vincent 10:44
Initially, Carlton, I believe, you know, I threw something together and basically relied on you and Jeff triplet, mainly, I think we asked Adam Johnson and maybe a couple other people, but it was just like, well, and then from there, it's, you know, gotten hopefully revised and gotten better each time. But yeah, it's a big, it's a big,
Carlton Gibson 11:05
if it is still open when this episode goes out, go and fill it in quickly, folks, because we need those. And something
Paul Everitt 11:09
else that will arrive when this episode comes out most likely is as part of the actually very intentionally as part of the year of Django campaign. We went through kind of a systematic effort at hiring a Python advocate at JetBrains on my team, for Django, focused on Django Django community. For her own benefit, I will not say the name yet until she joins. But we are so wildly happy to have her November 1 timeframe. And we will pick up the pace of things like the Django survey, that's super super,
Carlton Gibson 11:55
that's like an actual, you know, representative that we can harass because because you're all busy with the you know, the pie cones. And
Will Vincent 12:04
while it's a good choice, I think I think I emailed you, when I found out separately, just saying, Here's my two thumbs up. She's wonderful. Well, so So what will you know, what will be new now that there'll be a full time person? Will that be the point person for Django things? I know, there's like, what's, yeah, what is what's what's what's the year, you look back and say, This is what we wanted that role to achieve? What's the mixture of stuff? Good question,
Paul Everitt 12:29
because it's, you know, multiple infinities of things that could be done, right? The art is in what you want to what, instead of what you will do, I believe in storytelling, over a period of time, and knowing what, in fact, you want to accomplish at the end. And so if if she already has a strong narrative of what she's about and what she wants to accomplish, and then we can support making that happen in the community. And then we'll get, you know, the company will get its benefit along the way. But for the most part, support and stay out of the way. Equally, someone really close to the product a lot closer to the product than I am who can to Jango who can then inform the product pi charm about its Django support. I was just before we started, I was like, Carlton, what do you think about the because he knows a lot more about Django than I do. And can inform the steering of the product, especially something we were talking about this kind of junior professionals that are starting their career journey. And that psychographic profile is really important to me. Well,
Carlton Gibson 13:45
you it's talking about, we've talking just about the perhaps the beginning now about IDs and why you use the word ID. And the contrast says, Well, I've got my text editor, and I've got my my terminal shell. And you know, I know all the you know, I know every like as a, as a veteran, it's hard to, it's not hard, the tooling is lovely, the tool is nice and smooth, it makes it but it's like oh, I could I could live without that no problem. But if you're a junior or an advanced beginner, and you're just sort of stepping up to that next level, to have the tooling to guide you, and to put the rails down and to show you the way, it's like the good example, I'm constantly using a Git GUI, because you know, I can use the Git command line, but I'll tell you what, a GUI doesn't have make life much easier. But it's that same thing, you know, if I've got a tip, you know, if I've got the text, the test runner, showing all my tests, I can see which ones failed. I can click through I can, you know, jump straight to the source code, that kind of thing. That tooling, it really helps me do my job more effectively, you know, regardless of whether it's pie chart or some other options, indeed,
Paul Everitt 14:50
and I'll use the same framing you finished with regardless of what tool it is that level of tooling is a way of development that in the world of Python, we don't promote enough. Python is really simple. You can just engage Python is you don't need a compiler like Java or dotnet, or whatever. So there's a temptation to just use them. Yeah, a lot of these projects are pretty big. And some people could use the rails that you described.
Carlton Gibson 15:23
I mean, because if you come from C++ or whatever, you know, C sharp, even if you know, you've got the whole Microsoft stack and all the tooling there, then you just crack open your text editor. It's a different world, right?
Will Vincent 15:33
But it is, I still remember I think it was five years ago. Now when I was visiting a local university that was teaching my book, and they were asking me all these questions, and then I didn't understand them until I realized they were all using PI charm education version. And, and I was like, oh, okay, like that. Makes more sense. Because it just powerful like, it would just I think it would start up this. I don't want to say it was doing some stuff that I wasn't familiar with using like a text editor, as opposed to an IDE. Which leads me into a question of so you have there's a big educational licenses, I believe, are free. Is that right? With pi term and open source? So that's a big, so then how do you how does the company think about that leap from? Okay, I used it for four years. And now that I have a job. There's the professional version, like, I would imagine that leap is a big one, right? So you don't want to lose them. But all of a sudden, they're like, wait, I have to pay for it, though. Of course, they just paid a lot of money for college. But like, what is that? What is that? Like? How would you how do you view the that funnel?
Paul Everitt 16:34
Like what's the value proposition? That's what you're describing? What justifies paying for this? Is that kind of where you're going?
Will Vincent 16:41
I guess it's just, it seems very smart. Because they're, they're used to a powerful IDE. And then compared to that everything else feels like a text editor.
Carlton Gibson 16:50
If a company tried to tell me what to lose us, I'd be out the door. I'm an old, I'm an old crusty hat. Oh, yeah. Then what do you need to do is turn up, here's your laptop, here's
Will Vincent 17:02
what we're doing. Right? Is it is that typically like, for these advanced beginner beginners or junior developers? Is that a company account where they buy a bunch of Python licenses and give them to their employees? Or do they let like these days employees make decisions and charge it back to the company? Or is it just all over the place?
Paul Everitt 17:19
First, for the record, Carlton is a young hack prepared
Will Vincent 17:28
was an old hack compared to me. So everything's relative.
Paul Everitt 17:34
Straight here, going, you're both right, that most companies these days have adopted a policy of letting their highly paid developers choose their environments. Because developers can choose their employers
Will Vincent 17:53
to good ones, yeah, going,
Paul Everitt 17:54
maybe maybe that's a little less true in the recent round of layoffs. But you want to use developer to be the most productive, they can as quickly as possible. And so they probably have a couple of options for what their internal IT Department supports. For something like us, we feel pretty traditional for them. For other kinds of software companies. There's an internal license server that you can use, which once you reach a certain number of licenses, and there's a pool and you can administer the purchasing and make it available to people and stuff like that. And that's an area that we have been going more into supporting with some of our tools like toolbox to helping companies administer tooling. Now back to your other question, or kind of meta question about the value of tooling. I've got opinions on this
Carlton Gibson 18:51
goal.
Paul Everitt 18:54
So for a lot of these shops, developers are pretty important when you say software is kind of important these days, right? If you look at like the median salary of a developer, the cost of like pi charm is their first minute and 20 seconds of their workday. So all we got to do is make a more productive
Will Vincent 19:18
minute. You almost like maybe you have this summer just like a side by side of like, you know, Django hello world with like, a text editor in quotes and then pi charm and just show like the speed difference, as part of his part of the challenge, right, is that people don't know what they're missing. They don't know what they're missing, right? Unless you get locked into a pattern. And that's, I find like for tooling like the only way I besides just chatting with people is like when I see people doing you know, occasionally things on YouTube, you're like, oh, that's sort of interesting, like, and I either like or dislike what they do, but it's I feel like for beginners there's a huge leap to like if I showed how I was doing something or any of us like we would have good ale least says we have all these things that, you know, the speed at which we go is different. No one's going to catch up with that, per se, and takes a lot of work to be like to make a course out of here's how I got to that level of productivity. Without, you know, I can speak from firsthand experience, it's a lot of work to put those together. So I just yeah, just wondering how you, you know, I know you do a lot of YouTube tutorials, as well like, how to, like guide someone up that ramp? Because it's, I would imagine, it's sometimes it's hard to get across how much more effective you can be with these tools than just doing it your old way. Like, how do you tell someone they're being slow? Basically,
Paul Everitt 20:38
there's a book inside JetBrains advocacy that we really believe in, it's called badass, making users awesome, I think by Kathy Sierra. In in there, she talks about the suck zone. And she also talks about liking with photography, people want to Mac master, taking photos, not master the camera. So make them good at photography, don't make them good at cameras. And we as advocates tend to get really jacked up about our IDE. And let me show you what the IDE can do. And we need to be better at showing you how you can be better at Django. So we really got to think about that and keep our eye on the ball. When it comes to what you just described. Someone that's just trying to get their job done. Carlton, you want to add to that? Well, no, I'm
Carlton Gibson 21:28
just noting, because I'm like, if I think about the best demos I've seen, it's it's not a demo of the tool. It's just a demo that happens to be using the tool, if that makes sense. And it's like, Oh, what did he do now? Or what did she do there? That was kind of cool. And then like you fight you learn a little thing, but they weren't talking about that at all. They just did it. You
Paul Everitt 21:48
are spot on. And we need to be better at like leading with it. And we say this all the time. Leave with the technology. Slip the IDE in the back door. Yeah, exactly. Exam. In fact, the perfect, perfect demo is one where you never say hi charm. But somebody pulls their hair out what tool are they using? Show me how to be like that. So that's an area that we got to get better at.
Will Vincent 22:18
Speaking of things, people pull their hair out around Django, I mean deployment. I just curious, what's the latest story and path? I mean, not that there's a silver bullet for it. But I imagine you all have thoughts on that. Sure.
Paul Everitt 22:32
That is a place that's getting a lot of attention at JetBrains we actually have a pretty good angle here. Because we're independent of all the cloud providers,
Will Vincent 22:44
right? Which is, which is rare. Yeah. Yeah. Yeah.
Paul Everitt 22:47
So we, we don't necessarily have an agenda, we, we are not some cost center, that is trying to, it seems like every startup, I'm sure you're gonna laugh, as soon as I say this, it's like every startup, they get some VC funding. When they talked about the monetization strategy, well, we're gonna have a cloud, we're gonna, you know, we're gonna have an edge service that we're going to charge for using our open source tooling. Okay. We try to take a direction that is somewhat independent, we are the lens that people look at, through their look at their code through and we and people trust us for that. We got to maintain that trust so that people don't feel like we're going to steer them to, like, our deployment strategy or something like that. Now, that's also a tough one, because there's a lot of deployment strategies. So keeping up with all of them, it's a challenge acquire
Will Vincent 23:50
button and offer a turnkey solution for all the providers.
Carlton Gibson 23:55
Before it can be acquired.
Will Vincent 23:58
I would think on that, you know, from from where you sit, Paul, like, I agree with that. On the other hand, I know that if you're using VS code, they can bundle and say, here's some credits on a zoo, or like when I was Yeah, startups with funding like, yeah, it's like, oh, all they would compete to offer you you know, X amount of dollars worth of credits for stuff which isn't the same as real money but that's can sound enticing in a way that like, with experience choosing what you want to use and having control, you kind of have to get burned a bit to value out.
Paul Everitt 24:33
But at the same time, people should just understand and be cool with that arrangement. Because that is the thing funding a massive amount of engineering work giving them a valuable tool at a cost of zero.
Will Vincent 24:50
Well, their data but yeah, what's the what is I mean if you lay if you look at the to like what actually do people pay for they pay for deployment, they will pay for some sort Have performance security, like look at sentry. And you know, there's a lot of other areas, it's just like, you're not going to get blood out of that rock. So, but maybe, Carlton I interrupted you before, though you had a point. I know
Carlton Gibson 25:14
the other thing I wanted to ask about was some. So JetBrains, we've got this nice little editor called fleet, which is still in preview is it's a lightweight, I quite enjoy playing with that. And one thing I've just wondered is if, say, I had pi charm installed, if it could somehow hook into the Django integration in playground, so it could be it because it hasn't got that. And I was just wondering if there's any possibility of that. Let's just ask you about the status of flee. Sure.
Paul Everitt 25:41
So just to explain fleet is, like JetBrains, next generation IDE, it has a different UI, different UI stack. It's intended to be polyglot from the start. It's big feature is it's distributed from the start, the front end and the back end are separated and can be in different processes, even in different locations, even in multiple locations, multiple back ends.
Carlton Gibson 26:10
And you can kind of like that on the remote container.
Paul Everitt 26:13
That's right. It's, indeed a remote container. The back ends contain the brains of our current IDE. So we're not starting over from scratch. Mostly, there's still some wiring up as you discovered with the Django integration, still some wiring up to kind of close the loop on it. But when that arise, it will be a different IDE experience, that will be a great fit for mobile users, distributed users. IT companies that want to provision a back end, make it available, it's always warm, it's always indexed all those kinds of things. Okay,
Carlton Gibson 27:01
cool. Interesting. So what are we going to talk about testing? A bit is
Paul Everitt 27:06
sure. The kind of the biggest one is stuff that we already have available. And we want to polish and do a better job of telling the story about first of all, we mentioned before about the the Django survey. Yeah, I remember the first time I saw pi test, overtake the Django test runner How was shocked that it's the do you trust those results?
Carlton Gibson 27:33
I think probably I do trust them. I mean, you know, I'm an old stick in the mud. So I'm still using the Django test runner, I'm still very happy with it. But you know, quite often, when I'm working with client projects, it will be like, you know, pi test by test process. And but yes, I think I think it's same,
Will Vincent 27:51
I sort of I have an old fashioned, I don't always use my test, I still kind of old fashioned that way. But everyone else that I hear just immediately goes to pi test.
Paul Everitt 28:02
Let me question the questioners. Then second question, stick my fellow sticks in the mud, class based views or function based views?
Carlton Gibson 28:15
Well, it depends. So I use class based views almost. Almost universally, it's for me, it's, my views always get gnarly, they always get whatever. And I like the namespace that a class gives you to break them up. But I tend not to use too. What I don't do is with Jango is generic class based views, is get into massive overriding of the mix ins and all the rest because I think in the Django community, there's this constant debate. And it's often conflates class based views as a general thing with the specific implementation of class based views of generic class based views that come with Django. And no question. Those are super complicated. And the inheritance structure is, you know, it's too complex. It's too many mix ins too much soup, glossing overlapping
Paul Everitt 29:09
with fat models versus skinny models. Well, maybe, I mean, the,
Carlton Gibson 29:20
how is it like so I write when I write a class based view, it's like class, and then the get handler, and it reads like a function based view, but it's indented one level, and you've got the namespace to break up in the various bits. And that's, that's it. Whereas if you if you and the class, but the generic classmates views are great if you don't need to override specific methods, or work out what the call order was, but otherwise, you're digging into classic class based views. And it's like, Ah, what's the method and where is it? Yeah, and it's just no, so I understand all the people who love function based views, but the answer to your question is I use class based views every single time Well, how
Paul Everitt 29:57
about you? What stick do you have in which mud?
Will Vincent 29:59
I I mean, Carlton articulated better than I can, I would say I try to I go down. So I start with generic class based views. I don't mind overriding one or two methods, but at some point, you just need to go as he said, Just define your GET method and use use the namespace. I don't, you know, honestly, in my day to day, I'm always trying to find the simple, elegant way to do it. So I really, I probably overemphasize using generic class based views, definitely class based views, just from a teaching standpoint, that's a lot simpler. There are canceled occasions where you need a function based view. But you know, it's like, there's a reason why class based views were invented, you know, are used, there's a reason why the code base is in that, like, I'm not going to it's a religious debate, in a way, but if someone asked me, it's like, I'll take generic class based view, class based view, function based view, in that order of preference. Yep. But I totally I understand. I also understand, though, I mean, one of the things I'm adding to the 5.0 edition of my beginner's book is I'm adding more function based view things. Because I think it's, I think it's probably an easier way to think about how the request response cycle in a way that if I just jump to like, template view, list view, detail view, people are gonna miss that. So I'm adding a lot more if showing both I always I didn't want to for a long time, because I was like, this is going to totally overwhelm people. And I think it will a little bit. But we I think it's from a teaching perspective, it's helpful.
Carlton Gibson 31:28
Whenever this topic comes up, people always mentioned Luke plants sa Django views the right way, or the function based views the right way. I can't remember exactly the type. But it's a polemic. And he says that, again, this is a polemic. Don't take it too seriously. But he, you know, he means it. But the sort of big challenge he puts to classmates views is, well, where's the view gone? And the view is a function, which takes a request, and it turns it into a response, right? That's the web problem, take requests and turn them into responses, and a function based view, where's that on its sleeve? Whereas the class based views when you just see, you know, list view model is this. And it's like, well, where's the view? Where's it gone? And so, I think, you know, to take from a teaching perspective to teach people that is dead, right? Yeah. Because you show them, the request goes in there, and the response comes out there. And then when you switch, when you move to class based views, I think it's really important to show them the actual handler, look, there's the handler on the class Base View, and then takes the request response. And it's just the generics. You know, they've abstracted all the way or you don't write that bit yourself. And you just declare these forms. And, you know, these fields and magic is done.
Will Vincent 32:43
I think it's also me becoming what I didn't want to be when I wrote the book, which was that, you know, most enduring books was always I was always a purist, Carlton, don't worry about that. But like, most engineering books are, are bottom up, right? It's like, why don't I just give you the answer, I want you to like, work hard to get there. So you understand the answer. But, you know, when you're trying to build a website, sometimes you just want to build a website and then backfill a little bit. And so certainly the early, earlier versions of the book, were more show than tell. And I just keep adding Intel, but I think I just need to make clear to people like this is tell, but you don't have to know this right now. I'm just putting it there for like, I want to have both, I'm trying to have my cake and eat it too. Because I value that the telling more and more as I get into it, and as I deal with people, but I also understand, they need to just like get hello world working, deploy a site, like they don't want to 400 pages to put up a site when I can just show it to them in three pages, and then be like, let me explain how that actually worked.
Carlton Gibson 33:41
I think there's room at sort of the end of you, beginners, like you did, but I agree with you 100%. For the beginning, you just get get them to the success point quickly, without all the backstory. But then somebody who's going to expect any professionals book, I don't know, but somebody who's going to go off and build web applications, there's gonna be the point where they're like, you know, what, the generic stuff just doesn't do what I want. And I need to I need to just turn a request into a response and and being 100% clear on that request response cycle on the web problem. Yeah. You know, that's that's equipping them for a career. Yeah.
Will Vincent 34:15
Well, this. I mean, Paul, you know, you educate people like this is the challenge. When you sit down with someone, you can tailor it, but when you're doing a video or a book or an article, you have to kind of guess and pick a layer of like, what are they going to what are they going to ask next? So that's the Yeah.
Carlton Gibson 34:33
Testing today's
Paul Everitt 34:35
that was going to be my segue because
Will Vincent 34:37
you caught me monologuing.
Paul Everitt 34:42
I prefer class based views for a number of reasons. One, the IDE can give you more assistance on that. And second, well, I'll go off on a little bit of a detour of an anti pattern in the world of Python web framework. bricks for a period. And oh my god, for damn sure in JavaScript frameworks. There's this race of well, my Hello World is only five lines. So it's way better than your frameworks, seven lines, and everyone rushes to adopt five line web framework. It's okay to write a little bit of code. You know, we've got smart tools, we've got VS code, we got pi charm, they'll generate a lot of this for you. And just because you have a great first five minutes, in a miserable next five years, make better decisions people. So okay, that's interesting.
Will Vincent 35:47
Yeah, it was old that one that's that's I was just last week talking with someone Carlton has a talk on this, you know, Django can be a micro framework, and there's a repo, I just will put a link in from four years ago, which makes me feel old, showing how quickly you can get to hello world with Django. And it's like 10, lines, maybe. And you know, even flask, if we're just going to the obvious comparison, like they show hello world. But that's not how you build hello world with Flask. So I think they've solved that marketing problem better than we have. Yeah, and
Paul Everitt 36:19
pyramid came out. I'm one of the pyramid guys that was Zope. Before that. And pyramid suffer greatly, when like six months later, flask comes out with its five, line HelloWorld everybody thinks it's just the magic. Whereas pyramid, oh, my gosh, the conveniences it gives you over the next five years are amazing. But people just don't see that during the first five minutes. So back to class based views and testing. I like this pattern of being able to instantiate the thing that's about to be rendered, and then test that thing that was instantiated. And to move some of the stuff out to make it easier to test. Like properties on the class. That's the class based view or something like that. And I just find that to be on the way towards my theory of testing, which is testing ain't about eating your vegetables. It's about joy. And what is the more joyful way to develop? What isn't joyful for me is I've got my editor, I've got my terminal where my test runner runs, or my dev server runs. I've got my Chrome browser over here. And I'm always going back and forth between all these different things, context, switch, context, switch, etc. And wouldn't it be great if I had like one environment, I could sit in it, and I could run my tests, execute that view? Under the frickin debugger. And whenever I have a question, I just set a breakpoint, run my tests, I stop right there. I can poke around, I can see the entire universe at that point of execution. I don't have to do print statements or in JavaScript console logs and all this other crap. I don't have to go over to 50 different tools to find out the universe. I'm right in my editor. Right where I'm typing is where I'm executing in is where I'm digging.
Carlton Gibson 38:29
Yeah, no, I mean, a debugger is an amazing thing. And it's
Paul Everitt 38:33
an amazing thing. It ain't just for blogs. No,
Carlton Gibson 38:37
but a Graphical Debugger as well. Like, aha, here's my favorite trick trick is COVID. Cheat. Is the ROG halfway through a test. I'm like, What's this? I don't know what this is. But I can put a breakpoint in the test. And I kill, Lee
Paul Everitt 38:51
said, especially, I mean, let's face it in the world of Python, it's so dynamic, that stuff just pops into scope. Oh my god, if you ever tried to answer the question of where did sphinx get that pixel from? Good luck. You can't know the answer. Unless you set a breakpoint. You'll never find the answer by looking around on disk. And so what you just said is exactly right. You just set a breakpoint. Run your test. Life is so good. Why don't people want this? Well, what's wrong with these people?
Will Vincent 39:28
I was just telling you like I have a future course planned. I mean, you know people Google Django testing tutorial, I think I'm near the top of results. I think the problem the problem is at what point do people say you know, read the manual, I just want the docs and that happens at some point. But you know, Doc's are I like to say now docks are designed for if you already know what you're doing, and you just need, like, Oh, what's that thing called? Whereas the tutorial teaches you so the docks are not going to teach you how to do a thing.
Paul Everitt 39:58
They won't tell you Why? Oh, yeah, what but not the lie? Yeah,
Will Vincent 40:04
well, I think maybe Django Doc's are pretty good at the why, but they don't give you the context. I mean, compared to other Doc's, well,
Carlton Gibson 40:11
yeah, okay. But like they exist for the Django, Doc's. But like, there's so take this exact example, there's a section in the advanced testing tutorial, which is testing class based views. But it's, if it's on like one screen, it's two kind of examples. And if you like, it shows you how to instantiate an instance of a class based view, and then you can call individual methods on it, right. But that could be like two chapters in a book, you know, really showing you how you leverage that and how you know how that enables you to test the methods in isolation and how you build up, you know, a really good testing stuff, but the Django Doc's haven't got that they've got these two examples, which kind of, if you just need a reminder, they're perfect. But if you learning that, for the first time you need, you need somebody alongside you to say, Hey, look at this, and this is how we could use this. And this is the patterns it unlocks.
Will Vincent 41:00
I'm gonna I'm gonna do it. I mean, there's also at the higher end, there's like Adam Johnson has his speed up your Django test book, which is amazing resource. And that's probably smarter, because that's like, Okay, you value tasks, but let me show you how to make them better. But how do you Yeah, how do you lead a fish to water? How do you tell them? what life is like without tests? If they don't know? I mean, one way, in a way, unless you work with other people, like, like working on another project reinforces that for beginners. So if you AirDrop into a project and you write some code, you're like, well, that worked. Why is things breaking? It's like, oh, because there's other, you know, whereas I think there's a sense that you can have everything in your head a little bit when you are doing everything. So that would be pedagogically. That'd be interesting to like, AirDrop you into a project and be like, just do this simple thing. Oh, and run the test suite. And then just a million things break? Sure, because you don't know what's going on. Yeah.
Paul Everitt 41:51
And I hope you're right. And I hope that I get to march in your army as you help convince people with your book about this. And I think there are things that can be done like have aI write your tests based on your last test. So really lower the friction, lower the barrier, get test to be closer to the code, like a companion to the code. But there's also something I don't know Have I ever there have you heard about in the world of JavaScript, something called storybook? storybook is the theme. storybook is Portuguese, Portuguese is the language if I think I know what it is, but I don't it's Portuguese. Book is the thing that I think I know what that is, but not really.
Carlton Gibson 42:38
No, I've seen I've seen the name a couple of times, but no, I'm not.
Paul Everitt 42:41
It's a way of development of component driven development using stories. And you write a story, which is kind of like the set up for the variations of that component. And then you go over and run this tool. And in the browser, you see a listing of all your components, and click on it and you see that component rendered. And it re renders as you type. And it renders all the variations of your component based on inputs and the paths and all of that. And that's the story that you write. It's like a catalogue of your project. But guess what, you can feed those stories to your tests. So you don't think you're writing tests? Maybe there's a way we can trick people into doing things that can be tested? Because those are the things they want to do. They want to see the rendering of their snippet, like
Will Vincent 43:32
textbook or something. Yeah, test book. Yeah,
Paul Everitt 43:35
I think I actually have a package on pi pi called story time, where we're, I'm trying to do it, but it's part of a different effort. But maybe just a large sense, there's a way to get something like testing into the workflow they want. Instead of eat your vegetables. Yeah,
Carlton Gibson 43:57
it shouldn't be a burden. Part of
Will Vincent 43:59
the teaching thing is I think there's a number of there's a couple of resources that are test driven development. So test driven.eo. Michael has some beta testing goat, I think. Which one? Test Driven? i Oh, yeah. It's a very good one. Yeah. But I think that that's off putting to beginners. I think, I'm not against Well, I don't do test driven. I think most people don't do tester, I think it's I think the problem is if you hit someone with testing is test driven. They just go like, well, I don't even know how to build this level on test it. So I think that's part of the part of the problem with testing is that it's done that way.
Paul Everitt 44:40
But it's unfortunate and Carl and I were talking about it a few minutes ago, there is this way of development where you just sit you stay in the flow. Stay close to your editor. Everything is brought to you and you can set this debug breakpoint. I will also say when it comes to testing and debugging and running have code. Boy is JavaScript kicking pythons. But yeah, tell me the hot reloader for PI test Oh, it doesn't exist.
Carlton Gibson 45:12
But hot reloading in Python is just a horrible and difficult problem like it's not really solved it
Paul Everitt 45:20
taken a good stab at it, but it's just not culturally there.
Will Vincent 45:23
Can we if we can shift gears and we're talking about HTML, CSS and JavaScript. So you had there was some Toots tweets about things recently. Do you care to share that story?
Paul Everitt 45:39
Sure. I think all three of us are but particularly Carlton, since he's put a lot of work into this. We're big fans of HT m x. Yes, which is a project to bring back server rendering of HTML, because that's the web. That's the way the web is supposed to be. In HTML, this lets you get some of the benefits people have moved to spas, four, you can keep your existing stack, you can keep your non JavaScript programming language, you can stay with Python and get some of these benefits. Carlton, would you agree with this?
Carlton Gibson 46:22
Yeah, no, I mean, absolutely like so. You know, I've been working on an application for last six months, and like, it was six months in going really well. And I've got four endpoints, I use JSON response four times. So it's not just a it's no longer API. First, it's API, maybe like maybe there's a rich component that needs some JSON. So you know, there's four related to one bundle of views, there's four uses of JSON response. And that's it, the rest is just HTML. Thank you very much. And it's it's lovely,
Paul Everitt 46:56
using a set of technologies you already know and trust,
Carlton Gibson 47:00
and not just know and trust that have got like 20 years worth of development behind them. It's not, you know, this week's framework or, you know, some new tech that's experimental and won't be around in six months. It's all this stuff in the book. And it's like, I was writing stuff like this in 2005. And I'm writing it again in 2023. And it is wonderful, just wonderful. So
Paul Everitt 47:24
I'll transition that to the rest of the story. Half of what Carlton is saying is, I already know Django and Django can render HTML, I don't have to send it to the browser to render JavaScript HTML. So it isn't just Django rendering the HTML that we already know and love its HTML render by the browser that we already know. And love. The web has a platform, it is super good at this, we don't need to put the HTML and the CSS into JavaScript, Carlton
Carlton Gibson 47:58
will just, I just had a moment of joy, as you as I remembered what I was doing today. So I've got a detail view. And that has a nested a bit of section of data, which is quite computationally expensive, it's a bit slow to render. And so to make it fast, that just literally load that separately. So I just have a little HX, get onload, you know, a thing, and it pulls it in, in afterwards. So it loads the main page, and the page is instantly responsive, instantly rendered. And then the little bit of the little bit in the section is the table of data, which is a little bit expensive to generate that comes in maybe a second later, but it's not the page isn't stuck there waiting for it, you know, and it's just like, how joyful is that and that, you know, the people looking at, they're like, Oh, this is great. This is really and it's just like, but it's the oldest rope in the box. You know, it's really we just need
Will Vincent 48:51
a hard call stack and be done with it. Like we get your full stack right here.
Carlton Gibson 48:55
No, but Okay, again, we talked about money being tight now. And, you know, we talked about in the current climate, it's enables me to build an application single handed in a way that I literally wouldn't have been able to build for the last decade, like
Paul Everitt 49:11
perfectly said. But there are other business reasons. That's a great business reason right there bringing the art isn't back the way it was 10 or 15 years ago. There are other business reasons. What about blind people? A lot of these, the spa front ends could care less about that. What about a 3g low powered phone and a remote part of the world. A lot of them have a really bad story on time to first content paint, which then impacts their SEO score, you'll get a bad SEO score, Google might index your spa once a month. And they may give you a bad core web vital score on it. So all these are making people read Think the spa front in React front end of vacation of everything. But a large part of the car is what you said, Carlton is exactly right. I can't do all of that, can I use a technology that just works? Can we go back to that and make it better. And so, Carson, the creator of HTML has put out a post talking about the loss of view source, in what Google's search page looked like in 2003, versus the indecipherable, optimized mess it looks like now. And one of the things we might have lost is being able to look at the web. And so I made a counterpoint to that in strangely enough, the creator of JavaScript replied to my tweet, saying that if we want to get back into that game, there was a time when HTML wasn't abandoned, where we didn't have to do everything in JavaScript, it was the time of HTML five, with the white working group, where people in the community came together, kind of in opposition to the browser vendors. And one, instead of a world of x, HTML two, we have the world of html5. And so he was encouraging us to stop complaining and say, Hey, HTML is good enough, let's make it better. Let's not make it he was responding to me saying that the web shouldn't be a big JavaScript runtime. I mean,
Carlton Gibson 51:44
and the, the HTML is sort of sales pitch for one of a better word is it's just adding attributes to you know, it's just making HTML, more powerful, okay, uses JavaScript to do that. But it's in a very controlled and small way, you know, like, why is it that every element isn't clickable or can't send events? Why is it you know, so do you think we can get browser vendors to implement this stuff? I mean,
Paul Everitt 52:09
it's an interesting point five years ago, would you have predicted that CSS would have a renaissance? No, it is yes, as of last few years, even. Safari. I'm a big fan of Safari, I That's my norm. That's my browsers.
Carlton Gibson 52:27
Last couple of years. It's just really come on, I think it hasn't
Paul Everitt 52:31
really come on PW A's are a thing and Safari now.
Will Vincent 52:36
And Chrome with its security stuff, just constantly, like every profile, you have to like, change this, you know, it's this is also like, this is a philosophical thing. Like, why do we have to like opt in to like, security and all our stuff, like instead of the opposite? Like we're, you know, the onus is on us to say no, don't sell all my data. Well, so.
Paul Everitt 52:58
And Google Chrome recently getting pretty shifty.
Will Vincent 53:03
Yeah. Yeah. I mean, maybe. Yeah, exactly. I mean, but all this all this is, again, it's the needs of solar developers or small developers and also big corporations in that. If you go online and look at how is like, every, every week, if not, almost every day, I get someone saying, should it shouldn't I use, like, you know, view or react and all this stuff for my solo project that I'm building, like, on the side? I'm like, no, no, no, no, no. But everything that they read online is, here's how to do full stack because you know, who's writing it, who's employed people at larger companies. And it is true that if you work at a company over 1020 developers, there's probably a dedicated front end and back end, you know, you're probably only writing a you know, so how do you you know, it's part of it is I try to tell people like that's just how it is out there is not nefarious, totally right. You know who
Paul Everitt 53:57
in their areas and the urgency now there are important voices pushing back on the people use React because people use React. It has become that way. That's the reason people use React.
Will Vincent 54:11
Yeah. How to how did the three of us fix everything?
Paul Everitt 54:14
Make Chango great, man.
Will Vincent 54:17
It is it is great. Yeah, we just got to talking about a more remote story.
Paul Everitt 54:22
Give that guy working on HTML snippets for Django, give him some money. Keep them happy. Django forever. Yeah,
Carlton Gibson 54:31
so Okay, so we want to get Django partials or at least the tooling for that into Django. I don't know. 5.0 has just done the feature freeze. So now, okay. 5.1. Need to make some changes to the template, Django template parser, which I've kind of just done horrible things in Django, template partials is a proof of concept. So we get an official API there that can use and then whether or not Django partials template partials itself becomes part of Django I don't know but improving the template language there. There's there's a reason renewed discussion about like a kind of capturing tag. So you know, so you've got a pagination thing. And you would want to render that twice on the page. Once that the top ones at the bottom, it's quite a heavy weight component. So you want to render it, capture the HTML into the context, and then just output that same HTML, again, when you render it later, rather than render it twice, because it's expensive. That was there was a ticket for that number 6000. And something close 10 years ago, and it's like, okay, as a whether do we need this, who knows, someday, maybe, I don't know. But, you know, it's discussion to reopen that there's this, there's things like template tags, rediscovering those and how to use them and what the patterns around those are. And that's super powerful, because, you know, I got, I want to pass a model object into a template, but I need to, I don't really want to pass the whole model object, I want to do some transforms on it and you know, fit some related properties. And whatsoever, what I really want to pass is what's called a view model. It's like a, it's like a special object, which gives the template exactly what it needs to know more just simple attributes. So I can calculate that in my view, and pass it in. But you can use template tags to kind of do that view model type thing. And then that's all in Python, and it's all testable. And then you've got a really simple bit of HTML, which is a template. And the two just go together in a beautiful way. And your what you're not doing is got these gnarly templates with ifs and loops and, you know, function calls in and all the rest of it, which is totally unmaintainable. And not really editable because you'd like scribing,
Paul Everitt 56:29
something that's consumed the last four years of my life, including this weekend, bringing component driven development to Python. And in fact, four, three dot 13, Jim Baker of Jython fame and Guido are working on tagged template strings, tag strings, a PAP already have an implementation. I'm helping write the PAP on it. And it's a way to do basically app strings that can run through a function. And then Jim has an HTML templating language built around that, which is just so interesting. Yeah, no, I
Carlton Gibson 57:11
mean, there's
Paul Everitt 57:12
we need a renaissance and blue. Thank you. Yeah, I find templating. Yeah, it's not ASP from 2000. anymore. That's not the way people develop anymore. People think in terms of components,
Will Vincent 57:23
call the pep off the top of your head, so we can link to it for people to
Paul Everitt 57:27
we have not published the PAP yet. Okay. It's over there on my hard drive.
Will Vincent 57:33
You can come over I'll show it to you. That's kind of exciting.
Carlton Gibson 57:37
So you're big. Are you bullish on HCM? Expo? You're
Paul Everitt 57:41
completely bullish on it. I think it represents a set of ideas that I would like to be actually foundational, whatever it is, I wind up doing, and hopefully this Django work that you're talking about, maybe they'll actually converge, who knows? It would be great if it was reimagined in the context of partials, components, small pieces, not rendering the entire thing, just at the most fundamental level, you don't have to think about it. It's baked in, which is the direction I think you want to go you've been working on. Yeah, and
Carlton Gibson 58:21
what you were talking about 20 minutes ago about testing and like pulling out the individual bits and making those testable. And then I guess that would feed into the UI work so that you, my
Paul Everitt 58:30
interest has been in reinventing Sphinx. Phoenix is what I call it. And so I have a view layer for Sphinx, and I have kind of reimagined the templating, it doesn't use Jinja. And the idea is an ecosystem of reusable components, I could write a component, it would work in Sphinx, or pyramid or Django. Because it is insulated from its outside world, and it's able to it, it's able to get stuff from the outside world is able to be given stuff. And you see this a good bit in the world of JavaScript.
Carlton Gibson 59:09
Yeah. And in principle, that's the idea of H web components as well
Paul Everitt 59:13
indeed, examine framework lists, components,
Will Vincent 59:18
it does also this HTML and all these things speaks to either the wisdom or the good luck of Django always having a separate templating language and not doing anything about it. Even though you know, 10 years ago, there's a lot big push to like, well, Jenga, you know, why didn't they do more? Why don't they bundle more in it now it provides the flexibility to be open to these new technologies and where the pendulum swings in a way
Paul Everitt 59:43
something in you can never take it out. Well, it's
Will Vincent 59:46
batteries versus magic. I forget which of our guests made that point like, and I really liked that that Django is batteries, less magic, because magic is like maybe more like rails where it's just like boom, zero to 60 but then What if I want something different? What if the ecosystem changes? Sure, yeah, you're stuck with it. Whereas batteries, little more work to put them together, but they're there for you if you need them, or don't use them. That is wisdom, Carlton, you agree? Yeah.
Carlton Gibson 1:00:12
I was just thinking like, I'm desperately trying to not ask Paul about doc utils. Got a merchant,
Paul Everitt 1:00:21
or opinion judge, but
Carlton Gibson 1:00:22
yeah, yeah, but that's a whole different. But ya know, I mean, again, just thinking what you're talking about the Django template language there. And like the way it makes you write these template tags to encapsulate your logic, rather than letting you put logic in the template. You know, I grew up writing PHP, and I've always liked the Django Django template language for that, but coming back to it after all these years of doing JSON endpoints, is that oh, yeah, actually, this is a really powerful pattern. And it's, it's dead, right? And enables you to do the the transformation logic in Python, and then, you know, if it's rendered as a list, or a table or a thing, that's just a little HTML change. That even that can be a parameter. And it's, it's really flexible. It's just lovely.
Will Vincent 1:01:11
You This is, you know, this is Carlton post fellowship, where he's, you know, it's like, he can do all the things he wanted to do, he can poke holes come in from the outside, he's like, red team, you know, he's like, where are the weaknesses? Well, we should have a post fellowship program right? There.
Carlton Gibson 1:01:27
politan is microd views that are taken crowd views I had, when I put that together, put it together in like, you know, afternoon sort of thing that the first sort of, you know, take of it, I looked up when I first thought of that, and the note that I first thought it was eight years ago, it's like, that's been, you know, my background for eight years. I could have done that eight years ago. But Well, that's good. You know, could you I didn't have any time and I didn't have the class Now wasn't that they're building a fresh project, we're having to the prospect of writing all these crud views and writing a list view and to get No, I'm just I'm writing the class, I always want it to write because I'm not doing that 58 times for this whole life of this project. That's how crowd view came about? Well,
Will Vincent 1:02:07
we're gonna have links to all this stuff. Paul, is there anything else as we wrap up that you wanted to mention or that we didn't cover?
Paul Everitt 1:02:12
It's time for us to all have more fun. It's time to have fun with Python and web frameworks. It's time to have fun with Django and new ideas, new patterns and testing new patterns in HTML X. And I'm in the joy business these days. And we should all remember how awesome it is that we have it. We should help the next generation of people take over. Get them in place. Let's have the new heroes replace the old heroes. And let's spark some innovation. Let's have Python, not ship. It's a It's UI layer to JavaScript.
Will Vincent 1:03:00
There it is. Yep. Boom, Mic drop. Well, I'm sure well, we'll need to have you on again shortly, especially with this this year of Django and in hearing about all the work that will happen. So look forward to that. Links to everything in the show notes. Carlton, you take us out.
Carlton Gibson 1:03:20
Yeah. Thanks. Thanks so much for coming on. Paul. I really enjoyed the chat. Damn. So we're Jango chats with Django chat on Mastodon and Macedonia. Chat tango.com.
Will Vincent 1:03:30
See you next time.
Paul Everitt 1:03:32
Still, but like before, go doo doo doo doo both of you for everything you've done. You've got to be in podcast number 5000. territory, communities lucky to have the two of you. Will I look forward to marching in your army on getting people to work better. And hopefully I come back on in a year and we look back on this and reflect on what's all transpired since then. Yeah,
Will Vincent 1:04:00
man, it was perfect. All right, everyone. We'll see you next time that I