← Back to Show Notes

Transcript: HorseRecords - Andy Ide

Will Vincent

Hey Carlton, take it away.

Come on, mate.

Sorry.

Go ahead.

Carlton Gibson

Hi, welcome to another episode of Django Chats, a podcast on the Django web frame.

Welcome.

Carlton Gibson joined us everybody by Will Vincent.

Hello, Will.

Will Vincent

Hi, Carlton.

Hello, Will.

Carlton Gibson

And we've got with us Andy Eyed this week, who's um builder of horse records and all-round good fella.

Hello, Andy.

G'day Carlton.

Andy Ide

G'day, Will.

Good to be here.

Carlton Gibson

Good to have you.

Thank you for coming on the show.

Carlton Gibson

I've wanted been talking to you for um online for ages.

Andy Ide

I brought some light reading.

I'll just hold it up to the microphone.

Will Vincent

Django for professionals, I see, yes.

Andy Ide

Written by some hack and uh Dangerous for APIs.

Oh yes.

Thank you very much.

Andy Ide

Yeah, a little bit of light reading for this evening afterwards.

Carlton Gibson

Okay, so Andy, we're always plugging the books.

What would you what what what would you say about Wheelsboards?

Andy Ide

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 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 uh, I didn't know um uh 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 uh uses, I don't know if you guys know, a little plugin called Django Rest Framework.

Have you heard of that one, Carlton?

We've heard of that, yeah.

Just heard of that, heard of that.

Andy Ide

Just in passing.

What I loved about this book was the Django for APIs book was I went through and I went, oh, that's how I do it.

Oh, that's how I do it, oh that's how I do it.

And 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 it the right way.

And uh yeah, I turns out that we were in agreements on how to do things, so that that was that was good.

But uh yeah, if I had to do my pick, I'd say Django for professionals, but get the lot.

Okay, yeah.

Carlton Gibson

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 Will's books, because you're thinking of Django for beginners and then Django for APIs.

But of course, a tweet came up the other day.

Well, where's all the middle grade material that gets you from that beginner to intermediate level or beyond?

And it of course Will's books are the answer there as well, actually, because the professionals book takes you that you know that step further.

So it's nice to hear you that that's you know your take on that.

Will Vincent

Well, we'll get into your background, Andy, but you have a background, so I think that's why yours is a bit unnecessary.

But I know it's very, very kind of you to say that.

I I appreciate that because I think of the books, the professionals was the hardest to write and is the one that's because I'm just I'm trying to I'm trying to, but there's so much that's not in it.

Will Vincent

Like there's so much more that 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 is 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 it 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

And it's where do you draw that line?

Where do you say this is you know, this is where I'm gonna go?

Um, you know, do I talk about hacking Django?

Or no.

Well, and you know, and

Will Vincent

that's I think the critique is to the extent there's a consistent critique of the books, it's that they sh show and don't explain.

And I kind of get that.

I wrote them explicitly to be the opposite, to be top down instead of 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.

And so I have that urge, like past you know, uh engineering-based authors to really, really show you how cool it is, but I know I'm just gonna 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, but with a book if it's not if it's not engaging.

No, you know, you're not gonna study for the test, it has to be useful.

Yes.

Any events, let's let's

Carlton Gibson

you've totally hijacked my opening there, Andy, with your your plug-in Will's books.

Andy Ide

I was just so excited about the books, Carlton.

Carlton Gibson

Yeah, no, no, no, you've got the hard copies as well, so that's good.

Um normally look, but normal, you you the the thing we won't really want to chat about is your web, your your your application horse records that you're building and the everything that's gone on there.

But in order to give a big bit of intro to that, tell us who you are and your background and then we can lead into um that you're building.

Andy Ide

And this I'm Andy.

Uh look, I'm based in a uh little country called Australia.

You can probably tell by the accent.

I've I've flipped my video upside down so you I come up right way to you guys.

So that's all good.

Um I started with computers in the early 80s.

Um my grandfather was into a thing called a sorcerer computer, which is a bit like a BBC micro or uh of that era, a bit before the the the uh before Commodore 64 is that generation, so it's BBC Micro was the one I remember.

But ours was called a Sorcerer, and um I never had enough games, so I was I'd start coding in in BASIC.

Um they had some BASIC there and you know just car racing games and stuff I'd find in a book and type in, you know.

Um and then after after that, uh uh probably in the late 80s, I've I was given this book Turbo Basic, which had everything that Turbo Basic did, and I went completely nuts um and just wrote this was early PCs like two eight sixes kind of sort of two meg hard drives were where you went, and I remember my old man wanting to get a four-meg hard drive, and everyone said, You're crazy

, you'll never need that much.

So those were the days.

Um and uh so yeah, I was 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 uh this strange language called PHP.

Um yeah, so I started learning that the Kookie language and got into websites which were all the rage in sort of the late 90s, early 2000s.

Um they were sort of a lot of them were written in Pearl and we were moving into PHP.

Um so yeah, I've I had my own business for about eight, ten years building websites, and um I found near the end I was starting to get beaten in the website game by the graphic designers because they could draw they could make a website pretty, they couldn't necessarily make it performant, but or secure.

Will Vincent

But but who can see who can see that?

Andy Ide

Who can see that?

Yes, the customer didn't care.

Um, 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 unhack site job.

Um yeah, so I made a career building website in PHP, and there was a brief foray into Angular with JavaScript and Ember, the JavaScript framework.

Um, 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, Oh, what do I do here?

Do I code it in PHP?

I hate all the frameworks, I hate all the JavaScript frameworks, I just hate everything and I hate everybody.

Um that's a 20 20 year end.

Carlton Gibson

That's a life at tech,

Andy Ide

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 a I looked at Flask and I looked at Django, and I started off with Flask and realized 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 I'm like, I don't know which one to use.

Um, 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, Oh, use this.

And I went, well, you know, if I've chosen it, they've been around 10 years, 12 years, whatever, it must be okay.

Um, and I just found that the that the decisions that Django 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 were sensible defaults uh that were that were good enough.

Um, so that that's sort of my journey into Django.

