Latest / Talk Python To Me / #215: The software powering Talk Python courses and podcast
Transcript
- 0:00Have you ever wondered about the software stack powering Talk Python, the training websites,
- 0:03the mobile apps, the video and audio delivery, and more?
- 0:06While at first glance, it might seem pretty simple.
- 0:09There's quite a bit going on, actually.
- 0:11We have our own custom search engines.
- 0:13We deliver about 15 to 20 terabytes of traffic per month.
- 0:16Our course video streams from eight locations throughout the world.
- 0:19Our database server is sending about 12 megabits of traffic sustained all day, all night,
- 0:25with no media in the mix.
- 0:26And all of this stuff is powered by Python.
- 0:29So this week, it's a bit of a role swap.
- 0:30Dan Bader from RealPython is here to interview me about the Talk Python tech stack.
- 0:35But we do get a chance to compare my tech stack with RealPython's,
- 0:39a site which is becoming quite an important one for developers in the Python world.
- 0:43This is Talk Python To Me, episode 215, recorded on scene at PyCon 2019 in Cleveland on May 6th, 2019.
- 0:52Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
- 1:11This is your host, Michael Kennedy.
- 1:13Follow me on Twitter, where I'm @mkennedy.
- 1:15Keep up with the show and listen to past episodes at talkpython.fm.
- 1:19And follow the show on Twitter via at Talk Python.
- 1:21This episode is sponsored by Linode and Backlog.
- 1:25Please check out what they're offering during their segments.
- 1:27It really helps support the show.
- 1:28All right.
- 1:29Hey, folks.
- 1:29We got a little bit of a different one this week.
- 1:33So I'm excited to be here with Dan Bader from realpython.com.
- 1:37Hey, how's it going, everybody?
- 1:38It's good to see you, Dan.
- 1:40Likewise.
- 1:41This is so unreal because the last couple of times when I was on your show,
- 1:44we were not sitting right next to each other at a hotel in Cleveland,
- 1:48but we were doing this over Skype.
- 1:49And so it's kind of cool, actually.
- 1:52It's super cool.
- 1:53Yeah.
- 1:53And greetings, everyone, from the tail end of PyCon.
- 1:55Not quite from the conference floor anymore since they cleaned that up.
- 1:58So now we're at the hotel floor.
- 2:00Yeah.
- 2:00And it was a really sweet conference.
- 2:01I mean, I don't know.
- 2:02I'm sure you had a great, fantastic time, too.
- 2:04I know you were always swarmed and surrounded by people and fans
- 2:07that want to take photos and chat with you.
- 2:09And yeah, it's really, really cool.
- 2:10It's one of my favorite times of the year, honestly.
- 2:12It's exhausting, but it's great.
- 2:14Yeah.
- 2:14Yeah.
- 2:15I know it was an awesome conference.
- 2:16I mean, thanks to everybody who organized it and put it on.
- 2:18It was really, really amazing.
- 2:20I feel like it's just getting better and better every year.
- 2:22And there's more interest in Python.
- 2:24And it's just so cool to hang out with the community.
- 2:27Yeah, absolutely.
- 2:28You meet all these people that you collaborate with on the internet or other things.
- 2:33And you would never run into them because they live in Australia or Vancouver or wherever.
- 2:38Yeah.
- 2:39But here you run into all of them.
- 2:40It's amazing.
- 2:40Yeah.
- 2:41It's really, really cool.
- 2:42And one of the things I like the most is when you've been working with somebody or you know
- 2:45them online, but you never actually met them or been on a video call.
- 2:48And then you run into them.
- 2:49You're like, oh my God, I had no idea.
- 2:51Oh, this is you.
- 2:51Like, this is so cool.
- 2:52And it's, yeah, it's just been a ton of fun.
- 2:55Yeah.
- 2:55Another one of the takeaways, I guess, is everyone's just a person, right?
- 2:59Like all these people working on these amazing projects.
- 3:02They're really open to meet you and share ideas.
- 3:04And like, if you just go and say hi, like chances are, you know, that you'll get to learn a lot
- 3:09about, you know, whatever you're interested in.
- 3:11Totally.
- 3:11Yeah.
- 3:11I think everybody is really, really welcoming.
- 3:13And I mean, that's the whole point.
- 3:15I mean, that's, I'm sure it's the same thing for you.
- 3:17Like, that's why I go to these conferences, right?
- 3:18To hang out and meet new people.
- 3:20I'm not going there to hide behind my laptop or just be in like business mode, but it's
- 3:24just fun to walk around and chat and grab a cup of coffee or beer with somebody.
- 3:29Yeah, absolutely.
- 3:29I consider this my geek holiday.
- 3:31Yeah.
- 3:31So I did say the opening that we have something a little bit different.
- 3:35So we're going to sort of reverse the roles.
- 3:37And Dan is going to interview me somewhat, but we're also, I'm also going to have a lot of
- 3:42questions for you, Dan.
- 3:43Sounds good.
- 3:44Yeah.
- 3:44I'm looking forward to this.
- 3:45So a lot of folks have asked various questions at different angles, like how have you built
- 3:51your Python stack?
- 3:54Or why are you serving your audio this way?
- 3:56Or how did you build your new mobile apps that you released?
- 3:59Just all these different questions about the tech involved in the podcast and the training
- 4:04and all the derivative stuff from that.
- 4:06So I decided, Dan, you would be the best person to sort of represent the audience on that side
- 4:14of the conversation.
- 4:15Because one, you're super knowledgeable.
- 4:17We're good friends.
- 4:18But also, because you are also running a pretty high-end website.
- 4:23Like, RealPython is one of the biggest Python sites out there these days, isn't it?
- 4:28I mean, it's kind of hard to measure that in terms of, I don't know, like impact and everything.
- 4:34But I can share some stats.
- 4:36We just hit 1.3 million unique users per month.
- 4:39So that's like several million page views a month just on RealPython.com alone, which
- 4:44to me is just an insane number.
- 4:46So yeah, I think, first of all, thanks.
- 4:49And I think we're up there somewhere.
- 4:50Yeah.
- 4:50It's awesome.
- 4:52Yeah.
- 4:52It's definitely really, really growing since you've taken over stewardship of that resource
- 4:59in the last year or two.
- 5:00And it's awesome to see.
- 5:02So we're going to talk about RealPython.com and what you're up to as well.
- 5:05Cool.
- 5:05All right.
- 5:06I guess one of the things I did want to start to set the stage with before we get into
- 5:11this conversation is we'll talk about some part and people might go, well, why didn't
- 5:16you build that serverless?
- 5:17Or why isn't that a microservice?
- 5:19Or couldn't you have hosted this here in that way?
- 5:23And probably the answer is yes, yes, and yes.
- 5:25But I'm not doing any of those because there's just a lot of ways to make this work, right?
- 5:32There's a lot of choices out there.
- 5:33And I think maybe that's even why people are interested, right?
- 5:35If like if it was you go to HP and you ask for a rack of servers and you set up this software
- 5:41on it and you put it on the internet and that was the answer, like nobody would ask, how
- 5:45many servers do you have?
- 5:45I have three, one U servers.
- 5:47Okay.
- 5:47Interesting.
- 5:47Right.
- 5:48But because there are all these choices, I think it's interesting.
- 5:50But I also want to just set the stage, like the choice that you might have made may
- 5:55be different than the choice I'm making or the choice that Dan is making.
- 5:57But, you know, just be aware, like they may all work, maybe better, maybe not.
- 6:03I don't know.
- 6:03But yeah, we're not judging.
- 6:05And so please give us the same favor in return.
- 6:10And I think there's also, you know, with all of this stuff, there's a huge like hindsight
- 6:14effect here, you know, happening here where sure, we could have built this probably on a
- 6:19number of different platforms and hosting services and tech stacks.
- 6:24But a big reason, I mean, for me personally, why I'm doing all this stuff, you know, why
- 6:28I love being involved with the Python community and being able to teach in the Python community
- 6:32is that I get to play with these things and build software in the way that I like to and
- 6:37that I enjoy.
- 6:39So not everything is like a pure what is like the most effective or efficient way to do
- 6:44this.
- 6:44So that's so interesting.
- 6:45You just made me realize I did the same thing, but unconsciously.
- 6:50So like, I knew nothing about deploying on Linux.
- 6:53So I feel like I originally tried going down the platform as a service route and like things
- 6:58that would hold my hand as much as possible.
- 7:00And then I'm like, no, I feel like I need to know this.
- 7:03So I'm going to go force myself to use the infrastructure as a service thing and learn
- 7:08Nginx and uWSGI and Linux and all these deployment things and how they work together.
- 7:12So that if I guess so, I wasn't be a weak spot for me or something.
- 7:17And I do feel like I took that on as like a learning challenge as much as a good way to
- 7:22deploy.
- 7:22I think it also works really well, but like also to learn, right?
- 7:25Like if you get a chance, totally.
- 7:26It's worth pointing out that you and I both run small businesses.
- 7:30We are not at a huge enterprise with somebody that has made rules about what tech we can
- 7:34use.
- 7:34We can use anything long as like we're willing to live with the consequences, right?
- 7:39And so at least personally, I use that as an opportunity to say, I want to use this tech
- 7:43so I can learn it as well as I think it might be a good idea.
- 7:45Yeah.
- 7:46I think that's a big part of it.
- 7:47And then, I mean, also, you know, wouldn't it be a shame if the biggest Python podcast was
- 7:52hosted on a bash script somewhere?
- 7:54Like it's got to be built on Python.
- 7:57It's a Java app.
- 7:58Yeah, I guess nobody's questioning that decision, right?
- 8:00To build the app in Python versus some other tech stack.
- 8:03Exactly.
- 8:04I kind of think like set the stage, we're running on Python, both of us.
- 8:08Let's start there, actually.
- 8:09That's an interesting case because when I started the podcast, I didn't want to start a Python
- 8:16website.
- 8:16I wanted to start a podcast.
- 8:18And yet, I needed a website to serve the RSS feed and the MP3s so that I could have a podcast,
- 8:26right?
- 8:26Like it was table stakes.
- 8:27And right now, there are pretty decent options for hosting a podcast if you're willing to pay
- 8:32a little bit.
- 8:32Like fireside.fm is not bad.
- 8:34Brian Okken uses that for testing code, for example.
- 8:37When I started Talk Python, there was a few options and they were bad options.
- 8:41Like they were not so good.
- 8:43So, I looked at that and I said, well, am I serious about this?
- 8:46Like do I want a site that looks good and people will respond to?
- 8:49Or is going to look like the worst WordPress theme you've ever seen?
- 8:54But technically, it will be an RSS feed.
- 8:56And who cares?
- 8:57You don't go to the website, right?
- 8:58Yeah.
- 8:59Yeah.
- 8:59I totally get that.
- 9:00And a lot of this stuff has changed also, I think.
- 9:03Because when did you start Talk Python training?
- 9:05I started...
- 9:06Or the podcast?
- 9:07The podcast started in April 2015.
- 9:10The training site started in 2016 and February 15th.
- 9:15I know because that was my day I was free from full-time employment.
- 9:18Yeah.
- 9:19And so, you know, with all of this stuff, I think, especially in the podcasting space, you
- 9:24know, a lot has changed.
- 9:25I mean, now it's sort of a legit thing like hosting a radio show.
- 9:28You know, my parents listen to podcasts and not my grandparents, right?
- 9:32But like people know about that this is a thing.
- 9:34And when I think back, you know, even like three, four years ago, it wasn't at that level.
- 9:39I mean, even just looking at the apps, you know, I really like the Overcast app, for example.
- 9:42I don't think that was out back then.
- 9:43And, you know, it was just all like basically Apple, iTunes or something.
- 9:47And it's really changed and grown since then.
- 9:49So now there's probably all kinds of different options.
- 9:51But there's a lot of personal investment and all this like custom software that you've built.
- 9:57I mean, that we've both built for our businesses.
- 9:58And there's sort of also a barrier to move to something else.
- 10:02I feel like we sound super defensive talking about this stuff.
- 10:05Well, I think it's really interesting to consider like, should I have just said, no, I'm not going to build, say, for example, talk Python.fm and Python and build it myself and do the web design myself and all of that and figure out how RSS feeds and work.
- 10:19And how am I going to get the video or the audio delivered without like breaking the bank and bandwidth and all of that kind of stuff.
- 10:24Like I could have just put my credit card in at Podbean, got a crappy site for, you know, $5.
- 10:30I don't know what the price is or whatever.
- 10:32And just gone with that.
- 10:33But, you know, I felt like there's going to be a point where I want to do something that it doesn't do.
- 10:38And do I want to be walled off over there?
- 10:41And also, it was a little bit of a learning experience, like you had said, like, oh, this will be to be a cool thing to run to understand how it all fits together.
- 10:48So I just understand it better.
- 10:50Yeah.
- 10:50But, you know, I would say like three months in, I never started the podcast thinking I would get sponsors.
- 10:55I thought that was a crazy idea.
- 10:56It would just be something that I could, you know, have a community of people I interact with because I didn't have that.
- 11:02But about three months in, one company approached me and said, hey, we would love to sponsor your show.
- 11:07It looks so nice and polished and professional compared to all the other stuff out there.
- 11:11And it's because all the other stuff was hosted in places that were like super cookie cutter and not so great.
- 11:17And I'm like, it started to feel like it paid off at that point.
- 11:19Like, oh, yeah.
- 11:20And I can like feature them in this way that wouldn't be possible if it were there.
- 11:24You know, like it slowed down the start, but it seems like it really paid off in a long term.
- 11:29Yeah.
- 11:29And that makes a lot of sense.
- 11:31And I just wanted to add to that, you know, also looking at my experience kind of building a custom tech stack.
- 11:38There's a huge element of survivorship bias in all of this where if you can pull it off and you can, you're successful with a custom solution, it's going to be awesome.
- 11:48It's going to make you unique and you're going to be able to build out all these unique features.
- 11:51But for every like 20 people who are trying to start a podcast of their own, there's going to be a lot of people who never make it to the actual recording because they're spending five months building their own infrastructure.
- 12:02I've been there, you know, not with a podcast, but with other stuff.
- 12:05That's a good thing to keep in mind for everything, right?
- 12:08Like getting started is the most important thing in this journey for whatever you're doing, right?
- 12:14I guess just to put a bow on that, like when I decided I'm going to try to build a site and see if I can make it work before I decided to host something else, host somewhere else.
- 12:23I started out on a Friday.
- 12:24I said, all right, done with work.
- 12:26I really want to create this thing.
- 12:28I'm going to just go all in on this weekend.
- 12:30And by Monday morning, it was like live and beautiful and ready.
- 12:33And so it was like, I'm willing to try a couple of days to see if doing it myself is crazy or not.
- 12:38And then I would have maybe gone and, you know, paid a couple bucks to Podbean or whatever, right?
- 12:43I wouldn't have waited three months before I even tried the podcasting side of the thing.
- 12:48It was like, this is exciting.
- 12:50Let me try it.
- 12:50And if it works, I'll go with it.
- 12:51Otherwise, I'll pull a ripcord and do something else.
- 12:53Yeah.
- 12:53Yeah.
- 12:54Like do a little experiment and then see how far you can get.
- 12:56Yeah.
- 12:56Yeah.
- 12:57Yeah, exactly.
- 12:59So maybe, I don't know, maybe it's worth talking a little bit about the just quick fly over the tech stack.
- 13:04What do you think?
- 13:04Yeah, I think it'd be interesting.
- 13:06I mean, how do you want to slice and dice this?
- 13:08Like maybe we should talk about like, first of all, what are the main services that you run for your podcast?
- 13:14And you've got the training site and all these other things.
- 13:16Right.
- 13:16Because they all have different goals and constraints and whatever, right?
- 13:20For example, the training site demands low latency video delivery where the podcast site, it doesn't matter at all if that's delivered a little slower because it auto refreshes on your app and you just open it and it's there.
- 13:31Yeah.
- 13:31So let's see.
- 13:32I have talkpython.fm, which is the website.
- 13:35And let's just group the audio delivery in for that one.
- 13:39I have pythonbytes.fm that I do with Brian and it's audio delivery.
- 13:43And I've got the training site.
- 13:45The Talk Python site and the Python Bytes site have custom search engines that I have as REST endpoints.
- 13:52So search.talkpython.fm, for example.
- 13:55You can consume that and search that if you want.
- 13:58And internally, the site uses that so you can search for stuff and whatnot.
- 14:02Same for Python Bytes.
- 14:03So there's kind of that side of things and the audio delivery there.
- 14:08And then there's the training site.
- 14:10And the training site is actually a lot more complicated, I would say, on the infrastructure side because it's got to deliver the videos.
- 14:17It's got to do e-commerce.
- 14:19It has a bunch of accounts.
- 14:21But also it has to have the video delivery, low latency, anywhere in the world.
- 14:26It has the apps, right?
- 14:27Now it has the apps, the iOS and Android apps around it and so on.
- 14:32So, yeah, that's probably the landscape.
- 14:34Also…
- 14:35Your mobile apps.
- 14:36Yeah, inbound, outbound, email.
- 14:38We've got a bunch of services there, like the video stuff, right?
- 14:43So when we record the videos, we don't release what we record.
- 14:47We have to transform it into certain formats that work well in like iOS and are minimized in their like video size based relative to, say,
- 14:56the resolution.
- 14:56And there's like all that processing pipeline is pretty interesting as well.
- 15:00Yeah, this is super cool.
- 15:02I mean, it's kind of mind-blowing, you know, to go over this and sit down and really tease it apart.
- 15:06Like what are even all the services that you run?
- 15:09Because it's so much stuff, right?
- 15:10People would…
- 15:11Isn't it just a podcast?
- 15:11I thought this myself.
- 15:13Yeah, you know, it's a podcast.
- 15:14So what do you need, you know, a laptop to record this?
- 15:17Like we're sitting here.
- 15:17It's kind of a nice and minimal setup.
- 15:19But there's a lot of infrastructure that is powering all this stuff so that your listeners get to enjoy this on their commute and in their cars.
- 15:28I mean, just to give people a sense, like a while ago, I sort of summed up all the data usage, bandwidth usage of my various servers and whatnot between the database and then the audio.
- 15:39Not even counting the videos, which are their own special thing.
- 15:42And I think it was running at like 17 terabytes of traffic a month.
- 15:45Oh, wow.
- 15:46It's a lot of Python.
- 15:47It's a lot of Python.
- 15:48It's a lot of Python.
- 15:49So, yeah, it's pretty cool.
- 15:51It's actually pretty awesome to see.
- 15:53Amazing.
- 15:53Okay, so this makes us even harder to kind of slice and dice this and dive into the most interesting bits.
- 15:58I know one of the things that you and I have had some conversations about is the whole like, you know, monolith versus microservices and most recently also the serverless approach.
- 16:07And I think it would be interesting to talk about that a little bit because I feel like now there's sort of a return to the monolith in the industry where people got burned by the server.
- 16:16Yeah.
- 16:17Yeah.
- 16:18The pendulum has swung a little backwards, right?
- 16:20So, I felt a little uncool, to be honest, a couple of years ago.
- 16:24Same here.
- 16:25Because people are like, dude, how are your microservices working?
- 16:27I'm like, well, there's three services, right?
- 16:30There's, say, talkpython.fm and then it also has like the search service and then it has an audio delivery bit that's like a little bit separate.
- 16:38But that's not really microservices so much, right?
- 16:41Microservices are way more small grained, certainly.
- 16:44You know, and talkbython training is like definitely a monolith.
- 16:47But I try to have a really pragmatic view of these things.
- 16:49Like, I'm not Google.
- 16:51I'm not Facebook.
- 16:52I'm not LinkedIn, as Brian likes to say, right?
- 16:55Like, why do I need to trade that off?
- 16:57And I guess in this context, I'd love to hear your thoughts on this.
- 17:00But when I think of like the, should it be a microservice or should it be more monolith, it feels to me like what I'm doing is taking the complexity and moving it from code complexity in a monolith to operational complexity in a bunch of services.
- 17:14I'm better suited naturally with my experience to handle code complexity than DevOps complexity.
- 17:20If I was maybe really good at DevOps complexity and not so good at code, maybe I would have chosen microservices, but that wasn't where my capabilities were.
- 17:28So I'm like, I'm going to play to my strengths here and just stick with this.
- 17:30Yeah.
- 17:31Which I think that is the best solution if you're running a small business.
- 17:35And I mean, in our case, we're both building all of the software ourselves.
- 17:38Yeah.
- 17:38And we're basically the CEO and CTO and main chief account of all this stuff in one person.
- 17:45And so I think especially then to go down a route of adding a lot of complexity, like operational complexity early on is not a good place to be.
- 17:54And like what I found really inspiring is Basecamp as a company.
- 17:58I mean, there used to be 37 signals.
- 17:59I love their stuff.
- 18:00I used to read like Getting Started, their book religiously.
- 18:03Yeah.
- 18:04Yeah.
- 18:04And it's, you know, it's really good, really good books.
- 18:07And I think also really, just a really, really inspiring company and really good or like really interesting from a tech stack perspective too, because they're totally going down the monolith route.
- 18:16I mean, their CTO is basically the inventor or creator of the Ruby on Rails framework, which is pretty much like Django in the Python world.
- 18:23And they're purposefully building software using monolithic approach so that they can be effective with a small team, which is ultimately if you're running a one person or two person business, super important.
- 18:36Like, I mean, you want that.
- 18:38That 20% efficiency or whatever is massive when you're small.
- 18:41When you're a huge company, huge companies are massively inefficient, like from my experience.
- 18:46So that's pretty interesting.
- 18:48I'm definitely a fan of just having things working simply and knowing that you can change it, right?
- 18:54We could break it into microservices if we need to, but yeah, same.
- 18:57And I feel like just serverless is just like that, but plus more.
- 18:59Like it's more pieces I got to manage.
- 19:02And so until I need it, I feel like I'm going to stick with what I'm doing.
- 19:06Yeah.
- 19:06Yeah.
- 19:07And to me, it's interesting also that, you know, your search service is a separate thing.
- 19:12So you're, it's almost a little bit of a hybrid model there for you.
- 19:16Yeah, a little bit.
- 19:16Where, and I think the Python bytes, that's a separate.
- 19:19That's a separate app, right?
- 19:21And it's similar for me where real pythons are a separate app, right?
- 19:22And it's similar for me where realpython.com is like a monolithic web app, but then we
- 19:27have this feedback form system that's separate or the PyCoders weekly newsletter that I run
- 19:32is also a separate application.
- 19:34And I think it makes sense to kind of slice things up this way because then you can treat
- 19:40those systems in isolation.
- 19:42And I guess the question is just, you know, when, I think it's a spectrum of like monolith
- 19:46to microservice to let's say serverless, maybe it was like really, really tiny microservices
- 19:51basically.
- 19:52And so, I mean, we're both not running pure monoliths, right?
- 19:56In that sense where if it was a pure monolith, like everything you have, like the podcast
- 20:01and all the APIs, the search.
- 20:02It would be one single thing.
- 20:04Yeah.
- 20:04Yeah.
- 20:04I have eight different servers that are participating in like all the stuff we described at the beginning.
- 20:09So maybe I don't know when it is a microservices architecture versus when is it a monolithic
- 20:15architecture?
- 20:15Because I mean, you basically have a search microservice in that sense, right?
- 20:19So I've always been struggling with those terms a little bit.
- 20:22Yeah.
- 20:22I think there's two driving forces.
- 20:24One would be technical and the other would be sort of team personal based.
- 20:30Like, is there a technical reason to have those two things separate?
- 20:32Do you want to consume them separately?
- 20:34Should they be versioned separately?
- 20:36Should they live on separate servers?
- 20:38Things like that.
- 20:39That's maybe a technical thing that'll push you into this mini microservice light?
- 20:44Microservice light?
- 20:45I don't know whatever you call it, right?
- 20:47We're going to term.
- 20:48And then the other one is, do you have people who are not experienced with the whole thing,
- 20:54but maybe they could work on the search service, right?
- 20:57Like if I had somebody who was like a junior developer who came on and I was going to have
- 21:01them work on the search service for a month, like it's not really worth it and it's not
- 21:04that big, but imagine it were, right?
- 21:06Like it might make sense to have that separate.
- 21:08They can deploy it and live with it.
- 21:11And if they take down the search service, it's not the end of the world.
- 21:14You know what I mean?
- 21:15But if they take down the main site, like all of a sudden it's a problem potentially.
- 21:18And so I feel like certainly microservices are easier for different teams to work on different
- 21:23bits or different people to work on simpler bits.
- 21:25But like you said, we're mostly doing the software development ourself.
- 21:29And so that's absolutely not a pressure that is applied to our stuff.
- 21:34Yeah.
- 21:34I think that's a good point where you want the ability for one of those services to go down.
- 21:39Like if it's an experimental new thing that you built, let's say like the search and you're
- 21:43playing with the or working on the search feature, trying to make it better in some way, you want
- 21:48to gracefully degrade the experience for everybody who's using the website.
- 21:52Maybe search doesn't work, but everything else would still work.
- 21:54I did that, for example, when I built like an ad serving, like an ethical ads platform for
- 21:59realpython.com.
- 21:59And it's now also used on PyCoders Weekly and some other sites.
- 22:03And there was the same thing where it's like, you know, I don't really know if I'm going to
- 22:06be running this thing in a couple of months.
- 22:07It's more an experiment.
- 22:08And instead of kind of polluting my monolithic code base with that new thing, I'd rather have
- 22:14it separate.
- 22:14And so I could also scale it independently.
- 22:16So I'm wondering if that also factors into your decisions, like maybe search needs to be
- 22:20scaled differently or one of these sites is going to grow faster than the other ones.
- 22:23Yeah, absolutely.
- 22:24Like if you need to scale one part a lot, it's easy to just scale that tier or put a load balancer
- 22:30in front of that.
- 22:31Also, it's running under different core domains and different SSL certificates and stuff.
- 22:37So maybe that makes it a little easier to have it separate, like search.talkpython.fm, not
- 22:41talkpython.fm/search.
- 22:43Although that's kind of maybe minor.
- 22:44I could change that around.
- 22:46But yeah, it's certainly a consideration.
- 22:47This portion of Talk Python To Me is brought to you by Linode.
- 22:53Are you looking for hosting that's fast, simple, and incredibly affordable?
- 22:57Well, look past that bookstore and check out Linode at talkpython.fm.
- 23:01Slash Linode.
- 23:02That's L-I-N-O-D-E.
- 23:04Plans start at just $5 a month for a dedicated server with a gig of RAM.
- 23:08They have 10 data centers across the globe.
- 23:10So no matter where you are or where your users are, there's a data center for you.
- 23:14Whether you want to run a Python web app, host a private Git server, or just a file server,
- 23:19you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly
- 23:25support even on holidays, and a seven-day money-back guarantee.
- 23:28Need a little help with your infrastructure?
- 23:31They even offer professional services to help you with architecture, migrations, and more.
- 23:35Do you want a dedicated server for free for the next four months?
- 23:38Just visit talkpython.fm/Linode.
- 23:41One of the differences between both of our setups there that I'm personally really interested in
- 23:47is that for the hosting aspects of the infrastructure, we're using different approaches.
- 23:53Absolutely.
- 23:53The way I understand it, you will actually provision an individual virtual server and then run an
- 23:59application on that.
- 24:00Let's say Python Bytes has its own virtual machine somewhere in the cloud.
- 24:03I'm more like the infrastructure as a service model, whereas most of my stuff runs on platform
- 24:08as a service providers like Heroku.
- 24:10I don't provision my own Linux server and keep it updated.
- 24:12I just kind of offload that.
- 24:14And so I'm really interested in how the infrastructure as a service model is working for you.
- 24:19If you ever considered switching, for example, or if you see some benefits in it.
- 24:22It's working pretty well.
- 24:23I feel like I've definitely gained a lot of experience that I wouldn't have, right?
- 24:27Like, give me 15 minutes, I could set up a new HTTPS service on Nginx backed by some, you know,
- 24:33MicroWiz gear, GPU record or something.
- 24:35And having like that experience, DevOps experience, I think is nice.
- 24:39I think the way I kind of got there was a little bit of that learning and exploration stuff.
- 24:44I kind of wanted to have that as a skill set.
- 24:46So like, let me try it.
- 24:48And, you know, when I started, it was like $10, two $5 servers, one for the database.
- 24:53Maybe it might have just been one, right?
- 24:55Like on the same server even or something.
- 24:57But it was like really just a quick little easy way to get started.
- 25:00And it worked really well for me.
- 25:02I'm like, this thing is just perfect.
- 25:04It works.
- 25:04It's up all the time.
- 25:05I love it.
- 25:05As things have grown, it's gotten a little more complicated.
- 25:08And I feel like I'm still really happy the way it is.
- 25:11But it's sort of taken on its own life a little bit to have.
- 25:15Because you're provisioning your own databases, right?
- 25:18You're not going like, oh, Amazon, I need to.
- 25:20So the way I have it set up is I have MongoDB as my server.
- 25:23I didn't start with MongoDB, but I have it.
- 25:25And I have the different services.
- 25:27And they have all different databases, but they all are on the same database server, right?
- 25:32So all the main sites, training.talkpython.fm, Talk Python itself, Python Bytes,
- 25:37they all have their main server in like a load balance failover server.
- 25:41So if I got a reboot or do maintenance, I can just like automatically through Python with an API.
- 25:46Like as part of the deployment stack, what happened or flow, it'll switch it to this other super, super cheap cloud server,
- 25:54handle the traffic well enough while it's off, and then switch it back.
- 25:58Right?
- 25:58But all of those share a central MongoDB virtual machine that's like, instead of having a bunch of small ones,
- 26:04I bought like one high, high performance one and they just share it.
- 26:07Yeah.
- 26:08Yeah.
- 26:08And it's fine.
- 26:09I mean, like if you go log into the MongoDB server and you pull up in load and you say,
- 26:13what is the traffic on this server?
- 26:14Like the average bandwidth is about eight to nine megabits per second continuously.
- 26:22So it's getting a lot of work.
- 26:23But if you pull up the CPU usage, it's one to 2%.
- 26:26Yeah.
- 26:27I mean, it's like, it could take way, way more of what it's getting than it does.
- 26:31So why did I choose that?
- 26:32Why don't I go on Heroku or something like that?
- 26:35I feel like what I got is already working.
- 26:36I'm really happy with the way it works.
- 26:38I can make it do just what I want.
- 26:41Any change that I want to make, I feel like the sky's the limit, right?
- 26:46I want to change how Nginx works.
- 26:47Fine.
- 26:47I want to make it serve HTTP2 for this part, but not for that.
- 26:50I can totally do that.
- 26:51Did you ever have like some incident with the database, let's say,
- 26:54where you have to rebuild it from scratch or restore it?
- 26:57I've never had any problem.
- 26:58The database, it's been that configuration, let's say, for about two and a half years.
- 27:04I've never had it go down or get corrupted.
- 27:08What I have had is the network infrastructure inside the hosting, inside the host has had issues.
- 27:16So the things couldn't find the server, but that wasn't the server process fault or the machine.
- 27:21It was like the glue was broken for a little, but that's still, you know, like a couple minutes
- 27:26if you sum it up over all those years.
- 27:28The thing that makes this challenging that you avoid, which I want to hear your side of this here in a second,
- 27:33is I can manage all this stuff, but I'm not running MongoDB in a replica cluster,
- 27:39which would be the way for like true 100% availability because the changes that I need to make to it are like incredibly small.
- 27:46But about once a month, there's a 10 second downtime because the underlying server has security patches.
- 27:53Yeah.
- 27:54And so I got to reboot the thing that is the center of that hub.
- 27:57Yeah.
- 27:58And so I've actually built stuff into say Talk Python, the training site, for example,
- 28:01that I'll flip a switch to say the app is in off mode and every request will send you over to a page that says,
- 28:07we're doing a major upgrade, please hold on.
- 28:09And it has a meta tag that refreshes every five seconds and it notices when the database switchbacks on,
- 28:14it takes them back to the page they tried to get to.
- 28:17Come on, man.
- 28:17That's not good enough.
- 28:18We need eight nines.
- 28:20Now, I realize like some people have to have 100% availability, but for my world, like 10 seconds downtime per month is acceptable, right?
- 28:29I don't know.
- 28:30That's the way I have it set up.
- 28:31Tell us about what you're doing at RealPython because I get a lot of traffic.
- 28:34I maybe do more pure bandwidth because I have audio in large quantities.
- 28:39I think you do.
- 28:39Pretty sure you do.
- 28:40But you definitely do more requests.
- 28:41I probably get under two or three million HTTP requests that are data-driven Python requests,
- 28:48not static files and whatever, per month if I add them all up across all the things.
- 28:53But I'm sure that you get quite a bit more.
- 28:55So you're running a totally different setup.
- 28:57Tell us how that goes.
- 28:58The setup that I use for RealPython, like all the other stuff like the Ethical Ads platform, PyCoders,
- 29:04pretty much all runs on Heroku these days.
- 29:06And the downside is it's a lot more expensive than provisioning your own box.
- 29:09But the upside is that, you know, recently I was going on my first vacation in like a really, really long time.
- 29:16And my wife and I were going on this hike and we're coming back to civilization.
- 29:21Very far away from a computer.
- 29:23Very far away from a computer.
- 29:24Of course, I brought the computer.
- 29:25Yeah, so did I.
- 29:26I'd never go about it just in case.
- 29:28We're coming back from a site.
- 29:29And I checked my phone and there's like 50 Slack messages.
- 29:31Not 50, but, you know, it's like Slack is on fire.
- 29:34Like the real Python Slack is on fire.
- 29:35And I checked my email and there's like all these exception tracebacks.
- 29:40And I'm like, oh my God, oh my God, oh my God.
- 29:42And it looks like the database passed.
- 29:44You know, some issue with the database.
- 29:45That service has just disappeared.
- 29:46And then I keep reading further down.
- 29:49And I get this email from my hosting provider, from Heroku, from where we have the database set up.
- 29:55And the way it works is you just say, okay, you know, I want the Postgres database, this version with this many rows of capacity.
- 30:00And you get that box provisioned and they do all the backups and they provide an automatic failover and all of that.
- 30:07And so I scroll down the emails further and I'm like, oh, okay, they detected that five minutes ago and already switched over to the failover automatically.
- 30:13And then reprovisioned the master and kind of switched it back.
- 30:17And I didn't have to do anything.
- 30:18And it totally saved me probably like at least an afternoon of work while the website would have been down.
- 30:24And not a regular afternoon of work.
- 30:26A vacation.
- 30:26Sorry, honey, we were going to be on the beach.
- 30:29Because now I'm in the hotel frantically fighting this bad internet afternoon of work.
- 30:33Exactly.
- 30:34And so I was like, oh man, this is great.
- 30:36I very much like that.
- 30:39And so I was always a bit worried that something really bad would happen from a hosting perspective if I was going to start provisioning all my own boxes and then updating them.
- 30:46This is a constant fear of mine of just like what happens if it just goes down.
- 30:50It hasn't been a problem yet, but that doesn't prove anything.
- 30:53It's just it hasn't happened yet.
- 30:54Right.
- 30:54Yeah, totally.
- 30:55It's a real fear that I also have all the time.
- 30:58Yeah.
- 30:58Yeah.
- 30:58Yeah.
- 30:58It's pretty interesting.
- 30:59But you're pretty happy with the platform as a service?
- 31:01I'm really happy with it just from a usability friendliness perspective as a developer because I don't have to worry about installing.
- 31:08When the whole Spectre thing happened and all of these interesting...
- 31:12Oh, yeah.
- 31:13We had that 10 second downtime for a lot of reasons.
- 31:16Yeah.
- 31:16Yeah.
- 31:16Yeah.
- 31:17Yeah.
- 31:17Yeah.
- 31:18Yeah.
- 31:18You know, I didn't really have to do anything about it because I just basically tell the platform, like, here's the code for the app.
- 31:24Here's the services that I need.
- 31:26So I need like Redis as a cache.
- 31:28I need Postgres as the database.
- 31:30And just give me an endpoint that I can talk to or like credentials for the database.
- 31:35And they will keep it patched and updated and make sure there's backups.
- 31:39And there's like, it's always like a failover primary, secondary system.
- 31:42And I very much like the sense of security it gives me.
- 31:47But on the other hand, I mean, it's probably fairly unlikely that your server will just melt down.
- 31:52And so what are you really getting?
- 31:54You know, maybe it's worth the trade-off.
- 31:56Yeah.
- 31:56I mean, you're already protected of hardware failures on the IaaS systems because they'll move your VM across.
- 32:03I've had several times the underlying machine has died and we moved your VM over somewhere else.
- 32:09Yeah.
- 32:09And it just kept rolling.
- 32:10Have you ever considered like running your podcast on real, like bare metal in your living room, in your office room?
- 32:16No.
- 32:16I'll tell you a funny story really quickly.
- 32:19Slight diversion, but I think it's worth it.
- 32:20So this is from 19, I remember where I was.
- 32:25This is like 95, 1994, 95.
- 32:29I remember like the first Mozilla browser came out in 93.
- 32:33So I had a friend who was a web designer friend.
- 32:38And this predates all the like hosting.
- 32:40Yeah.
- 32:40I mean, this is like a couple of years in the internet.
- 32:43And he somehow, I have been thinking back, I have no idea how he did this.
- 32:46He had gotten the job to build the website of one of the major helicopter manufacturers in the world.
- 32:54Wow.
- 32:54Right?
- 32:54And he was hosting, he was hosting all of his sites on his laptop in his house.
- 32:59But, but we had a party at his house and somebody walked by and tripped on the power cord and unplugged it.
- 33:08But it didn't turn off right away.
- 33:10Right.
- 33:10Cause it just went to battery.
- 33:11Yeah.
- 33:12But a few hours later that ran out of battery and it turned off and he went to sleep.
- 33:15He woke up the next day and people were upset.
- 33:17Like, why is the website?
- 33:18Oh no.
- 33:19We had a server failure is what he told him.
- 33:21But it was, we had a party and someone pulled the cord on the laptop.
- 33:23Is that insane?
- 33:24Would that ever happen now?
- 33:26Yeah.
- 33:27It goes to show like how much this, this whole industry has changed.
- 33:31I mean, maybe that's what they're doing at Heroku.
- 33:32I don't know.
- 33:33It's like in somebody's basement.
- 33:36Yeah.
- 33:36No, I would never, I would never consider on like bare metal.
- 33:40Like there's just having the failover at the network level and just the bandwidth and the
- 33:46flexibility, the geolocations, right?
- 33:49Like I think a lot about where stuff located for different purposes.
- 33:52That's going to be interesting too, to chat about that aspect because I know that for the
- 33:56video delivery, for the courses, you're doing some really interesting stuff.
- 33:59Like basically you built your own little, like not little, but like a content delivery network
- 34:03to be like physically close to the person that's watching the video.
- 34:07The first thing I hear when I talk to people about this is you're not just using a CDN and
- 34:13I'm sure I'm going to hear some stuff about this again, because it's irresistible.
- 34:16It seems to talk about it, but I'm not using CDN.
- 34:19I'm using something else that lets me create, have more control over the visibility of the
- 34:23URLs and the content, because I don't want to have just public content, even if it's sort
- 34:27of protected on the app side.
- 34:29It's like once you have URLs, they're just public, right?
- 34:31So I have a way to like create signed short-term URLs.
- 34:34But yeah, the video delivery is really important.
- 34:37So that doesn't happen out of my servers.
- 34:39That happens out of other places throughout the world.
- 34:41So I have like eight locations.
- 34:42Like there's a site in Mumbai, there's one in Sydney, there's one in Tokyo, there's one
- 34:47in Ohio, right?
- 34:48Where we are here and so on.
- 34:50And so when you go to training.talkpython.fm and you play a video, not the little marketing
- 34:54videos, but like all the other real content, the first question the site asks is, who are
- 34:59you?
- 34:59Are you logged in?
- 35:00Are you allowed to do this?
- 35:01The answer is yes.
- 35:02Then the next one is, where are you?
- 35:03Right?
- 35:04So it'll figure out what of the servers that it has available to it, which one is closest
- 35:10to you.
- 35:11And then it'll, it'll stream it to you from that location, wherever you happen to be.
- 35:15Nice.
- 35:15Yeah.
- 35:16And then to get it in those locations.
- 35:17I've got one place I upload to.
- 35:20And then this little system, a little like unit, a system unit from system D Python thing
- 35:27that runs continuously on one of the servers.
- 35:29And anytime it sees a change to like the main location, it'll synchronize it throughout the other seven places in the world.
- 35:36So, you know, upload it to one place, walk away, you know, seven minutes, a few minutes
- 35:40later, like it's in the different seven locations.
- 35:42Yeah.
- 35:42So the crazy thing to me here is that, that you're also doing your own video transcoding
- 35:47and all of these things to be able to deliver to the app and to different browsers.
- 35:51And yeah.
- 35:52Well, I tried to just publish the Camtasia videos and they wouldn't play on iOS.
- 35:55And then they were too big in other places and stuff.
- 35:58And you've got to have certain underlying, like it's not good enough.
- 36:03It's just an MP4.
- 36:04Yeah.
- 36:04It's got to have like this version or like these settings, or it can't be over like 1.5
- 36:09megabit encodings for certain things.
- 36:11And it's super painful.
- 36:13And so actually shout out to Cecil Phillip.
- 36:15He pointed me towards this.
- 36:16So what I found and started using, I mean, obviously it's, you know, been around is Amazon
- 36:23has something called elastic transcoder service.
- 36:25All right.
- 36:26So elastic transcoder service lets you come up with a very carefully structured set of transformations
- 36:32to your video and you give it a video and it'll generate that, like give it a five minute
- 36:37video and 20 seconds.
- 36:38And you have like an output that is perfect for streaming on the other devices.
- 36:42So I wrote a Python script that'll go to a set of like a course videos folder, run it.
- 36:48It'll take all the videos.
- 36:50It'll upload them to a temporary location in S3.
- 36:52And then it'll use the API to talk to the transcoder service and have it drop into another
- 36:56location in S3 when it's done.
- 36:59And then when it's done, it'll grab it, download it, put it in a different spot on my stuff.
- 37:02And just here's like the sort of streaming version of that course you just built.
- 37:06It's awesome.
- 37:07It still seems crazy to me, but I mean, I know that you're a really good engineer.
- 37:10And the fact that you can pull this off, I think is really, really amazing.
- 37:13When you told me about this the first time, I just thought it was mind blowing.
- 37:17Because I was like, I'm just going to use Vimeo.
- 37:19Well, here's the thing.
- 37:21I started out with Vimeo.
- 37:22I started out using Vimeo.
- 37:23And it was really good until it wasn't good enough.
- 37:27Right?
- 37:28Like Vimeo was good, but it would periodically, like the embedded player stuff would stop working,
- 37:33you know, and it'd be down for like 15 minutes.
- 37:37It'd be like, you know, I'd start getting emails.
- 37:39Michael's site's down.
- 37:41I'm like, yeah, I know.
- 37:42But it's 100% out of my control.
- 37:44Then I would get questions like, hey, can I play this at 1.5 speed?
- 37:47Like, no.
- 37:48Player doesn't do 1.5.
- 37:49It doesn't have speed.
- 37:50So, no, I'm not.
- 37:51I can't do that.
- 37:52Just on and on.
- 37:53Can I have an offline version or whatever?
- 37:55Right?
- 37:55Like there's all these things that you start to want and they eventually pile up.
- 37:59And you're just like, okay, well, if not that, then what?
- 38:03Right?
- 38:03Because it was working mostly great.
- 38:05But then it's like, all right, well, now it gets really complicated really quickly.
- 38:09But, you know, it didn't start that way, right?
- 38:12Like I was selling the courses.
- 38:14Things were going great.
- 38:15And then like I needed more than I could get from that sort of pro setup I had,
- 38:20like the pro account or the business account I had set up with them.
- 38:23I'm like, all right, that's, you know, thank you for your service.
- 38:26But it's time for me to move on and do something else.
- 38:28And by the way, this is way more expensive, right?
- 38:30Like I'm paying for the bandwidth.
- 38:32Oh, yeah.
- 38:32Oh, I better do so.
- 38:32And the transcoder is pretty cheap.
- 38:34It's like $10 to transcode like hours of video or something.
- 38:37And you do that once, but the bandwidth is more.
- 38:40This portion of Talk Python To Me is sponsored by Backlog from NewLab.
- 38:45Developers know the importance of organization and efficiency when it comes to collaborating on a team.
- 38:50And Backlog is the perfect collaborative task management software for your team.
- 38:55With Backlog, you can create tasks, track bugs, make changes, give feedback,
- 38:59and have team conversations right next to your code.
- 39:01You track progress with features like Gantt and burndown charts.
- 39:05You document your processes right alongside your wikis.
- 39:08You can integrate with the tools you use every day like Slack, Jira, and Google Sheets.
- 39:12You can automatically register issues from email or web form submissions.
- 39:15Take your work on the go using their top-rated mobile apps available on Android and iOS.
- 39:20Try Backlog for your team for free for 30 days using our special URL at talkpython.fm/backlog.
- 39:27That's talkpython.fm/backlog.
- 39:31So would you say the fact that this also makes your offering unique, your website is unique,
- 39:38sort of like a bespoke design, build it from scratch, like the search, all of that stuff is unique.
- 39:44It makes you special.
- 39:45And it makes, I think, as a visitor or reader, follower, consumer,
- 39:49it feels different to go on one of your websites than like a run-of-the-mill WordPress site.
- 39:54So is this something that sort of happened organically or is this something that that was your goal initially?
- 39:58I would say it somewhat happened organically, but it was also somewhat of a goal,
- 40:03like especially around the training stuff.
- 40:05Like there were a lot of options.
- 40:06Like I could have used Teachable or Thinkrific or Udemy,
- 40:10or I could have partnered up with Pluralsight or one of those sets of people, right?
- 40:15Those types of platforms.
- 40:17And the consideration there was this is like my bet on my future.
- 40:23And this is the most important thing I consider that I'm doing for the next couple of years.
- 40:28I want it to be as nice as it can be.
- 40:29I know I can build a better site than Thinkful or whatever, Teachable, these different places.
- 40:34And I think it'll be more special if it's not just under some subscription place like Pluralsight or Safari Online or whatever, right?
- 40:42And so I actually thought as hard as I could, like, is there a way I can avoid doing this, right?
- 40:49Because I really don't want to.
- 40:50It's getting in my way.
- 40:51It's going to take me like weeks.
- 40:52Like that actually took a long time.
- 40:54It was like almost a month to write the site and all that stuff.
- 40:57But in the end, I decided, you know, if I just do it like a band-aid, just pull it off, do it now, I'll be in a better place, you know?
- 41:05And like keep in mind, this is like, this is the decision I had to make like the day I quit my job and I had no income and I could have no income until that was done, right?
- 41:14It wasn't just like, oh, maybe I'll evolve it, whatever.
- 41:16That gets you motivated, yeah.
- 41:18Yeah, that'll get you going.
- 41:19Like you'll get it written quick.
- 41:20You know, when I think back, like we've been chatting about this stuff for a long time, right?
- 41:26Yeah, absolutely.
- 41:26Developing our stuff there in parallel.
- 41:28And you've sort of drawn me into that direction more to do more custom stuff.
- 41:33We had a real similar debate, right?
- 41:35You're like, I could probably just set up some WordPress thing and make this happen like for real Python or whatever it was you were doing at the time.
- 41:40My first Python education website, debater.org, which is still around, sort of my personal thing there.
- 41:46That was a custom, sort of like a static site generator, but it was just all serving it from memory.
- 41:52So it was like written in the BottlePy framework.
- 41:54And, you know, way back when I wrote it in 2012, I didn't really know what I was doing, to be honest.
- 41:59So it's kind of limping along.
- 42:01And when I had the chance to do things properly with real Python, I was sort of torn between, oh, I would love to do something custom.
- 42:11But I also know that there's downsides to it in the long run.
- 42:16It's like a constant friction that is on you.
- 42:18Like I would say I spend at least 10% of my time just keeping things running and smooth and adapted.
- 42:25Like it doesn't, I don't know why, but it seems like there's always just a little bit of friction.
- 42:29And you wouldn't have that necessarily with the other stuff, right?
- 42:31Yeah.
- 42:32Well, it's or so you would think, right?
- 42:33I guess so you would think.
- 42:34I was talking to a lot of people just in the web dev space.
- 42:37And, you know, I used to work as a backend engineer for a company in Vancouver.
- 42:40And shout out to Mobilify, a really cool company.
- 42:42And my friends were pushing towards like, oh, just use WordPress.
- 42:46You know, you can get all the plugins if you want to hire somebody.
- 42:49There's a lot of people who know about WordPress and PHP versus Python.
- 42:53You can buy a theme, you know, there's like this whole ecosystem for this stuff.
- 42:56And, you know, back then I think we had a similar conversation about this.
- 42:59And we're like, you know, you should really consider doing a custom implementation because
- 43:03then you can tailor it exactly the way you want to.
- 43:06And I'm so glad I changed my mind or partially you convinced me and that I rewrote realpython.com
- 43:12as a Django app because now it is sort of a superpower being able to have a really tailored
- 43:17and unique workflow for all the authors contributing to the site, you know, for our editing team
- 43:23and just to be able to, you know, run something like a little linter on an article.
- 43:26And I don't have to A, write that in PHP.
- 43:29And then B, I think the other thing is as soon as you get, so for example, my wife's website,
- 43:34she has a graphic design portfolio.
- 43:35We built that on WordPress and that's cool and all.
- 43:39You're so effective and fast in the beginning, but then you start running into all these issues
- 43:44with these plugins playing together.
- 43:45And maybe you don't even fully understand the underlying tech.
- 43:48Like you can jump into Python and fix it.
- 43:50Like, can you actually resolve that problem with PHP?
- 43:52Yeah, no.
- 43:53No, me either.
- 43:54Some people, yes, but me, no.
- 43:57Yeah.
- 43:57Yeah.
- 43:58And that's a big pain now where it's like, well, you know, this plugin is getting updated
- 44:01and then there's like a new big new release or some security patch.
- 44:04And these things are not all updating in sync and they're kind of all doing their own thing.
- 44:08And it blows up a lot.
- 44:10Whereas if you run your own application, you have a lot of control over the deployment process
- 44:14also.
- 44:15And so like in retrospect now, I'm really glad that it's a custom Python app.
- 44:19Yeah.
- 44:20Yeah.
- 44:20That's awesome.
- 44:21I guess the question is, how are we all going to feel about this in five years from now
- 44:24where it's like, oh God, you've got to maintain this thing.
- 44:27Actually, this brings me to another question that we haven't really touched on yet.
- 44:30Like choice of Python web dev frameworks.
- 44:32Yeah.
- 44:33So you're using Pyramid, right?
- 44:34Yeah.
- 44:35I'm using Pyramid and you're using Django.
- 44:36For the most part.
- 44:37Yeah.
- 44:37Django.
- 44:37For the most part.
- 44:38Yeah.
- 44:38I'm also using a little bit of Flask for some APIs that people don't see, but they're there.
- 44:43Yeah.
- 44:43It's got some BottlePy in there still for debater.org, but everything else is Flask.
- 44:48Yeah.
- 44:49So that's an interesting one.
- 44:50You know, there's two things that I really, really liked about Pyramid.
- 44:54And keep in mind, this is 2015, not 2019.
- 44:57When I decided these things, right?
- 44:59Yeah.
- 44:59Yeah.
- 44:59So at least for one of them, one's unchanged, one's true.
- 45:03For when I went, like my personal web style is like a minimalist, bring the little pieces
- 45:10together.
- 45:10I'm kind of a micro framework type person.
- 45:11So I thought Django is nice, but it feels like kind of bigger.
- 45:15I need to understand more of it at once.
- 45:18And I felt like with the micro frameworks, I could like learn it piece by piece.
- 45:22You know, like I'm going to understand this little part here.
- 45:24And like, I don't know what that does.
- 45:25I don't need to know.
- 45:26I mean, that's actually on the Pyramid framework site.
- 45:29Like one of their principles is you can be effective with a partial understanding of Pyramid.
- 45:33Like I can call it.
- 45:34So anyway, so I was considering Pyramid.
- 45:37I was considering Flask and a few other things.
- 45:39But when I, at the time, super underscore that, at the time I went to the Flask website and
- 45:46said, this is for Python 2.
- 45:48It may, may work on Python 3.
- 45:51Your mileage may vary.
- 45:52We have no guarantees for you there.
- 45:55Right.
- 45:56And I'm like, whoa.
- 45:57I don't know if I want to get into that.
- 46:00Right.
- 46:00Like I don't want to start a brand new thing on Python 2.
- 46:03If like that's its world.
- 46:04I did a quick check of the performance stuff and Pyramid was faster than the other two on Python 3.
- 46:10I think Flask was faster on Python 2, but that didn't make me happy.
- 46:13Right.
- 46:14I want to be on Python 3.
- 46:15So, you know, having no legacy code, I'm like, all right, let me try this Pyramid thing.
- 46:19The other reason I really like Pyramid is the Chameleon templates.
- 46:22Like I very much dislike the style of the Jinja templates.
- 46:27And it's not just Jinja, you know, C# has the Razor space that's very similar.
- 46:32Django's templates are similar.
- 46:33What I don't like is template languages that are very much not HTML.
- 46:39Like you can't take a Jinja template and load it in a standard HTML editor and have it think it's okay.
- 46:45Right.
- 46:45Because you've got that angle bracket percent for something, something like their angle bracket percent and for all over the place.
- 46:52Right.
- 46:52Whereas Chameleon is more angular or view like, like Vue.js, like where it's attribute driven.
- 46:58So you might have an attribute that is not understood, but that's valid HTML other than tal colon condition has a string.
- 47:05Right.
- 47:05Right.
- 47:06It's like, I don't know what attribute means, but it's valid HTML.
- 47:08Oh, does it actually like parse the template as XML or whatever?
- 47:10And then like, it makes sure that it's valid.
- 47:13Yes, it does.
- 47:14Because if you have an unclosed tag, it freaks.
- 47:16That is cool.
- 47:17I had no idea.
- 47:17Yeah.
- 47:17It's like true HTML that's like extended by Python.
- 47:21And also it's more, you can't write arbitrary Python code there.
- 47:26You have to like have a little better architectural separation.
- 47:28Those two things, when I got started, I'm like, okay, I like both of these about Pyramid.
- 47:33And I didn't consider Django as much because it's a micro frameworks bent that I have, I guess.
- 47:38And that's a personal thing, right?
- 47:39Yeah.
- 47:39No, for sure.
- 47:40Yeah.
- 47:40And I think it also, yeah, I guess like depends on the nature of the site and your workflow.
- 47:44I think you do a lot of like terminal driven stuff, right?
- 47:48When you just showed me your deploy process or when you, like, what does it look like for you?
- 47:52I'm really interested in the workflows, right?
- 47:54Because for a new podcast episode to go out, like what's going to happen once we're done recording this and you want to publish it on the website?
- 48:01Oh, that's a good question.
- 48:02So when we're done recording this right now, recording it, I'm going to convert it to multi-track WAV files.
- 48:07I'm going to hit it with some audio filters, some quick editing, quick leveling.
- 48:12So even if our mic settings are different or our distance we're holding our mics are different or like normally it's recorded at different locations, it all sounds like we're in the same room mostly.
- 48:20I'm going to send that off to Marco.
- 48:22Shout out to you.
- 48:23I'm sure you're editing it now.
- 48:24And Marco is an awesome guy that's been supporting me for a long time.
- 48:26And he edits it into its final form.
- 48:29I take that back.
- 48:30I actually have a bunch of other little bits, like the ad bits and the intro bits and the music.
- 48:34And I do all that in GarageBand because GarageBand is good for multi-track stuff.
- 48:40I don't actually do the audio editing there, but I do like the composition of the tracks there.
- 48:44Put that into an MP3.
- 48:45I upload that to S3.
- 48:48Like manually with the...
- 48:50I'll use Transmit, but yeah, yeah, yeah, exactly.
- 48:52So I upload that.
- 48:53And then it goes into the Python world.
- 48:56So then I log into a backend on Talk Python.
- 49:00And I say, here's a new episode.
- 49:02I type in the details and I say, here's the URL on S3.
- 49:05And you could just serve it off S3.
- 49:07But the amount of bandwidth that's going through there, like let me just do a quick test here.
- 49:11So we have...
- 49:12I want to have the right numbers and I want to make enough stuff here.
- 49:15So if I served it off S3, it would be like $600 or $700 a month, which is not the end of the world,
- 49:20but it's not ideal, I guess, right?
- 49:23Especially when I was getting started.
- 49:24And so I actually have another server, another virtual server that has tons of available paid bandwidth, right?
- 49:31And with that, I just put it on there and just serve it out of IntuneX as a static file.
- 49:35So when I add the S3 URL, it'll like grab it.
- 49:40It's sort of a cache server.
- 49:41Like it'll ask from the place it actually comes from.
- 49:43And if it's not there, it'll get it from S3.
- 49:45But if it is there, it'll serve it off disk.
- 49:47And the reason is like that I'm even doing that is if for some reason I need to stop doing that or it goes down,
- 49:54then I can just flip a switch and it'll fill back to S3.
- 49:58So S3 is always there as like a reliable backend for the media content.
- 50:03And as far as like updating the content on the website goes, like you...
- 50:08There's like a little editor backend I built.
- 50:10Okay.
- 50:11Yeah.
- 50:11Yeah.
- 50:11Like a little web form or something where you could...
- 50:13Yeah, exactly.
- 50:13Like, you know, four or five pages that'll edit episodes, edit guests, things like that.
- 50:18Yeah.
- 50:18It's interesting.
- 50:18Like I was just thinking like maybe a big part of the, you know, different approaches there is for your workflow
- 50:24because it's so, it's heavily media based, right?
- 50:26Like the deliverable is an MP3 file.
- 50:29Yeah.
- 50:29And so...
- 50:30There's a lot of steps I can't avoid no matter what, right?
- 50:32Yeah.
- 50:32Yeah.
- 50:33And it's like a different, you know, when I compare this, for example, to RealPython,
- 50:37RealPython is more like a multi-user online magazine, really, right?
- 50:42Yeah.
- 50:42Like from the backend perspective.
- 50:43And Django is great for that because it was built for that purpose, you know, at a news organization.
- 50:48And so, at a newspaper journal.
- 50:50And so, it was like a perfect natural fit for that because it gives you all this like amazing admin interface and all that stuff.
- 50:57But when you're doing a podcast, like a lot of the technical aspects, you got to build a custom workflow for that anyway.
- 51:03Like because a lot of it is like audio processing distribution and the content delivery.
- 51:08Whereas with more like a magazine-based site, it's more you're doing a website.
- 51:13You need multiple people interacting with the site side of things, right?
- 51:15Yeah.
- 51:16Yeah.
- 51:16Where my main work is on the media locally and it just happens to be delivered there.
- 51:20Yeah.
- 51:21Interesting.
- 51:21Here's the thing.
- 51:22It's like, could I change things to do something better?
- 51:24Maybe, maybe not.
- 51:26But it's like...
- 51:26It's all relative.
- 51:27And it's just, it's working so well for me.
- 51:29Like it's totally spot on.
- 51:31So, and I'm happy.
- 51:32So, you know, it's all good.
- 51:33Yeah.
- 51:33Yeah.
- 51:33No, for sure.
- 51:34I think, yeah, that's like the biggest thing to keep in mind there that it's all...
- 51:38As long as it works, there's not necessarily like...
- 51:41There's not a huge benefit to improving things much beyond that point.
- 51:45I mean, I want to rewrite things all the time.
- 51:47But realistically, you want extra...
- 51:49It's a diminishing returns thing.
- 51:50Right.
- 51:50Absolutely.
- 51:51For example, like you launched your mobile apps now.
- 51:53Right.
- 51:54That is a huge thing.
- 51:55Instead, you could have spent the last year like rewriting all of your existing infrastructure.
- 51:59Right.
- 51:59Exactly.
- 51:59So, it's in the hottest new framework.
- 52:01It could be all Vue.js or whatever.
- 52:03Right.
- 52:03Like on Docker.
- 52:04But whatever.
- 52:05I got my mobile app and that adds true value.
- 52:07Right.
- 52:08When you're a small group of people working on something, you got to focus where it counts.
- 52:12So, maybe that's worth talking about a little bit.
- 52:14You know, people ask, you know, did I use Python for my mobile apps?
- 52:17So, people who don't know, released two apps where you can take the courses in a much better
- 52:24way on iOS or Android phones or tablets, whatever.
- 52:27Right.
- 52:27There's a lot of...
- 52:28Especially on iOS, there's a lot of limitations to trying to do that through even a nice web
- 52:32app.
- 52:32It's just not the same.
- 52:35So, having something truly native there was super important to me.
- 52:39And I've wanted to do it for a long time.
- 52:40And I knew it was going to set me back in terms of productivity and getting stuff done.
- 52:44But I finally broke down and did it.
- 52:46So, I guess the first question is what's it built in, huh?
- 52:49Yeah.
- 52:49Is it Python?
- 52:50Man, I wish it was Python.
- 52:52I tried to make it Python.
- 52:53I even looked at Ionic for a while.
- 52:56Ionic's pretty cool.
- 52:56But I wanted something native for iOS, something native for Android.
- 53:01I didn't want to do Kotlin and Swift.
- 53:03I have a decent amount of experience with C#.
- 53:06Right.
- 53:07And the JavaScript.
- 53:08So, the two choices were do something with Cordova phone gap type of thing, maybe on Ionic and some front-end framework there.
- 53:15Or do something native with C# and Xamarin.
- 53:17So, Xamarin takes your code and compiles it down to native instructions on iOS and on Android.
- 53:23And it's like a true native app.
- 53:24So, that's what I ended up doing.
- 53:25And as far as the native apps go, like the mobile apps in this case, I think you've done some experimentation in the past, too, with like Electron and stuff like that.
- 53:35Yeah.
- 53:35That's more for the desktop side.
- 53:36Yeah.
- 53:36I had originally like prototyped it out with Electron.js.
- 53:39And I was going to like move that to Ionic because they have the widgets that look native on the devices.
- 53:44And they're just like, it was a constant whack-a-mole.
- 53:47Like, I fixed this.
- 53:48Boom, that broke.
- 53:49I fixed this.
- 53:50Boom, that broke.
- 53:50And I'm just like, all right, this sucks.
- 53:51I don't want to do this.
- 53:52Like, let me try something else, you know.
- 53:54Yeah.
- 53:54You know, Xamarin is 100% free, right?
- 53:57So, that's cool.
- 53:58Plus, you were a C# developer in another life.
- 54:00Yeah, exactly.
- 54:00So, I had enough experience that that was not a horrible choice to me.
- 54:04Like, would I prefer to write in Python?
- 54:05Yes.
- 54:06But can I go write?
- 54:07In fact, what I did was I wrote the prototype in C# and WPF on Windows because I knew how to do that.
- 54:14I didn't know how to do it on iOS or Android.
- 54:16And then I hired a developer to help write that for the mobile stuff and just worked with them on that.
- 54:22And that was a really good experience.
- 54:24What was it like publishing these mobile apps?
- 54:27Because, I mean, we're, in a way, I feel like we're really jaded creating content for the web or programming stuff for the web.
- 54:32I guess what I could say is I didn't realize how good we had it.
- 54:35I'm serious.
- 54:38I mean, holy moly.
- 54:40Like, the stuff would break all the time.
- 54:41I would get builds from the guy I was working with and it would be like, oh, this doesn't work anymore.
- 54:46Oh, did you do a build clean rebuild all on it?
- 54:49No, I forgot.
- 54:50Oh, now it works.
- 54:52You know, you're like, what the heck is going on with this stuff?
- 54:54You know, then you hit the app store and the gatekeepers.
- 54:57And, oh, my God.
- 54:58It's so super scary.
- 55:01There was one person I was working with at Google and one person, presumably, I'm working with at Apple.
- 55:06And if both places rejected the app over and over.
- 55:11And it was like, well, if I can't make this person happy, the last four months of work go down the train.
- 55:16And my hope of having a mobile app are gone.
- 55:18And there's this person who is massively incompetent.
- 55:22Like, let me just give you, I'm not going to go too long, but I just want to say I have a lot of sympathy for mobile developers now.
- 55:28So, I submit the app on Android and the title is Talk Python Training Player, Talk Python Training Courses, something like that.
- 55:38Yeah.
- 55:38That's the title.
- 55:39The subtitle is Take Talk Python Courses on, you know, on your device.
- 55:43But in the description, it said Talk Python Training for Android is the best way to take our courses.
- 55:49You can learn Python.
- 55:51You can learn to be a web developer and so on.
- 55:53Boom, rejected.
- 55:53Why was it rejected?
- 55:55It was rejected because there is an app called Learn Python and I'm trying to impersonate it.
- 55:59Like, where do you get that?
- 56:00And eventually I see where it says you can learn Python here.
- 56:03I'm like, oh, they must think.
- 56:04But it's like not the title, not the subtitles.
- 56:06No graphics are about it.
- 56:08Like, but way down there's the word you can learn Python.
- 56:10It's no more verbs, man.
- 56:11It's all trademarks.
- 56:12So, I had to have an argument for four days because there's like a 12-hour turnaround period of it can say you can learn Python.
- 56:18And that doesn't mean it is associated with an app whose title is Learn Python.
- 56:22Eventually, the thing that broke that loose was, let's try a different word.
- 56:26Let's say it was physics or music.
- 56:28You want to, you can learn music with our app.
- 56:31Does that mean we are the app called Learn Music?
- 56:34No.
- 56:35But like, I had to have this conversation for days with this person.
- 56:38And if they just disagreed with me, they decided then I'm out of the app store.
- 56:43Yeah.
- 56:44You've made that investment to build the apps and somebody has worked on it for weeks and, you know, you have to coordinate everything.
- 56:50Like, I pay for it, you know, like pay for the development.
- 56:52Yeah.
- 56:52And you can't find out until you're done.
- 56:54Yeah.
- 56:54Right?
- 56:54You can't pre-submit it and see if they like it.
- 56:56Right?
- 56:56Yeah.
- 56:57You can't.
- 56:57That's what we're thinking.
- 56:58Yeah.
- 56:58Yeah.
- 56:58That's cool.
- 56:58Keep going.
- 56:59You do it all and you try to launch it and they say no.
- 57:02And it could be reasonable or it could be unreasonable.
- 57:04Yeah.
- 57:04Unreasonable.
- 57:05But anyway, I'm super happy they're out.
- 57:07I guess to round out that conversation, there's a bunch of APIs it works with.
- 57:10And of course, those APIs are all in Python on the server.
- 57:13But the thing you have on your phone is a Xamarin app, which is, I think, is a pretty cool thing that we have like 95% code reuse, visual designers, everything, and debuggers for it.
- 57:2495% code reuse across the various platforms and so on.
- 57:27I think that's going to help a lot in just keeping things manageable.
- 57:30Right?
- 57:31Because again, it's coming back to like, you're not 100 people working on infrastructure.
- 57:34I can't have a Kotlin team.
- 57:36Right?
- 57:36Like, I don't know what this stuff like.
- 57:37Yeah.
- 57:38And you've got to be able, in the worst case scenario, you've got to be able to go in and jump in and maybe do a bug fix or something.
- 57:42Yeah.
- 57:43Yeah.
- 57:43Something quick or whatever.
- 57:44Right?
- 57:44Like, if it were massive, I'd hire somebody.
- 57:46But other than that, like, yeah, you want to be able to at least take it over if you have to somewhat.
- 57:50Yeah.
- 57:51So, that worked pretty well.
- 57:52It's a really cool app.
- 57:53I mean, you showed me later and I installed it on my phone.
- 57:55And it's just really smooth and fast.
- 57:59Thanks.
- 57:59I think for a first release, like, it's really, really cool.
- 58:01Yeah.
- 58:02Yeah.
- 58:02I'm really happy how it came out.
- 58:04I'm glad we did it.
- 58:05But boy, it was a shaky process to get there.
- 58:08Yeah.
- 58:08Yeah.
- 58:08Not technically, but, like, approval and stuff.
- 58:10Yeah.
- 58:11I guess, you know, one more thing that I'd like to, like, sort of exchange.
- 58:14Well, I'm doing what you're doing just so people can know.
- 58:17Is, like, so, we have the stuff hosted.
- 58:20Like, you talked about Heroku.
- 58:21I got my servers and so on.
- 58:22But I also use AWS for a bunch of stuff.
- 58:25Even though I'm not on EC2.
- 58:27I'm not a huge fan of EC2.
- 58:28I think it's really expensive and really complicated.
- 58:31I think it's built for, like, running Netflix and other massively awesome things.
- 58:36But if I just want a server, you know, it's like, well, my security groups aren't, like,
- 58:41I just want a little firewall and I just want to, anyway, let's not make that a rant.
- 58:44But even though I'm not using AWS, I'm still using Elastic Transcoder.
- 58:48I'm using Simple Email Service.
- 58:50I'm using S3, Stripe.
- 58:53I've got Stripe, MailChimp.
- 58:55There's a bunch of other services that get involved here.
- 58:59Like, how about you?
- 59:00Like, what else are you using?
- 59:01It's so fun, or not fun, but it's hard to think about this and, like, remember all the
- 59:08services.
- 59:08I know.
- 59:08I'm sure I'm missing some.
- 59:09But, like, for me, like, in terms of software that I use, Redis plays a big role.
- 59:14Like, it's basically our caching system in between the database and, or not, you know, not in
- 59:19between in any sort of, like, physical direct sense, but, like, the Django app will talk to
- 59:22Redis and put some stuff there as a cache, like, the sessions live there.
- 59:25I was wondering, like, are you using anything like Memcached or Redis or any apps?
- 59:31I've considered using Redis for some of the search, like, build up a search index and
- 59:37put it there.
- 59:37But in the end, I'm just using MongoDB.
- 59:40Yeah.
- 59:40I mean, I'm using Postgres for a lot of things, like the full-text search.
- 59:45I was like, let's just see how far we can get with Postgres full-text search.
- 59:48And it's actually amazing how much modern databases can just do for you.
- 59:52Yeah, that's awesome.
- 59:53Where you, yeah, you don't have to invent this stuff from scratch or build your own index.
- 59:57Yeah.
- 59:57Yeah.
- 59:58As far as infrastructure goes, yeah, I've got, actually, PythonistaCafe.com is hosted
- 1:00:02on a DigitalOcean box.
- 1:00:04Okay.
- 1:00:04That's been really helpful.
- 1:00:05Yeah, awesome.
- 1:00:05And, yeah, I've been super happy with their service and, you know, just rock-solid hosting,
- 1:00:09I felt like.
- 1:00:09Let me throw one thing out there for people listening, by the way.
- 1:00:12If you're thinking about hosting and you want to be on Amazon, check out Amazon LightSail.
- 1:00:15Do you know about LightSail?
- 1:00:17It's, like, really small.
- 1:00:18So, it has the same pricing as DigitalOcean and Linode.
- 1:00:21In bandwidth.
- 1:00:22You get a free terabyte with a $5 server, which is $100 worth of bandwidth on S3 equivalent.
- 1:00:28Nice.
- 1:00:28And so, if you just want to be on Amazon, but you don't want all that stuff, like, and,
- 1:00:32you know, LightSail as well.
- 1:00:33Anyway, keep going.
- 1:00:34Yeah.
- 1:00:34Yeah.
- 1:00:34Yeah.
- 1:00:35Also use S3 and then CloudFlare as the CDN in front of everything.
- 1:00:40You do a lot with CloudFlare, right?
- 1:00:41Yeah.
- 1:00:41It's been incredibly useful.
- 1:00:42They have this great image transcoding service that is totally transparent to you, where they
- 1:00:47will recompress your images and do, like, a browser detection.
- 1:00:50So, if you're on Chrome or, like, modern Firefox, they will transcode your images to WebP
- 1:00:55and then serve them out.
- 1:00:56And that could, you know, reduce your image sizes to, like, basically half them.
- 1:01:00And I don't have to go and, on the back end, write the logic for, like, oh, does this
- 1:01:04specific version of Chrome support this format or Safari or whatever?
- 1:01:09No, it can't be WebP.
- 1:01:10It's got to be whatever.
- 1:01:11But they make that decision for you and they can update those rules for everybody.
- 1:01:14So, that's been incredibly helpful.
- 1:01:16I guess we're basically out of time, Dan.
- 1:01:18And there's, like, still so much more stuff we could talk about.
- 1:01:22Email, I think, would be super interesting.
- 1:01:24But maybe we'll do another one of these if there's interest.
- 1:01:27Yeah, I guess we could come back.
- 1:01:28I guess one other thing that people ask a lot that I just want to throw out there, it's,
- 1:01:31like, why MongoDB and NoSQL versus relational?
- 1:01:34Oh, yeah, yeah, yeah.
- 1:01:35Yeah.
- 1:01:35And to me, like, it's just the modeling stuff in the NoSQL database is really easy.
- 1:01:40But the one thing I really love is, like, I've not done a database migration in two years.
- 1:01:44Right?
- 1:01:45But the data models have changed a lot.
- 1:01:46Right?
- 1:01:46Because the document databases or schema can just adapt most of the time to the new classes,
- 1:01:51especially if it's additive and not subtractive.
- 1:01:53You've never been burned by that?
- 1:01:55Like, I kind of like having a schema I can trust.
- 1:01:58Yes.
- 1:01:58So here's the reason I don't think I've been burned by it is I have, to me, I know the schema
- 1:02:03safety structure is in the app code.
- 1:02:06So I have a special tier whose job it is to just talk to the database.
- 1:02:10And it always enforces the schema.
- 1:02:12And, like, I never, ever talk to it anyway other than through that part of code.
- 1:02:16Okay.
- 1:02:16And so...
- 1:02:17The schema is in the business code.
- 1:02:18There is still a schema because otherwise the code won't run.
- 1:02:21Yeah.
- 1:02:22But if you just ad hoc it or if you have five apps to talk to it and they don't share
- 1:02:25that bit, then you very well could get burned.
- 1:02:28So I'm just super careful because I've done it before.
- 1:02:30And I think, like, if you're the sole developer working on it, I think that's a great model
- 1:02:35too, right?
- 1:02:35Where, yeah, you can take these shortcuts and they're basically fine.
- 1:02:38But as soon as you have, like, I don't know, if you have a team of, like, 50 people working
- 1:02:42on an application, then that stuff just starts breaking, like, every single day, right?
- 1:02:45Where it's like, oh, who put a bunch of strings into this integer field?
- 1:02:50Exactly.
- 1:02:51Yeah, but for example, I use MongoEngine, which is like SQLAlchemy or Django ORM, and
- 1:02:56it will not let you put strings where integers go, for example, right?
- 1:02:59So the safety is in the data access layer, but it's not that it's not there.
- 1:03:03You know what I mean?
- 1:03:04Right, right.
- 1:03:04It's just shifted, like, it lives in the application versus the database.
- 1:03:07It's kind of like the monolith versus microservice conversation as well, right?
- 1:03:11Yeah.
- 1:03:11Is there anything that we both really wanted to talk about, but we haven't yet?
- 1:03:17I feel like we covered a lot of stuff.
- 1:03:19We haven't really talked about Python bytes, I think, the infrastructure for that.
- 1:03:23Well, Python bytes is pretty much like a fork of Talk Python.
- 1:03:26Nice.
- 1:03:27So it's real, real similar.
- 1:03:28Yeah.
- 1:03:28I mean, it's got its own instance of an app and database and stuff, but it's basically the
- 1:03:32same.
- 1:03:33We got the training stuff.
- 1:03:34I think that's pretty much, I guess.
- 1:03:35If you were to do this all over again, like right now, and you had a month to rebuild it,
- 1:03:39like infinite time to rebuild it, how would you do anything different?
- 1:03:43I don't know that I would do too much different.
- 1:03:45Like, I'm really happy where things are.
- 1:03:48Like, it doesn't go down.
- 1:03:49It's easy to maintain.
- 1:03:50It's cost effective.
- 1:03:52The way I got here was like a circuitous path of like, oh, I'm going to try this platform
- 1:03:56as a service thing.
- 1:03:57Oh, it's kind of not really reliable.
- 1:03:59Oh, I'm going to use SQLite so I don't have to deal with this other stuff.
- 1:04:02But like, oh, now things are outgrowing that.
- 1:04:04And just, I would have gone more towards either where I am or maybe towards Heroku or something
- 1:04:10like that, where you are, if I felt like a platform as a service would have made me happier.
- 1:04:15I don't think I would change too much, but I would have gotten to where I was a lot better.
- 1:04:19But like, that's more quickly, like that's the curse of knowledge, right?
- 1:04:23Like you kind of, how about you?
- 1:04:24Yeah, I feel the same.
- 1:04:26I mean, I'm pretty happy with how like all of the hosting aspects and the technical side
- 1:04:32of that.
- 1:04:33I think, I mean, it's much more about creating.
- 1:04:35I have to continuously remind me of that, right?
- 1:04:38where like the goal of this business is to provide really, really good training material
- 1:04:43to people and to enable people to learn better and become better Python programmers.
- 1:04:48Right.
- 1:04:48Neither of us are selling tech.
- 1:04:50We're selling content and education and experiences.
- 1:04:54And this is just the facilitation layer.
- 1:04:57Yeah.
- 1:04:57And so from that perspective, I'm super happy with the tech.
- 1:05:00And I think, you know, also considering that, what we just said, it's really important that
- 1:05:04it's fun to work with the tech and that we get to work with all these interesting tools
- 1:05:09and learn more about them so we can go out and teach others about them and share that.
- 1:05:13So from that perspective, yeah, I'm super happy.
- 1:05:15I mean, I would want to rewrite it in PHP or anything like that.
- 1:05:18No, definitely not.
- 1:05:20The themes, they're just not worth it.
- 1:05:22Don't do it.
- 1:05:23All right.
- 1:05:24Well, Dan, thanks for doing this.
- 1:05:27Don't like sort of interview me and sort of 50-50 hosting of the show today.
- 1:05:32I really appreciate it.
- 1:05:33It's been a ton of fun.
- 1:05:33Yeah.
- 1:05:33This is so cool to do this in person, like sitting next to each other.
- 1:05:36Like initially it was like, oh, you know, when we're talking to each other, there's no delay.
- 1:05:40Like usually there's like a 200 millisecond or I don't know how long delay is like over Skype.
- 1:05:42We talk over each other all the time because of the latency and stuff.
- 1:05:45Yeah, it's great.
- 1:05:46The bandwidth is awesome right here.
- 1:05:48Yeah.
- 1:05:48It's 3D too.
- 1:05:50It's all cool.
- 1:05:51Thank you, Dan, for doing this.
- 1:05:53And I can certainly recommend folks come out to PyCon next year.
- 1:05:56Hopefully you could see some of this live as well.
- 1:05:58Oh, yeah.
- 1:05:58No, it was great.
- 1:05:59It was, yeah, just a ton of fun.
- 1:06:01We're going to be, PyCon is going to be in Pittsburgh.
- 1:06:03So that's, I've never been to Pittsburgh.
- 1:06:05Me either.
- 1:06:05I'm looking forward to it.
- 1:06:06I'm looking forward to that.
- 1:06:06All right.
- 1:06:07Well, cheers.
- 1:06:08Thanks for being here.
- 1:06:08All right.
- 1:06:09Thanks so much for inviting me again.
- 1:06:10Bye.
- 1:06:11This has been another episode of Talk Python To Me.
- 1:06:15Our guest, or should I say guest host, was Dan Bader.
- 1:06:20And this episode's been brought to you by Linode and Backlog.
- 1:06:23Linode is your go-to hosting for whatever you're building with Python.
- 1:06:27Get four months free at talkpython.fm/linode.
- 1:06:31That's L-I-N-O-D-E.
- 1:06:32With Backlog, you can create tasks, track bugs, make changes, give feedback, and have team conversations
- 1:06:39right next to your code.
- 1:06:40Try Backlog for your team for free for 30 days using the special URL talkpython.fm/backlog.
- 1:06:47Want to level up your Python?
- 1:06:49If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
- 1:06:54Or if you're looking for something more advanced, check out our new async course that digs into
- 1:06:59all the different types of async programming you can do in Python.
- 1:07:02And of course, if you're interested in more than one of these, be sure to check out our
- 1:07:06everything bundle.
- 1:07:07It's like a subscription that never expires.
- 1:07:09Be sure to subscribe to the show.
- 1:07:11Open your favorite podcatcher and search for Python.
- 1:07:13We should be right at the top.
- 1:07:15You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 1:07:19and the direct RSS feed at /rss on talkpython.fm.
- 1:07:24This is your host, Michael Kennedy.
- 1:07:26Thanks so much for listening.
- 1:07:27I really appreciate it.
- 1:07:28Now get out there and write some Python code.
- 1:07:30Thank you.
- 1:07:37Thank you.
- 1:07:44Thank you.