Andy Ide is the creator of HorseRecords, a comprehensive Horse Husbandry App written in Django. We discuss his 20+ year career as a programmer, the local to production gap in Django, django-unicorn, htmx, and more.
This podcast does not have any ads or sponsors. To support the show, please consider purchasing a book, signing up for Button, or reading the Django News newsletter.
Will Vincent 0:06
Take it away. Oh, come on. Sorry. Go ahead.
Carlton Gibson 0:10
Hi, welcome to another episode of Django Chat podcast on the Django web framework. I'm Carlton Gibson joined by as ever by Will Vincent. Hello Will!
Will Vincent 0:15
Hi, Carlton.
Carlton Gibson 0:18
Hello Will. And we've got with his NDI. This week. He's built of course records and all around good fella. Hello, Andy.
Andy Ide 0:23
G'day Carlton, g'day Will. Good to be here.
Carlton Gibson 0:26
Good to have you. Thank you for coming on the show. I've been talking to you online for ages. I promise.
Will Vincent 0:33
I'll just hold it up to the market. Oh, Jenga for professionals. I
Andy Ide 0:37
say yes. Written by some hack and dream much API's? Yes, thank you very much. ittle bit of light reading for this evening afterwards.
Carlton Gibson 0:49
Okay, so only we're always plugging the books. What would you what would you say about wills?
Andy Ide 0:53
Well, look, I love the Django for professionals, because I'd learnt Django. And I needed something to take me from sort of experienced beginner that targeted like the mid level of programmer of Django. So I knew things but I didn't know things like management commands. I didn't know template tags. I didn't know management comm. I don't know. Model managers. And this book. Django for professionals just took me up to that next level, and answered a few questions. That was great. Django for APIs. uses. I don't know if you guys know a little plugin called Django rest framework. Have you heard of that? One? Cotton.
Carlton Gibson 1:40
We've heard of that. You just heard of that.
Andy Ide 1:42
Just just in passing. What I liked about this book was the Django for API's book was, I went through and I went, Oh, that's how I do it. Oh, that's how I do it. That's how I was like, it gave me a sense of confidence in that what I was doing with DRF was actually good, because I was running about three or four apps. And I had no idea if I was doing the right way. And yeah, it turns out that we're in agreeance on how to do things. So that that was, that was good. But yeah, if I had to do my pickup, so Django for professionals, but get the lot.
Carlton Gibson 2:17
Okay, yeah. But that's interesting, because I always, you know, someone was saying, how do I learn Django and I was always, I always point people to wills books was everything in Django for beginners, and then Django for API's. But of course, the tweet came up the other day, or Where's all the middle grade material that gets you from that beginner to intermediate level or beyond? And, of course, wills books are the answer there, as well, as the professionals book teaches you that, you know, that step further. So it's nice to hear that that's, you know, your take,
Will Vincent 2:42
we'll get into your background, Andy, but you have a background. So I think that's why yours, unnecessary, but I know it's very, very kind of you to say that, I appreciate that. Because I think of the books, the professionals was the hardest to write and is the one that I'm trying to, I'm trying to, but there's so much that's not in it. Like there's so much more than I want to have in it. And it's hard to push the curve up to the point where it's like, this is kind of this the best practice, you need to know this versus who the heck knows. And experts do it differently. So that's, that's the level I'm trying to get at is like, there's pretty much consensus up to here. And then I think I do in the book, I'll say, now it's a choose your own adventure.
Andy Ide 3:17
And it's where do you draw that line? Where do you say this is? You know, this is where I'm gonna go? You know, do I talk about hacking Django? Or? No? Well,
Will Vincent 3:30
no. And that's, I think that critique is to the extent there's a consistent critique of the books, it's that they show and don't explain, and I kind of get that I wrote them explicitly to be the opposite to be top down to the bottom up. But the issue I have now is that now that I'm 10 plus years into Django itself, I'm really interested in the details. So I have that urge, like past, you know, engineering based authors to really really show you how cool it is, but I know I'm just going to lose people so it's always that that mixture of context like here's here's how to actually do what you want to do. And then let me explain to you because it's really kind of cool and you could do all these things but I don't want to totally lose you Yeah, exactly. Yeah, you know, like a university professor can just lose you but you're stuck there engaging now you know, you're not going to study for the test it has to be useful Yes. Anyway, let's
Carlton Gibson 4:20
move you've totally hijacked my opening there Andy with your your plugin wheels books just so
Andy Ide 4:25
excited about the books Carlton.
Carlton Gibson 4:28
You've got the whole coffees as well. So that's normally not you think we weren't room one chat about your web, your application horse records that you're building and everything that's gone on there. But in order to give a bit of intro to that tell us who you are and your background and then we can lead into
Andy Ide 4:44
yes sure
Carlton Gibson 4:45
that you're building and
Andy Ide 4:47
I'm Andy. I'm based in a little countries called Australia you can probably tell by the accent have flipped my video upside down. So you I come up right way Hi. I started with computers in the early 80s. My grandfather was into a thing called a source for a computer, which is a bit like a BBC Micro or of that era before the the, the before Commodore 64. Was that generation. So was BBC Micro was the one I remember. But ours was called a sorcerer. And I never had enough games. So I was I'd start coding in, in basic. They had some basic there, and, you know, just car racing games and stuff I'd find in a book and typing, you know. And then after, after that, probably in the late 80s, I was given this book, Turbo basic, which had everything that turbo basic did. And I went completely nuts. And just wrote, This was early PCs, like two eight sixes, kind of, sort of two meg hard drives, where were you when, and I remember my old man wanting to get a four Meg hard drive and and I said, You're crazy. You'll never need that much. So those were the days. And so yeah, I was still at school. And then in the mid 90s, I was working as a team leader for a company that was coding in this strange language called PHP. So what started learning that the cookie language and got into websites, which were all the rage in sort of the late 90s, early 2000s, they were sort of a lot of them were written in Perl, and we're moving into PHP. So yeah, I I had my own business for about 810 years building websites. And I found near the end, I was starting to get beaten in the website game by the graphic designers, because they could draw it, they could make a website. Pretty. They couldn't necessarily make it performant. But or secure.
Will Vincent 7:08
But who can see who can see that? Who
Andy Ide 7:10
can see that? Yes, customer didn't care. And it got to the point where you know, these sites got hacked, and that the graphic designers would be calling me to sort of clean them up. And I still do the odd WordPress Unhak. Site, job. Yeah, so I made a career building websites in PHP, and there was a brief foray into Angular with JavaScript and Ember, the JavaScript framework. And about sort of late 2018 2019, I was given a task at work, and a new project. And I was agonizing with my mentor, I said, What do I do here? I coded in PHP, I hate all the frameworks. I hate all the JavaScript frameworks. I just hate everything. And I hate everybody. So here's the 2020.
Carlton Gibson 8:02
That's a life in tech.
Andy Ide 8:05
And he said, Well, why don't you use this as an opportunity to learn a new framework? Learn something new? Oh, that's good. Okay, well, I'll look at Python. So I looked at Python. And I had, I looked at flask, and I looked at Django. And I started off with Flask, and realize that you sort of, you have to bring your own batteries. So what I found with Flask, I was new, I didn't know. They said, Oh, you could use all these packages. There's like three or four for authentication. And unlike I don't know which one to use. And then after a week of watching videos on YouTube, I thought, Okay, I'll give Django a chance. And I looked at Django and they said, I use this and I went, Well, you know, I've chosen it. They've been around 10 years, 12 years, whatever, it must be okay. And I just found that the, that the decisions that Jango had made with its batteries included, concepts really resonated with me and allowed me just to focus on actually writing what I needed to write and solve the problems I needed to write. I didn't need to worry about what authentication library I needed to install or what templating library I needed to install that there was sensible defaults that were that were good enough. So that's sort of my journey into Django. Yeah.
Will Vincent 9:24
Well, there is a saying, if you use last long enough, you end up kind of rebuilding Django. Exactly. But it is what it is. I think there's interesting combination of beginners go to flask first, because the Hello World, even though Carlton's given a talk on this single hello world and, and then at the same time, I think in larger companies, there's actually quite a lot of flask usage, because you can just spring up a dedicated API endpoint, just bolt bolted on. You can do that with Django two. But I think the combination of those two is partly why, like there's a lot fewer fully flask sites of any scale out there. There's a lot of you know, have tiny sites or some endpoints with Flask. Yeah, yeah, I think that that makes the numbers the comparison. A little bit off. You know, if you look just at stars, they're used for different things.
Andy Ide 10:10
Yeah, exactly. And often, you know, part of being a sort of engineer who's got Sr. In front of his title, just because he's old, not because he's good. But you've, you've seen, you've been in the game long enough to realize maitenance matters. So what is it the the median age of developers is five, five years experience on Stack Overflow, so
Carlton Gibson 10:38
five years old?
Andy Ide 10:44
The the experience, so half of developers have got less than five years experience. And if you've been around a while, eventually start to see your projects that you coded, need maintenance, and a lot of the maintenance problems start to come up. And so you, yeah, so flask being small. Works well. But often with things like Django. It goes, your projects get bigger and bigger, and you always need to be able to maintain them.
Will Vincent 11:18
I wonder how much of that is, you know, being doing consulting and having ownership? I mean, Carlton, you you had did consulting quite a long time. You know, most people are either new in their career, or if they're, you know, they're at large companies, you know, they do something for a year or two, and then they move on to the next thing, right, like, what was that Google stadia, the new video game thing, they kill them partly because, you know, all the impetus internally is on creating the new thing, and then there's no reward for maintenance. So I think a lot of people, even people who make a lot of money and are very prestigious, don't don't feel that pain, or they know that someone else will feel it. And so it's, you know, you don't get promoted for maintenance in a lot of places. And
Andy Ide 11:55
you can always move on after two years. So you don't have to maintain your software.
Will Vincent 11:59
Well, that's I mean, that's, that's especially like I was briefly out in Silicon Valley. That's the, you know, the two three year itch, it's like, first year, you're like, Oh, this is great, like, new thing. Second year, you're like, Okay, I know what to do is getting annoying third year, like, I hate all of it to dumpster fire of tech debt, and then you go to the next place. Yeah. And then you sort of then you but then you get, you know, to get you know, 40% Raise, I mean, used to so, you know, again, you can't like put get blame on like someone's resume, like, keep following this person and their trash. But anyway, yeah, so that's, yeah, did you did you can I ask, did you, so pythons? Not necessarily sorry, Carlton, I just have I know you have, you're gonna have all the questions for this. But I just want to know, a couple little icon. So Python isn't necessarily the the sexy thing these days, there's like elixir, and there's all sorts of other things. What was it? Uh, maybe you're too experienced to be excited by those. What else did you consider? I guess is my question is my question, you know, back to three years ago die.
Andy Ide 12:59
It was always for Python. My mental wants, you know, I think it'd be really happy if I went with a compiled language, but it's just not my background. And when I started coding Python, I sort of got the feeling of back in the basic days. You know, everything's fairly simple and clean. It's kind of works. Yeah, the nomenklatura is easy. It's been around a while. So most problems are solved that you that I would find, you know, I'm not here. I'm not one of these devs, who's sort of on the cutting edge of stuff. I'm just using it to produce something cool. And you sort of, I don't know, I don't need the latest and best thing. I went there with the Ember and the angular. I got burnt when Angular went from Angular to to Angular four, and then got called Angular and what was Angular turned to AngularJS. And the fact that they didn't have any portability between the versions and no backwards compatibility, just turned me off. JavaScript evil Java frameworks forever. For that one, what
Will Vincent 14:13
is that thing that you still use? You still use a, you know, an old time JavaScript framework by choice, not Ember, right. But what's the Don't you have a favorite? What do you use for JavaScript frameworks, if you have a choice,
Carlton Gibson 14:27
if I have a choice these days, I will use an htm X for but then I'll use. I've used outpoint. Jas, I use L. Four, right. But
Will Vincent 14:42
just to say like, you don't have to
Carlton Gibson 14:44
know but it's a whole left field maneuver. And the reason I like it is because it's written it's this whole little other language is sort of functional language is a bit like Haskell. And it compiles down to JavaScript, but you never see JavaScript and it because it's strictly typed, there's no if it compiles, it runs is no runtime errors slightly? The, you know, you can, it's a miracle if you can get a runtime error out of it, you've, you know, so you never see JavaScript, and that's why I like him.
Andy Ide 15:11
But jQuery on my site, so,
Carlton Gibson 15:15
yes, exactly, but like jQuery, so jQuery was awesome. And then I got into to a backbone. Why? Because it gives you a little bit more state around jQuery. And then the Ember thing, and they just know, sort of skating too much, I never followed it, I never got there. And then, you know, became it, the whole world became so far removed from what I was used to, that I was kind of Evermore migrating towards being a back end developer back end developer. And that's why I'm so excited by this HTML over the wire thing, which you know, we'll talk about it. And because you're using Django unicorn, I know. HTML is Django unicorn, the hot wire stuff. It's just so exciting, because it's like, you know what, this is just like doing JavaScript back when you first picked up jQuery. So it's just like doing jQuery when you first picked it up. And you're like, you know, select my selector and then remove it. Oh, and it's gone. And or animate that. Oh, it's animated. Wow. Amazing. And it's like these, these lines
Andy Ide 16:15
of, you know, I can recreate the marquee tag.
Carlton Gibson 16:19
Yeah. And if you want that yellow fade in thing, yes. I'll give it back. Yellow fade out. Text. Yes. Awesome.
Andy Ide 16:25
I've got the shivers. Now, guys, haha.
Carlton Gibson 16:30
Anyway, so and so you're not you're not agency anymore. You're not doing client work. Particularly, you're working on a site called your own site. Because the one thing that came to mind when you were talking about agencies is the trouble with ownership is you give over your project, and you try and convince them to take on a maintenance, but, you know, contracts, they want it and they'll be like, we don't need a maintenance project. And then, you know, a couple of years, they come back to you when it's totally broken. And you're like, but I don't know, I wanted to maintain it, you know, every six months.
Andy Ide 17:00
So I could keep my business running. Not come to me when it's all on fire.
Carlton Gibson 17:06
Right. So that's why I got in the end. I'm like, I can't do this, this agency work. I want to do other things. And you're doing horse records. Tell us about?
Andy Ide 17:15
Yes. So I, somewhere in my journey, when I had my web business, I met a pretty girl and I ended up marrying her. And turns out that I'm married into a pretty good pedigree, if you pardon the pun. She and her her mother have run the largest, the oldest stock horse Australian stock horse stud in South Australia. So a stock horse is the Australian working horse. It's like a quarter horse in America. It's not bred for racing, like the quarter horse was bred to do the quarter mile. But the stock horse is bred for versatility, intelligence, you know, strength endurance, you're just a working horse that can just do a bit of everything. Anyway, so I'm married into the horse world. So city boy, you know, moving and working, going into horses, and no one warned me how hard that would be on the body. Anyway, so after a few years, my wife wanted something online that can record what she was doing with her horses. So horses need worming horses need a farrier, which is for their, their hooves their feet. They need a dentist, you need a horse needs a dentist once a year. And she wanted to record all of this as well as the breeding matches, keep a good record on the pedigree. And you know, just dates and stuff. So I wrote, wrote a program pretty simply in PHP. And then after a few years of running it, she said, Why don't you make other people able to use this? So this was sort of in 2018. And then by early 2019, when I had that project at work, which I did in Django, I thought, well, I'll create horse records, and I'll do it in Django as well. So I built horse records. At the same time, as I was learning Django, and doing Django for work, so there was a lot of cross pollination between the things that weren't cared about and the things I cared about in horse records. So yeah, what is the software well, it records everything about your horse. So I've already said your farrier, your your feeds your dentistry, worming your performance so like the the ribbons they win or the trophies or the races they win. You can customize it so you know things like chiropractic. If you have a chiropractor for your horse, you can record all the servings so all the whole breeding operation is its own thing. Because so horses mares Come on every three weeks. And that's when you can introduce a stallion to them in the state and conserve them. The other, you know, there's about three or four days and there is fertile, and we'll accept the state and the other. The other three weeks, she'll kick in, say, go away. So even though the mammals like us, it's a little bit different. And you can record pedigrees, which is really important for horse people. They'd like to know the lions, so pedigrees like the mom and dad, grandfather, grandmother. progeny, etc. So yeah, it's, it's a full service horse application written in Jango. A little bit of jQuery, a little bit of vanilla JavaScript. And yeah, hosted on a fairly small VPS.
Will Vincent 20:49
It's gonna ask about hosting. Yeah, yeah. So it's host so let's Yeah, yeah, sorry, more more backwards. Backwards.
Andy Ide 20:57
Backwards, hosting. Okay, so hosting, I've got it running on a VPS, because it's in Django. And a lot of it is all it's all back end stuff. So server rendered, you don't actually need a lot of grunt. You in the server. It's not a single page app or anything like that. So it doesn't have that delay that single page apps have. So yeah, I just run it on the Linode. Plan, it's sort of at the lower end, at this point, there's plenty of room for many orders of magnitude growth, just in the Linode plans before I even go to the custom gig. And yet hosted Linode uses AWS, I think they by AWS and on sell it or something like that. So you know, it's all backed up and secure as I run cloud, cloud Cloudflare on front, which handles all the bad actors trying to hack the thing and you know, all the bots trying to port scan you and stuff like that. So it blocks all of those and and add some caching. So I don't need to use any of the white noise or anything like that. In Django. I just use the Cloudflare caching. And yeah, it renders pretty fast. So I'm pretty happy with the performance of the site. Yeah, I just such a cheap plan. Yeah.
Will Vincent 22:18
And yeah, I mean, users can upload photos and stuff. So I assume you're using Django storages. And are you hosting that on Linode? are using s3? Howard? What's the media file? Just on the just on the box, right?
Andy Ide 22:29
It's on the box in the media directory.
Will Vincent 22:33
Oh, you your wild man, wild man.
Carlton Gibson 22:37
Okay, so this, this is the key point, right? So you stick it on a VPS. And just use the file system. And I bet you've got recurring recurring jobs, right, like tasks that need you need to run out. So what do you use for that?
Andy Ide 22:50
I case, I use cron.
Carlton Gibson 22:52
Just use cron.
Andy Ide 22:54
We here and then I'm this this close to implementing Django key on it for emails. So there's Okay, so I'm using quite, you know, fairly trusted old school boring as as hell. Tech. And
Carlton Gibson 23:11
right but this episode, not episode essay about us boring tech. Right. Yeah. And use the old stuff. And you just focus on the core things. And like, So Andy, you're a one man operation? Yes. And you're running the web application all by yourself? Yep. And I'll do
Andy Ide 23:27
it because I had a DevOps DevOps guys helped set me up. And I asked him some of the hard things like SSL certificates and, you know, self credit. Anyway, all that stuff that they care about. And but you're just running it day to day as me. Yeah. So it has to be simple. I got enough problems.
Carlton Gibson 23:48
Yeah, no, but this is it. It's and it's the same, you focus on Django, you focus on Postgres, you use Nginx. You stick it on one VM. And that's all the operational complexity that you need. And you can scale up to a bigger box, and then a bigger box, and then a bigger box and nothing changes,
Andy Ide 24:06
and my CPU sits flatlining at about 1.5% usage, an occasion occasionally spikes to 15% but it sits at 1.5 Like, pretty happy with that on like a low end plan. So, so I've got I've worked it out, I've easily got 1000 times more capacity just in the Linode plans. So you know, there's plenty of good for now. I'm good for now, and that's without any sort of scaling or having to worry about scale or anything.
Will Vincent 24:40
Yeah. No Kubernetes yet.
Andy Ide 24:44
If I need Kubernetes I'll be calling academ.
Carlton Gibson 24:47
No, no, no, you you actually you won't, you won't just get a bigger box.
Andy Ide 24:54
Well, once you get beyond the VPS as in you get a dedicated servers, you know, and people you make enough money there. If you're happy to pay for someone to do it all for you, so I'm pretty happy with how the how the the stack sits and how it performs. It's really, really good.
Carlton Gibson 25:11
I just want to say this because I think the best example is Stack Overflow, Stack Overflow, they did eventually move to containers and, you know, could probably Kubernetes underneath and all the rest. But for years and years and years and years and years, they were just running on, you know, a couple of couple of servers at the front end with a big ol big old database behind it. And it's the most old fashioned thing in the world. And they were like the top 10 internet sites. And it's like, you are not going to be bigger than Stack Overflow, you are not going to need more capital on Earth than you do in. But what on earth are you doing with this Google scale technologists, when you could just be keeping it simple and getting on with building your application? is
Andy Ide 25:52
there's a few gurus that say that people sort of, you know, will it scale? Well, at scale? Well, how big do you want to go? Like, there's, there's about 1.5 million horses in Australia. On 2016 figures, there's about 10 15 million horses in America, that's not a lot of rows, like, you know, you get every horse in America, you know, and then you get big enough, and you're starting to think, well, maybe I should, you know, handle scale. So yeah, I'm not not hugely worried at this point. And what will happen is that 1.5 will start to go to 2.5, and then five and 10, and up to 50. And then I'll get okay. You know, now I need to start thinking about adding a couple more negative of CPU. So it's, yeah, I'm happy with the server side render, I render as much as I can on the server side. And it seems to work really, really well. So it's really quite a fast site.
Will Vincent 27:00
I think that misconception I, where does that come from? It's for, especially for people who are newer in their careers. I think it's a combination of many tools are built by big companies for big company problems, right? Regular react, yes. And then also, who's out there talking about it? It's it's the people at big companies who have the time to talk and not work in a monopoly. And so they're preaching about the things they struggle with. But yeah, it's not what 99.9% of places Yeah.
Andy Ide 27:29
Do you really struggle with how to handle a million hits a second? Like?
Will Vincent 27:33
Yeah, it's a good interview question. But yeah, I just, I just wanted to ask mention on, on assets, I'm actually glad I was playing around with white noise yesterday, because I'm doing some docs for a hosting service. And Jacob Kaplan moss has a great talk, I actually saw in person at Pycon 2019, called the assets and Django without losing your hair. We basically says, you can just put it in the file system, almost until forever, like he did all these tests. I mean, like, yeah, you can white noise and just carry it, really, but you really don't need to. And I love to He also said he that's the part of he hates the most, like static and media files. Because it's not that tricky to just do white noise and Django storages on an s3 bucket or whatever. But you also stick it in the file system, maybe not immediate files, you know, but I guess unless you get hacked,
Andy Ide 28:23
yeah, like, I'm limited to 100 meg on my video uploads. So I've said to my users, look, it's, you know, 10 second videos, 15 second videos, you can upload. And if someone wants more, ask me, and I haven't been asked yet. Because that's when I'd look at a third party video for video because they're big files. Yeah, there's all those different encryption coatings and stuff. And that's when I'd look at a third party to handle the video upload. But for now, I just stick them on the file system. And just check for check for Meg's the gigs left. Every week. Someone hasn't gone right, who's gonna upload them all?
Carlton Gibson 29:06
I think there's a good test a good litmus test for for like you're running your running site. And you just need to upload a PDF so that someone can download it. How, how easy is it for me to just stick this PDF online and get a link to it. And if you're using the file system on a VPS, you just stick it in your media file, there's your link, it's, you know, already set up to serve it. Yeah. Whereas if you're on some platform as a service, or whatever, it's like, oh, no, I actually have no way of uploading it. So I've got to find somewhere to stick it in. Yeah. Yeah. Yeah. I think it's a good like, simplicity test.
Will Vincent 29:41
Yeah. Anyway, we,
Andy Ide 29:42
it works for now. Golf works for now is what I'm saying. We
Carlton Gibson 29:46
add Adam from Django unicorn. Just last week, your last episode, right. So there's your opening early on.
Andy Ide 29:57
I did a lot of work in Laravel in my life. last job, they were a Laravel house. And one of the cool things that came out of using Laravel was this thing called Live Wire. And I said, I'm sure there's something like this in. In Django, I just couldn't find it. And eventually I found unicorn. Oh, it yeah, this is basically it. It's in its early stages at that point. I think it's up to about point eight or point nine now. But I think I've got on Twitter about point three. And it was very, very close to Livewire. So what it is, is your, it creates Ajax pages. And that does all the JavaScript for you. And it ends up that your view becomes very, very, very simple. And then anytime any variable in the view changes it does an Ajax request to the HTML page and updates it. So it is a bit like HTML x, but you're not passing templates back and forth, you're just changing variables in your view, and your template is updating automatically. And you can do much the same things. So one of the things for HCM X is to check if user names are unique. Well, that's trivial in in unicorn as well. In fact, I like the project so much, I'm actually a Patreon of Django Unicode. So I think 1012 bucks a month I send to him. And I just want to say one thing. There's different ways to support open source software. So there's obviously contribute, upload your code, you can do the documentation, you can, you know, do what I'm doing, which is send some money to them monthly, you can be an advocate for them. So there's all these different ways. So if you're like me, we are little bit too nervous or embarrassed to actually commit to the Django repo itself. Know that there are other ways, such as sending money or just simply being an advocate on Twitter or the socials for it. But yeah, Jenga unicorn is is great. I've looked at htm X, I think that's valid as well. Unicorns sits better with me, sometimes you just pick text because it a technology because it just works for how you think it works for your brain. I'd love Adam to get some funding to work on image uploading. And I've chatted to him and said, Are we gonna get a Python grant for your mate or a Django grant somehow to get image uploading working in Django unicorn. But otherwise, I use it in production. If you go to my website, horse records, dot info, click on tools, there's a falling date calculator. And you can just put in the date that you say, pretend that your meal was served. And I'll tell you roughly when the fall is due based on gestation times, and simply what it does is it's a date and you add 340 days if you're in southern hemisphere, 342 days if you're in the northern hemisphere. That's just because one of the one of the good Lords greatest jokes about horses is no one knows the exact gestation time. So the year I asked a vet in Texas is one of my clients. What's the gestation time in the US? She said, I have 342 days. Yep, definitely. And of course, here in Australia, it's 340. And there's there's one breed that some weird number, so yeah. Well, I don't know. But yeah, so that's, it looks like an AJAX See page. But the actual code is really, really simple. You just get the date from the form, add 340 days and say, you know, due date is this, and it does all the JavaScript back and forth. You don't touch JavaScript, or C, any of it. But
Carlton Gibson 34:06
the point with that, is that the actual request that does the calculation that comes back to the server renders the HTML sends that back, which gets put in the pages that that's correct.
Andy Ide 34:17
Yeah. I think Jenga Unicorn does that. They call it hydration or something. Anyway, there's some word for it. It knows what to replace. It does a template for you. Where he makes you kind of say, here's the template, I believe. I think that's right. So yeah, it works fine. It's really quite good. Yeah.
Carlton Gibson 34:41
Okay. I mean, Adam, when I asked him well, what's the sort of big difference between HTML and Django up and he was like, Jenga, unicorns a bit of a slightly better integrated with Django. It's like it knows. It knows more about.
Andy Ide 34:53
Yeah. Yeah, exactly. So we're how she mixes JavaScript basically, yeah, yeah,
Will Vincent 35:02
I'm still thinking about what you said about grants, because that's something that on the Django Software Foundation Board, we sometimes think about if you know, why would we try to raise more money, you know, Django grants, or even Python, like we have this issue with. I can say this with Django Girls events, where a lot of times they'll submit both to Python and to Django. And both of us have money set aside to sponsor conferences, but the vetting is difficult. And so one thing we've been trying, I think we're hoping to work on is to ask the organizers of Django Girls to to say, you know, if we put aside X amount of money, can you've edit for us? Okay, then that puts, but then that's sort of like, a trickle down ownership for volunteers on volunteers. But there are these like, motherships that have funding, but it's hard to, can be hard to give it away. Yeah, and there's a little bit, you know, grants is a lot of people who want it and you know, it's like, if you give to one is that, but there's got to be something better than Kickstarters. And
Andy Ide 36:01
here, like, there's
Will Vincent 36:03
some work we're gonna do on corporate sponsors, I would like to, actually Django con us is coming up. So I'd like to, you know, if we had more money, how do people think we should spend it because we could get more money, but we're not gonna get it if we don't know where it's going. planned?
Andy Ide 36:15
Yeah. And if you look at something like Laravel, which is, you know, this is a this is my opinion. And once again, feel free to people will probably reply to this one. Laravel makes PHP good. A lot of the weirdness of PHP Laravel. Writes wrapper functions that do things like make it always haystack needle, where P PHP arguments are sometimes needle haystack, sometimes the haystack needle, who knows, sometimes it's underscores between the words, sometimes they're jammed together for your function calls, who knows, which is part of the organic growth of PHP and Laravel sort of wraps that nicely, and hide some of that away for the punters. But Laravel makes quite a bit of money. The disadvantage with Laravel for example, is you know, they've got benevolent the owner, what's his name? Can't remember, tireless on the year brilliant engineer, very talented man. And he's made money in Laravel. And good on him. And but, you know, he is Laravel. Sort of, there's a limit there. There's, there's an issue there, that fact that he could go evil, or he could take Laravel in a way that you don't want to take your software, where with Django, we don't have that problem of that kind of Django being taken the other way, because you can go right, well, I'm going to push a pull request up and HyperCard Hello, Morris, apply it. But Laravel finds makes money. Laravel is making updater coin. One of the ways of
Will Vincent 38:08
doing well, he I mean, he just posted Instagram photo of his orange Lambo in front of his house, and you know, good on him because someone's gonna make money it should be. It should be something like that. But you know, he's, they've got a no, it's not a Django Lambo.
Andy Ide 38:21
No, no, I just just the one that we drive. But Laravel has a bunch of tools that it makes money off. Like these two,
Will Vincent 38:32
I think, right? There's, there's the hosting is the big one. And there's a starter because that start to kick in. Maybe there's more. I know those, those two, and especially the hosting,
Andy Ide 38:40
yeah, there's a few trickling around the edges. Like there's sort of, we provide a basic one for free if you want the paid one, which has got all the bells and whistles. So that might be an option for the Django Foundation is to have some of these tools to make some money. Now what those tools would be, I don't know, but throw it out there. Let the better minds than me work on it.
Will Vincent 39:09
What do you think, Carlton? I think I've spoken
Carlton Gibson 39:12
on Thank you. I mean, I think it's difficult for Django itself because of the way that the SF is structured and whatnot. I think there are a few starter kits I know well, you've got a starter template Jeff's Jeff triplets just published one. Just tweeted about it.
Will Vincent 39:28
Yeah, we sorry, Cory. Yep. Yeah, he's doing pretty reasonably well with that. I think
Carlton Gibson 39:34
yeah, good. Yeah. So I mean, so the Pegasus product is paid and he you know, he's doing okay with it. And that's that's great when there's room for you know, I didn't is room for your package to be monetized. Well, maybe I don't know. But it's it's open source. It's difficult how to make money with it. I don't know. I'm working on Barton which you know, it's been
Will Vincent 39:51
bad guys land border 10 years from now,
Carlton Gibson 39:54
but I don't want to, I don't want to land but what I want it is just you know if it can make some money That's great. But what I really want is to not see people driving themselves down rabbit holes, building silly things so that I can package it up. That's great. But for the DSF to do it, it's kind of like the DSF just isn't this person. Now it's a charity. It's a nonprofit. And how is it that Django gets to be 17 years old? And is all like, it's almost like we're at the verge of another golden age with all the changes that are happening and all the things that are coming out the usage, you know, we've just had 600 People at Django con Europe, it's like, masses of interest and masses of usage. Would that be? Would that have been the case? If Django had been a commercial enterprise, monetizing itself from the go? I'm not sure. Because how did the trouble is, if you've got a dictator, how do you move from one dictator, the next accession is always a problem. Whereas if we've got a community based project, there's life around it, but I think I think it would be nice to see projects around the sort of Django call, being able to make money. I think there's been a kind of, you know, a reticence for that to happen in the community. I don't know.
Andy Ide 41:15
This seems to come off every episode.
Will Vincent 41:18
It's just that there's just a therapy session, we talked about consulting for Carlton
Andy Ide 41:22
and well, you guys just secured cards. You have to take a shot now.
Will Vincent 41:26
For me. Yeah.
Carlton Gibson 41:27
Okay. But okay. So why does it come up? It comes up because the problem of open source is sustainability. Yes. So when I was coming into it, some of my absolute heroes from the early days of the framework, they were busy publicly melting down, because they'd had such a high. Oh, really? Well, yeah. But the whole this, this idea that Django is a meat grinder, and you need fresh meat for the meat grinder, and you know, people just get wiped out by it. And it was like, this isn't sustainable. And the fellowship program, which is the one kind of sort of monetized bit in Django, it's probably the reason Django still exists. I agree. It's it was able to take on paid work that made the unsustainable work sustainable. And so it really is a big question like wills work, how do we make sure that people like well, are able to continue to produce produce quality content, and make sure that it's renumerated in a way that is realistic? And you know, I saw a comment on Twitter about, well, why don't you do free tutorials and, you know, add to the docks? And it's like, because it's a job. And because we'll have a family and the has like to feed them?
Will Vincent 42:34
Well, I think what, it's less that No, I mean, it's that I mean, whatever. That's just, I'm used to that at this point. But it's, it's more so like the the DSF board, specifically, like Anna, who has been the president does a lot and has done a lot, unpaid, largely invisible. And it's healthy to have recycling, but there's a reason why the board the board cycles, and there's all these other areas, translation teams docks, you know, most people are doing it pretty much invisible. And so, you know, and Carlton is great about this, when it becomes too much people step away, you know, if you were paid, maybe people could stay longer. I don't know how healthy that would be. But there's Yeah, at some point, the formation of the DSF will need to be changed. It seems to work now. But there's all these. I mean, I saw for a full circle before I was on the board, I was like, Why don't they do all these things? And now that I'm on the board, I'm like, Well, this is why. And it's because it's a handful of people who we meet months, once a month, and they do a lot of things but trying not to take on more is why it's sustainable. Right? Like why don't we pull in a dozen third party packages that are essentially part of core well then who's going to maintain them Carlton aureus? Like yeah, you know? Yeah, anything, you know, kicking things, kicking things out? I mean, but Well, since we're diverging all over the place. I'm curious to ask you, Andy, I've been talking to people, there's gonna be a state of Django panel coming up at Django con us and one thing for me on the technical side Carlton has mentioned is like the start project command, there's like there's such a gulf between local and production. Deployment remain more more batteries, you know, what would what? What are your thoughts on that? Do you think there's a way to have like start project dash production and what would that look like?
Andy Ide 44:28
Yeah, well deployments the big thing, isn't it? That's the sticking point I had with Django. Remember, I come from the days of PHP where you just upload files via FTP
Will Vincent 44:42
Carlton do all sin
Carlton Gibson 44:43
could accountability. Yeah.
Andy Ide 44:49
Yeah, look, the way that Laravel Forge does it and the way that Carlton is doing with button, I would hope is the way to do it. What you really I want to do is, I don't have a problem logging into this. So I don't have a problem logging into the server and doing a git pull, and then changing your branch and then running, you know, make my make migrations collect static, and then G unicorn restart. I don't think that's a burden. But getting to that point of being able to just use your Git repo as your sort of your upload the new files, that's the hard bit, and tools like button, and Laravel Forge in the other language, they do that they get you to that very quickly without making it hard. And I think if you could get to that point, you would find that a lot of programmers would sort of, you know, yeah, a lot of programmers would, would find that appealing, because they don't have to worry about, they don't want to program is DevOps, when I started DevOps and programming with the same thing. Now, DevOps is specialized, because everything's expanded, you have to specialize. Specialization leads to interdependence on dependent on someone with DevOps. But I don't want to learn DevOps, I just want to code there's enough problems there. I don't want to not have to know a million Linux bash commands to get my site set up. So if someone took that DevOps part away from me, so that I could just run a Git command, and then obviously, a few make migrations and stuff. That would be brilliant. That would be where I would want to be.
Will Vincent 46:30
Well, we've, we've mentioned this, I think, I think in the episode with Adam, that comes out tomorrow, but Eric Mathis is working on this Django simple deploy tools, tried to standardize this. I mean, I think I was actually talking with Jeff triplet about this yesterday about because I'm, I'm writing the docs for a hosting company. I was like, trying to make it really simple. And it's really hard to make it simple versus just saying this works. Trust me. But like, so let me ask you set multiple settings, files or environment variables.
Andy Ide 47:02
I think Django because Django environment, I think should be pulled into core.
Will Vincent 47:07
So this is a question. Yeah. Should we? I mean, there's, there's a couple of them. I mean, I like environments. Go by one of them. If start project came with built in environment variables, yes. Just for like, debug allowed hosts secret key CSRF trusted origins.
Andy Ide 47:22
Out with Git ignore file, sorry. Yep. Get
Will Vincent 47:27
while Git ignore. And then if there was something is static, like, why don't we have static route and static files, ders, just set up and throw in Gunicorn? Gunicorn. And while we're at it, make startup have urls.py file? I think that hits a lot of it.
Andy Ide 47:41
Yeah. And yeah, I would agree. I would agree with that. I, when I went with Laravel, when you set something up, it automatically does the dot env file. With Django, it doesn't you have to create that you have to know to create that. And then you have to create it.
Will Vincent 48:00
As kind of why I hear people pay me is for this stuff. But I would rather teach other stuff, you know, like, because it's like, there's just, it's so
Andy Ide 48:07
so rare to stuff. Yeah, I agree. It's, you shouldn't have to say the horse's the head is this in the tails added.
Will Vincent 48:16
But it's one more thing to pull into Django itself. Everything initially, then then we're then we're picking a third party environment variables package. And we're and we're picking various variables over multiple settings, files, we
Andy Ide 48:27
could just code our own, then we got for
Carlton Gibson 48:30
now, but there's, there's a heartache here, which is it says that we can't bring this stuff in because every time to get suggested, and it does get suggested Yeah, of course, quite frequently, there's a massive outcry. And we have this thing called the AST API Stability Policy, which you all love, because that means when you type pip install, dash you Django when it upgrades and your site continues to work. It works because of the API stability project, right? The policy, right? But it also means that we can't make changes in this as a consensus that change. And when you come to topics like this, there's no consensus, everyone will go, oh, yeah, we should we could have we could make the start project a little bit better. And they say, Well, how about this? And then there's four voices that say no. And they say, Well, what about this? And it's for voices that say no, and yeah, and there's any concrete change? It's not possible to say, say not possible, we need a dictator. Now, we'll Well, this is where the dictator comes in the benefit of the dictator is and
Andy Ide 49:28
they just say, we're doing it this way, and then you like it.
Carlton Gibson 49:31
Right? So but so the way forward here though, is to just create, like, do it your way or do it one way and just say this is mine? And, and just live with that and be happy with that and get some people who also use way and let's do this for other people, you're all advocating for, you know, Andy's way of doing stuff, which is the best way here. But let's merge that. And there's, there's more of a chance that it gets really difficult to pick out exactly what the change is that's possible to merge with the various competing issues that come in. Because even like MBAs, we all agree you shouldn't hard code secrets. Yeah. In a sense, yes. Yes. Right. We all agree. Very bad. Exactly. The Right. But there are like, if you do a survey of it, there are about 70 Just Django packages on how you load environment variables. And because everyone's got a different take on it. And everyone's really quite committed to the take that they've got.
Andy Ide 50:32
I've got a package with the invite the Django vervoe In the settings file. Don't talk about it. Well, I,
Will Vincent 50:42
I think when one sort of baby step that I liked with secret key is now going back I think one or two versions it has its it'll say Django insecure in the name being like, hey, you really, really need to change this. Yeah, that's good. And, you know, we do have in the docs and elsewhere, but like, something like that, for allowed host about CSRF trusted origins would be something it's not a solution. But I find with a secret key I found that was that was helpful, because it's like really beats people over the head with it.
Carlton Gibson 51:11
So what what you mentioned Django simple deploy, one thing I want to do for that is create a plugin for button. So there's, there's a pre step for button, which is get your project ready for button, you have to have these environment variables ready to take their viral variables that are given to you. If I can, if I can automate that as a plugin for Django simply deploy, I'm going to do that, because I think it's a great project and that you just go automate all and it's ready to go for ball.
Will Vincent 51:36
Well, one last thing on these platform hosting companies, because I was doing this yesterday, so. So Heroku, is based on Git. So you'd have a Git ignore, and you would get push, just as you do to GitHub or GitLab. Or whatever.
Andy Ide 51:48
You that's what I use in any in my stuff. Yeah. What is what? Yeah, get? Yeah, just to get pool to get the latest branches. And then,
Will Vincent 51:59
yeah, so the newer hosting companies like fly.io, in particular, but many of the others, it's all containerized. It's all Docker stuff. They don't use Git. So you need, they don't, so they don't respect. You don't you don't get push? Well, you just wrote you just you just run a, you know, fly, deploy, or whatever, you know, command. Oh, yep. And so you need a Docker ignore file that says, ignore the Git repo. Otherwise, you're going to toss all your Git stuff up on there, it doesn't automatically look for the Git ignore because it's not get first it's basically Docker first. So that's, that's going to trip up a lot of people. I guess that's why I get paid, right.
Andy Ide 52:44
Job was easy. We wouldn't have one. Yeah.
Will Vincent 52:47
Yeah. Like, we talked about get I had, like, it's a little bit of a month mind shift for me, too, is like, huh, like, you know, so then it's like, okay, well, so if you're writing the docs for when these for button or something else, or for this company, it's like, okay, well, I want to tell people to have a Git ignore file, because that's a good practice, but it's not really related to this. It's kind of like, you should know that. But it's not their fault that people don't know how to do that. So who, where do people go for that? You know, I mean, it come to me, but like, you know, should the Django Doc's have that stuff? It's like, it's not really a Django problem. It's a website hosting.
Andy Ide 53:19
It's however, the hosting company is doing their daco is extensive, but they're trying to cover every case.
Will Vincent 53:27
Yeah. And get I mean, universities don't teach get in any way. I've seen, you know, people don't know how to do professional pull request.
Carlton Gibson 53:35
People don't even know how to check out a branch or Nepal look like, you know, the, you know, literacy students who, you know, they can invert a binary tree on a whiteboard. No problem. Yeah, they can't. They can't show a branch from a remote.
Andy Ide 53:47
I've been coding for 23 years. And yeah, I don't know how to invert it binary tree.
Carlton Gibson 53:53
You turn the whiteboard up, so
Andy Ide 53:56
I'll probably just probably just
Will Vincent 54:01
Yeah, exactly.
Carlton Gibson 54:03
Import interview.
Andy Ide 54:09
Okay, go on carton.
Will Vincent 54:13
thought I wasn't going to ask about your you haven't. So you have an eight, back to horse records. So you have an API that people can access. Can you talk about building that how it's being used in the future?
Andy Ide 54:23
Inside horse records, if you're on a paid plan, it gives you access to an API, which is a DRF. API. They got a token and they can access all the horses they're allowed to access. It's at the moment, it's just a read only API. The idea is that they'd have their own website that pull the data from horse records and show it on their site. So I've got a we call them studs in Australia, you would call them ranches or farms.
Will Vincent 54:54
We call them fellows fellows.
Andy Ide 54:58
Yes, so
Will Vincent 54:59
Carlson's not smiling.
Andy Ide 55:04
He's a beautiful man up close. It's great. Thank you. So Sorry, continue. So yeah, so you can see. So you might have a site for your start where you say, here's all my beautiful manners and my stains and my files, please buy them. And you can just basically do simple GET requests to the API. I say to people, look, please put some occasion layer in, you know, but my next major job is to get that really cranking for our own site. It's, I have to do breeding at the moment, breeding, I'm working with one of the largest AI studs in Australia to get a breeding platform working. And then after that, I'll be getting the API beyond just high, it exists to something that really, really pumped, so that'll be some more inputs and some permissions and stuff. It won't have patch back at this point, I would want to talk to someone who's going to use that before I implement it. Because I want to know what they're patching. And why aren't they just logging into horse records and doing it? If it's another API wanting to talk, that's something different. But yes, so there is an API in there for for the guys who want to use it. Yeah, that's, that's all pretty cool. can update your token, whatever you like, etc.
Carlton Gibson 56:33
I want to ask about you, will you once or came second in some Ward you've got of some Ward about this. And because you told me this story, and I'm like, wow, that's such a good advert for.
Andy Ide 56:46
So tell us about. So a few months ago, there was the Innovation Awards, the AI awards. And in South Australia in Northern Territory, which is sort of the two states in the middle of Australia. I was a finalist in the technology section of these AI awards. And I came second in the end. But I was the only solo developer there. In all the different awards. There was about five awards turned each I was the only single bloke there. The the one that beat me, by the way, was converting a phone call into text for entry into the census. So you know, I don't know exactly how many programs they have, but at least 20. And you know, AWS huge budget, blah, blah, blah, there's me going oh, yeah, horses made. And there was another company that deals with forestry all over the world, the forestry supply chain. There was another company working on the cost of insurance for houses all through America and Europe. And yeah, I was certainly in good company. Yeah. And it was amazing to just come second to something, you know, so, so competitive.
Carlton Gibson 58:14
And we'll just well done for that. Congratulation. You know, did you not feel like Thor against the hordes when it's you? A one man Django developers taking on these tactics? Yeah.
Andy Ide 58:27
So I wanted to be pulled up on stage for them to go, no, no, you can call the rest of your team up. It was a it was a really good night. Yeah. And I was really happy to get that award. And, yeah, I sent out a press release to a whole bunch of papers. And I got featured in quite a few. And I also got featured in a horse website in New Zealand for it, even though it was an Australian award. So well done New Zealand. By the way, at the process of talking to New Zealand horse associations to begin exporting to there have been any key we can register the horse on horse records because of success online, but to talk to those formal associations or get a formal relationship, so similar to what I have here. So in South Australia, Northern Territory, every retired racehorse goes through horse records. So when, when a horse retires from racing as in around the track, they get a rug, they get a $500 food voucher, and they get entered into horse records. So that the Racing Association says, Hey, we've provided you that with all the tools for you to give the best care for your horse, all the ethical care, you know, everything we can. And when I call up these customers, and I say I get on Andy from horse records, like 90% of the time, the first thing they say is, let me tell you about my boy. It's Apache summarize, you know, he won a few races, oh, he's got such a big personality. Oh my God, he's looking at me now. And they will wax lyrical for 10 minutes about how much they love their horse. And it's really nice to hear anything in here, these horses are going to be some of the best treated happiest animals. And I go, Oh, by the way, and host records, if you sell them, you can transfer the records to the new owner. Oh, I never saw my boy. He's life. It's so great to hear that. Because you hear all those stories of X ray sources being treated poorly. It's not the case, the vast vast majority are treated beautifully. So yeah.
Will Vincent 1:00:45
Can I ask about payments? are you what are you using for payments? Yeah. Do you implement that? Yeah,
Andy Ide 1:00:50
I've using Stripe. They've been pretty good. A lot of the developer type questions though, you need to find out for yourself. The customer service is very much what you see on the dashboard is what you get. Don't ask some questions why something is something you got to find out.
Will Vincent 1:01:13
Are you using a third party package you just raw implemented the latest? DJ stripe?
Right that's the big one
Andy Ide 1:01:20
I get that document was lacking in documentation was lacking in a key part.
Will Vincent 1:01:27
And then I looked at having a big grant from stripe I was I did they like while struggle stripe has money. So I'm pretty sure that it
Andy Ide 1:01:38
is. Yeah. I just do it raw with the Python stripe library. And
Will Vincent 1:01:45
Carlton as well, I think right? You you're doing Yeah,
Carlton Gibson 1:01:48
well, I use the hosted portal stuff, which is all great. Very easy to it's very easy to implement. And people can update their card details and things like that. It's it's super, I recently found that their their payment receipts don't aren't sort of EU tax compliant and their invoices API, which is doesn't integrate with their payments API, which isn't and so you can't you can't create an invoice for payment. You have to anyway, so I've got a source. There's always wiggles
Will Vincent 1:02:17
but that's why yeah, there's those like, what tax jar there's there's all these like, third party one was
Carlton Gibson 1:02:24
the new tax off in stripe is brilliant. And it works. And it does, it allocates the right tax depending on where people are. And depending on where you're registered, and it does all of that brilliantly. It just doesn't create the invoices that like the receipt they send to the customer isn't isn't good enough. It hasn't got the right details on it. So you then have to create another one. Okay, fine. It you know, but it contains where was it two years, two years ago, when I first looked into it for button, I was like, Oh, I'm gonna have to implement the tax myself. And that's a whole different thing. Because you know, you tax is not simple. No. So now that stripe do all that for you. It's like, okay, yeah, this is really quite manageable.
Andy Ide 1:03:04
Yeah, I use the console too. I find that really great. The risk on that at the moment is that I'm just using one payment processor if they decide to turn off or turn the switch off. Are they real trouble? Yes, but that's a phase two problem. I'm in phase one, which is just expanding the business getting it out there getting it self sustaining. And phase two is doing things like, you know, reducing risk across the business and exporting to other things. And phase three is to go into things like pet records, dog records, Greyhound records. So yeah, I'll be covering gold chain soon. And driving a yellow Ferrari.
Carlton Gibson 1:03:52
Fantastic. I'll just say on the payment thing, I think it's, you know, like, once you've got revenues coming in at a certain scale, I think to go to your bank and pay their gateway fees is perfectly reasonable. But when you're starting up and you're zero to go to your bank, and it's like, oh, it's like, you know, quite big charges to begin, like monthly charges quite high percent. It's like no, I'm not doing any of that
Andy Ide 1:04:14
I used to at one point, I was working very closely in the payment space. I actually had plugins for WordPress and WooCommerce and a few others in for a particular payment gateway. And yes, the banks really want to know your volume. And then they can give you a price. If you just say I'm just starting up, you won't get a good price. So yeah, well, this is in Australia anyway. So no, I think
Will Vincent 1:04:42
it's the same stripe stripe to stripe to will change your rates based on your volume. Yes,
Andy Ide 1:04:46
yeah. I'm not at that stage yet. But one day, I hope that they're calling me.
Will Vincent 1:04:53
Yeah. Well, I know we're coming up on time. There are two questions So I wanted to ask Carlton, you may have others, no one is function based views. You, you have thoughts, yes,
Andy Ide 1:05:05
big proponent of function based. I started, when I started, I coded in class based views, because I thought, Oh, well, they're newer, they must be more correct. And as time went on, I just found I was writing more and more methods to do these class based views. And the thing is, is class based views are good for vanilla, but almost nothing I do is vanilla. There's always something. So for example, with a horse, I have to link it to the stud there in or the ranch or whatever. So anytime doing anything on a horse, I have to link this. And there's not a straightforward way to do it in class based views, you have to code it. And then I saw that brilliant, brilliant article that said, when I think we know the one, yes, that just says, yeah, it's okay to use function based views. And it felt like it had solidified in in writing what I was afraid to say. So now I, I always reach for function based views right from the beginning, I never do class based views. Because I know exactly what variables I've got in scope. I know where they've come from, and I know what's happening. And you actually write less lines of code, usually, for anything beyond really vanilla instance, and I will die on this hill.
Will Vincent 1:06:45
Well, that's okay. I wanted to I was I was gonna ask what your longest function based view was, but I think maybe a better question is, at what point do you move the logic elsewhere? Like, are there any examples you can think of where you can move it? Model or manager? How do you
Andy Ide 1:07:01
as I'm getting more and more experienced with Django? I'm putting more and more in the model. So, yeah, when I first started out, even though, like I've been coding for 20 years, I've been doing, you know, MVC for, which is Model View Controller, which is model view controllers, what it's called traditionally, in Django, it's basically Model View Template, just the names of different that's just for the listeners who are thinking her who don't know what MVC is. Any I always knew, you know, skinny skinny views, fat models. And when I was learning Django, I tended to just, you know, sort of sway towards fatter views. And now I'm swaying back and doing less and less. And it's more and more in the models. And it's more useful, because you can use the same code multiple times. So they've written once. But yeah, it's more of a discipline to do that. At what point do you do it? Basically, what I think is gonna be written data twice, later, more than once I go, Okay, I'll just flip this to the model is a fairly good rule of thumb. You know, you got to be gentle on yourself. Sometimes it just doesn't happen. And you're too busy solving the problem. And, you know, you've got so many balls in the air, you just write something down and to get it to work. But yeah, if you get a chance, do put in the model, if you can. And use a project.
Will Vincent 1:08:37
That Carlton?
Carlton Gibson 1:08:39
Yeah, I mean, yeah, high level. Yeah, I would, I think I realize, I've seen about this in the shower. Like I use forms in a way that I don't necessarily see a lot of people using forms should perhaps right up I use, like, I really have quite strict, the validation layer that sits between so the view will interact normally in my, in my life with the form, and it will rarely interact with the model directly. And so I put a lot of business logic in that in the form of date and save in the form. Yeah, because I don't necessarily view it as part of the model layer, but it's the same idea for us that same breaking it up quite often. You know, if you sit down and you're just trying to write some stuff, yeah, bang it all in the view to stick it all in the view. Yeah, and the reason why I'll use a class based view not necessarily the the built in class based views, but just a class based view is because it gives me a namespace to break up the logic you know, I've got I've got oh yeah, this is this is do this thing. So I can put that in a method I can call it and pass in the parameters and that kind of stuff. But stick it all in the view and then factor it out. Yes, one thing one thing I do to let me use the form is say for instance, you've got to associate the the horse with the start Yeah, with the with the with the ranch. The place it lives with the ranch. I will the form I'll give it an enter key word that takes the runch so you instantiate the form with with the teacher, and then, and then in save, you're able to make these make that association. And so the view, it just goes if form valid form, save, and it gets back the instance saved, but it didn't see anything. That interaction logic, do that as a management. And you could do that, you know,
Andy Ide 1:10:22
I haven't been using the Form saving forms. That's maybe something I can look at. I sort of do it in the view. But yes, I see where you're coming from. That's better. Yeah, I should put it in the form in the form save thing. Yep.
Carlton Gibson 1:10:37
You know, it's to start gentle.
Andy Ide 1:10:42
You know, yeah. One thing I used to do was compare myself to the best side, I'd go on Twitter, and I see the best and people pulling out amazing things, people like Simon Williamson, that guy's productive as anything, and everything he does is just
Carlton Gibson 1:11:02
Simon, you're in trouble.
Andy Ide 1:11:05
I'm never gonna be like this guy. I love what he does. I love his approach. And I'm just I don't understand half of this. But then I realized that someone contacted me. Had I realized he was comparing himself to me. And I'm like, Oh, God. And that really is realize that yeah, that, you know, you only get to sort of see the the best parts of people you know, it sort of. There's, there's words from a basically, I stopped needing to compare myself to the best. And I think that every programmer while they can admire the work of the best and learn from it, don't beat yourself up. Because you're not as good as someone who's been in the game 10 years less than you and knows more that that's okay. You know, there's reasons and it's alright, so yeah, just, I guess, to the, the younger coders, just be gentle on yourself. Yeah,
Will Vincent 1:12:10
I think it's also if you look at success in terms of financial or size, or other things, so much of it is luck, of course, but but pointing, walking the right direction, like there are people who can run really fast, often, they don't ever pull their head up and look around for where they want to go. So they're just running in circles. Whereas if you just horse records, or whatever, like have a thing and keep going, you can apply a modicum, a modicum of ability and talent to something that's underserved. That's always going to be someone running fast in a circle. And if you're too in love with your tools, you never know like, because pure engineers don't really care what the product is, they just want to hear your tech. And that's great. But that's, that's different than building a business that's different than having an impact that's different than having a popular third party package where you find out, hey, the code is like 10% of it. And 90% of it is marketing and Docs and going on podcasts and all these things and having the relationship required for success. I think it's just how you define it,
Andy Ide 1:13:10
was it you will who said, I think it was you in one of the earlier podcasts of Jango chat, you said, Look, I don't know how to invert a binary tree. But I can create a whole website, I can create the front the marketing, I can do the admin area, the backend, I can link up payments, and I'm going to have it selling a product. And but I can't invert a binary tree. So I think that was you. If it was it really
Will Vincent 1:13:36
sounds like something I would say, an inverted binary tree. But But yeah, the point is, it doesn't matter.
Andy Ide 1:13:41
It was awesome to say that sometimes the whole product is valuable. And that really inspired me at the time. So that was an I realized that I'm that kind of guy, you know, I don't know the intricacies of Django down to reading the source code and questioning what they're doing. But I can build a site from beginning to end, which is a skill in itself. And that's okay, too.
Will Vincent 1:14:07
I think you need a reason to poke at the source code. Like I like the analogy of chefs and farmers. I mean Carlton's a bit of both. But most of us, myself included are chefs like I just, you know, pull things off the rack and combine them. I'm not growing seeds. I'm not working on core Django itself, really. And most people aren't. But there's a skill to both. And it's a temperament thing to some people are way more comfortable on digging super, super deep. But is that what you should be working on? Like? It's hard to it's hard to know.
Andy Ide 1:14:40
Yeah. I did a blog post where I have dug into Django Q and found out how to do something that's not documented. I was quite proud of that one. Put that out there. Put that out there to the team.
Will Vincent 1:14:55
Yeah, I think do we do we feature that in the newsletter? I think we've had some, if not I'm really gonna check. If not, we would I don't know, we might have I think I think I have
Andy Ide 1:15:06
to miss that. Well,
Will Vincent 1:15:08
I don't know if I did. I think I recall seeing that. And I meant to. So if I didn't, I will
Carlton Gibson 1:15:14
miss it, guys, we could go. We could be going off forever here, but we're really hot covered up for time. And is there anything else you'd like to cover that we haven't touched on thus far, this is your window.
Andy Ide 1:15:25
I'm really happy to talk to any horse people about horse records. So if there's people out there in the in Django chat land who got horses and want to have a look at Horse records and have a bit of a chat happy to do that we can do it via you know, Facebook or, or whatever. Happy to have a chat. But yeah, I think I covered everything. I wanted to talk about work life balance, and I'm glad we got to talk about that. That's really important to me.
Carlton Gibson 1:15:52
Did we do we do?
Andy Ide 1:15:54
We said Be gentle on yourself? Yeah,
Carlton Gibson 1:15:57
okay, fine. Yeah. Okay.
Will Vincent 1:16:03
That's how Carlton and I got connected. He has a beautiful talk on the topic, and it resonates. Everybody
Andy Ide 1:16:10
should listen to that. Because, yeah, you've got to look after yourself effectively. You're not just it's that five
Carlton Gibson 1:16:20
years median age thing or median experience thing? Right? Yeah, that's gonna go beyond that. You've got to look after you sort of look after yourself.
Andy Ide 1:16:28
Yep. Yeah, and things come up. And, you know, management always want more out of you. There's always always more points in the sprint, they can get out of you. But you need to know to look after yourself. So that reason, reason being, you need sustainability. You need to be able to keep going. You can't just have these crunches all the time. So yeah, I could go on.
Will Vincent 1:16:53
Next time next time. We have time.
Andy Ide 1:16:55
We'll do philosophy next time, too. Yeah. Okay.
Carlton Gibson 1:16:59
We'd love to start a new podcast. Andy, thanks very much for coming on. And well done with horse riders and keep and well done. You know, I enjoy seeing your Twitch all the time, and it's lovely to chat with you about
Andy Ide 1:17:12
it. Thanks, Carlton. Thanks. It was great. Thank you all.
Carlton Gibson 1:17:15
We're chatdjango on Twitter, Djangochat.com. Join us next time.
Will Vincent 1:17:20
Bye bye.