Yeah.

Will Vincent

Well, there is a saying if you use Flask long enough, you end up kind of rebuilding Django.

Andy Ide

Yeah, exactly.

Will Vincent

But it is, but it is in, I think there there's an interesting combination of beginners go to Flask first because the hello World, even though Carlton's given a talk on Django Hello World.

And um, 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 and just bolt bolt it on.

You can do that with Django too.

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

There's a lot of you know tiny sites or some endpoints with Flask.

Andy Ide

Yeah, yeah.

Will Vincent

So 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

Yeah, exactly.

And often, you know, part of being a uh sort of uh engineer who's got senior in front of his title just because he's old, not because he's good.

But um you've s you've seen you've been in the game long enough to realize maintenance matters.

So what is it the m the median age of developers is five, five years experience on Stack Overflow?

Five years

old, yeah.

Well pretty good.

Andy Ide

But but the the experience, so half of developers have got less than five years experience, and if you've been around a while, eventually you start to see your projects that you coded need maintenance, and a lot of the maintenance problems start to come up.

Um and so you you yeah, so FLAS being small um works well, but often with things like Django, uh it it goes your projects get bigger and bigger and and you always need to be able to maintain them.

Will Vincent

I I wonder how much of that is, you know, being you know, 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 even if 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 killed, and partly because you know all the impetus internally is on creating the new thing and then the you know 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.

Andy Ide

Yeah, and you can always move on after two years so you don't have to maintain your software.

Will Vincent

So well that's I mean, that's the that's especially like I was briefly out in Silicon Valley.

That's the you know, the the two, three year itch.

It's like the first year you're like, oh, this is great, like new things.

Second year, you're like, okay, I know what to do, it's getting annoying.

Third year, you're like, I hate all of it, it's a dumpster fire of tech debt, and then you go to the next place.

Yeah, and then you sort of

Will Vincent

get a you know, 40% raise.

I mean, you used to.

So, you know, again, you you can't like put get blame on like someone's resume, like, oh, I keep following this person and their code is trash.

But any event, yeah, so that's um yeah.

Did you so did you can I ask, did you so Python's not necessarily sorry Carlton, I I just have I know you have you're gonna have all the questions for this, but I just want to get a couple in while I can.

So Python I would isn't necessarily the the sexy thing these days.

There's like Elixir and there's all all sorts of other things.

Yeah.

What was it about 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 two, three years ago.

Andy Ide

Uh it was always for Python.

Um my mentor once, you know, I think he'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.

Will Vincent

Just kind of works.

Andy Ide

Yeah, the nomenclature 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 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, went Angular, went from Angular 2 to Angular 4, and then got called Angular, and what was Angular turned to Angular JS.

And the fact that they didn't have any portability between the versions and no backwards compatibility just turned me off uh Java screen Java frameworks forever.

Will Vincent

Carl Crout,

Andy Ide

hate mail for that one.

Will Vincent

What is that thing that you still use?

You still use uh 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

If I have a choice these days, I will use um HGMX for uh as

Will Vincent

much but

Carlton Gibson

before that.

But then I'll use um I'll use Alpine.js.

I use L.

The thing I like is L.

Will Vincent

Okay, that's what I was going for.

Carlton Gibson

Right, but L.

Will Vincent

Not to attack you, but just to say like you don't have to.

Carlton Gibson

No, but it's a whole left field maneuver.

And the reason I like it is because you it's written in this whole little other language, this 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 um strictly typed, there's no comp if it compiles, it runs no runtime errors.

Like you the you know, you can it's a miracle if you can get a runtime error out of it.

You you know, so you never see JavaScript, and that's why I like Elm.

But I've got a bit of jQuery on my site, so yeah,

no, but exactly.

Carlton Gibson

But like jq so jQuery was awesome, and then I got into um sort of backbone w because it gave you a little bit more state around jQuery.

Um, and then the Ember thing and the uh it just no, it was all just getting too much, and I never followed it, and I never got there, and then you know, it became it the whole world became so far removed from what I was used to that I was kind of ever more migrating towards being a back-end developer, back-end developer, backend developer.

And that's why I'm so excited by um this HTML over-the-wire thing, which you know we'll talk about in um Andy, because you're using Django Unicorn, I know.

But um, HTMX, Django Unicorn, the hotwire stuff.

It's just so exciting because it's like, do you know what?

This is just like doing JavaScript back when you first picked up um jQuery.

Sorry, 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 oh, animate that.

Oh, it's animated, wow, amazing!

And and it's like these little the these lines of

Andy Ide

you know like a recreate the marquee tag,

Carlton Gibson

yeah, yeah, yeah.

And if you want that yellow fade in thing, yeah, so give it back that yellow fade that out.

Andy Ide

Like text.

Yeah, that's awesome.

I've got the shivers now, guys.

Anyway, so Andy, so you're not you're not agencying anymore, you're not doing um client work particularly, you're working on a site called uh your own site because the one thing that came to mind when you were talking about agencies is the trouble with ownership is you get you give over your project and you try and convince them to take on a maintenance project um you know contract if they want it, and they'll be like, ah no, 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 want to fix it now, I wanted to maintain it, you know, uh every six months after you little update so

Andy Ide

I could keep my business running, not come to me when it's all on fire.

Carlton Gibson

Right.

So that's why I got in the end.

I'm like, I can't do this this agency work, I want to, you know, do other things.

And but you're doing horse records.

Andy Ide

Tell us about yourself.

So um I uh somewhere in my journey when I had my web business, I met a pretty girl and I ended up marrying her.

And um turns out that uh I married into a pretty good pedigree, if you pardon the pun.

She and her her mother have run the largest, uh the oldest stock horse, Australian stock horse stud in South Australia.

So a stockhorse is the Australian working horse, it's like a quarter horse in America.

Um, it's not bred for racing like the quarter horse was bred to do the quarter mile, but the stock horse is bred for uh versatility, uh 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 a city boy, you know, moving and working and yeah, 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 could record what she was doing with her horses.

So horses need worming, horses need a farrier, which is for their hooves, their feet.

