Latest / Talk Python To Me / #531: Talk Python in Production
Transcript
- 0:00Christopher Trudeau: Have you ever thought about getting your small product into production,
- 0:02Christopher Trudeau: but are worried about the cost of the big cloud providers?
- 0:05Christopher Trudeau: Or maybe you think your current cloud service is over architected
- 0:08Christopher Trudeau: and costing you too much?
- 0:10Christopher Trudeau: Well, in this episode, we interview Michael Kennedy, author of Talk Python
- 0:14Christopher Trudeau: in Production, a new book that guides you through deploying web apps
- 0:17Christopher Trudeau: at scale with right sized engineering.
- 0:20Christopher Trudeau: This is Talk Python To Me, episode 531, recorded November 26, 2025.
- 0:44Christopher Trudeau: Welcome to Talk Python To Me, a weekly podcast on Python.
- 0:48Christopher Trudeau: This is your guest host, Christopher Trudeau.
- 0:50Christopher Trudeau: Follow me on bluesky, where I'm trudeau.dev.
- 0:53Christopher Trudeau: You can follow the podcast or this week's guest on Mastodon, @talkpython for the show
- 0:59Christopher Trudeau: and @mkennedy for the guest, both on fosstodon.org.
- 1:03Christopher Trudeau: And keep up with the show and listen to over nine years of episodes at talkpython.fm.
- 1:09Christopher Trudeau: If you want to be part of our live episodes, you can find the live streams over on YouTube,
- 1:14Christopher Trudeau: subscribe to our YouTube channel at talkpython.fm/youtube and get notified about upcoming shows.
- 1:21Michael Kennedy: Look into the future and see bugs before they make it to production.
- 1:25Michael Kennedy: Sentry's Seer AI code review uses historical error and performance information at Sentry
- 1:30Michael Kennedy: to find and flag bugs in your PRs before you even start to review them.
- 1:35Michael Kennedy: Stop bugs before they enter your code base.
- 1:37Michael Kennedy: Get started at talkpython.fm/seer-code-review.
- 1:42Michael Kennedy: And it's brought to you by Agency.
- 1:44Michael Kennedy: Discover agentic AI with Agency.
- 1:47Michael Kennedy: Their layer lets agents find, connect, and work together.
- 1:50Michael Kennedy: Any stack, anywhere.
- 1:51Michael Kennedy: Start building the internet of agents at talkpython.fm/agency spelled A-G-N-T-C-Y.
- 1:58Christopher Trudeau: Michael, welcome to Talk Python To Me.
- 2:00Christopher Trudeau: You know, I looked it up.
- 2:01Christopher Trudeau: You've been on the show more than anyone else.
- 2:03Christopher Trudeau: But in case there's new listeners, tell us a bit about yourself.
- 2:06Michael Kennedy: Incredible.
- 2:07Michael Kennedy: Good to be here with you, Christopher.
- 2:09Michael Kennedy: A bit of a turn of the tables, I would say.
- 2:13Michael Kennedy: And it's, you know, long time listeners, I'm sure they know all the little details because
- 2:18Michael Kennedy: I work them in here and there.
- 2:20Michael Kennedy: I think that's kind of fun to just make things personal.
- 2:22Michael Kennedy: But I've also said this on the show,
- 2:24Michael Kennedy: and I'm sure it's a surprising fact that you know as well,
- 2:27Michael Kennedy: but over half of the people in the Python space
- 2:30Michael Kennedy: have only been here for two years.
- 2:31Christopher Trudeau: Yeah, I keep seeing that stat.
- 2:33Christopher Trudeau: Yep.
- 2:34Michael Kennedy: That's crazy, right?
- 2:34Michael Kennedy: So even if people, you know,
- 2:36Michael Kennedy: I told this story about my background five years ago,
- 2:39Michael Kennedy: like those people weren't here, like half of them.
- 2:41Michael Kennedy: So crazy, crazy stuff.
- 2:43Michael Kennedy: All right, so my backstory, I was,
- 2:47Michael Kennedy: I thought I would be a mathematician.
- 2:48Michael Kennedy: I studied math.
- 2:49Michael Kennedy: stuff like that in college, was working on my PhD,
- 2:53Michael Kennedy: started doing a bunch of work with silicon graphics,
- 2:57Michael Kennedy: mainframe, supercomputer type stuff
- 2:59Michael Kennedy: so that I could do my math research.
- 3:00Michael Kennedy: And I realized, wow, this programming stuff
- 3:02Michael Kennedy: is way more fun than math.
- 3:04Michael Kennedy: How do I change gears?
- 3:05Michael Kennedy: And so that was like 1998, 99.
- 3:09Michael Kennedy: Haven't looked back.
- 3:10Michael Kennedy: I've been programming since then and super fun,
- 3:13Michael Kennedy: a couple of languages and around 10, 11 years ago,
- 3:16Michael Kennedy: started Talk Python, year after that, quit my job.
- 3:19Michael Kennedy: Made Talk Python my full-time job.
- 3:22Michael Kennedy: Started offering courses as well.
- 3:23Michael Kennedy: That's something that people don't necessarily know.
- 3:26Michael Kennedy: That sometimes they'll ask, well, what do you do for your job, actually?
- 3:28Michael Kennedy: I'm like, well, we're doing it.
- 3:31Michael Kennedy: So anyway, that's me.
- 3:34Michael Kennedy: A super, super fan of Python.
- 3:36Michael Kennedy: Super fan of programming.
- 3:38Michael Kennedy: Every day I wake up just like, wow, how awesome is today?
- 3:40Michael Kennedy: Look at all the new stuff that came out that we learned that we can do.
- 3:43Michael Kennedy: Like new libraries, AI stuff these days.
- 3:47Christopher Trudeau: Yeah, there's always plenty to talk about.
- 3:49Michael Kennedy: It's incredible times.
- 3:50Michael Kennedy: It's incredible times.
- 3:51Christopher Trudeau: And you've added a new trophy to the mantle, I guess.
- 3:57Christopher Trudeau: You've written a book.
- 3:58Michael Kennedy: I have written a book.
- 4:00Michael Kennedy: You know, that's a little bit, I'll put it this way.
- 4:02Michael Kennedy: It's not something I ever saw myself doing, but I'm really excited that I did.
- 4:07Michael Kennedy: And yeah, it took, I spent a couple of months properly writing it.
- 4:12Michael Kennedy: You know, I really put in my energy in and like all projects, you think you're about done.
- 4:18Christopher Trudeau: Yeah, that first 80% is nothing like the last 80%.
- 4:22Michael Kennedy: No, and the last 5% is long.
- 4:25Michael Kennedy: You know, and it's not just the book.
- 4:28Michael Kennedy: It's like, okay, well, where am I going to sell it?
- 4:30Michael Kennedy: Okay, well, Amazon, and then I'll self-publish, or do I use a publisher?
- 4:34Michael Kennedy: You end up self-publishing it, but then you're like, how do I?
- 4:37Michael Kennedy: You know, all these things you learn for the first time.
- 4:39Michael Kennedy: Like, how do I get it into Amazon to sell even?
- 4:42Michael Kennedy: And there's a bunch of decisions.
- 4:44Christopher Trudeau: I can tell you, even with having taken the publishing route, it's no easier.
- 4:48Christopher Trudeau: It's just that it goes dark for two months and then all of a sudden it's like, you need
- 4:52Christopher Trudeau: to do this by yesterday.
- 4:53Christopher Trudeau: So yeah, it's not necessarily an advantage either way, I think.
- 4:57Christopher Trudeau: Yeah.
- 4:57Michael Kennedy: Yeah.
- 4:58Michael Kennedy: Yeah.
- 4:58Michael Kennedy: I was really on the fence and I thought, look, let me just try this myself.
- 5:03Michael Kennedy: I got a few podcast listeners.
- 5:04Michael Kennedy: I can let them know about it.
- 5:06Michael Kennedy: An audience helps.
- 5:08Michael Kennedy: I honestly think it was probably the right choice for me.
- 5:11Christopher Trudeau: And for those who haven't come across it yet, do you want to give us the one paragraph version?
- 5:17Michael Kennedy: Yeah.
- 5:17Michael Kennedy: So the book is called Talk Python in Production.
- 5:20Michael Kennedy: There are other books that are,
- 5:22Michael Kennedy: I'm pretty sure one is called Python in Production
- 5:24Michael Kennedy: or other things about how do you get your Python app
- 5:26Michael Kennedy: into production.
- 5:27Michael Kennedy: But this is Talk Python in Production
- 5:29Michael Kennedy: because it's sort of a dual role storytelling vehicle.
- 5:33Michael Kennedy: Obviously it's nonfiction, it's a technical book.
- 5:35Michael Kennedy: But the idea was, let me tell not a generic story
- 5:39Michael Kennedy: of how you might run some of your Python code in production,
- 5:42Michael Kennedy: mostly APIs, web apps, databases,
- 5:45Michael Kennedy: like that kind of stuff, right?
- 5:46Michael Kennedy: not a general story of that but my story right i i've been on this journey of not complete noob
- 5:55Michael Kennedy: but pretty significantly lost getting my original python app out into the world to pretty confident
- 6:03Michael Kennedy: running stuff in i think a simpler than usual way in a good way right i one of the things i really
- 6:11Christopher Trudeau: liked about the book is it's not quite changing gears but you you do a nice mix of sort of the
- 6:19Christopher Trudeau: decision making process versus the here's exactly what i did um and so you get a little bit of both
- 6:25Christopher Trudeau: and and honestly the decision making process is something i find often isn't there in a lot of
- 6:30Christopher Trudeau: work uh you know your your standard blog post is always well and then and then add exactly this to
- 6:36Christopher Trudeau: exactly this file um but i think i really really sort of enjoyed the and and this is what i tried
- 6:41Christopher Trudeau: and this is this is why i changed and you're very kind of humble about it like it like a lot of
- 6:47Christopher Trudeau: folks who write this kind of content it's thou shalt do this and you're like this is the way
- 6:51Christopher Trudeau: i've told you yeah yeah this worked for me and uh yeah so so i really like the fact that you've
- 6:57Christopher Trudeau: you've kind of blended that in what what made you decide to do this like that what there so you said
- 7:03Michael Kennedy: you didn't really have the itch to go down the path so uh what i'm not sure i didn't have the
- 7:08Michael Kennedy: itch i just didn't think that it was something i was capable of ah i see okay you know what i mean
- 7:14Michael Kennedy: not not that i didn't think if i literally took two years of my life and went into like a cabin
- 7:20Michael Kennedy: the rose style or something i could come out with a book i'm pretty sure but given all the
- 7:25Michael Kennedy: constraints of like i have a family and i gotta keep top python running like in that sense i didn't
- 7:30Michael Kennedy: I didn't think I would be able to do it, but.
- 7:32Christopher Trudeau: - Yeah, it's perseverance more than anything else, I think.
- 7:35Christopher Trudeau: Yeah, yeah, for sure.
- 7:36Christopher Trudeau: - Exactly.
- 7:38Michael Kennedy: So, yeah, go ahead.
- 7:39Michael Kennedy: - Sorry, go ahead.
- 7:39Michael Kennedy: No, no, go ahead.
- 7:40Michael Kennedy: - You know, so why did I write it?
- 7:43Michael Kennedy: Two reasons.
- 7:44Michael Kennedy: One, I think it's an interesting story,
- 7:46Michael Kennedy: and I thought people would enjoy hearing it,
- 7:48Michael Kennedy: like the personal side that you mentioned a little bit.
- 7:50Michael Kennedy: I thought people would appreciate that.
- 7:52Michael Kennedy: And maybe more significantly,
- 7:55Michael Kennedy: I feel like a lot of the advice out there
- 7:58Michael Kennedy: in the tech space in general,
- 8:00Michael Kennedy: but for now we're focused on like,
- 8:02Michael Kennedy: how do I deploy my app sort of like Python plus DevOps
- 8:05Michael Kennedy: type of thing.
- 8:05Michael Kennedy: But I think a lot of the advice out there
- 8:08Michael Kennedy: is a little bit of a flex in the sense that,
- 8:12Michael Kennedy: oh, look at this, we're using these seven services
- 8:15Michael Kennedy: and then this technology,
- 8:17Michael Kennedy: and then we're auto scaling it with that.
- 8:18Michael Kennedy: And then we have these logs pumped over to this other thing.
- 8:21Michael Kennedy: You're like, whoa, okay, that's kind of cool.
- 8:23Michael Kennedy: But a lot of people who just have an app
- 8:26Michael Kennedy: they just want to go from like it works on my machine to look what I made they see that and go
- 8:32Michael Kennedy: I can't do that you know what it's not for me it's just like I can't spend $500 on this
- 8:38Michael Kennedy: infrastructure and I don't feel worthy if I don't have all you know like completely geo distributed
- 8:46Michael Kennedy: redundant databases and like you don't need that you know what I mean and people keep asking me
- 8:50Michael Kennedy: like hey Michael can you give me some advice I'm like well not that and finally I'm like let me
- 8:55Michael Kennedy: just tell the story you know and so that was a big motivation you see it in industry a lot
- 9:01Christopher Trudeau: it's sometimes referred to as you know resume based architecture right like it's a do we need
- 9:06Christopher Trudeau: this or is this because i'm trying to learn it um and i think there's always that oh some of it's
- 9:12Christopher Trudeau: aspirational right i we will be netflix and so you know we need to be on every continent and all
- 9:19Michael Kennedy: the rest of it and uh right right it's it's very aspirational it's like i'm going to build this app
- 9:23Michael Kennedy: And the reason I'm building it is it's going to take off.
- 9:26Michael Kennedy: And that day when the hockey stick hits, I'm ready.
- 9:30Christopher Trudeau: Yeah.
- 9:30Michael Kennedy: You know what I mean?
- 9:31Christopher Trudeau: There's also a, you know, I think there's a lack of recognition of the cost of both in
- 9:40Christopher Trudeau: energy and money, energy as in human effort.
- 9:42Christopher Trudeau: I'm not talking about electricity, of the next 1%, right?
- 9:47Christopher Trudeau: So like getting from 90% uptime to 95% uptime costs something.
- 9:52Christopher Trudeau: getting from 95 to 96 costs more than that and getting from 96 like and once you're getting into
- 9:58Christopher Trudeau: like the four nines five nines thing and then you know cloud flare goes down and you're all screwed
- 10:03Michael Kennedy: anyways right so it's so it's so ironic it is 100 ironic that you take all these steps and you employ
- 10:11Michael Kennedy: all these services and it's the complexity of those services that went down like yeah you know
- 10:16Michael Kennedy: this show will come out in a couple of weeks,
- 10:18Michael Kennedy: but we're just on the eve of basically three weeks
- 10:22Michael Kennedy: of important things going down.
- 10:24Michael Kennedy: First AWS, then Azure, and then GitHub.
- 10:28Michael Kennedy: And also, and then Cloudflare, so let's put that as four,
- 10:30Michael Kennedy: within three weeks, right?
- 10:32Michael Kennedy: And the AWS one was like, the reason it went down
- 10:36Michael Kennedy: is DynamoDB had some sort of DNS problem.
- 10:40Michael Kennedy: Even if you're not using that, the thing you're using,
- 10:42Michael Kennedy: Like Lambda depends upon DynamoDB for itself to work.
- 10:46Michael Kennedy: So it was just like a cascade of kabang, right?
- 10:49Michael Kennedy: And that's a little bit of this complexity.
- 10:51Michael Kennedy: Like the more complexity you buy in,
- 10:53Michael Kennedy: even if it's not yours, it is yours in a sense.
- 10:56Christopher Trudeau: Yeah, yeah.
- 10:56Christopher Trudeau: And there's always humans involved, right?
- 10:58Christopher Trudeau: So there's always fallibility somewhere, right?
- 11:03Christopher Trudeau: Although one of the arguments I have seen recently
- 11:05Christopher Trudeau: in response to the Cloudflare outages,
- 11:08Christopher Trudeau: the good news is if you're, you know,
- 11:10Christopher Trudeau: I saw some articles that were like,
- 11:11Christopher Trudeau: well, you shouldn't be dependent on Cloudflare.
- 11:13Christopher Trudeau: And I saw the counter articles were basically,
- 11:15Christopher Trudeau: you know what, when half the internet's down,
- 11:17Christopher Trudeau: no one's hassling you that your app is down
- 11:19Christopher Trudeau: because half the internet's down.
- 11:21Christopher Trudeau: So there is an excuse when it isn't your fault.
- 11:25Christopher Trudeau: So yeah, anyways.
- 11:26Christopher Trudeau: That is true.
- 11:27Michael Kennedy: And you don't see what Cloudflare saved people.
- 11:31Christopher Trudeau: Yes.
- 11:31Michael Kennedy: Right?
- 11:32Michael Kennedy: I'm not using Cloudflare.
- 11:34Michael Kennedy: I actually use bunny.net.
- 11:35Michael Kennedy: But CDNs make it possible for your app
- 11:38Michael Kennedy: to survive these spikes in ways
- 11:40Michael Kennedy: that they very well may not with without and certainly the ddos type of stuff that they protect
- 11:45Christopher Trudeau: against well and i use it simply for certificates like google decided everyone shall be https even
- 11:52Christopher Trudeau: my sites that don't need it and rather than try to figure out automation for let's encrypt has
- 11:58Christopher Trudeau: gotten a lot better but when i first started it it was like and i need this and i need this and i
- 12:03Christopher Trudeau: need this and then the cron job could go down or it's like or i can stick cloud fire in front of it
- 12:07Christopher Trudeau: and I never have to think about it ever again, right?
- 12:09Christopher Trudeau: So yeah, there's a little bit of value that way.
- 12:12Michael Kennedy: Yeah, there definitely, definitely is.
- 12:14Michael Kennedy: Another thing I want to kind of bring back a little bit
- 12:16Michael Kennedy: is that you opened this segment on.
- 12:19Michael Kennedy: You said, like I shared the human side of the story
- 12:22Michael Kennedy: in kind of a humble way.
- 12:24Michael Kennedy: Like that was certainly something,
- 12:26Michael Kennedy: that was one of the main goals, like I said.
- 12:27Michael Kennedy: I think it's just a continuation of the podcast, right?
- 12:30Michael Kennedy: I started the podcast 10 years ago and I'm like,
- 12:33Michael Kennedy: when I got into Python, there were no Python podcasts.
- 12:36Michael Kennedy: there had been but there were none at the time and i'm like there's all these cool libraries i want
- 12:40Michael Kennedy: to hear the stories and the humanity and you go to the documentation and you're like cool
- 12:45Michael Kennedy: technology sterile as can be and the reason technology is interesting is not just because
- 12:52Michael Kennedy: there's an api i can call this but it's like it's a journey and it's a story and it's so i just
- 12:58Christopher Trudeau: wanted to do that again in the book it's all problem solving right and and there has to have
- 13:02Christopher Trudeau: have been a problem for someone to want to solve it, which means there's going to have been people
- 13:06Christopher Trudeau: involved in trying to figure out what that is. Yeah. I think a lot of people maybe, I don't know,
- 13:10Michael Kennedy: I shouldn't speak for people. It seems to me though, like a lot of people, they look at a
- 13:15Michael Kennedy: technology and they think, they just assess it as a dry, sterile sort of thing on its own. That was
- 13:22Michael Kennedy: created in a context, right? Why was celery created? Not just so I can send events to it and
- 13:30Michael Kennedy: like, you know, add more complexity and asynchronous, it solved a real problem.
- 13:35Michael Kennedy: And if you, if you hear and you understand and you, you follow that journey, you're like,
- 13:39Michael Kennedy: I see this is where this come from and why it exists.
- 13:42Michael Kennedy: Then you can decide, is it for me?
- 13:45Michael Kennedy: Right.
- 13:45Christopher Trudeau: Well, and, and I think doubly so in the, in the open source space, because like this is
- 13:51Christopher Trudeau: all volunteer work.
- 13:52Christopher Trudeau: And so knowing a little bit about who's doing what and, you know, humanizing that a little
- 13:58Christopher Trudeau: bit.
- 13:59Christopher Trudeau: Right.
- 13:59Christopher Trudeau: Their motivation.
- 14:01Christopher Trudeau: Yeah.
- 14:01Christopher Trudeau: And it's also easier to be grateful, right?
- 14:03Christopher Trudeau: Like this isn't some soulless corporate machine.
- 14:05Christopher Trudeau: There was a reason behind this and a driver behind it.
- 14:09Michael Kennedy: This portion of Talk Python To Me is brought to you by Sentry.
- 14:13Michael Kennedy: Let me ask you a question.
- 14:15Michael Kennedy: What if you could see into the future?
- 14:17Michael Kennedy: We're talking about Sentry, of course.
- 14:19Michael Kennedy: So that means seeing potential errors, crashes, and bugs before they happen.
- 14:24Michael Kennedy: Before you even accept them into your code base.
- 14:26Michael Kennedy: That's what Sentry's AI Seer code review offers.
- 14:30Michael Kennedy: You get error prediction based on real production history.
- 14:34Michael Kennedy: AI Seer Code Review flags the most impactful errors your PR is likely to introduce before merge using your app's error and performance context, not just generic LLM pattern matching.
- 14:46Michael Kennedy: Seer will then jump in on new PRs with feedback and warning if it finds any potential issues.
- 14:52Michael Kennedy: Here's a real example.
- 14:53Michael Kennedy: On a new PR related to a search feature in a web app, we see a comment from seer by sentry bot in the PR.
- 15:02Michael Kennedy: And it says, potential bug, the process search results function can enter an infinite recursion when a search query finds no matches.
- 15:10Michael Kennedy: As the recursive call lacks a return statement and a proper termination condition.
- 15:15Michael Kennedy: And Seer AI code review also provides additional details which you can expand for further information on the issue and suggested fixes.
- 15:23Michael Kennedy: And bam, just like that, Sear AI Code Review has stopped a bug in its tracks without any
- 15:29Michael Kennedy: devs in the loop.
- 15:30Michael Kennedy: A nasty infinite loop bug never made it into production.
- 15:33Michael Kennedy: Here's how you set it up.
- 15:34Michael Kennedy: You enable the GitHub Sentry integration on your Sentry account, enable Sear AI on your
- 15:40Michael Kennedy: Sentry account, and on GitHub, you install the Sear by Sentry app and connect it to your
- 15:45Michael Kennedy: repositories that you want it to validate.
- 15:47Michael Kennedy: So jump over to Sentry and set up Code Review for yourself.
- 15:50Michael Kennedy: Just visit talkpython.fm/seer-code-review.
- 15:54Michael Kennedy: The link is in your podcast player show notes and on the episode page.
- 15:58Michael Kennedy: Thank you to Sentry for supporting Talk Python and me.
- 16:02Christopher Trudeau: Inside the book, you've added a couple of things that are a little sort of non-standard,
- 16:08Christopher Trudeau: like the audio reader briefs and the galleries.
- 16:11Christopher Trudeau: You want to give a quick rundown?
- 16:13Christopher Trudeau: And speaking of motivation, what motivated you to include those things?
- 16:18Michael Kennedy: - So let me describe what they are first,
- 16:20Michael Kennedy: 'cause they are weird,
- 16:21Michael Kennedy: but they're weird in a good way, I think.
- 16:23Michael Kennedy: So if you go to the book,
- 16:26Michael Kennedy: my vision was somebody's gonna be reading this,
- 16:29Michael Kennedy: very likely on a Kindle,
- 16:30Michael Kennedy: and if I go and put really nice diagrams, pictures, whatever,
- 16:36Michael Kennedy: how good is that gonna look in a Kindle paper white,
- 16:39Michael Kennedy: black and white, you know what I mean?
- 16:40Michael Kennedy: Like how hard is that going to be to read?
- 16:42Michael Kennedy: I think it's gonna be hard is what I decided.
- 16:44Michael Kennedy: And so what I ended up doing is I said, okay,
- 16:48Michael Kennedy: How can I make it better for people so that when they want to work with code, it's not trapped inside your Kindle or your iPad, Apple Books or wherever you read it, but it's super accessible, right?
- 17:00Michael Kennedy: So what I did is I created some things I called galleries, and there's a code gallery, a figure gallery, and a links gallery.
- 17:07Michael Kennedy: And these are just like, they're kind of like an index of those things.
- 17:11Michael Kennedy: So like the links one just says, hey, here's all the URLs that we talked about in chapter 10 or chapter 11.
- 17:17Michael Kennedy: and just the sentence that contains them.
- 17:19Michael Kennedy: So instead of trying to go back through
- 17:21Michael Kennedy: and flipping through the book,
- 17:22Michael Kennedy: like, where was that thing they talked about, right?
- 17:24Michael Kennedy: Like, no, you just go to the gallery
- 17:26Michael Kennedy: and you click on the chapter
- 17:27Michael Kennedy: or you just do command F.
- 17:29Michael Kennedy: There it is, you know what I mean?
- 17:30Michael Kennedy: And also for, especially for the figures,
- 17:32Michael Kennedy: like it has like 2,000 or 4,000
- 17:37Michael Kennedy: by whatever level pictures
- 17:39Michael Kennedy: that you're not even allowed to put into
- 17:42Michael Kennedy: like a Kindle book.
- 17:42Michael Kennedy: They're like, no, we're going to redo those,
- 17:45Michael Kennedy: rescale those images for you
- 17:46Michael Kennedy: down to something fuzzy, right?
- 17:47Michael Kennedy: So if you want to read like little tiny texts, I put it there.
- 17:51Michael Kennedy: So that's the galleries.
- 17:51Michael Kennedy: And I was just maybe a little bit more backstory here is when I wrote this,
- 17:56Michael Kennedy: I've worked with other type of editing things, any tools.
- 17:59Michael Kennedy: I'm just like, I need to write this and I need to get this done in a super fluid
- 18:04Michael Kennedy: way.
- 18:05Michael Kennedy: So I'm just going to write in Markdown.
- 18:07Christopher Trudeau: Right.
- 18:07Michael Kennedy: Just writing in Markdown.
- 18:09Michael Kennedy: And so what I did is I, of course there's book publishing things that you can put
- 18:13Michael Kennedy: Markdown into and so on.
- 18:14Michael Kennedy: But I'm like, I'm just going to write one markdown file per chapter and then write some Python program to assemble that in interesting ways.
- 18:23Michael Kennedy: Right.
- 18:23Michael Kennedy: And then turn that into an EPUB or PDF or Kindle or whatever through something called Pandoc.
- 18:29Michael Kennedy: Are you familiar with Pandoc?
- 18:30Christopher Trudeau: I've heard of it.
- 18:31Christopher Trudeau: Yeah.
- 18:31Michael Kennedy: If you go and look, for people who don't know what Pandoc is, if you go look at Pandoc, it has right on the web page, it has this like fuzzy thing on the right.
- 18:40Michael Kennedy: It's like gray fuzzy.
- 18:41Michael Kennedy: You know, what is that?
- 18:43Michael Kennedy: this thing on the right shows you all the formats that go in and all the formats that could come out
- 18:49Michael Kennedy: and it's it's insane like you can't even the line is just the lines connecting the graphs of these
- 18:55Michael Kennedy: things it's just a black blob like i could put a haddock uh a haddock document whatever that is
- 19:02Michael Kennedy: it convert that to a doc book four right i mean it's insane okay so what i did is i built this
- 19:07Michael Kennedy: Python, simple Python thing that reassembles Markdown in certain ways and then feed the
- 19:13Michael Kennedy: final thing that it built into Pandoc to get the different ebook formats.
- 19:16Christopher Trudeau: Right, right.
- 19:17Christopher Trudeau: Okay.
- 19:17Michael Kennedy: But then it occurred to me, like, so I didn't start out with these gallery type things or
- 19:22Michael Kennedy: other stuff, but I'm like, well, this is just Python against Markdown.
- 19:27Michael Kennedy: Surely I can start pulling out all the links and pulling out the images and then writing
- 19:30Michael Kennedy: them somewhere else and then just committing that to GitHub.
- 19:33Michael Kennedy: So once, you know, it's kind of just the standard story of Python or programming in general,
- 19:38Michael Kennedy: but I think it's extra common in Python.
- 19:40Michael Kennedy: It's like, I started solving the problem with Python.
- 19:42Michael Kennedy: And once that was in place, it's like the next block and the next thing is just like,
- 19:47Michael Kennedy: that's easy now.
- 19:47Michael Kennedy: And that's easy.
- 19:48Michael Kennedy: And these three things are also easy.
- 19:50Michael Kennedy: Let's just do that and just keep adding to it.
- 19:52Michael Kennedy: So that's where they came from is one, wanting to make sure people had a good experience
- 19:57Michael Kennedy: with like code resources, pictures, and so on.
- 20:00Michael Kennedy: But also it's just kind of following the lead of like, hey, let's just keep going.
- 20:04Christopher Trudeau: Well, and it's one of the beauties of an ebook.
- 20:08Christopher Trudeau: If dead tree copies, those things cost money.
- 20:11Christopher Trudeau: And so it's like, oh, I've got a great idea for six more appendices.
- 20:15Christopher Trudeau: And that's when you start going, oh, wait a second.
- 20:18Christopher Trudeau: I'm not going to add 300 pages to a 200 page book.
- 20:21Christopher Trudeau: Yeah, exactly.
- 20:22Christopher Trudeau: With an ebook, you can go, oh, yeah, here, we can make this referenceable in a couple
- 20:28Christopher Trudeau: different ways.
- 20:29Michael Kennedy: Right.
- 20:29Michael Kennedy: Yeah.
- 20:29Michael Kennedy: It's like it duplicates the images into, you know, maybe 20 more pages or something, but it's an ebook.
- 20:35Michael Kennedy: Who cares?
- 20:36Christopher Trudeau: Exactly.
- 20:36Christopher Trudeau: Yeah.
- 20:36Christopher Trudeau: Yeah.
- 20:37Christopher Trudeau: So, you know, over the history of the show, I think I've become familiar with your AI journey.
- 20:45Christopher Trudeau: And recently, it sounds like you've bought.
- 20:48Christopher Trudeau: It's your fairly big proponent.
- 20:51Christopher Trudeau: That being said, there's still a Made by Humans logo inside.
- 20:55Christopher Trudeau: Yeah.
- 20:57Christopher Trudeau: So I'm going to put you on the spot.
- 21:01Christopher Trudeau: Do you believe in it or not?
- 21:04Christopher Trudeau: Do I believe in it or not?
- 21:06Christopher Trudeau: So why made by humans?
- 21:09Michael Kennedy: Yeah, it's a really good question.
- 21:11Michael Kennedy: So I think there's a weariness of content generated by AI or assisted by AI meant to attract attention and build authoritative feelings about a thing.
- 21:26Michael Kennedy: when that authority or that skill set is not necessarily yours.
- 21:31Michael Kennedy: And that I still very much do not like.
- 21:34Michael Kennedy: If I wanted to create a blog, I mean, I guess I could do it.
- 21:37Michael Kennedy: It'd be a fun experiment, I guess, in sort of an evil way.
- 21:40Michael Kennedy: Like, what if I just go create a completely random blog
- 21:43Michael Kennedy: and I just have chat just bust out an article twice a day, every day,
- 21:48Michael Kennedy: of the thing that's on the top of Hacker News or something?
- 21:50Michael Kennedy: You know, just like, you could do that.
- 21:52Michael Kennedy: And actually, it might even be interesting.
- 21:54Michael Kennedy: I don't really even know.
- 21:56Michael Kennedy: but I don't want it. I don't want that. Right. And for this, I wanted to share my story,
- 22:01Michael Kennedy: not have AI create a book that has bullet points of my story. Right. Right. Yeah. So for me,
- 22:07Michael Kennedy: it was important to like write this. I wrote it a hundred percent by Michael, right. It took me
- 22:13Michael Kennedy: a lot of work. People's, I know like it got posted on like Reddit and I think hacker news somewhere.
- 22:19Michael Kennedy: There was a bunch of comp and they're like, Oh, this thing is definitely just AI generated. I'm
- 22:25Christopher Trudeau: felt not AI generated to me. If it makes you feel any better, I've had actually comments pop up on
- 22:32Christopher Trudeau: some of my video courses claiming that my voiceover was AI. So that's just the world we live in now.
- 22:39Michael Kennedy: It's the world we live in and there's not a lot you can do with it. So just kind of put a little
- 22:43Michael Kennedy: bit of a pushback against that. I did put like a prefix sort of thing and a label that says
- 22:50Michael Kennedy: made by humans. And you know, what's really funny is I don't know if I can actually find that section.
- 22:55Michael Kennedy: I don't think I can on just the web part, but I made a picture.
- 22:59Michael Kennedy: Maybe I did.
- 23:00Michael Kennedy: Humans?
- 23:01Michael Kennedy: No.
- 23:01Michael Kennedy: Anyway, I made a picture that I drew.
- 23:03Michael Kennedy: I literally, I'm a big fan of Pixelmator Pro.
- 23:07Michael Kennedy: I went into Pixelmator Pro and I drew it.
- 23:09Michael Kennedy: And they said, proof that this is AI generated.
- 23:12Michael Kennedy: Look at that stupid made by humans graphic.
- 23:14Michael Kennedy: It's clearly AI generated.
- 23:15Christopher Trudeau: It would be way better if it wasn't generative.
- 23:17Christopher Trudeau: Yes.
- 23:19Michael Kennedy: Okay.
- 23:20Michael Kennedy: So how do I square that with me actually being quite a fan of AI stuff these days?
- 23:24Michael Kennedy: Like I'm, let's do like a looking back and then looking forward.
- 23:28Michael Kennedy: So let's go back 30 years.
- 23:30Michael Kennedy: I'm also a fan of using editors that when I hit dot, tell me what I can do with that function, class, variable, et cetera.
- 23:38Michael Kennedy: So I'm not constantly in the documentation, right?
- 23:42Michael Kennedy: Does that make me not a programmer?
- 23:44Michael Kennedy: I don't think so.
- 23:45Michael Kennedy: I'm still writing code.
- 23:46Michael Kennedy: I'm still thinking architecture.
- 23:47Michael Kennedy: I'm just not in the documentation constantly.
- 23:50Michael Kennedy: And honestly, I maybe don't memorize every little function and field of everything in the standard library, right?
- 23:57Michael Kennedy: It's fine.
- 23:57Michael Kennedy: That's not where our time is best spent.
- 23:59Michael Kennedy: And I feel that way about AI programming.
- 24:01Michael Kennedy: I think there's a lot of, there are pitfalls and there are worrisome aspects of it.
- 24:06Michael Kennedy: But you can use some of these agentic AI tools these days to think in so much higher level building blocks.
- 24:13Michael Kennedy: Think of like, I'm working in a function and I'm writing this part.
- 24:16Michael Kennedy: or I'm working in design patterns.
- 24:19Michael Kennedy: And I can think of these big sort of concepts.
- 24:22Michael Kennedy: Well, with this AI stuff, you can just say,
- 24:24Michael Kennedy: what if we had a login page?
- 24:25Michael Kennedy: Oh, we have a login page.
- 24:27Michael Kennedy: Now, what other building block do I need?
- 24:29Michael Kennedy: Like the building blocks are so big
- 24:31Michael Kennedy: and sort of non-critical software,
- 24:35Michael Kennedy: non-super important software becomes
- 24:38Michael Kennedy: so much cheaper than before.
- 24:40Michael Kennedy: You're like, I wish I had a little utility or app
- 24:42Michael Kennedy: that would do this,
- 24:43Michael Kennedy: but it just definitely doesn't justify
- 24:45Michael Kennedy: two weeks of work to have it. Like, what if it was a couple of prompts and half an hour? Like,
- 24:50Michael Kennedy: yeah, well then I'll have it. You know what I mean? And you can, that is transformative
- 24:55Christopher Trudeau: for how we work. Yeah. So much of coding is boilerplate, right? So if we can figure out how
- 24:59Christopher Trudeau: to make that easier, then why not? Right. And I haven't got there with it myself. I don't know
- 25:05Christopher Trudeau: whether I will. I'm definitely a little more suspicious of it than you are, but I copy and
- 25:11Christopher Trudeau: paste code all the time.
- 25:12Christopher Trudeau: And it's not like I'm like, oh, I have to hand tune that.
- 25:16Christopher Trudeau: No, it's like, well, I got to copy something that does that.
- 25:18Michael Kennedy: - Yeah, let me give you a concrete example
- 25:21Michael Kennedy: because I think it's easy to talk in generalizations
- 25:24Michael Kennedy: and people are like, well, that's not for me,
- 25:25Michael Kennedy: a bunch of AI slop, which is fair.
- 25:28Michael Kennedy: But I'll give you an example of one thing I'm like,
- 25:29Michael Kennedy: this was just such a nuisance and I'm gonna fix it.
- 25:33Michael Kennedy: So when I first built Talk Python, the website 10 years ago,
- 25:37Michael Kennedy: Bootstrap was all the rage, not modern Bootstrap,
- 25:40Michael Kennedy: like old Bootstrap, right?
- 25:41Michael Kennedy: Which they've completely redone the way
- 25:43Michael Kennedy: that you have to structure your HTML and CSS
- 25:48Michael Kennedy: completely, incompatibly, several times since then.
- 25:51Michael Kennedy: And until very recently, until this summer,
- 25:54Michael Kennedy: every time I wanted to add a feature or an aspect,
- 25:56Michael Kennedy: like for example, this whole section that hosts the book,
- 25:59Michael Kennedy: I wanna add that, well, you know what I had to do?
- 26:01Michael Kennedy: I had to go write like 10-year-old Bootstrap.
- 26:03Michael Kennedy: And I'm like, I hate it so much.
- 26:04Michael Kennedy: There's so much nicer tools I could be doing this.
- 26:07Michael Kennedy: but there's 8,000 lines of HTML and almost as many CSS.
- 26:12Michael Kennedy: Does it justify me rewriting that much UI
- 26:16Michael Kennedy: so that I can feel a little bit better
- 26:18Michael Kennedy: and use a little bit nicer UI tooling?
- 26:20Michael Kennedy: No, it definitely doesn't.
- 26:22Michael Kennedy: And so for a couple of years, I'm like,
- 26:25Michael Kennedy: oh, I wish I could do something else,
- 26:27Michael Kennedy: but it's not worth it.
- 26:28Michael Kennedy: And then I was sitting on my porch,
- 26:30Michael Kennedy: little back area with my computer in the summer,
- 26:31Michael Kennedy: hanging out, I'm like, you know what?
- 26:32Michael Kennedy: I bet Claude could do it.
- 26:34Michael Kennedy: Hey, Claude, rewrite all of this site.
- 26:37Michael Kennedy: make a plan and rewrite it, move it from Bootstrap 3 to Bulma, which is like simple tailwind,
- 26:43Michael Kennedy: and just completely do it. Four hours later, the whole thing was redone, like 20,000 lines of edits.
- 26:49Christopher Trudeau: Wow.
- 26:49Michael Kennedy: Done. And it wasn't perfect. I had to go, you messed up a little bit here. And actually,
- 26:53Michael Kennedy: that was right, but that doesn't look good anymore. So could you actually just make it look,
- 26:57Michael Kennedy: you know what I mean? But I mean, it was like half a day. That work was done.
- 27:00Michael Kennedy: Right.
- 27:00Christopher Trudeau: And that is a different level.
- 27:04Michael Kennedy: No, it would have been weeks to a month.
- 27:07Michael Kennedy: And it's the worst kind.
- 27:08Christopher Trudeau: It's like, okay, here's how the grid system used to work.
- 27:11Michael Kennedy: Let me restructure the HTML.
- 27:12Michael Kennedy: Oh, you lost a div?
- 27:14Michael Kennedy: Whoopsie.
- 27:15Michael Kennedy: Now how are you going to untangle this?
- 27:16Michael Kennedy: You know what I mean?
- 27:16Michael Kennedy: Like really, really not good stuff.
- 27:19Michael Kennedy: And you can just turn these tools on it.
- 27:20Michael Kennedy: And I'm like, you know, love it or hate it.
- 27:22Michael Kennedy: That is a skill and a power and a tool that is unlike things we've had before.
- 27:27Michael Kennedy: And so when I started having some of those kinds of experiences, I'm like, all right,
- 27:31Michael Kennedy: I need to pay attention to this.
- 27:32Michael Kennedy: I honestly think a lot of these AIs and LLMs,
- 27:35Michael Kennedy: they're kind of copyright theft and other types of things.
- 27:39Michael Kennedy: And there's the environmental aspect and all that.
- 27:41Michael Kennedy: But the thing is out of the box.
- 27:44Michael Kennedy: Pandora is on the loose, right?
- 27:46Michael Kennedy: So given that you're putting your head in the sand,
- 27:49Michael Kennedy: it's not going to make it go away.
- 27:51Michael Kennedy: Should you use it or not?
- 27:52Michael Kennedy: It's a very powerful tool.
- 27:53Michael Kennedy: And so that is what I'm excited about,
- 27:55Michael Kennedy: but I'm not excited about when I go to YouTube
- 27:58Michael Kennedy: and I see a video and you can just tell
- 28:00Michael Kennedy: that it's a voiceover plus some general,
- 28:02Michael Kennedy: or I go to read a blog and you can tell that it's like,
- 28:05Michael Kennedy: they didn't even put enough energy into like,
- 28:08Michael Kennedy: they spent less time writing than I have to read it.
- 28:10Michael Kennedy: That's not right.
- 28:10Michael Kennedy: There's something going wrong here.
- 28:12Christopher Trudeau: - Well, as with all tools,
- 28:13Christopher Trudeau: we'll figure out what works and what doesn't work.
- 28:16Christopher Trudeau: Those 8,000 files that you're talking about though,
- 28:19Christopher Trudeau: those are 8,000 files you have and built over time.
- 28:25Michael Kennedy: I suspect- - Lines, by the way, not files.
- 28:27Christopher Trudeau: - Lines, I'm sorry.
- 28:28Michael Kennedy: - I think it's a couple hundred files probably.
- 28:31Christopher Trudeau: so, but, so that might be something that folks listening aren't really aware of,
- 28:36Christopher Trudeau: right?
- 28:37Christopher Trudeau: Like, you're not just the, you know, the podcasts and the courses, but you're
- 28:42Christopher Trudeau: the guy behind the engineering behind all of it.
- 28:44Christopher Trudeau: So why, you know, why do that?
- 28:47Christopher Trudeau: Why not, you know, Squarespace or something along those lines didn't exist when you came
- 28:51Christopher Trudeau: out, but you get the idea.
- 28:52Christopher Trudeau: Like what, what, what, why spin it up yourself?
- 28:55Christopher Trudeau: How did you, how did you get there?
- 28:56Michael Kennedy: So it's a good question.
- 28:58Michael Kennedy: When I started, there were places I could have gone and hosted the podcast.
- 29:05Michael Kennedy: You know, they were very unappealing.
- 29:08Michael Kennedy: Not in the sense, like, as a consumer of it, like, they put your show there.
- 29:13Michael Kennedy: They were really ugly.
- 29:15Michael Kennedy: And they would do things like, next to your show, here's some other shows you might like.
- 29:18Michael Kennedy: You're like, no.
- 29:20Michael Kennedy: No, I don't.
- 29:21Michael Kennedy: I just got people to come to my page.
- 29:23Michael Kennedy: You're sending them away.
- 29:24Michael Kennedy: Like, don't do that.
- 29:25Michael Kennedy: Right.
- 29:25Michael Kennedy: But those sites are like Squarespace or whatever, and they're hosting a bunch of them.
- 29:29Michael Kennedy: And so they want engagement on their platform broadly.
- 29:33Michael Kennedy: They're not for you.
- 29:34Michael Kennedy: So initially I thought, well, plus I don't have a ton of experience writing Python code.
- 29:38Michael Kennedy: And if I'm going to do the podcast, the more I can get my hands on this stuff, get experience.
- 29:43Michael Kennedy: So I just sat down and really in like three days, I wrote the Talk Python website.
- 29:48Michael Kennedy: I'm like, I'm doing it this weekend.
- 29:50Michael Kennedy: You know what I mean?
- 29:50Michael Kennedy: I had a job at the time.
- 29:51Michael Kennedy: So I'm like, I got to do it.
- 29:52Michael Kennedy: It's a long weekend.
- 29:53Michael Kennedy: We're doing it.
- 29:53Michael Kennedy: And so I just sat there and cranked it out and really got a really good appreciation for building all the way to the end, you know, like not 60% or following a demo, but like, no, here's a fully working app and all the little nuances.
- 30:08Michael Kennedy: But then honestly, that's like the genesis of this, the story that is the book is, well, now how do I get it out there?
- 30:15Michael Kennedy: I built it.
- 30:16Michael Kennedy: It's fine.
- 30:17Michael Kennedy: It works great here locally.
- 30:19Michael Kennedy: Now, like, where do I take it?
- 30:21Michael Kennedy: Right.
- 30:21Michael Kennedy: And a lot of places said, well, you just fire up your Linux terminal and your SSH.
- 30:24Michael Kennedy: And I'm like, these words are making me very nervous.
- 30:27Michael Kennedy: I need them to not do that.
- 30:28Michael Kennedy: I need you to stop saying that.
- 30:31Christopher Trudeau: Don't forget to swing the chicken over your head.
- 30:35Christopher Trudeau: Exactly.
- 30:37Michael Kennedy: So I actually started in Python Anywhere, even before Anaconda owned them, which was the
- 30:45Michael Kennedy: selling point was you go to your browser.
- 30:47Michael Kennedy: You, I think you give it a get URL, or maybe, maybe you go into a terminally do a get plot.
- 30:53Michael Kennedy: I can't remember how it worked 10 years ago, but it was basically you go to the webpage,
- 30:57Michael Kennedy: you type in your domain, you get a terminal, which is basically an SSH connection, but
- 31:02Michael Kennedy: in the terminal, and then you give it some commands and then they manage it for you.
- 31:05Michael Kennedy: And I'm like, okay, I don't really have to know any Linux.
- 31:08Michael Kennedy: I just have to do the two things that says in the terminal.
- 31:10Michael Kennedy: And then they keep it running and they, they do the SSH key, the SSH certificates, the DNS,
- 31:17Michael Kennedy: that i'm like this i can do this and i got it going there and i was really proud and i ran
- 31:21Michael Kennedy: i ran talk python on basically python anywhere and sqlite for like six months first six months
- 31:27Michael Kennedy: but then it occurred to me that python anywhere is not really intended to host production level
- 31:33Michael Kennedy: applications and it occurred to me when i got an email from them one day again this is pre-anaconda
- 31:39Michael Kennedy: and what it said was we're going to be down for four hours as we do some maintenance that's not
- 31:46Michael Kennedy: going to be the best look for my podcast which is just now starting to gain some traction and getting
- 31:50Michael Kennedy: a lot of people talking on social media and saying hey there's a new podcast you should check
- 31:54Michael Kennedy: it out i'm like the four hours are not making me psyched like i understand that things might have
- 31:59Michael Kennedy: to reboot they might be down for 30 seconds but hours and hours seems a little like this is not
- 32:06Michael Kennedy: really what they intend this for it's like for hobbyists to put up a thing and i probably don't
- 32:10Christopher Trudeau: belong there anymore and once you shifted why not aws or azure or something like that so
- 32:16Michael Kennedy: So I looked around and I went to DigitalOcean.
- 32:19Michael Kennedy: So I'd done stuff with both Azure and AWS.
- 32:23Michael Kennedy: A little part that I left out about this web journey
- 32:25Michael Kennedy: is I had actually run some pretty big websites
- 32:30Michael Kennedy: in both AWS and Azure,
- 32:32Michael Kennedy: but they were Windows-based.NET type things, right?
- 32:36Michael Kennedy: So literally GUI sort of configuration hosting them
- 32:40Michael Kennedy: or platform as a service.
- 32:42Michael Kennedy: And I don't know, I looked at both of them,
- 32:45Michael Kennedy: especially Azure at the time,
- 32:46Michael Kennedy: I'm like, "Well, this is complicated,"
- 32:47Michael Kennedy: and like unnecessarily so,
- 32:49Michael Kennedy: and I'm afraid I'm trading one level of complexity
- 32:52Michael Kennedy: for another, and also really expensive,
- 32:55Michael Kennedy: like no joke expensive.
- 32:57Michael Kennedy: The podcast, like in terms of people viewing the pages,
- 33:00Michael Kennedy: is nothing insane, I mean, it's certainly popular,
- 33:03Michael Kennedy: but it's nothing like, how are you gonna handle that?
- 33:05Michael Kennedy: But the amount of traffic the podcasts and courses do
- 33:07Michael Kennedy: in terms of video and MP3s and even XML,
- 33:12Michael Kennedy: Like I think Talk Python ships about a gigabyte of,
- 33:15Michael Kennedy: no, a terabyte of XML.
- 33:17Michael Kennedy: Think about a terabyte of XML every month.
- 33:18Michael Kennedy: Like it's basically a distributed denial, a DDoS,
- 33:22Michael Kennedy: and a welcome DDoS attack,
- 33:25Michael Kennedy: because you'll think how many podcast players are out there
- 33:27Michael Kennedy: going, got a new one, got a new one,
- 33:28Michael Kennedy: got a new one, got a new one.
- 33:30Michael Kennedy: And each one of those requests is like a meg of XML or more.
- 33:35Michael Kennedy: You know, it's like, got a new one,
- 33:36Michael Kennedy: got a new one
- 33:42Michael Kennedy: certainly the courses and my bill was well over a thousand bucks and just bandwidth right and then
- 33:47Michael Kennedy: I looked at DigitalOcean and I'm like oh you mean it all that bandwidth is free it's included you
- 33:54Michael Kennedy: get like terabytes of free traffic with DigitalOcean or Hetzner or some of these smaller ones and I'm
- 34:01Michael Kennedy: just like yeah this is better like I don't know what I don't know what this stuff for is here
- 34:05Michael Kennedy: where they charge you know a hundred dollars a terabyte yeah just to ship stuff around it's crazy
- 34:10Christopher Trudeau: I have found, particularly professionally, it's like, oh, you're going to charge me for how many DNS lookups there are.
- 34:16Christopher Trudeau: That doesn't seem like something I can predict.
- 34:20Christopher Trudeau: Yes, I know.
- 34:22Christopher Trudeau: And quite frankly, if it reaches a certain level, I need you to turn it off because something's gone horribly awry.
- 34:31Michael Kennedy: This portion of Talk Python To Me is brought to you by Agency.
- 34:34Michael Kennedy: The Agency, spelled A-G-N-T-C-Y, is an open source collective building the Internet of Agents.
- 34:40Michael Kennedy: We're all very familiar with AI and LLMs these days, but if you have not yet experienced the
- 34:46Michael Kennedy: massive leap that agentic AI brings, you're in for a treat. Agentic AI takes LLMs from the world's
- 34:53Michael Kennedy: smartest search engines to truly collaborative software. That's where agency comes in. Agency is
- 34:59Michael Kennedy: a collaboration layer where AI agents can discover, connect, and work across frameworks.
- 35:05Michael Kennedy: For developers, this means standardized agent discovery tools, seamless protocols for interagent
- 35:11Michael Kennedy: communication, and modular components to compose and scale multi-agent workflows.
- 35:16Michael Kennedy: Agency allows AI agents to discover each other and work together regardless of how they're
- 35:21Michael Kennedy: built, who built them, or where they run.
- 35:24Michael Kennedy: And they just announced several key updates, including interoperability with Anthropics,
- 35:29Michael Kennedy: Model Context Protocol, MCP, a new observability data schema enriched with concepts specific to
- 35:35Michael Kennedy: multi-agent systems, as well as new extensions to the OpenAgentic Schema Framework, OASF.
- 35:43Michael Kennedy: So are you ready to build the internet of agents? Get started with Agency and join
- 35:47Michael Kennedy: Crew AI, LangChain, Llama Index, BrowserBase, Cisco, and dozens more. Visit talkpython.fm
- 35:54Michael Kennedy: slash agency to get started today.
- 35:56Michael Kennedy: That's talkpython.fm/agency.
- 35:58Michael Kennedy: The link is in your podcast player's show notes
- 36:01Michael Kennedy: and on the episode page.
- 36:02Michael Kennedy: Thank you to the agency for supporting Talk Python and me.
- 36:06Michael Kennedy: There's certainly areas where the cloud can go like sideways.
- 36:10Michael Kennedy: In the book, I mentioned a story about Kara, I believe.
- 36:13Michael Kennedy: And that was this project that this woman,
- 36:17Michael Kennedy: I think in Hong Kong or South Korea,
- 36:19Michael Kennedy: I'm afraid I can't remember which,
- 36:21Michael Kennedy: I think it's South Korea.
- 36:22Michael Kennedy: Anyway, created this.
- 36:23Michael Kennedy: she's a photographer and really hates ai generated art so created this service that would say hey
- 36:29Michael Kennedy: give me a piece of art and i'll tell you if it's ai generated or not or something vaguely like this
- 36:35Michael Kennedy: and her thing took off in the app store and was like number six and her cloud bill at versell was
- 36:41Michael Kennedy: ninety six thousand dollars in a week right as not as a business just as a human who built something
- 36:47Christopher Trudeau: fun as a side project like oh my yeah and in fairness to a lot of those tools they tend to
- 36:52Christopher Trudeau: have ways of saying, please limit this and do that.
- 36:55Christopher Trudeau: Yeah.
- 36:55Christopher Trudeau: They're not the default.
- 36:57Christopher Trudeau: And if you're not thinking about that problem and protecting yourself, you know, you'd, you'd
- 37:03Christopher Trudeau: kind of hope that it would be the other way around.
- 37:06Christopher Trudeau: It should be, yeah, you know, here's your cap.
- 37:08Christopher Trudeau: And if you want more than that, you need to do something about it.
- 37:11Michael Kennedy: Yeah, absolutely.
- 37:12Michael Kennedy: And to their fairness, they did send her a message saying your bill is going way higher
- 37:17Michael Kennedy: than you might expect.
- 37:18Michael Kennedy: And she didn't look at her email or something, but still.
- 37:22Michael Kennedy: And so one of the things that really appeals to me is when you choose something like a
- 37:27Michael Kennedy: Hetzner or a DigitalOcean or something, and you say, I'm going to pay for the server.
- 37:31Michael Kennedy: You're like, okay, that's $40 I'm committing to.
- 37:34Michael Kennedy: Maybe double that, you know, whatever.
- 37:37Michael Kennedy: But the bandwidth is basically free or it's included, right?
- 37:40Michael Kennedy: But for 40 bucks, it feels free.
- 37:42Michael Kennedy: And then it's only going to cost as much as it costs.
- 37:44Michael Kennedy: You might have to go, oh my gosh, it's too much traffic.
- 37:47Michael Kennedy: We're going to have to deal with it.
- 37:48Michael Kennedy: but it's the upper bound of those systems these days is so high.
- 37:53Michael Kennedy: It is so high that we, you know, back to that aspirational thing that you mentioned, right?
- 38:00Michael Kennedy: Like the chances that you blow past what a $50 server can handle,
- 38:05Michael Kennedy: you're going to be really, really popular with the SaaS or something.
- 38:10Christopher Trudeau: You were joking earlier about SQLite.
- 38:13Christopher Trudeau: It's gotten so much better as well.
- 38:14Christopher Trudeau: And I'm not saying it's the answer to everything,
- 38:17Christopher Trudeau: But I could probably come pretty close to running your site now too.
- 38:21Christopher Trudeau: Like it's scary between the processor improvements and the improvements in the software.
- 38:27Christopher Trudeau: It's made a big difference for that kind of stuff.
- 38:30Christopher Trudeau: It takes very, very little hardware to handle something that's pretty, pretty impressive.
- 38:36Michael Kennedy: Yeah.
- 38:38Christopher Trudeau: So I think the title of chapter four is one of my favorites.
- 38:41Christopher Trudeau: It gives a little hint as to what approach you took.
- 38:45Christopher Trudeau: The title is Docker, Docker, Docker.
- 38:48Christopher Trudeau: so what approach did you take you know what i was really not wanting to do docker on genuinely i mean
- 38:53Michael Kennedy: that and so what i did when i originally switched over to some vms i'm like okay the story i'm told
- 38:59Michael Kennedy: of what the cloud is you know i bought the aw the ec2 story well we've got all this extra capacity
- 39:05Michael Kennedy: oh instead of getting like really expensive heavy metal you know big metal sort of servers you get
- 39:11Michael Kennedy: a bunch of small ones and they're kind of like cheap and you just make them throw them away
- 39:15Michael Kennedy: whatever right so I went and made a bunch of small servers in in DigitalOcean I
- 39:20Michael Kennedy: think I had eight servers at one point and I thought this is gonna give me lots
- 39:22Michael Kennedy: of isolation if I got to work on this one thing it won't mess with that and
- 39:25Michael Kennedy: what I realized is they're interconnected enough like that really I
- 39:30Michael Kennedy: end up just having to reboot eight servers in an orchestrated way than
- 39:34Michael Kennedy: managing I'm like this is just worse I gotta patch eight servers instead of one
- 39:38Michael Kennedy: now because this is not better so how do I end up with docker docker docker I
- 39:42Michael Kennedy: I realized that it would be better to just have one server and basically stepping back just a little bit.
- 39:48Michael Kennedy: Like, what if you could completely isolate yourself from almost all the complexity of the cloud and all of their services and all that junk and just say, I have a place where I can run apps that's got enough capacity that I can just keep throwing more apps in there if I want.
- 40:04Michael Kennedy: And it doesn't have any tie in with the specific APIs and services of a particular provider.
- 40:10Michael Kennedy: So I said, well, what if I just get a big server and I just run all my apps in there?
- 40:15Michael Kennedy: And if I want a database, I put the database there.
- 40:17Michael Kennedy: If I want like a Valkey caching, I can put a Valkey caching and things like that.
- 40:22Michael Kennedy: And that's sort of as much autonomy as I can exert on running something in the cloud.
- 40:27Michael Kennedy: It's almost like I went and got a big machine and stuck it in my closet.
- 40:31Michael Kennedy: But that's insane because you get million dollar networking equipment and, you know, failover.
- 40:36Michael Kennedy: But that doesn't mean you have to go fully pass managed database, this other service.
- 40:41Michael Kennedy: Like you could just say, just give me a Linux machine where I can then go do my, do my,
- 40:46Michael Kennedy: my hosting and all my apps and let them party and talk to each other and stuff in there.
- 40:52Michael Kennedy: Right.
- 40:52Michael Kennedy: So then I thought, well, I don't have all these little servers for isolation.
- 40:57Michael Kennedy: I'm not really sure I want to throw all this random stuff together, like completely just
- 41:02Michael Kennedy: in the same soup in that one big server.
- 41:05Michael Kennedy: And by the way, the big server right now that it's running
- 41:07Michael Kennedy: has eight cores, 16 gigs of RAM, and costs $30.
- 41:11Christopher Trudeau: Right.
- 41:11Michael Kennedy: It comes with two terabytes of four terabytes traffic,
- 41:13Michael Kennedy: something like that.
- 41:14Michael Kennedy: Lots.
- 41:15Michael Kennedy: $400 of included bandwidth for $30.
- 41:18Michael Kennedy: So I said, well, what if I took that over?
- 41:19Michael Kennedy: I think autonomy is a big motivator of this whole journey as well.
- 41:24Michael Kennedy: Like, I don't want to be tied into all these different things.
- 41:27Michael Kennedy: I just want a space where I have reliable compute and networking
- 41:30Michael Kennedy: and Linux, and I can just do whatever.
- 41:32Michael Kennedy: So then I said, all right, well,
- 41:33Michael Kennedy: I better figure out some of the stuff with Docker just so that there is some
- 41:38Michael Kennedy: isolation of all the different pieces living in the same space.
- 41:41Michael Kennedy: So I forced myself to learn Docker and what it occurred to me was, Oh,
- 41:45Michael Kennedy: Docker is just writing down in a file what I would normally have to type in the
- 41:50Michael Kennedy: terminal to make the thing happen.
- 41:52Michael Kennedy: Except for I put run in front of the command or copy instead of CP and I
- 41:58Christopher Trudeau: get a repeatability and, and, and someone else has packaged a bunch of this stuff.
- 42:02Christopher Trudeau: so you don't have to do it yourself.
- 42:04Michael Kennedy: Exactly.
- 42:05Michael Kennedy: And I'm like, okay,
- 42:06Michael Kennedy: I don't know what all my concern was about
- 42:08Michael Kennedy: because it's not much more complicated.
- 42:10Michael Kennedy: One of my concerns was sort of monitorability.
- 42:13Michael Kennedy: Like if I just go there
- 42:15Michael Kennedy: and I just create a bunch of virtual environments
- 42:16Michael Kennedy: and run my code,
- 42:17Michael Kennedy: I can actually go and see the source code.
- 42:19Michael Kennedy: I can see the config files.
- 42:20Michael Kennedy: I can see where the logs are being written
- 42:22Michael Kennedy: and I can sort of manage it through SSH.
- 42:25Michael Kennedy: And I thought, well,
- 42:26Michael Kennedy: if I put a bunch of disconnected Docker things together,
- 42:28Michael Kennedy: that's going to be challenging.
- 42:29Michael Kennedy: And I realized actually, not really.
- 42:32Michael Kennedy: like if you set it up the same you could still tail all the logs and you can you can ssh into
- 42:38Michael Kennedy: the containers if you really have to you know look at something running inside them like what is the
- 42:44Michael Kennedy: process actually i don't know what does it do how much memory is it using relative to other stuff
- 42:48Christopher Trudeau: but and i also talk about a bunch of tools for monitoring them yeah so how has that changed over
- 42:53Christopher Trudeau: time like you started with some fairly bare bones you've got you've got some extra tools what what's
- 42:59Christopher Trudeau: What does that evolution look like?
- 43:01Michael Kennedy: Well, I used to rely more on whatever the cloud provider,
- 43:07Michael Kennedy: DigitalOcean or Hetzner, offered.
- 43:09Michael Kennedy: You know, they always have like a metrics section.
- 43:11Michael Kennedy: So I can go see, well, what's the CPU doing?
- 43:13Michael Kennedy: What's the memory looking like over time?
- 43:16Michael Kennedy: And that works okay.
- 43:19Michael Kennedy: And if you've got one app that you're running there,
- 43:21Michael Kennedy: you're like, okay, well, that must be how much memory the app is using.
- 43:24Michael Kennedy: But right now, if I go to Talk Python and I ask,
- 43:27Michael Kennedy: I think there are 27 different containers running,
- 43:31Michael Kennedy: which you can't ask how's the server doing.
- 43:34Michael Kennedy: I know very much.
- 43:35Michael Kennedy: You know, it really matters much more.
- 43:36Michael Kennedy: Well, it's busy.
- 43:37Michael Kennedy: I get it.
- 43:38Michael Kennedy: But which one is the problem?
- 43:39Michael Kennedy: Which one is busy?
- 43:40Michael Kennedy: Which one's using all of them?
- 43:41Michael Kennedy: So I started to look around
- 43:43Michael Kennedy: and there's actually a bunch of recommendations
- 43:45Michael Kennedy: that I have for the book.
- 43:47Michael Kennedy: So one of them,
- 43:49Michael Kennedy: the first one I used was this thing called Glances
- 43:51Michael Kennedy: and Glances is excellent.
- 43:52Michael Kennedy: And by the way,
- 43:53Michael Kennedy: Glances, the way they talk about often getting it,
- 43:56Michael Kennedy: I think, where do they talk about installing it here?
- 43:59Michael Kennedy: Probably is often like apt install glances
- 44:02Michael Kennedy: or something like that, right?
- 44:04Michael Kennedy: But a lot of these tools even have Docker versions.
- 44:07Michael Kennedy: If you share the volumes and sockets just right,
- 44:09Michael Kennedy: they function just the same.
- 44:11Michael Kennedy: So you could say Docker run glances XYZ
- 44:15Michael Kennedy: and it doesn't even install,
- 44:16Michael Kennedy: it doesn't even touch your one big server
- 44:18Michael Kennedy: that is kind of like your building space.
- 44:20Michael Kennedy: So it leaves it a little more pure, right?
- 44:22Michael Kennedy: So glances is super cool.
- 44:23Michael Kennedy: And what it does is it gives you this really nice dashboard of what's going on with your app, like your server.
- 44:33Michael Kennedy: How much memory is being used?
- 44:34Michael Kennedy: How much CPU is being used?
- 44:36Michael Kennedy: How has that been over time?
- 44:37Michael Kennedy: Has there been like extended spikes and so on?
- 44:40Michael Kennedy: And one of the things that's new to Glances, and I don't think it's in this picture that's on their home screen.
- 44:46Michael Kennedy: I'm pretty sure it is not.
- 44:48Michael Kennedy: Oh, no, it is.
- 44:48Michael Kennedy: It just, mine is inverted because I have so many.
- 44:51Michael Kennedy: It has a container section.
- 44:52Michael Kennedy: So when you run it, it actually shows you not just the processes, but also gives you a performance, memory, IO, etc.
- 45:00Michael Kennedy: for all the running containers and their uptimes and those kind of things.
- 45:04Michael Kennedy: So this is super cool.
- 45:05Michael Kennedy: So you construct a certain Docker command and then you have this running dashboard that just goes.
- 45:11Michael Kennedy: So this is the first thing that I started with and I really like that.
- 45:14Michael Kennedy: But then I also found something called BTOP.
- 45:16Michael Kennedy: Are you familiar with BTOP?
- 45:18Christopher Trudeau: No, I haven't used this one.
- 45:19Christopher Trudeau: Oh my gosh, BTOP is incredible.
- 45:21Michael Kennedy: This is so good.
- 45:22Michael Kennedy: it's really something.
- 45:25Michael Kennedy: Zoom in on it.
- 45:26Michael Kennedy: So this gives you moving graphs over time
- 45:30Michael Kennedy: of all sorts of things.
- 45:31Michael Kennedy: It shows you graphs of network,
- 45:34Michael Kennedy: inbound, outbound traffic.
- 45:36Michael Kennedy: It shows you the CPUs.
- 45:37Michael Kennedy: It gives you a breakdown of like,
- 45:38Michael Kennedy: here's all the different distributed work
- 45:41Michael Kennedy: across your eight CPU cores and over total.
- 45:44Michael Kennedy: It's really something else.
- 45:45Michael Kennedy: And so this one is really nice.
- 45:47Michael Kennedy: You can configure the UI a lot to show
- 45:50Michael Kennedy: and zoom in on disk activity or whatever.
- 45:53Michael Kennedy: This is really a nice way to view it.
- 45:55Michael Kennedy: And again, when you run all these Docker containers,
- 45:57Michael Kennedy: they feel like they're super isolated and tucked away.
- 46:00Michael Kennedy: And from their perspective, they are.
- 46:02Michael Kennedy: But when you look in the process list here,
- 46:04Michael Kennedy: it just shows the process that Docker is running.
- 46:06Michael Kennedy: So I have all my web apps and APIs and stuff
- 46:09Michael Kennedy: setting a process name.
- 46:11Michael Kennedy: So instead of just Python, Python, Python, Python, Python,
- 46:13Michael Kennedy: it'll say like, talk Python, Granian Worker 1,
- 46:16Michael Kennedy: talk Python, Granian Worker 2.
- 46:19Michael Kennedy: Versus indexing service daemon.
- 46:22Michael Kennedy: And then when you look into any of these tools, you can see, oh, exactly what is busy.
- 46:26Michael Kennedy: And those are actually the names inside of Docker, but they still surface exactly like
- 46:31Michael Kennedy: that to all these tools.
- 46:32Christopher Trudeau: One of the things you said kind of hit home for me, like it was subtle and it kind of
- 46:37Christopher Trudeau: moved on, which was like, if you interconnect it correctly, right?
- 46:41Christopher Trudeau: Like if you get the files and sockets going, this goes smoothly.
- 46:45Christopher Trudeau: And I think it's one of the things you've done very, very well in the book is sort of
- 46:49Christopher Trudeau: through that, like, as you talk about the different Docker configurations, like, okay,
- 46:53Christopher Trudeau: well, this is why we're putting this here rather than in the container, this is going to be shared.
- 46:57Christopher Trudeau: And, you know, and, and there's, and the reason for this, I assume some of that was experimental.
- 47:03Christopher Trudeau: You just sort of over time, you kind of went, oh, okay, wait, I need that somewhere else.
- 47:08Christopher Trudeau: Yeah.
- 47:08Christopher Trudeau: Or, or was it, you know, did, was there somebody's knowledge that you, depended
- 47:14Christopher Trudeau: on a lot there?
- 47:14Christopher Trudeau: How did you get there?
- 47:16Christopher Trudeau: How, how organic was the journey?
- 47:18Michael Kennedy: the, I would say half and half, like some of it, for example, the glances stuff, I just found
- 47:25Michael Kennedy: when I went looking for it, that there was like ways to install. And I said, it just said, Oh,
- 47:29Michael Kennedy: you could just install it by running this Docker thing. And it's like a big, long command. And I'm
- 47:33Michael Kennedy: like, Oh, that's cool. Because it doesn't matter how long the command is, what I would do is I'll
- 47:39Michael Kennedy: go into my dot ZS HRC and say alias glances equals paste. And then I saved that somewhere. And I
- 47:46Michael Kennedy: never I couldn't tell you what it is at all I just know it has to like do a yeah it has a few things
- 47:51Michael Kennedy: so it can like look back into the host to see you know what's running and so on um yeah so a lot of
- 47:57Michael Kennedy: it was was like that and then some of it was definitely you know two whole days of like why
- 48:03Michael Kennedy: won't that talk to that let me build it again let me do some more devote you know what I mean and
- 48:07Michael Kennedy: eventually like okay all right but once you get it kind of dialed then it's once you get a little bit
- 48:11Michael Kennedy: of it working it's a blueprint you just like again again again so so you seem to have taken a bit of
- 48:16Christopher Trudeau: a like a heavier weight approach here you're just it's it's everything in the kitchen sink that that
- 48:23Christopher Trudeau: implies that it's not the right amount but it's counter to some of the advice that's out there
- 48:28Christopher Trudeau: uh sometimes folks talk about you know wanting to have things as minimal as possible why why what
- 48:34Christopher Trudeau: you've done versus the other how how how are they wrong can we start a flame war on the internet you
- 48:40Michael Kennedy: Let's do it. Let's see how many, Michael, you're wrong. I can get into the YouTube comments.
- 48:45Michael Kennedy: Actually, please, that's not a challenge. So here's the deal. I want, especially at the
- 48:53Michael Kennedy: beginning of this journey, when I was like, I want as much comfort and visibility as I can get
- 48:59Michael Kennedy: in these containers and other areas. You know what I mean? And I wanted to make it as close to,
- 49:04Michael Kennedy: if I just set up a VM and just, you know, uv, V, ENV, and just roll from there, right? So what I did
- 49:10Michael Kennedy: is I said, okay, I could try to go for like the super slim Docker image, or I could just get like
- 49:17Michael Kennedy: a basic Docker image, but then put, you know, I put like, oh, my Z shell and ZSH on it, right?
- 49:23Michael Kennedy: Does that need it? No, you could use SH, but do you know what happens when you use SH and you go
- 49:28Michael Kennedy: in there? It's a brand new start. It doesn't remember anything you've ever, any command you've
- 49:32Michael Kennedy: ever run, it doesn't give you any help. You know, you hit tab, it doesn't tell you nothing, right?
- 49:37Michael Kennedy: You're like, oh gosh. But if you use like, oh my Z shell, it'll show you, hey, what version of Python
- 49:42Michael Kennedy: is your virtual environment activated in? And I can just hit command R and see, you know, filter all
- 49:48Michael Kennedy: my history and I can hit get tab and it'll auto complete all the get commands that I forgot what
- 49:53Michael Kennedy: I was supposed to use because I'm freaked out because the site is down and how do I fix this?
- 49:56Michael Kennedy: I mean, I wouldn't actually be in the container for that, but a lot of times you're in there kind
- 50:01Michael Kennedy: of exploring because you're like, it's been fine for six months, but I need to see something.
- 50:05Michael Kennedy: And so in the book, at least in the beginning, I recommended to people that they install
- 50:11Michael Kennedy: some of these tools that you might install into your own terminal to make you feel more comfortable.
- 50:15Michael Kennedy: So that my assumption is you're kind of new to Docker. You're feeling a little uncomfortable.
- 50:20Michael Kennedy: Like who cares if it's another hundred megs on your hard drive? You're not shipping your app
- 50:27Michael Kennedy: to Docker Hub. You're not going to take your web app, probably. It's not a reusable component.
- 50:33Michael Kennedy: You've got your source code and you want the thing to just run here. You're not shipping it. So
- 50:38Michael Kennedy: whoever wants to run, you know, indeed.com can just Docker pull that and run it. Like it's,
- 50:43Michael Kennedy: that's not what it is. And in that context, you're not so worried about the space. And there's a
- 50:48Michael Kennedy: couple of tips that you can use for like really, really fast build times, right? So I mean, like
- 50:53Michael Kennedy: container build times for me are like seconds, a few seconds, even though, you know, there's 250
- 50:59Michael Kennedy: pip install packages for Talk Python training, you know, build times, and build time is also
- 51:06Michael Kennedy: installing Python, right? You could make these things fast, so it's not like a huge impedance,
- 51:11Michael Kennedy: but I think for people who are new to it, having something other than just sh, not even bash,
- 51:17Christopher Trudeau: you're a lot better off. So that's what I promoted. And I think it's, you know, it kind of comes back
- 51:21Christopher Trudeau: to sort of the thesis of the book as well, right?
- 51:23Christopher Trudeau: Which, which is right for you.
- 51:25Christopher Trudeau: so, you know, if you are going to be running a thousand of these spread
- 51:30Christopher Trudeau: across a whole bunch of different cores, then yeah, if you optimize this, that
- 51:34Christopher Trudeau: might change your cost framework and everything else.
- 51:37Christopher Trudeau: Well, right.
- 51:37Christopher Trudeau: Or if I was, if you're 27, if you're 27 on eight CPUs works fine, then, you
- 51:44Christopher Trudeau: know, go for it.
- 51:45Christopher Trudeau: You know, why, why, why get in your own way?
- 51:48Michael Kennedy: And that advice is not like, this is why I really emphasize the
- 51:51Michael Kennedy: context sort of thing, right?
- 51:53Michael Kennedy: Is this advice is bad if your goal is to ship a container to Docker hub so that people can
- 51:58Michael Kennedy: self host your open source thing.
- 52:00Michael Kennedy: You don't want that to have extra crap that they don't need.
- 52:03Michael Kennedy: But when there's only one of them for your machine and you're building it and you're managing
- 52:08Michael Kennedy: it, you know, make it as comfy and helpful as possible.
- 52:12Michael Kennedy: That was my philosophy.
- 52:13Christopher Trudeau: The, the structure of your site is, it has a lot of different pieces to it using
- 52:20Christopher Trudeau: different technology. You spend some time talking about like static sites and using static sites for
- 52:25Christopher Trudeau: part of it versus, you know, Python applications and those kinds of parts. How did you end up here?
- 52:33Christopher Trudeau: Like oftentimes the answer when you're looking at this kind of stuff is, well, I need a CMS for
- 52:37Christopher Trudeau: everything. And then I will try to figure out how to square peg my round hole of a CMS or whatever.
- 52:43Christopher Trudeau: So how did you end up with a collection? Well, you know, like many things that start simple,
- 52:48Michael Kennedy: And you're like, well, just one more thing.
- 52:50Michael Kennedy: So I tried, I'd kept pretty much the same web framework across all my different sites thinking,
- 52:55Michael Kennedy: okay, that's, I'm going to just pick one and go with it.
- 52:57Michael Kennedy: I think a lot of people do that.
- 52:59Michael Kennedy: You know, there's people who are like, I use Django.
- 53:00Michael Kennedy: There's people, I use Flask and so on.
- 53:02Michael Kennedy: And then just slowly over time, you're like, really, this is, this part is really a hassle.
- 53:08Michael Kennedy: I'd be a lot better off if I made that part served through the CDN or why am I, you know,
- 53:14Michael Kennedy: One of the things that I see a lot, and it doesn't drive me crazy, but I'm just like,
- 53:19Michael Kennedy: yeah, it's probably not necessary, is a lot of people in technology X.
- 53:24Michael Kennedy: For us, that's Python.
- 53:25Michael Kennedy: It could be JavaScript.
- 53:26Michael Kennedy: It could be.NET, whatever, right?
- 53:28Michael Kennedy: People who work extensively in that and have a lot of their identity tied into that, like
- 53:32Michael Kennedy: I do and others.
- 53:34Michael Kennedy: Like, I'm a Python developer, right?
- 53:36Michael Kennedy: So if I'm going to choose a tool, like, let's say, a CMS or a static site generator or something
- 53:41Michael Kennedy: like that, I'm going to choose the Python one.
- 53:43Michael Kennedy: I'm a Python person like okay but are there better options out there than the Python ones for what
- 53:48Michael Kennedy: you're trying to do because are you going to extend this tool no then what do you care of
- 53:52Christopher Trudeau: what it's written in right your operating system is not written in Python it's written in yeah yeah
- 53:57Christopher Trudeau: yeah C or I'm not going to use this word processor because it's not written in Python
- 54:02Michael Kennedy: exactly so I have to go back in no I need a new service like it doesn't you don't see it you don't
- 54:07Michael Kennedy: have to work with it you don't care and so I ended up a little bit with the mish match of just trying
- 54:11Michael Kennedy: to say like what are the best tools like for example for the blog and some of the other static
- 54:16Michael Kennedy: elements i've used hugo which is written in go it's like okay i type the command the command hugo
- 54:22Michael Kennedy: you know and it it does its thing i don't really care what it's written in the templating extension
- 54:26Michael Kennedy: is a little bit annoying but um i kind of just went around and said okay well what what do i think
- 54:31Michael Kennedy: would be the best fit to make to make my life easy not to reinforce my identity as this type of
- 54:37Christopher Trudeau: of developer or that type of developer you know yeah it's um the one of things you know i'll show
- 54:45Christopher Trudeau: my own stripes here and and you can defend your beloved flask if you like but having come from
- 54:51Christopher Trudeau: the django side uh some of the things that you've kind of learned organically here are forced on you
- 54:57Christopher Trudeau: in django um so when you so so when you when you like the instructions for putting together a
- 55:03Christopher Trudeau: production site are, and you will run this command and it will move all of your static content over
- 55:07Christopher Trudeau: here. So like your mental model, when you come from that side is, oh, my site is actually built
- 55:12Christopher Trudeau: of these, at least these two different things. And I think coming from Flask, you might've sort of
- 55:18Christopher Trudeau: that, that discovery might've been a little more organic. You might not have been forced into it
- 55:24Christopher Trudeau: immediately, but once you've come to that realization of, oh, wait, I have these pieces
- 55:29Christopher Trudeau: and I can use something like Nginx to tie it all together,
- 55:33Christopher Trudeau: that means, well, then I don't have to figure out
- 55:35Christopher Trudeau: how to use a CMS for this thing
- 55:37Christopher Trudeau: that's very unnatural for a CMS.
- 55:39Christopher Trudeau: I can just mount it under slash blog
- 55:42Christopher Trudeau: and it'll work fine, yeah.
- 55:44Michael Kennedy: Yeah, Django is very powerful.
- 55:46Michael Kennedy: It definitely is.
- 55:46Michael Kennedy: And I actually talked a lot about that in the book,
- 55:50Christopher Trudeau: which evaluating web frameworks.
- 55:52Michael Kennedy: But I would say before we, if we're going to that,
- 55:54Michael Kennedy: but before we do, I think your point about using Nginx
- 55:57Michael Kennedy: to piece them together,
- 55:58Michael Kennedy: things together or caddy or traffic or whatever it doesn't matter like some front end web server
- 56:03Christopher Trudeau: they all do it yep yeah is so often people think i have this python app let's say i have a django
- 56:10Michael Kennedy: app so i want to add a cms to it what could i possibly add is it static content well maybe what
- 56:15Michael Kennedy: you should add is hugo i don't know i'm just making this up right like it might actually be a bad
- 56:19Michael Kennedy: option but well hugo is not a python thing so how do i put it into my django app i mean they're very
- 56:24Michael Kennedy: very different in the way they work so they don't really go that super well together if you were to
- 56:28Michael Kennedy: like how does one literally source code wise go into another but if you just made like a hugo site
- 56:35Michael Kennedy: or other static site however you make it and then put it on the same server and then in nginx when
- 56:40Michael Kennedy: you say if you go to this domain slash docs it goes completely over here and if it goes anywhere
- 56:46Michael Kennedy: else it goes just to django and all of a sudden from the outside it looks like a very cohesive
- 56:52Michael Kennedy: single thing with just different sub urls but you get to choose the best technology for the static
- 56:56Michael Kennedy: bits and you get to choose the best technology for your dynamic data-driven bits and that is all just
- 57:02Michael Kennedy: done by configuring the front-end web server that you don't even have visibility to in python and i
- 57:08Michael Kennedy: think that that's a big mental shift but it's like those kinds of things that bring a both the
- 57:13Michael Kennedy: flexibility to make these choices and the simplicity to not try to jam them together
- 57:17Christopher Trudeau: there's a uh there's a a third-party library for django that i use once in a while which is called
- 57:22Christopher Trudeau: distill and it's a static site generator based on django so say you had your url was like books
- 57:29Christopher Trudeau: you know it's books slash one book slash two book slash three well you tell distill i want book and
- 57:35Christopher Trudeau: i want all the possible queries of this number and it will generate the results as static so even
- 57:42Christopher Trudeau: when you've got a dynamic site you can actually carve off the static portion and then have that
- 57:47Christopher Trudeau: fed straight out of nginx and if it isn't if there's no actual dynamic content on the page and
- 57:53Christopher Trudeau: if it only updates when the database updates or something like that and you can do it nightly like
- 57:57Christopher Trudeau: this gives you all sorts of other options and you know to come back to your my eight processor
- 58:02Christopher Trudeau: whatever's well the static sites are almost free you do not even need that you don't even need it
- 58:09Christopher Trudeau: it's nothing so like you can scale way down and have an absolutely mammoth site just by properly
- 58:15Michael Kennedy: fine-tuning what's dynamic and what's static yeah you could go to millions and millions of requests
- 58:20Michael Kennedy: if you just converted all that stuff to static and then put the x the extra resources css image
- 58:28Michael Kennedy: javascript etc on a cdn yeah like i mean that is like almost web that's like web on easy mode right
- 58:34Michael Kennedy: there because you it can't go down unless the server literally almost almost can't yeah i mean
- 58:41Michael Kennedy: Let's not say we're in the eve of like, are we in the eve of a fifth going down?
- 58:46Michael Kennedy: But I mean, like it can't go down because the code is wrong or there's a race condition
- 58:51Michael Kennedy: or you're out of memory.
- 58:52Michael Kennedy: Like it's really close to just if, if the, if the web server is up and you put a CDN
- 58:57Michael Kennedy: in front of it and then it's not even necessarily that it's like the CDN has to go.
- 59:02Michael Kennedy: You've got to have a cloud flare level incident.
- 59:04Christopher Trudeau: Yeah.
- 59:04Christopher Trudeau: And, and fully distributed in often cases.
- 59:07Christopher Trudeau: Right.
- 59:07Christopher Trudeau: So people in, you know, in continents, other than where you are based are getting fantastic load times because it's cached locally for them.
- 59:17Michael Kennedy: Yeah, I just want to give a little shout out.
- 59:19Michael Kennedy: I'm going to give a little shout out to Bunny.net.
- 59:21Michael Kennedy: Like, I know people are all about Cloudflare, but this is a cool European company that focuses on privacy, has some really nice features.
- 59:29Michael Kennedy: The pricing is great.
- 59:30Michael Kennedy: And they have, you go here, go to the CDN.
- 59:33Michael Kennedy: They've got somewhere way down here, you know, like 119 different places, including all over Africa.
- 59:41Michael Kennedy: And this is just super, super cheap for traffic.
- 59:45Christopher Trudeau: Nice.
- 59:45Christopher Trudeau: Yeah.
- 59:46Christopher Trudeau: So I wasn't, earlier there, I wasn't intending to force a fistfight.
- 59:52Christopher Trudeau: And, you know, we're on the opposite side of the continent, so that would be a challenge when I, Django versus Flash, go.
- 1:00:00Christopher Trudeau: But, you know, I think one of my favorite chapters was actually chapter 13, which was titled Picking a Python Web Framework.
- 1:00:07Christopher Trudeau: I really liked the nuance of this.
- 1:00:11Christopher Trudeau: It's unusual for folks to sort of reveal their reasoning.
- 1:00:16Christopher Trudeau: And honestly, I think, like, because I had no intention of tomorrow going and using Docker, the Docker chapters were interesting because I like to see how other people do things.
- 1:00:26Christopher Trudeau: But like I could grab the picking a Python web framework, pull that chapter out and hand it to almost any of my students.
- 1:00:33Christopher Trudeau: Right. Like it's this, you know, how do I make these kinds of decisions?
- 1:00:37Christopher Trudeau: How is this different? Why do I think about these things?
- 1:00:40Christopher Trudeau: And so often the content on this is really just religious war.
- 1:00:44Christopher Trudeau: And you've done like a really, really good job there of just sort of conveying this, you know, hey, here are pros and cons for each.
- 1:00:51Christopher Trudeau: And this is why I picked this.
- 1:00:53Christopher Trudeau: And so I really, really liked how you, how you covered that.
- 1:00:58Christopher Trudeau: Thank you so much.
- 1:00:59Christopher Trudeau: What you, I guess it's maybe the answer is obvious, but, but why?
- 1:01:05Christopher Trudeau: Like you were fine.
- 1:01:07Christopher Trudeau: You were just doing configuration file after configuration file and then a little bit editorial.
- 1:01:12Christopher Trudeau: What, what caused you, what, what was the emphasis for the impetus for spicing it up a little?
- 1:01:18Michael Kennedy: Well, I mean, I think it's an important part of the journey is, is picking a technology to run your code on. So there's actually a couple of places that I kind of have that like I have that for I'm trying to create a term because I don't think we do a good job of disambiguating it from from like engine X of Python, like production app servers, like where your code runs, I think these a little more disambiguation, I'm talking like granian, unicorn, those kinds of things.
- 1:01:46Michael Kennedy: Uvicorn, Uvicorn now, all those places you run your Python code.
- 1:01:50Michael Kennedy: So I kind of went through a debate on those from Michael's context, right?
- 1:01:55Michael Kennedy: And then I did the same for Python web frameworks.
- 1:01:57Michael Kennedy: And it was, you know, I told the story of the bootstrap and how I just, every time I have
- 1:02:02Michael Kennedy: to write new code, I'm like, here we go.
- 1:02:04Michael Kennedy: I'm in the relic, right in the relic code.
- 1:02:08Michael Kennedy: I kind of felt the same way for, so everything was based on Pyramid and I loved Pyramid and
- 1:02:13Michael Kennedy: I still have a lot of respect for it.
- 1:02:15Michael Kennedy: The reason I chose Pyramid in 2015 was when I went to the Flask page, it said, you may potentially be able to use Python 3, but we are not supporting it and we don't recommend it.
- 1:02:27Michael Kennedy: And I'm like, wait a minute, didn't Python 3 come out in 2008?
- 1:02:31Michael Kennedy: That's like seven years later.
- 1:02:33Michael Kennedy: You know what?
- 1:02:34Michael Kennedy: No, I'm not doing that.
- 1:02:37Michael Kennedy: I'm starting this project beyond this problem and I'm not going back to be in the, you know what I mean?
- 1:02:44Michael Kennedy: As they've since obviously moved on from that.
- 1:02:46Michael Kennedy: So Flask was out.
- 1:02:48Michael Kennedy: I looked at Django and I thought, I'm really like a microservice guy.
- 1:02:51Michael Kennedy: I really want to use Mongo.
- 1:02:52Michael Kennedy: A lot of things were not quite good fits.
- 1:02:54Michael Kennedy: They actually would be better fits now, right?
- 1:02:56Michael Kennedy: Even then.
- 1:02:57Christopher Trudeau: Yeah, no, if you want to do Mongo, that's, yeah, that's almost a deal breaker.
- 1:03:02Christopher Trudeau: Yeah.
- 1:03:02Michael Kennedy: Yeah, I know.
- 1:03:03Michael Kennedy: Almost.
- 1:03:03Michael Kennedy: And so I'm like, all right, well, maybe not Django.
- 1:03:06Michael Kennedy: Well, you had a pyramid.
- 1:03:07Michael Kennedy: They're like, we are trying to embrace the latest standards.
- 1:03:11Michael Kennedy: We're Python 3 first, et cetera, et cetera.
- 1:03:13Michael Kennedy: And I'm like, all right, I'm gonna give this a chance,
- 1:03:16Michael Kennedy: even though it wasn't as popular, like this is great.
- 1:03:17Michael Kennedy: And I used it for eight years, seven years,
- 1:03:20Michael Kennedy: something like that, it was really good.
- 1:03:22Michael Kennedy: But things evolved over time, right?
- 1:03:24Michael Kennedy: Like Pydantic came out and Pydantic was great.
- 1:03:27Michael Kennedy: What's a really nice way to talk to the database
- 1:03:30Michael Kennedy: with Pydantic, Beanie, okay?
- 1:03:32Michael Kennedy: So I can do Beanie and I can do Pydantic and wow,
- 1:03:34Michael Kennedy: what a really nice, clever way to write databases.
- 1:03:38Michael Kennedy: And oh, Beanie's all async only,
- 1:03:41Michael Kennedy: Pyramid's synchronous only.
- 1:03:43Michael Kennedy: When was the last commit to Pyramid?
- 1:03:45Michael Kennedy: Oh, it was two and a half years ago.
- 1:03:47Michael Kennedy: Chances that it gets async support are low
- 1:03:49Michael Kennedy: 'cause that was just like a minor bug fix.
- 1:03:51Michael Kennedy: You know what I mean?
- 1:03:52Michael Kennedy: It's just like, it's fine.
- 1:03:54Michael Kennedy: Open source projects, they ebb and they flow
- 1:03:55Michael Kennedy: and they come and they go.
- 1:03:57Michael Kennedy: But I'm just like, I should really move this forward
- 1:04:01Michael Kennedy: to something that feels like it's active, right?
- 1:04:03Michael Kennedy: I mean, stuff in the web makes me nervous.
- 1:04:05Michael Kennedy: I'm always just, did you put a port open on the internet?
- 1:04:08Michael Kennedy: Well, that's scary.
- 1:04:09Christopher Trudeau: - Yep.
- 1:04:10Michael Kennedy: And so a framework that felt like things were not on top of it as it could have been made
- 1:04:16Michael Kennedy: me nervous.
- 1:04:17Michael Kennedy: To be fair, I don't know that they had any security incidents or very, very few because
- 1:04:21Michael Kennedy: it did so little, right?
- 1:04:23Michael Kennedy: It's not like it had a bunch of admin pages or something where there's like accepting
- 1:04:27Michael Kennedy: input, but still, still same reason.
- 1:04:29Michael Kennedy: So I'm like, I really want to use these more modern tools, typing, async, identic, et cetera.
- 1:04:37Michael Kennedy: And I kind of would not like to continue building on something that feels like it's no longer being supported.
- 1:04:42Christopher Trudeau: And similarly, you, with chapter 13, sort of that, you know, the different thought process there.
- 1:04:49Christopher Trudeau: You also provide chapter 15, which is a retrospective on Hetzner, which is the hosting provider that you chose.
- 1:04:55Christopher Trudeau: and again, I think it's pretty clear.
- 1:04:59Christopher Trudeau: I think I've said it three different ways.
- 1:05:01Christopher Trudeau: My favorite stuff in the book really is sort of this, you know, that the little, the little, insight into Michael's brain, right?
- 1:05:08Christopher Trudeau: Like how did he make this decision and how happy is he with these decisions?
- 1:05:12Christopher Trudeau: Right.
- 1:05:13Christopher Trudeau: I think that's the stuff that's, that's, globally applicable to a reader, which is nice.
- 1:05:18Christopher Trudeau: so you've, it's now even a few months further on with Hetzner.
- 1:05:22Christopher Trudeau: So you, you still happy?
- 1:05:24Christopher Trudeau: Any regrets yet?
- 1:05:26Michael Kennedy: Yeah, no, no regrets.
- 1:05:28Michael Kennedy: It hasn't been absolutely a hundred percent smooth.
- 1:05:30Michael Kennedy: Let's see.
- 1:05:31Michael Kennedy: I could tell you how long it's been if I can get past all the ads.
- 1:05:34Michael Kennedy: There we go.
- 1:05:35Michael Kennedy: So I actually blogged about this.
- 1:05:38Michael Kennedy: And yeah, so it's been about a year, I guess.
- 1:05:42Michael Kennedy: No regrets.
- 1:05:43Michael Kennedy: I would say if people are out there looking around, to me, it really,
- 1:05:48Michael Kennedy: and you want to follow the philosophy of Michael,
- 1:05:50Michael Kennedy: like carve yourself a space out in a multimillion dollar data center
- 1:05:54Michael Kennedy: that doesn't have anything to do with it.
- 1:05:55Michael Kennedy: And you just run your code in your own space.
- 1:05:58Michael Kennedy: DigitalOcean and Hetzner are the two ones.
- 1:06:01Michael Kennedy: And I did DigitalOcean for a long time.
- 1:06:03Michael Kennedy: When Hetzner came out, I thought they just had some really interesting appeal.
- 1:06:07Michael Kennedy: I started seeing a lot of people talking about them.
- 1:06:09Michael Kennedy: And they are a German company.
- 1:06:12Michael Kennedy: And they were just in Europe.
- 1:06:14Michael Kennedy: And I'm like, I love Europe, but the majority of my customers are in the U.S.
- 1:06:17Michael Kennedy: So what is the best place for my server?
- 1:06:21Michael Kennedy: Probably the east coast of the United States, because that serves the U.S. really well.
- 1:06:25Michael Kennedy: But then it's like one hop across the ocean to all of Europe as well.
- 1:06:28Michael Kennedy: So it's still really fast from there and so on.
- 1:06:32Michael Kennedy: So I didn't want to move my server to Europe
- 1:06:36Michael Kennedy: when I felt like being closer to the US was more important.
- 1:06:38Michael Kennedy: Not so much because I needed to manage it.
- 1:06:40Michael Kennedy: I could SSH to wherever, but just East Coast to the US.
- 1:06:43Michael Kennedy: And then they're like, hey, we have two new US data centers.
- 1:06:47Michael Kennedy: One near Virginia, right by the US East 1,
- 1:06:51Michael Kennedy: the infamous AWS US East 1.
- 1:06:53Michael Kennedy: And the other one actually in Hillsborough, Oregon,
- 1:06:56Michael Kennedy: just down the street from me, which is funny.
- 1:06:58Michael Kennedy: Yeah, it's like I could drive to it in like 20 minutes,
- 1:07:02Michael Kennedy: which of all places in the world is relatively close.
- 1:07:04Michael Kennedy: So I went and looked at it and I said,
- 1:07:06Michael Kennedy: let me just check it out.
- 1:07:07Michael Kennedy: And the prices are super cheap.
- 1:07:09Michael Kennedy: You get a little bit less support
- 1:07:11Michael Kennedy: and I think a little bit less top tier data center
- 1:07:16Michael Kennedy: than DigitalOcean,
- 1:07:17Michael Kennedy: but the prices are like insane there.
- 1:07:19Michael Kennedy: Like I said, eight core server for 30 bucks.
- 1:07:23Michael Kennedy: You know, that's insane.
- 1:07:25Michael Kennedy: And when I first signed up,
- 1:07:27Michael Kennedy: that came with 20 terabytes of free traffic.
- 1:07:30Christopher Trudeau: Wow.
- 1:07:30Michael Kennedy: Which is about $1,700 out of AWS.
- 1:07:36Christopher Trudeau: Right.
- 1:07:36Michael Kennedy: Included in your $30 bill.
- 1:07:38Michael Kennedy: You know what I mean?
- 1:07:39Michael Kennedy: Like, oh my gosh.
- 1:07:41Christopher Trudeau: Yeah.
- 1:07:41Michael Kennedy: So yeah, I talk a lot about it in the book,
- 1:07:43Michael Kennedy: but yeah, I went over and moved my stuff over there
- 1:07:46Michael Kennedy: and it's been good.
- 1:07:48Michael Kennedy: I've had one incident where the machine
- 1:07:51Michael Kennedy: that it was on died.
- 1:07:52Michael Kennedy: The one big server, wherever it was, it died
- 1:07:55Michael Kennedy: and they had to move it,
- 1:07:57Michael Kennedy: which blows my mind,
- 1:07:58Michael Kennedy: they were able to hot relocate it to another server.
- 1:08:01Michael Kennedy: But the problem is it has an external,
- 1:08:04Michael Kennedy: like a 300 gig external drive,
- 1:08:06Michael Kennedy: and that didn't move location.
- 1:08:07Michael Kennedy: So all of a sudden, a lot of the IO operations
- 1:08:10Michael Kennedy: were much slower 'cause they weren't close
- 1:08:12Michael Kennedy: to the server anymore.
- 1:08:13Michael Kennedy: - Right, right.
- 1:08:14Michael Kennedy: - Why, why did my Docker builds take two minutes?
- 1:08:17Michael Kennedy: They used to take about three or four seconds.
- 1:08:18Michael Kennedy: I cannot figure it out.
- 1:08:20Michael Kennedy: And I wrote them, they're like, no, we've tested it.
- 1:08:22Michael Kennedy: There's no problem.
- 1:08:22Michael Kennedy: I don't care what you say, there's a huge problem.
- 1:08:25Michael Kennedy: eventually there's like we moved it again it's fine and then it was fine right so you know if
- 1:08:31Christopher Trudeau: if folks are looking for something slightly lighter weight and this is going to sound like a commercial
- 1:08:37Christopher Trudeau: i'm just a happy customer i don't know sponsorship or whatever but i use opal stack with a lot of my
- 1:08:42Christopher Trudeau: clients um what do you go opal stack opal um yeah and you wouldn't go full docker with it um but
- 1:08:49Christopher Trudeau: but they do give you access full SSH to the box.
- 1:08:54Christopher Trudeau: And they've got a neat little sort of packaging thing.
- 1:08:56Christopher Trudeau: They don't support a lot of things,
- 1:08:58Christopher Trudeau: but if you've got like Django or Flask
- 1:09:00Christopher Trudeau: or static files for Nginx or whatever,
- 1:09:02Christopher Trudeau: you hit a couple of buttons in the dashboard
- 1:09:04Christopher Trudeau: and it spawns it up.
- 1:09:06Christopher Trudeau: But a lot of tools like that, it spawns it up
- 1:09:08Christopher Trudeau: and then you're not allowed to touch it.
- 1:09:10Christopher Trudeau: What they do is create all the entries in the directories
- 1:09:12Christopher Trudeau: and then you can SSH into the box
- 1:09:14Christopher Trudeau: and get at the files themselves.
- 1:09:15Christopher Trudeau: So I find it's a nice little compromise between the two.
- 1:09:19Christopher Trudeau: It would not scale to what you're doing.
- 1:09:22Christopher Trudeau: But if folks are looking for a relatively inexpensive thing to experiment with, I find it's a nice little stopgap.
- 1:09:28Michael Kennedy: Yeah, that's awesome.
- 1:09:29Michael Kennedy: I'm always interested in finding those types of things.
- 1:09:33Michael Kennedy: This one is new to me.
- 1:09:34Michael Kennedy: This is cool.
- 1:09:34Christopher Trudeau: Yeah, this is I'm trying to remember there was a site I used to use.
- 1:09:39Christopher Trudeau: It got bought.
- 1:09:40Christopher Trudeau: The half of the founders went, we don't want to be bought and took their baseball bat and created Opal Stack.
- 1:09:46Christopher Trudeau: So I used to be a client of the original and followed them along.
- 1:09:50Christopher Trudeau: So yeah.
- 1:09:51Christopher Trudeau: Cool.
- 1:09:51Christopher Trudeau: And very happy with like the service as well.
- 1:09:54Christopher Trudeau: They're like you open a ticket and things are very, very human, which is nice in this day and age.
- 1:09:59Christopher Trudeau: You usually, I'm usually expecting to talk to a bot.
- 1:10:02Michael Kennedy: You're getting about as much support as you get out of Gmail.
- 1:10:05Christopher Trudeau: Yeah, exactly.
- 1:10:06Michael Kennedy: Google Docs, which is done.
- 1:10:08Michael Kennedy: Another thing worth a shout out here is sort of an alternate way of working with Docker and Docker Compose directly
- 1:10:15Michael Kennedy: that I propose in the book is something called Coolify.
- 1:10:18Michael Kennedy: Are you familiar with Coolify?
- 1:10:20Christopher Trudeau: No, this one I don't know.
- 1:10:21Michael Kennedy: Yeah, this is super interesting.
- 1:10:22Michael Kennedy: So what this does is it knows how to run Docker, Docker Compose,
- 1:10:28Michael Kennedy: but it also gives you all sorts of easier ways.
- 1:10:31Michael Kennedy: So if people look at what I'm proposing,
- 1:10:33Michael Kennedy: they're like, no, Michael, too complicated.
- 1:10:35Michael Kennedy: This is interesting because what it gives you
- 1:10:37Michael Kennedy: is it basically gives you your own private Heroku
- 1:10:40Michael Kennedy: or Netlify or Vercel or Railway,
- 1:10:43Michael Kennedy: or you can go in, I don't know how to find it,
- 1:10:45Michael Kennedy: from here, but you can also go in and say,
- 1:10:48Michael Kennedy: let me find any self-hosted app.
- 1:10:50Michael Kennedy: - Okay.
- 1:10:51Michael Kennedy: - And they've got hundreds of them in there.
- 1:10:52Michael Kennedy: And then you just type in the name and say,
- 1:10:54Michael Kennedy: install this set of Docker containers
- 1:10:57Michael Kennedy: as a Docker compose file into my server.
- 1:10:59Michael Kennedy: So you could create the one big server,
- 1:11:01Michael Kennedy: which is your own space in someone's cloud.
- 1:11:04Michael Kennedy: And then you can install this
- 1:11:06Michael Kennedy: or you can pay them five bucks a month
- 1:11:07Michael Kennedy: and they'll actually manage the server,
- 1:11:10Michael Kennedy: manage the deployments,
- 1:11:11Michael Kennedy: do like rollouts of new versions of your app.
- 1:11:15Michael Kennedy: stuff like that right it sounds like it sounds like it makes it way easier right it actually makes it
- 1:11:22Michael Kennedy: it's like two steps forward 1.8 steps backwards right because you know instead of using dot env
- 1:11:29Michael Kennedy: files you've got these like a UI to enter a bunch of environment variables and the saving of them
- 1:11:35Michael Kennedy: is weird and you're like oh i forgot to press save on these three even though i saved the page i mean
- 1:11:39Michael Kennedy: there's just right right it's it promises more ease than you would think and i'm not necessarily
- 1:11:45Michael Kennedy: switch i do like i've played with it some i'm not saying i would switch to it given a choice
- 1:11:50Michael Kennedy: but it does it does ease you in it's a little bit like python anywhere like i'm sure when i started
- 1:11:55Michael Kennedy: there were things that could have gotten in my way but the stuff the support that it gave me made it
- 1:12:00Michael Kennedy: possible for me to feel like comfortable and get going i feel like this might be an option for
- 1:12:04Michael Kennedy: people who care.
- 1:12:05Christopher Trudeau: Right.
- 1:12:06Michael Kennedy: But let me give you an example.
- 1:12:07Michael Kennedy: For example, I could go install an app that has Postgres, Valkey, and the web app.
- 1:12:15Michael Kennedy: If I, then I just click install that from wherever self-hosted definition that comes
- 1:12:20Michael Kennedy: from, it creates those three containers.
- 1:12:22Michael Kennedy: And then on the container setting through the image setting, I don't know really how
- 1:12:26Michael Kennedy: you think of it.
- 1:12:26Michael Kennedy: I mean, they're not, I guess it's image sort of, you can go to the web part and say, and
- 1:12:31Michael Kennedy: just use this URL and it'll automatically do the SSL generation as part of that.
- 1:12:36Michael Kennedy: Then you go to the database, the Postgres thing, you say, oh, and make backups for
- 1:12:39Michael Kennedy: me daily and store them in this S3 compatible storage.
- 1:12:43Michael Kennedy: And that kind of stuff is a lot of extra when you're doing it yourself and you
- 1:12:47Michael Kennedy: just go check those boxes.
- 1:12:48Michael Kennedy: So that's the one point forward, that's the two forward, but then there's the
- 1:12:52Michael Kennedy: step back.
- 1:12:52Christopher Trudeau: Yeah.
- 1:12:52Christopher Trudeau: Yeah.
- 1:12:52Christopher Trudeau: Well, and that tends to be also what makes people nervous, right?
- 1:12:56Christopher Trudeau: So like that, and that's, you know, I still use managed database simply because I don't want to
- 1:13:02Christopher Trudeau: have to think about it, right? Like it's like, yeah, okay. I'm perfectly fine with pointing my
- 1:13:07Christopher Trudeau: app at a managed database and let somebody else think about backing it up and all the rest of it.
- 1:13:12Michael Kennedy: Yeah. Yeah. You know, one thing about managed databases that I don't like, and I can't speak
- 1:13:16Michael Kennedy: to all potential hosts of them, but certainly some of them, some well-known ones, some names I've
- 1:13:21Michael Kennedy: already said, if you get a managed database there, that database server is listening on the public
- 1:13:26Michael Kennedy: internet. I very much do not espouse having a database listening. Yeah, it has a password,
- 1:13:34Michael Kennedy: but I mean, that's that database. I'm always worried about what is in the database.
- 1:13:38Christopher Trudeau: That's interesting. I've never thought to even check that.
- 1:13:41Michael Kennedy: And on my setup, not only is it not listening on the internet, it's not even listening on the
- 1:13:46Michael Kennedy: host there's like a private docker network that only things right in the docker shared docker
- 1:13:52Michael Kennedy: network can even know about or see the data you know what i mean so there's yep it's it's less
- 1:13:58Michael Kennedy: likely to fewer holes but i have to make backups and if i don't it's bad if it goes down it's real
- 1:14:04Michael Kennedy: bad so and it did one time this year i was down for like 10 minutes about a hair out there goes
- 1:14:09Christopher Trudeau: - That was your sixth nine, yes.
- 1:14:11Christopher Trudeau: - Exactly, I know.
- 1:14:13Michael Kennedy: So the problem was just for people who wanna benefit
- 1:14:17Michael Kennedy: from my suffering and not suffer themselves,
- 1:14:19Michael Kennedy: is I did not, on the Docker pull for the database image,
- 1:14:23Michael Kennedy: I didn't pin it to a major version.
- 1:14:26Michael Kennedy: And so it upgraded and then it said,
- 1:14:27Michael Kennedy: well, you have old data in your file system
- 1:14:29Michael Kennedy: and we're not gonna upgrade it for you automatically.
- 1:14:31Michael Kennedy: So we're not gonna run.
- 1:14:32Michael Kennedy: I'm like, why is the database server not running?
- 1:14:33Michael Kennedy: It just, and it was like a weird update.
- 1:14:36Michael Kennedy: It was like 8.2.1 that broke.
- 1:14:39Michael Kennedy: Well, why?
- 1:14:40Michael Kennedy: Point one.
- 1:14:41Michael Kennedy: Surely, surely a bigger number needs to be like, this will never run again.
- 1:14:49Michael Kennedy: Anyway, you know, you find the stuff out the hard way, but yes.
- 1:14:51Michael Kennedy: Well, yeah, that that's the negative, not using a managed database.
- 1:14:56Christopher Trudeau: Yes.
- 1:14:56Christopher Trudeau: Yeah.
- 1:14:57Christopher Trudeau: Yeah.
- 1:14:57Christopher Trudeau: Cause you have to deal with some of that kind of stuff yourself.
- 1:14:59Christopher Trudeau: Yeah.
- 1:15:00Christopher Trudeau: So I thought we would wrap up by reviving an old tradition.
- 1:15:04Christopher Trudeau: I have two questions for you.
- 1:15:06Christopher Trudeau: What is, what, what, what is your development environment?
- 1:15:09Christopher Trudeau: and what library are you excited about?
- 1:15:12Michael Kennedy: So the development environment right now
- 1:15:15Michael Kennedy: is a mix of Cursor and PyCharm for sort of editing.
- 1:15:21Michael Kennedy: And despite this very detailed conversation about Docker,
- 1:15:24Michael Kennedy: I don't use Docker very much locally for development.
- 1:15:28Michael Kennedy: I just use virtual environments.
- 1:15:29Michael Kennedy: And I want to give a shout out to Hynek,
- 1:15:31Michael Kennedy: who I had some back and forth about
- 1:15:33Michael Kennedy: when I was writing some of this stuff
- 1:15:34Michael Kennedy: that gave me some really good ideas.
- 1:15:36Michael Kennedy: And he has a really good article,
- 1:15:37Michael Kennedy: which I referenced in the book,
- 1:15:38Michael Kennedy: about you just use virtual environments.
- 1:15:41Michael Kennedy: Keep everything consistent, right?
- 1:15:42Michael Kennedy: That's an interesting debate that we don't have time for,
- 1:15:45Michael Kennedy: but it's very fun.
- 1:15:46Michael Kennedy: So uv, I'm a huge fan of uv.
- 1:15:50Christopher Trudeau: - Particularly in Docker, that makes things that much faster.
- 1:15:53Michael Kennedy: - Yeah, because you can just say in your Docker,
- 1:15:55Michael Kennedy: it used to be you're like, okay, well,
- 1:15:57Michael Kennedy: I gotta use Docker and I need to use Python.
- 1:15:59Michael Kennedy: So let me use the official Python distribution for Docker
- 1:16:01Michael Kennedy: because I need to have Python.
- 1:16:03Michael Kennedy: And then, well, that excludes 99.9%
- 1:16:08Michael Kennedy: have all the other things you could build upon
- 1:16:10Michael Kennedy: that already have something that's harder to manage
- 1:16:12Michael Kennedy: set up for you, right?
- 1:16:14Michael Kennedy: But in your Docker file, you just say,
- 1:16:16Michael Kennedy: run uv venv-python3.14,
- 1:16:20Michael Kennedy: you've installed Python 3.14 in two seconds.
- 1:16:23Michael Kennedy: And it's cached, right?
- 1:16:24Michael Kennedy: It's like, yeah, it just, it makes it so much faster
- 1:16:27Michael Kennedy: and so powerful, but also just in general, right?
- 1:16:30Michael Kennedy: Like it's unified so many tools that I like
- 1:16:33Michael Kennedy: that are just, it's all there together.
- 1:16:34Michael Kennedy: And then library, oh my goodness.
- 1:16:37Christopher Trudeau: - Now you know how it feels
- 1:16:38Michael Kennedy: like i know how it feels and now i didn't warn you on purpose i love it i love it so there's
- 1:16:45Michael Kennedy: there are a bunch of ones i've been playing with lately and i'm trying to think which one i've
- 1:16:49Michael Kennedy: i've used i don't really have a great answer to this chris i'm i'm afraid to say i would say
- 1:16:54Michael Kennedy: let's keep it let's keep it flowing with some of the vibes that we had here i would say
- 1:16:59Michael Kennedy: let me give a shout out to set proc title which there you go sounds insanely silly like the goal
- 1:17:06Michael Kennedy: of that is so in your process and your Python process and I actually use this
- 1:17:10Michael Kennedy: on a bunch of different things in your Python process you can say set proc
- 1:17:14Michael Kennedy: title dot set title and you give it the name of whatever you want your process
- 1:17:18Michael Kennedy: to be so why does that matter when you pull up all these tools like glances be
- 1:17:24Michael Kennedy: top or others anything that looks at processes basically instead of seeing
- 1:17:28Michael Kennedy: Python Python Python node node node postgres postgres postgres at least the
- 1:17:32Michael Kennedy: Python ones now have meaningful names and you might be thinking well Michael
- 1:17:36Michael Kennedy: that much production, useless to me.
- 1:17:38Michael Kennedy: No, it's good for development too.
- 1:17:40Michael Kennedy: Have you ever had the idea,
- 1:17:43Michael Kennedy: like I wanna know how much memory my process is using.
- 1:17:46Michael Kennedy: Is it using a lot or a little?
- 1:17:47Michael Kennedy: So you pull up, you know, activity monitor,
- 1:17:49Michael Kennedy: task manager, whatever, you see Python, Python, Python,
- 1:17:52Michael Kennedy: you're like, oh man, I know my editor's using one of these
- 1:17:55Michael Kennedy: or whatever, but which one is it?
- 1:17:57Christopher Trudeau: - And if you're using the right terminal,
- 1:18:00Christopher Trudeau: it'll change the terminal's title too,
- 1:18:02Christopher Trudeau: because most terminals respond to the proc name.
- 1:18:05Michael Kennedy: Oh, that's a very nice touch. Yeah. Okay. Yeah. So, but if you, if you do that in development,
- 1:18:10Michael Kennedy: if you just set the name of your process to be like, you know, my utility or whatever the heck
- 1:18:15Michael Kennedy: you call it, right. Then when you go into process management tools, like even just for Mac or
- 1:18:19Michael Kennedy: windows or whatever, you'll see it and you can see how much CPU is it using? Is it using a lot of RAM?
- 1:18:25Michael Kennedy: If you've got to end task it, like we now have another way reason that this is something we've
- 1:18:29Michael Kennedy: got to do all the time is the, sometimes the agentic AI things go mad and they start a bunch
- 1:18:35Michael Kennedy: servers and then they lose track of them and then you can't run anymore because it says um port is
- 1:18:39Michael Kennedy: in use you're like but where like something in that stream of text that shot by for five minutes
- 1:18:45Michael Kennedy: it started one and then it left it going but then you pull it up it says python python python and
- 1:18:51Michael Kennedy: like well i don't want to kill the other thing that's running you know what i mean and so it also
- 1:18:56Michael Kennedy: gives you a way to kill off your ai abandoned stuff that it went mad on so there you go setting
- 1:19:01Christopher Trudeau: a process name might save you a reboot. There's your little nugget to take away from the podcast.
- 1:19:06Michael Kennedy: Exactly. It's a package with one function, but it's a good one.
- 1:19:11Christopher Trudeau: Excellent. Well, thank you for having me on. This has been fun to sort of reverse the tables on you.
- 1:19:16Christopher Trudeau: It's been great.
- 1:19:18Michael Kennedy: Yeah. Chris, thank you so much. I really appreciate it. And always great to catch up with you. Bye.
- 1:19:21Christopher Trudeau: It's been fun to be here.
- 1:19:23Michael Kennedy: This has been another episode of Talk Python To Me. Thank you to our sponsors. Be sure to check
- 1:19:27Michael Kennedy: out what they're offering. It really helps support the show. Look into the future and see bugs before
- 1:19:32Michael Kennedy: they make it to production. Sentry's Seer AI code review uses historical error and performance
- 1:19:38Michael Kennedy: information at Sentry to find and flag bugs in your PRs before you even start to review them.
- 1:19:44Michael Kennedy: Stop bugs before they enter your code base. Get started at talkpython.fm/seer-code-review.
- 1:19:51Michael Kennedy: Agency. Discover agentic AI with agency. Their layer lets agents find, connect, and work together.
- 1:19:57Michael Kennedy: any stack, anywhere. Start building the internet of agents at talkpython.fm/agency spelled
- 1:20:04Michael Kennedy: A-G-N-T-C-Y. If you or your team needs to learn Python, we have over 270 hours of beginner and
- 1:20:10Michael Kennedy: advanced courses on topics ranging from complete beginners to async code, Flask, Django, HTMX,
- 1:20:17Michael Kennedy: and even LLMs. Best of all, there's no subscription in sight. Browse the catalog at talkpython.fm.
- 1:20:23Michael Kennedy: And if you're not already subscribed to the show on your favorite podcast player,
- 1:20:27Michael Kennedy: What are you waiting for?
- 1:20:29Michael Kennedy: Just search for Python in your podcast player.
- 1:20:30Michael Kennedy: We should be right at the top.
- 1:20:32Michael Kennedy: If you enjoyed that geeky rap song,
- 1:20:33Michael Kennedy: you can download the full track.
- 1:20:35Michael Kennedy: The link is actually in your podcast player show notes.
- 1:20:37Michael Kennedy: This is your host, Michael Kennedy.
- 1:20:39Michael Kennedy: Thank you so much for listening.
- 1:20:40Michael Kennedy: I really appreciate it.
- 1:20:42Michael Kennedy: I'll see you next time.
- 1:20:55Michael Kennedy: Thank you.