Uh, 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 of the pedigree, um, and you know, just dates and stuff.

So I 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 Wort cared about and the things I cared about in horse records.

So yeah, well, what is the software?

Well, it records everything about your horse.

So I've already said your farrier, your your feeds, your dentistry, your worming, your performance.

So like the the ribbons they win or the trophies or the races they win.

You can customize it so you can add things like chiropractic if you have a chiropractic for your horse.

You can record all the servings, so all the whole breeding operation is its own thing.

Because so horses, uh mares come on every three weeks, and that's when you can introduce a stalin to them, and the stalin can serve them.

The other, you know, there's about three or four days a mare is fertile and will accept a stalin.

The other the other three weeks she'll kick him, say go away.

So even though they're mammals like us, it's a little bit different.

Yeah.

Andy Ide

Um, and you can record pedigrees, which is really important for horse people, they like to know the lines.

So a pedigree is like you the mum and dad, grandfather, grandmother, um, progeny, etc.

So, yeah, it's it's a full service horse application written in Django.

Uh, little bit of jQuery, little bit of vanilla JavaScript, and uh yeah, hosted uh on a fairly small um uh VPS.

Will Vincent

I was gonna ask about hosting, yeah.

Yeah, so it's it's hosted.

Andy Ide

Well let's yeah, uh yeah, sorry,

Will Vincent

we'll work backwards.

Yeah, we'll get back to the back.

We'll work backwards.

Andy Ide

Okay, let's work 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 backend stuff, it's all server rendered.

You don't actually need a lot of grunt in the server.

It's 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 uh 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 the custom gig.

Um and yeah, it's hosted in uh Linode uses AWS.

I think they buy AWS and on sell it or something like that.

So yeah, you know, it's all backed up and secure as I uh run cloud cloud um cloudflare on front, which handles all the 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 it blocks all of those and and adds some caching.

Um 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 of the site.

Yeah.

Oh, just such a cheap plan, yeah.

Will Vincent

And yeah, I I mean users can upload photos and stuff, so I assume you're using Django storages, and are you hosting that on Linode or using S3?

How are what's the media file?

Just on the just on the box?

Oh, you're you're a wild man.

Wildman.

No, no,

Carlton Gibson

no, no, no, no, no, no, no.

Right, but okay, so this this is the key point, right?

So you stick it on a V 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 every time.

So what do you use for that?

Andy Ide

Okay, so I use cron.

Carlton Gibson

Just use cron?

Right, exactly.

Andy Ide

Yeah, and then um I'm this this close to implementing Django Q on it for emails.

So there's so I'm using quite you know fairly trusted, old school, boring as as hell tech.

And right,

Carlton Gibson

but there's a there's an episode, um not episode, essay about um use boring tech, right?

Yeah, and use the old stuff and use 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, yeah.

And you're doing the ops all yourself by yourself because it's

Andy Ide

I had a DevEps DevOps guy help set me up, and I ask him some of the hard things, like SSL certificates and you know, self-created anyway, all that stuff that they care about.

And but yeah, just running it day to day is me.

Yeah, so it has to be simple.

Um I've got enough problems, mate.

Carlton Gibson

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

My um CPU sits flatlining at about 1.5% usage and occasionally spikes to 15%, but it sits at 1.5, like I'm pretty happy with that on a like a low-end plan.

So so I've got I worked it out, I've easily got a thousand times more capacity just in the Linode plans, so you know there's plenty of stuff.

Carlton Gibson

So you're good for now.

Andy Ide

I'm good for now, and that's without any sort of scaling or having to worry about scale or anything.

Yeah, I'm

Will Vincent

no Kubernetes yet.

Andy Ide

No, if I need Kubernetes, I'll be calling you Carlton.

Carlton Gibson

No, no, no, you you actually you won't, you won't, because I'd be like, well, just get a bigger box.

Andy Ide

Well, once you get beyond the VPSs, then you get a dedicated service, you know, and people you make enough money there, you you're happy to pay for someone to do it all for you.

Yeah, so I'm pretty happy with how the how the stack sits and how it performs.

It's really, really good.

Carlton Gibson

I just want to say this because it I think the the the best example is Stack Overflow.

They Stack Overflow, they did eventually move to you know 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 a couple of servers at the front end with a big uh big old database behind it, and it was the most old-fashioned thing in the world, and they were like the top 10 internet sites there are.

And it's like you are not gonna be bigger than Stack Overflow, you are not gonna need more traffic than that.

What on earth are you doing?

Andy Ide

You heard of me, man.

Carlton Gibson

No, but but what on earth are you doing with this Google scale technology when you could just be keeping it simple and getting on with building your application?

Andy Ide

Yeah, there's a there's a few gurus that say that people sort of, you know, will it scale?

Will it scale?

Well, how how big do you want to go, mate?

Like, there's there's about 1.5 million horses in Australia uh 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 you get every horse in America, that's big enough, and you're starting to think, well, maybe I should 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 5 and 10 and up to 50, and then I'll go, okay, you know, now I need to start thinking about adding a couple more mega of of um CPU, you know.

So yeah, it's yeah, I'm happy with the server side render.

I render as much as I can on the server side.

Um, and yeah, it seems to work really, really well.

So yeah, it's really quite a fast site.

Will Vincent

I I think that misconception, I I you know, where does that come from?

Uh, it's a c 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?

Angular React.

Will Vincent

Yes.

And then also who's out there talking about it?

Andy Ide

It's it's them.

Will Vincent

People at big companies who have the time to talk and not work um because they're in a monopoly.

And so they're preaching about the things they struggle with, but yeah, it's not what 99.9% of places

Andy Ide

struggle with.

Will Vincent

Like, it's a good interview question, but um yeah, I just I just wanted to ask mention on um on assets.

I'm I'm actually glad I was playing around with white noise yesterday because I'm doing some docs for a hosting service.

And um, Jacob Kaplan Moss has a great talk I actually saw in person at uh PyCon 2019 called uh Assets in Django Without Losing Your Hair, where he basically says you can just put it on the file system almost until forever.

Like he did all these tests.

I mean, like, yeah, you can white noise and just three

Andy Ide

or whatever else.

But like you

Will Vincent

really but you really don't need to.

And I love too, he also said he that's the part of he hates the most is 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 you know, stick it in the file system.

Maybe not, I mean media files, you know, but I guess unless you get hacked.

Andy Ide

Yeah, I 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 incr encodings and stuff, and that's when I'd look at a third party to handle the video upload.

Um, but for now I just stick them on the file system and uh just check the check the megs, the gigs left every week make sure someone hasn't gone right I've got to upload them all

Carlton Gibson

I think there's a good test a good litmus test for for like you're running you're running a 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 your VPS you just stick it in your media

file there's your link it's you know already set up to serve it 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 some way of sticking it in API to get the link and then I think I think it's a good like you know simplicity test.

Yeah but anyway we had

Andy Ide

it works for now go on no it works for now is what I'm saying

Carlton Gibson

we we had Adam from Django Unicorn and um just last week on the last episode right so there's your opening Andy come on

Andy Ide

okay so I did a lot of work in Laraville in my last job they were a Laravel house and um one of the cool things that came out of using Laravel was this thing called livewire 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 I went yeah this is basically it's in its early stages at that point I think it's up to about 0.8 or 0.9 now but I think I got onto it at about 0.3 and it was very very close to live wire so what it is is your it creates Ajax pages and but does all the JavaScript for you and it ends up

that your view becomes very um 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 HTMX 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 uh the things for HTMX is to check if usernames 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 uh Django Unicorn uh so I I think 10 12 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 uh 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 where you're a little bit too uh nervous or embarrassed to actually commit to the Django repo itself um 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 Django Unicorn is a is great I've looked at HTMX I think that's valid as well Un

icorn sits better with me sometimes you just pick text because it uh 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 I said oh we're gonna get a Python grant for you mate or a Django grant somehow to to get image uploading working in Django Unicorn but otherwise I I use it in production if you go to my website hors

erecords.info click on tools there's a folding date calculator and you can just put in the a date that you say pretend that your mare was served and it'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 uh 340 days if you're in southern hemisphere 342 days if you're in the northern hemisphere nah that's just because one of the one of the good lord's greatest uh jokes about horses is no one knows the exact gestation time so yeah so the uh uh yeah I asked a vet in Texas who's one of my clients what's the gestation time in the US she

said oh 342 days yeah definitely and of course here in Australia it's 340 so and there's there's one breed that's some weird number so yeah so I don't know um but yeah so that that's it looks like an Ajaxy 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 see any of it

Carlton Gibson

But uh but the point with that um is that uh the actual request that does the calculation that comes back to the server renders the HTML sends that back which gets put in the page is that right

Andy Ide

that's correct yeah I I think Django Unicorn does that uh they call it hydration or something anyway there's some word for it it it knows what to replace it does the template for you where HTMX you kind of say here's the template I believe I think that's right so yeah it it

it works fine it's it's really quite good yeah okay

Carlton Gibson

I mean Adam when I asked him well what's the sort of big difference between HTMX and Django unicorn he was like Django Unicorn's a bit of is slightly better integrated with Django it's like it knows it knows more about Django Django

Andy Ide

Django yeah yeah exactly yeah so well HTMX is a JavaScript basically yeah yeah

Will Vincent

I'm still thinking about what you said about grants because that's something that on the Django Software Found

ation board we sometimes think about if you know why would we try to raise more money it would be nice to do Django grants or even Python like we have this issue with um yeah I can say this with 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 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 s to say you know if we put aside X amount of money can you vet it for us but then that puts but then that's sort of like trickle down ownership for volunteers on volunteers but um there are these like motherships that have funding but it's hard to it can be hard to give it away.

Andy Ide

Yeah and there's a lot of people

you know grants and there's a lot of people who want it and you know it's like if you give to one is that but it there's got to be something better than Kickstarters and um yeah if it like there's some work we're gonna do on corporate sponsors.

Will Vincent

I would like to and actually DjangoCon 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

Andy Ide

going to have a plan yeah and if you look at something like Laravel which is you know it uh this is a this is my opinion and I'll once again uh feel free to uh people will probably reply to this one Laravel makes PHP good um a lot of the weirdness of PHP L

aravel writes wrapper functions that do things like make it always haystack needle where p php arguments are sometimes needle haystack sometimes they're haystack needle who knows sometimes it's underscores between the words sometimes they're jammed together for your function calls who knows um which is part of the organic growth of PHP and um but Laraville sort of wraps that nicely and hides some of that away for the punters um but

larval makes quite a bit of money um the disadvantage with larval for example is you know they've got uh benevolent uh you know the owner um what's his name can't remember tailor something yeah uh yeah brilliant engineer very talented man um and he's made money in larval and good on him and but you know he is laravel sort of there's a limit there there's a

there's an issue there the 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 gonna push a a pull request up and hope that Carlton or Marius apply it but Laravel finds makes money.

Laraville is making a bit of coin.

One of the ways they're doing it.

Will Vincent

Well, he I mean he just posted an Instagram photo of his la orange Lambo in front of his house.

And you know, good on him.

If someone's gonna make money, it should be it should be something like that.

But you know, he's

Andy Ide

and they've got a novel.

Will Vincent

There's not a Django Lambo.

Andy Ide

No, no.

Um just just the one that uh we drive.

Um but Laraville has a bunch of tools that it makes money off.

Like uh

Will Vincent

well there's two, I think, right?

There's there's the hosting is the big one, and then there's a starter there's

Andy Ide

that starter kit, yeah.

Will Vincent

But maybe there's more, but I know those those two, and especially the hosting.

Andy Ide

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 um to make some money.

Now, what those tools would be, I don't know, but uh throw it out there.

Um let better minds than me work on it.

Will Vincent

What do you think, Carlton?

I think I've spoken about that.

Carlton Gibson

That's what I'm thinking.

I mean, I think it's difficult um for Django itself because of the way that the ESF is structured and whatnot.

Um, I think there are a few starter kits.

Uh I know Will, you've got a starter template, Jeff's Jeff Triplett's just um published one or something.

It's been out for a while and he just tweeted about it.

Will Vincent

Yeah, we we had Corey.

Corey, yep.

Yep.

He's doing pretty reasonably well with that, I think.

Yeah, good.

Carlton Gibson

Yeah, so I mean, so the Pegasus product is is paid and he you know he's doing okay with it, and that's that's great.

Then there's room for, you know, I don't there's room for your per package to be monetised well, maybe.

I don't know, but it's all 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 has been part of the

Will Vincent

Barton's guy's Lambo ordered 10 years from now.

Carlton Gibson

But I don't want a I don't I don't want a Lambo.

What I want 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 if I can package that up, that's great.

But for the DSF to do it, it's kind of like, but the DSF just isn't this set up like a business owned by a person.

No, it's a charity, it's a non-profit.

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 DjangoCon 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 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 to the next?

Succession is always a problem.

Um 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 the sort of Django core being able to make money.

I think there's been a a kind of you know a reticence for that to happen in the community.

Um, I

don't know.

Andy Ide

This seems to come up every episode.

Will Vincent

Well, it's just a it's just a therapy session.

We talk about consulting for Carlton and Oh,

Andy Ide

you guys have got your bingo code, you have to take a shot now.

Will Vincent

DSF for me.

Yeah.

Carlton Gibson

Okay, but but okay, so why does it come up?

It comes up because um of the problem of open source sustainability.

Yes.

Right?

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

Andy Ide

Oh, really?

Carlton Gibson

Well, yeah, but the whole there's this good this idea that Django is the meat grinder and you need fresh meat for the meat grinder, and it, you know, people just get wiped out by it.

And it was like this isn't sustainable.

And the fellowship program, which is the 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 Will's work.

How do we make sure that people like Will are able to continue to produce quality content and make sure that it's remunerated in a way that is realistic?

And you know, I saw a comment on Twitter about Will.

Oh, why don't you do free tutorials and you know add to the docs?

And it's like because it's a job, and because Will has a family and he has like to feed them.

Andy Ide

Well, I think it's crazy, isn't it?

Will Vincent

Well, it's it's it's less that and a 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, uh specifically like Anna, who's 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, docs, you know, most people are doing it pretty in much invisible.

Yes.

And so, you know, and Carlton's great about this.

When it becomes too much, people step away.

You know, if you were paid, maybe people could stay longer.

Um, I don't know how healthy that would be, but um anyways, yeah, it 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 yeah, I it's all 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.

Uh and it's because it's 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 gonna maintain them?

Carlton, Marius?

Like, you know, the ball.

Andy Ide

You know, that's the thing.

Yeah, if anything, you know, kicking things out of the heart.

Will Vincent

Kicking things out.

I mean, but well, since we're um diverging all over the place, I'm curious to ask you, Andy.

I've been talking with people, there's gonna be a state of Django panel coming up at DjangoCon US.

And one thing for me on the technical side, Carlton's mentioned is like the start project command.

There's like there's such a gulf between local and production.

Um, mean more more batteries, you know.

Will Vincent

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

Yeah, well, deployment's the big thing, isn't it?

Um that's the sticking point I had with Django.

Um remember I come from the days of PHP where you just upload files via FTP.

Will Vincent

Carlton too.

Carlton Gibson

I'll sync it account a bit.

Andy Ide

Yeah, but that's right.

Um yeah, look, the way that Laravel Forge does it and the way that Carlton is doing it with Button, I would hope is the way to do it.

What you really want to do is I I don't have a problem logging into the ser 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 I don't think that's a burden, but getting to that point of being able to just use your git repo as you sort of your upload the new files, that's the hard bit.

And tools like button and you know, Laravel Forge and 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 programmers DevOps when I started DevOps and programming were the same thing.

Now DevOps is specialized because everything's expanded, you have to specialize.

Specialization leads to interdependence.

I'm 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 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 and then obviously a few make migrations and stuff, that would be brilliant.

That would be where I would want to be.

Will Vincent

Well, we've we mentioned this, I think, I think in the episode with Adam that comes out tomorrow.

Okay.

But like um Eric Mathis is working on this Django simple deploy tool to try to standardize this.

I mean, I think I was actually talking with Jeff Triplett about this yesterday, about because I'm right again, 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?

Environment variables.

Andy Ide

I think Django because Django Environ, I think, should be pulled into core.

So this is the question.

Will Vincent

Yeah, should we I mean there's also there's a couple of them.

I mean, I like environs Django,

Andy Ide

but if you

Will Vincent

if if start project came with built-in environment variables, yes, just for like debug allowed host, secret key, CSRF trusted origins.

Andy Ide

And a gitignore file so yep.

Will Vincent

Git well, gitignore, and then if there was something if static, like why don't we have static root and static files DIRS just set up?

And if you throw in Gunacor Gunicorn and while we're at it make startup have a URLs.py file, I think that hand hits a lot of it.

Andy Ide

Yeah, and um yeah, I would agree.

I would agree with that.

I when I went with Larva, when you set something up, it automatically does the dot em v 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

This is kind of why I 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

much stuff.

Yeah.

Andy Ide

Yeah.

I agree.

It's yeah, you shouldn't have to say the horse is the head is this end, the tail's that end.

Will Vincent

Um but it's one more thing to pull into Django itself, you know, back to what we were saying initially.

Then then we're then we're picking a third-party environment variables package, and we and we're picking environment variables over multiple settings files.

Andy Ide

We could just code our own, then we've got four.

Carlton Gibson

No, but there's a hot there's a hot take here, which is this is that that we can't bring this stuff in because every time it gets suggested, um, and it does get suggested, yeah, of course.

Quite frequently there's a massive outcry.

And we have this thing called the API stability proje policy, which you all love because that means when you type pip install um Django and it upgrades and your site continues to work, but it works because of the API stability project, right?

Um uh policy, right?

But it also means that we can't make changes unless there's a consensus to 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 then you say, Well, how about this?

And then there's four voices that say no.

And they say, Well, what about this?

And there's four voices that say no, and there's and there's any concrete change, it's not possible to get it.

Andy Ide

We need a dictator now.

Carlton Gibson

Well, well, this is where the dictator comes, the benefit of the dictator is, and they

Andy Ide

just say do it, we're doing it this way, and then you're like, yeah.

Carlton Gibson

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

And look, there's a there's 400 people you all all advocating for you know Andy's way of doing startups,

Andy Ide

which is the best way, yeah.

Carlton Gibson

But let's merge that, and there's a there's more of a chance.

Um 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 NVIS, we all agree you shouldn't hard code secrets in your in your settings.

Yes, yes, yes.

Right?

Carlton Gibson

We all agree that it's a good thing.

Andy Ide

It's all very bad, but the

Carlton Gibson

right, but there are like if you do a survey of it, there are about 70 just Django packages on how you load um environment variables and your thing.

Because everyone's got a different take on it, and everyone's really quite committed to the take that they've got.

Andy Ide

I've got a package with the the invite the Django variable in the settings file.

Don't talk about it.

Will Vincent

Well, I I think one one sort of baby step that I liked with Secret Key is you know, now I forget going back, I think one or two versions, it has 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, debug, CSRF, trusted origins would be something.

It's not a solution.

Will Vincent

But I I find with the secret key, I found that was that was helpful because it like really hits beats people over the head with it.

Carlton Gibson

So what so what you mentioned Django Simple Deploy.

One thing I want to do um for that is create a plugin for button.

So there's a there's a pre-step for button, which is get your project ready for button.

You have to have these you know environment variables ready to take the environment variables that are given to you.

If I can if I can automate that as a plugin for Django Simplo deploy, I'm gonna do that because I think it's a great project and it can just go automate all and it's ready to go for button.

Will Vincent

Well, one last thing on these uh platform hosting companies, because I was doing this yesterday.

So so Heroku is based on git.

So you'd have a gitignore and you would git push just as you do to GitHub or GitLab or whatever.

Andy Ide

Yeah, that's what I use is many in my my stuff, yeah.

Yeah.

What is what?

Will Vincent

Git?

Andy Ide

Uh git, yeah.

I just do a git pool to get the latest branches and then yeah.

Will Vincent

Yeah.

So the the newer hosting companies, like fly.io in particular, but uh uh 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 pushed.

Well you just wrote you just you just run a you know fly deploy or whatever, you know, command.

Oh, yep, git, yep.

Will Vincent

And so you need a Docker ignore file that says ignore the git repo.

Otherwise, you're gonna toss all your git stuff up on there.

It doesn't automatically look for the git ignore because it's not git first, it's basically Docker first.

So that's that's gonna trip up a lot of people.

Andy Ide

Uh yeah.

Will Vincent

But I guess that's why I get paid, right?

To write

Andy Ide

stuff like that.

Right.

If if our job was easy, we wouldn't have one.

Yeah.

Yeah.

Will Vincent

But anyways, we were talking about git, I had like it's uh a little bit of a my 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 one of these for a button or something else, or for this company, it's like, okay, well, I want to tell people to have a gitignore 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?

Well, they I mean they come to me, but like, you know, should the Django docs have that stuff?

It's like it's not really a Django problem, it's like a

web problem.

Andy Ide

It's however the hosting company's doing it, and their Doco is extensive, but they're trying to cover every case.

Um Yeah,

Will Vincent

and Git, I mean universities don't teach Git in any way I've seen.

You know, people don't know how to do a professional pull request.

Yeah, well.

Carlton Gibson

People don't even know how to check out a branch on a pull request.

Like, you know, the you know, literally CS students who you know they can invert a binary tree on a whiteboard, no problem.

But they can't they can't pull up a a branch from a remote.

Andy Ide

I've been coding for 23 years and yeah, I don't know how to invert a binary tree.

Carlton Gibson

You turn the whiteboard upside down.

Andy Ide

I'd probably just I'd probably just go Python.invert.

Will Vincent

Yeah, exactly.

Carlton Gibson

Import interview.

Yes.

Andy Ide

Yeah, that it's it's okay.

Go on, Carlton.

No, I wasn't going to say.

Will Vincent

I want to ask about your you have so you have an eight uh so back to horse records.

So you have an API that people can access.

Can you talk about building that, how it's being used, what do you want to add in the future?

Andy Ide

Inside horse records, if you run a paid plan, it gives you access to an API, which is uh a DRF um 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 uh a read-only API.

The idea is that you they'd have their own website, they'd pull the data from horse records and show it on their site.

So if they've got a uh we call them studs in Australia, you would call them ranches or farms.

Will Vincent

We call them fellows.

Fellows.

Yes.

So um

Will Vincent

Carlton's not smiling.

That's okay.

Carlton Gibson

Um thank you.

Will Vincent

So sorry, continue.

Andy Ide

So yeah, so you can see so you might have a a site for your stud where you say, Here's all my beautiful mares and my stains and my foals, please buy them.

And you can uh just basically do simple get requests to the API.

I say to people, look, please put some a caching layer in.

You know, but but it's yeah, my next major job is to get that really cranking for our own site.

It's uh I have to do breeding at the moment.

Uh breeding, I'm working with one of the largest AI studs in Australia to get a breeding platform working.

Um, and then after that I'll be getting the API beyond just hey, it exists, to something that really, really pumps.

So that'll be some more endpoints and some permissions and stuff.

It won't have patch back at this point.

I would want to talk to someone who's gonna 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.

Um if it's another API wanting to talk, that's something different.

Uh, but yes, so there is an API in there for for the guys who want to use it.

Um yeah, it's you know, it's it's all pretty cool.

You can update your token whenever you like, etc.

Carlton Gibson

I want to ask about um you were you won or came second in some ward, you got the final of some award about this, and because you told me this story, and I'm like, wow, that's such a good advert for everything that we

Andy Ide

so there was tell us about So a few months ago there was the Innovation Awards, the i Awards, and in South Australia and Northern Territory, which are sort of the two states in the middle of Australia, I I was a final

ist in the technology section of these i awards.

And I I came second in the end.

Um but I was the only solo developer there in all the different awards.

Uh there was about five awards, two in each.

I was the only single bloke there.

Um 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 programmers they had, but at least 20.

And you know, a AWS huge budget, blah blah blah.

And there's me going, oh, you know, horses, man.

And there was another company that uh 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.

Um, and yeah, I was certainly in uh uh a good company.

Um, yeah, and it was amazing to just come second to something you know so so competitive.

Carlton Gibson

And well, just well done for that.

Congratulations.

Thank you, man.

Carlton Gibson

Well, you know, to did you not feel like Thor against the hordes when it's you as a one uh a one-man Django developer taking on these tech tips.

Andy Ide

Yeah, I so wanted to be pulled up on stage for them to go, you no, no, you can call the rest of your team up.

No, it was a it was a really good night.

Um, yeah, and I was I was really happy to get that award.

Um, and uh 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 a horse uh website in New Zealand for it, um, even though it was an Australian award.

So well done, New Zealand.

Um by the way, I'm at the process of talking to New Zealand horse associations to begin exporting to there.

I mean, you know, any Kiwi can register the horse on horse records because it's a SAS online, but to talk to those formal associations and get a formal relationship, so um similar to what I have here.

So in South Australia and Northern Territory, every retired racehorse goes through horse records.

So when um when a horse retires from racing, as in around the track, they get a rug, they get a $500 food voucher, and they get entry into horse records so that the racing association says, Hey, we've provided you 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 I am Andy from Horse Records, like 90% of the time, the first thing they say is, Let me tell you about my boy.

And I go, Your boy, Apache Sunrise, 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 they were wax lyrical for 10 minutes about how much they love their horse.

Um, and and it's really nice to hear, and you're thinking, Yeah, these horses are gonna be some of the best treated, happiest animals.

And I go, Oh, by the way, in horse records, if you sell them, you can transfer the records to the new owner.

Oh, I never sell my boy.

Um, he's he's here for 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

Can I ask about payments?

Are you what are you using for payments?

Yeah.

How do you implement that?

Andy Ide

Yeah, I'm using Stripe.

Um, that'd been pretty good.

A lot of the developer type questions, though, you need to find out for yourself.

Uh, their 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 gotta find out.

Will Vincent

Um are you using a third-party package or you just raw implemented the latest?

Andy Ide

I did look at DJ Stripe.

Will Vincent

Um Right, that's the big one.

Andy Ide

Yeah, the document was lacking in it, documentation was lacking in a key part.

Um and then I looked at how

Will Vincent

they got a big grant from Stripe.

I was Oh, did they?

Will Vincent

Like well, Stripe because Stripe has money, so I'm pretty sure that's it.

Andy Ide

They cleaned it up in the last two years.

Yeah, I I just do it raw with the Python Stripe library.

Um and uh

Will Vincent

Carlton as well, I think, right?

You you're doing yeah.

Carlton Gibson

Well, I use their their hosted portal stuff, which is all great.

They're not that's very easy to implement.

It's very easy to implement, and people can update their card details and things like that.

It's 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 from a payment.

You have to uh anyway, so I've got to sort of add out so there's always wiggles,

Will Vincent

but that's why it's getting that yeah, there's those like what tax jar, there's there's all these like third-party ones.

Carlton Gibson

The new tax

stuff in Stripe is brilliant and it works, and it depends it it allocates the right tax depending on where people are and depending on where your registers and it does all of that brilliantly, it just doesn't create the invoices that I need 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 it it you know, but compared to where it was 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 EU tax is not simple.

No, it so now that Stripe do all that for you, it's like okay, yeah, this is really quite manageable.

Yeah, I'd

Andy Ide

I use the console too, I find that really great.

Um, the risk I'm at at the moment is that I'm just using one payment processor.

If they decide to turn off the turn the switch off, I'm in real trouble.

Um 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 um things.

And phase three is to go into things like pet records, dog records, greyhound records.

Yeah, yeah, yeah, yeah.

Okay.

World domination.

Andy Ide

So uh yeah, I'll be uh covered in gold chains soon and driving a yellow Ferrari.

Carlton Gibson

Fantastic.

Oh well, I I'll just say on the um payment thing, I think it's um, 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 you're you're at zero to go to your bank and it's like, oh, it's like you know, quite big charges to begin, quite monthly charges, quite high percent.

It's like, no, I'm not doing any of that.

Andy Ide

And I I used to at one point I was working very closely in the payment space.

I actually had plugins written for WordPress and um WooCommerce and a few others uh 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, you well, this is in Australia anyway.

Carlton Gibson

So No, I think it's the same as well.

Will Vincent

Stripe Stripe 2, Stripe 2 will change your rates based on your volume.

Andy Ide

Yes, yeah.

Um I'm not at that stage yet, but uh one day I'll hope that they're calling me.

Yeah.

Yeah.

Will Vincent

Well, I know we're coming up on time.

There are two questions I wanted to ask, Carlton.

You may have others.

One is function-based views.

You you have thoughts.

Andy Ide

Yes, I'm a big proponent of function-based views.

I started uh when I started I coded in uh 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 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 they're in or the ranch or whatever.

So anytime I'm doing anything on a horse, I have to link this, and there's not a straightforward way to do it in uh class-based views, you have to code it.

And then I saw that brilliant, brilliant article that said, uh we I think we know the one.

Yes, that just says, Yeah, it's okay to use uh function-based views, and it felt like it he'd uh 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'd I'd never do class-based views because I know exactly what variables have 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 a really vanilla um instance.

And I will die on this hill will.

Well, that's okay.

Will Vincent

So I wanted to ask I was I was gonna ask what your longest uh 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 to the model or manager, or how do

Andy Ide

you think about that?

As I'm getting more and more experienced with Django, I'm putting more and more in the model.

Um so yeah, I when I first started, I 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 controller is what it's called traditionally.

In Django, it's basically model view template.

Um, just the names are different.

Um that's just for the listeners who are thinking who are who don't know what MVC is.

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

Uh, and it's more and more in the models, and it's more useful because you can use the same code multiple times, it's only written once.

Um, but yeah, it's more of a discipline to do that.

At what point do you do it?

Basically, when I think it's gonna be written needed twice, needed more than once.

I go, okay, I'll just flip this to the model is a fairly good rule of thumb.

You know, you've 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 on the air, you just write something down and to get it to work.

Um, but yeah, if you get a chance, do put it in the model if you can.

Oh, and use the probably.

Will Vincent

Would you agree with that, Carlton?

Carlton Gibson

Uh yeah, I mean, yeah, at a high level, yeah, I would.

Um, I think I realize I was thinking about this in the shower the other day.

Like, I use forms in a way that I don't necessarily see a lot of people using forms.

So I should perhaps write up.

I use like I really have quite a strict um uh validation layer that sits between so the view will interact normally in my in my life with the form, um, and it will rarely interact with the the model layer directly.

And so I put a lot of business logic in that in the form validate 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, right?

It's that same breaking it up.

When I'm you know, if you sit down and you know, you're just trying to write some stuff, yeah.

Bang it all in the view, just stick it all in the view.

Yeah, you know, 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 and I can call it and pass in the parameters and that kind of stuff.

Um but stick it all in the view and then factor it out later.

One thing I I one thing I do to let me use the form is say, for instance, you've got to associate the um the horse with the stud, with the

Andy Ide

with the with the ranch, yeah.

Carlton Gibson

The place it lives with the ranch.

I will the form, I'll give it an init keyword arg that takes the ranch.

So you instantiate the form with with the um

the ranch object.

Carlton Gibson

Yes, and then and then in save, you're able to um make this make that association.

And so the view, it just goes if form valid form save, and it gets back the instant save, but it didn't see anything

about that

Carlton Gibson

that interaction logic.

But you could do that as a manager method, you could do that, you know.

Andy Ide

I haven't been using the form save in 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

But the you know, but it's just

Andy Ide

oh I'm gentle on myself, and I yeah, I know I'm you know, yeah.

I one thing I used to do was compare myself to the best.

So I'd I'd go on Twitter and I'd see the best, and people pulling out amazing things, people like Simon Williams, and that guy's productive as anything, and everything he does is just um bleeding in the street.

And I was like, Yeah, I'm never gonna be like this guy.

Uh I love what he does, I love his approach, and I'm just like, I don't understand half of this.

Um, but then I realized that uh someone contacted me uh and I I realized he was comparing himself to me.

I'm like, oh god, and that really's realized that yeah, that you know you only ever sort of see the the the best parts of people, you don't sort of uh there's there's words for it, but basically I stopped needing to compare myself to the best.

Um, 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 ten years less than you um and and knows more.

That that's okay, you know, there's reasons and it's all right.

So yeah, just I guess to the the younger coders, just be gentle on yourself.

Um 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 but pointing walking the right direction.

Will Vincent

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.

Yep.

Whereas if you just horse records, whatever, like have a thing and you know, can apply a modicum, a modicum of ability and talent to something that's underserved, that's always gonna 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 have cool 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 are required for success.

I think so it's I think it's just how you define it.

Andy Ide

Was it you, Will, who said um I think it was you in one of the earlier podcasts of Django 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 back end, I can link up payments, and I can have it selling a product.

And but I can't invert a binary tree.

So I think that was you.

But if it was, it

Will Vincent

really, but but yeah, it's the point is it doesn't matter.

Yeah, it was

Andy Ide

awesome to say that sometimes the whole product is valuable, and that really inspired me and um at the time.

Yeah, so that was and I realize 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, um, which is a skill in itself, and that's okay too.

Will Vincent

I think you need a reason to poke at the source code.

Like I I I like the analogy of chefs and farmers, right?

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

Some people are way more comfortable on digging super, super deep.

Uh, but is that what you should be working on?

Like, I don't know, it's hard to it's hard to know.

Yeah.

Andy Ide

I I did a blog post where I um have dug into Django Q and found out how to do something that's not documented.

I was quite proud of that one.

So I put that up there.

Just put that out there to the team.

Will Vincent

Yeah, I think do we do we feature that in the newsletter?

I th I think we've had some of your stuff.

If not, I don't know.

Really?

I'll go check.

If not, we would.

Will Vincent

I don't know.

We might have.

I think I have I think I have.

Wow.

Andy Ide

Anyways.

I did not know that I wants to miss that.

Will Vincent

Well, I don't know if I did.

I I think I recall seeing that and I meant to, so if I didn't, I will.

Andy Ide

Oh, then I'll know I'm listening guys.

Carlton Gibson

We could go, we could be going on forever here, but we're really hard covered up for time.

Andy, is there anything else you'd like to cover that we haven't touched on thus far?

This is your this is your your window.

Andy Ide

I'm really happy to talk to any horse people about horse records.

So if there's people out there in the in uh Django Chat LAN who've 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.

Um 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

Well, did did we?

Did we too?

Andy Ide

Well, we said be gentle on yourself, mate.

Carlton Gibson

Yeah, okay, fine.

Yeah, yeah, yeah.

Okay.

Will Vincent

We're gonna that that's how Carlton and I got connected.

He has a beautiful talk on the topic, and yeah, at a certain point in your life and career it it it it resonates.

Andy Ide

Everybody should listen to that.

Because um, yeah, you've got to look after yourself effectively.

Um you're not just it's

Carlton Gibson

that five years median age thing or median experience thing, right?

Yeah, it's if you're gonna go beyond that, you've got to

Andy Ide

look after yourself.

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

Well, next time, next time we have a UA.

Andy Ide

Next time we'll do philosophy next time, too.

Yeah, yeah, okay.

Carlton Gibson

We'd have to start a new podcast.

Right.

Carlton Gibson

Andy, thanks very much for coming on and well done with horse radicals and keep and well done.

You know, I enjoy seeing you on Twitter all the time, and it's lovely to chat with you about it.

Thanks, Carlton.

Andy Ide

Thanks, Will.

It was great.

Thank you all.

Carlton Gibson

We're uh Chat Django, Django Chat, Chat Django on Twitter, DjangoChat.com.

Join us next time.

Bye bye.