Monitor performance issues & errors in your code

#206: Running Django in Production Transcript

Recorded on Tuesday, Feb 19, 2019.

00:00 Michael Kennedy: Let's talk about running Django in production. On this episode, you'll meet Michael Herman, who used to work on realpython.com and today is running testdriven.io. We'll cover some of the trade-offs between a set of microservices and a monolith and a round trip journey between them as well. This is Talk Python To Me, Episode 206, recorded February 19th, 2019. Welcome to Talk Python To Me, a weekly podcast on Python: the language, the libraries, the ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter, via @talkpython. Michael, welcome to Talk Python.

00:51 Michael Herman: Thank you.

00:52 Michael Kennedy: It's great to have you here. You've been doing so many cool things in the community and creating all these community projects and really helping a lot of people learn Python and programming, so I'm excited to have you on the show and dig into all of those things and more, but before we do, before we get to them, let's start with your story. How did you get into programming and then Python?

01:09 Michael Herman: Sure, yes, so I started programming back in, say, seventh grade, I think that was like '96, '97, and it was really to compete with my best friend, Derek, who started a very popular PlayStation website called PlayStation Fan. Started out on GeoCities and then eventually moved to a domain name, but yeah, just started off with HTML and CSS and a bit of JavaScript.

01:31 Michael Kennedy: Wow, that's really interesting. GeoCities, that's something I haven't thought about for a while, but for younger people, that was the WordPress of the day, the wordpress.com of the day or whatever. You could just go and click a button and make your site and they were often quite cheesy, right?

01:45 Michael Herman: Yeah, yeah, definitely. Yeah, I started with a PlayStation website as well, PlayStation Extreme, and then moved onto Final Fantasy, got really big into Final Fantasy 7, and then, I started a Final Fantasy 8 enthusiast website, ff8.org, and sort of paid the bills around that with mod chip advertising. I don't know if you remember mod chips, but it's basically a lot of allowed you to...

02:09 Michael Kennedy: No, I don't know that at all, no.

02:10 Michael Herman: Yeah, you solder them onto your PlayStation, you could play games that were outside the US.

02:18 Michael Kennedy: Oh, interesting. So, a little bit of a side-loading, get around the restrictions of the PlayStation there. So, did they get pretty popular or what, are they just sort of hobby things?

02:27 Michael Herman: They did get pretty popular. I had a lot of companies send me games they wanted me to review and I think, sort of, with the Final Fantasy 8 website, I had an early bootleg copy of it and of course, it was in Japanese and being an RPG, you couldn't really do much with it, but yeah, I did get a lot of early copies of games and whatnot to review.

02:46 Michael Kennedy: Wow, that's really cool. So maybe, if that was today, you would be doing a Twitch channel at that age or something like that, but back then, it was a website. Interesting. So, there's not a whole lot of programming there per se, though, is there? I mean, that's kind of getting you started in the web world, but where did you really get into programming for real?

03:06 Michael Herman: So then I learned a bit of the LAMP stack, mostly the M and the P, and then, I really started looking at vBulletin and sort of the message forums of the day and got really good into adding tweaks and hacks to them. In high school, took a Basic and Pascal and then a C++ class and kind of, that was my sophomore year of high school, or freshman, sophomore year, and then, my junior and senior year, I actually went half-days at high school and half-days at a vocational tech program and with the hardware side, got A+ certified, and that was back in the day with desktops. I don't think it means anything these days, but.

03:53 Michael Kennedy: And you don't get too many recruiters reaching out to you for that?

03:56 Michael Herman: No, no.

03:56 Michael Kennedy: No, that's a super cool thing that you can do at high school though, right? I mean, there's so many classes you take that are kind of fluffy, just you got to do something for the day at high school, and that sounds really constructive and useful. Did you enjoy it?

04:10 Michael Herman: Yeah, yeah, it was very practical, gave me a lot of skills and learned quite a bit about the hardware side of things. Also, got Cisco certified, I think it was the CCNA, network administrator. That might mean something a little bit more now, but not sure.

04:27 Michael Kennedy: Yeah, still, it sounds like a really cool project, especially for when you're in high school. Would you get a CS degree from there?

04:33 Michael Herman: No, so, in college, ended up starting in computer science, took a philosophy class. That steered me into philosophy, then my dad was subsidizing most of my education, so ended up with a practical business degree.

04:45 Michael Kennedy: Yeah, that's cool. He's like, look, you can these philosophy classes, but you can't live on philosophy very easily, so go get a regular degree?

04:52 Michael Herman: Right, basically, it was, unless you're going to law school, you're going to do something different.

04:56 Michael Kennedy: Yeah, that makes a lot of sense. Philosophy is really fun, but it's a hard job to have, I think, unless you just want to be a teacher. Yeah, for sure. Okay, so, lot of interesting background there. So, how'd you get to Python?

05:08 Michael Herman: So, after my undergrad, I ended up moving to New York and was working in a sort of a sales support, sales operation type role for Yahoo! Sort of got back into coding there, was doing a lot of Excel, doing a lot of VBA, writing little macros here and there, and eventually, that led me to San Francisco and I started working at start-ups, started wearing multiple hats, and so, sort of my finance and Excel experience led to Python, 'cause I found I could do things a lot quicker and do things a lot more efficient with Python and having that control Excel over VBA.

05:46 Michael Kennedy: Yeah, that makes a lot of sense. And that sort of debate and functionality is still raging today. We've got that user voice issue where everyone's trying to get Python into Excel and Microsoft has kind of put their head in the sand and ignored it, but you know, every couple of days, there's a new person who goes, what a great idea, like thousands and thousands of votes, but yeah, we'll see. I think a lot of people go on that path. So, when you got to San Francisco, was this like the dot com heyday or was it after that?

06:11 Michael Herman: It was after that. This was 2008, 2009.

06:15 Michael Kennedy: Yeah, it would've been wild to be there, '98, '99. That time, it would've been crazy, but I wasn't there either, so. Alright, so that was your history. How about today, what are you doing day to day?

06:28 Michael Herman: These days, I'm spending about 50% on a start-up that I started called testdriven.io. We're developing the platform, doing content marketing, and of course, development, and then, 50% on freelance.

06:39 Michael Kennedy: Okay, that sounds really fun. You could control quite a bit of what you do and always building these new platforms, these new products, it's so exciting, right?

06:49 Michael Herman: Yeah, so, I went back to freelance a couple weeks ago, so I've been free from a day job for about two weeks.

06:58 Michael Kennedy: Yeah, are you having cubicle withdrawal or anything like that, are you okay?

07:01 Michael Herman: I'm fine, I'm fine, yeah.

07:05 Michael Kennedy: Nice. Yeah, how's it going, you enjoying it?

07:07 Michael Herman: Yeah, the commute is a lot better. Sort of get up, roll out of bed, right there.

07:11 Michael Kennedy: Yeah, that sounds great. We're definitely going to talk a lot about TestDriven and I feel like TestDriven is, it's got a lot of parallels to what you did before, even going back to your story that you already told about starting the Final Fantasy and the PlayStation sites and then, moving onto something that you're pretty well-known for is starting Real Python. Alright, is this like the next generation of that, maybe?

07:33 Michael Herman: Yeah, so, I've definitely been drawn towards tech education and teaching in general. I taught it at boot camp for a number of years. That was full stack JavaScript, so we won't talk about that. But I'm a programmer first and I'm a teacher second, so that's why I'm not teaching right now, but yeah, there's definitely a lot of parallels between Real Python and TestDriven. I would say that TestDriven, targeting a little different audience, starting in the intermediate to advanced level web developers, whereas Real Python was all targeting just the basics.

08:04 Michael Kennedy: Yeah, I'm sure that makes a lot of sense. You know, I feel like, you said you're a little bit more of a developer than a teacher, but also a teacher, and I feel like, really, to be a proper teacher who teaches developers, you have to get your hands dirty, right? You have to write this code. It's not enough to just know, it works this way, you have to know, actually, I tried it that way, and that seemed like it was going to work, but in practice, it was really painful and this other way, like, you need to have those scars to help people along, I think.

08:36 Michael Herman: Right, and that's one of the things that the boot camp that I worked for struggled with, how to continually scratch that itch for those developers first that really wanted to get back into the field and I don't really think there is a correct or right answer there for that, but it is definitely something that they struggled with, it's definitely something I struggle with as well. But yeah, I enjoy working freelance jobs and I also enjoy working on the TestDriven platform. That's one of the reasons why I decided to build a platform, was so actually, I had something there, something I can actually work on, something I can actually scale and whatnot.

09:09 Michael Kennedy: Yeah, I'd be interested to hear your thoughts on this, but for me, a lot of times, when I look out there and I'm like, I need something to solve some kind of problem and I could grab something off the shelf and use it or I could build it myself, there's always that, does it make sense for me to put that time and effort into it versus just grab something and it won't be quite the perfect fit, but it'll be good enough. But for me, another thing I'm always got going in my back of my mind is, if I did have to or went down the path of building this myself, would it give me something really interesting to learn and teach other people, right? Maybe I could just get some teaching platform, but if I built my own, hey, maybe I could use the lessons learned from there to actually create courses or create interviews and things like that, right? Do you think about stuff that way as well?

09:53 Michael Herman: Yeah, definitely the build versus buy type thing. I think a lot of educators out there that are on the internet, they use a lot of the existing platforms and maybe they're more teachers, maybe they're more into building content and whatnot. I'm a doer, I'm a hacker, and so yeah, I definitely like having that platform there. If somebody is like, hey, I will promote your courses if you have this little tweak in there, I can go in there and just add that little tweak, whereas, if I'm using some other platform, then I'm at the whim of the developers there.

10:23 Michael Kennedy: Yeah, it's usually more painful up front, but often, at the end, you're like, I'm so glad I get to completely control this experience.

10:29 Michael Herman: Right.

10:29 Michael Kennedy: So, a bit of a time shift, by the time this episode comes out, I will have released a show with Ned Batchelder and a couple of other folks called Beginners and Experts, but that hasn't been released yet, so you have no chance to have heard it, so I'll just tell you real quick. We talked about a lot of the challenges that beginners and experts had and it seemed like the syntax people could learn pretty well and other things, they could follow along, but the real challenge is looking at a problem and going, this is how I break down that problem, these are the steps, like, okay, this needs this type of database for it. That's better as a web app versus as a command line, just these quick analyses that you do with experience that, when you're new, you're like, I don't even know what tools to bring to bear. Once I knew that, I could probably do it pretty well, but I don't know what to start with, and that comes back to this sort of, the scars and the boot camp story you were telling me. How do you think that people can at least speed up that learning process to sort of get that experience? Do you have any shortcuts? We didn't have any great options, honestly. I mean, maybe reading other peoples' code and stuff, but really, how do I decide how to attack a problem? Do you have any kind of advice there?

11:41 Michael Herman: I don't have any real advice in terms of speeding things up. I think that just takes time and it is about being able to break a problem up into manageable pieces. I think really focusing on information retrieval skills, I think that was one thing that I always told my classes is, the one thing that differentiates myself from you all is, I'm a way better Googler. I can find answers to Stack Overflow questions, that sort of thing, within the first three or four pages or whatever, when I Google something, and I'd always tell them, if you're on that end of the second page and in the third page of your Google results, you probably need to re-craft your query.

12:19 Michael Kennedy: Yeah, and part of that is filtering it out, going no, irrelevant, irrelevant, irrelevant, this is the one, right? But when you're new, it's hard to go, these are irrelevant. I think that's part of the challenge as well.

12:31 Michael Herman: Yeah, I do have a Master's of Science in Information Science and for a bit there, I was thinking about going the librarian route and I see a lot of parallels between web developers and librarians, whereas librarians are not subject matter experts, they're just able to connect with information quickly. I think a lot of web developers, sort of the jack of all trades, master of none, have that same sort of philosophy that they can pick up things really fast. They might not be an expert in any one particular area, but they can wear many hats and go up and down the stack.

13:03 Michael Kennedy: Yeah, especially if you're a JavaScript developer, because whatever you know is out of date five, even six months later, right? The new framework is not the one, but the new shiny comes along really quick in that space.

13:14 Michael Herman: Definitely.

13:15 Michael Kennedy: So, since we're on the topic of boot camps, let me ask you just a couple questions about that. Putting aside whether it's JavaScript or Python or whatever the subject is being taught at the boot camp, do you think they're a good value? Do you see people getting lots of success, maybe relative to a CS degree or relative to just, hey, I bought some books and took an online course? Do you think it's worthwhile? They're pretty expensive, but you know, maybe it's worth it.

13:40 Michael Herman: I definitely think it's worth it. A lot of times, it depends on the type of jobs that you're looking for. If you're looking to build an Angular-type framework, you probably need a CS degree. If you're looking to leverage Angular to build your own type of products, then you're probably fine with just going to a boot camp.

13:58 Michael Kennedy: I definitely agree with that. A lot of times, you're in a CS degree and there's more formal programs. You're taught way more theory and deeper level stuff than you probably need to know. You probably have to take differential equations as a CS degree, you probably have to learn how to create an operating system and all that stuff is good to know, but you could be a completely competent, functional web developer, whatever kind of developer, unless you really are building an OS or something, just knowing the APIs and a little bit of theory, which seems like a lot of that, you could get at a boot camp.

14:34 Michael Herman: Right, yeah, definitely.

14:35 Michael Kennedy: Yeah, cool. Were you there helping people get jobs afterwards? What was that side of the thing? That was probably like a big celebration, like somebody who just got a job who recently graduated or something like that.

14:45 Michael Herman: Yeah, the placement rates of the program were pretty high. They were in the 90s, which you think of college...

14:51 Michael Kennedy: That's pretty high.

14:52 Michael Herman: And you think of some of those degrees, that's why they don't post the placement rates. But yeah, even though I wasn't formally part of that transition to the job market, I had that double-edged sword where it was like, I think I cared a little bit too much, and so, I was all-in and kind of lost myself a little bit in teaching, but yeah, I was definitely there helping students interview, connecting students with people I knew in the community and whatnot.

15:18 Michael Kennedy: Yeah, cool. Real quick, single piece of advice for people trying to get a job coming out of a boot camp? What would you tell them?

15:23 Michael Herman: Ooh, yeah. So many. Keep coding, I guess. There's just too many. Keep coding, go to meet-ups, keep connecting with people. It's difficult, I don't think there is a single piece of advice, but definitely keep coding, go to meet-ups, connect with people.

15:39 Michael Kennedy: Awesome, yeah, sounds good. Alright, so let's bring it back to a little bit more of what we were going to talk about originally. I want to definitely talk about testdriven.io and what you're doing there and some of the lessons you've learned, but let's start at the beginning on that side of things. So, as I said before, you founded realpython.com, and did you do it alone or did you do it with some other folks?

16:00 Michael Herman: So yeah, there were two other co-founders. Fletcher, the original founder, founded it in, I want to say, 2010, and he did the original Kickstarter for the first Real Python course and I actually wasn't involved in it then. I came after that and I can't remember who contacted who, but we were talking about, hey, how can we take sort of the philosophy of Real Python, the learning by doing, and apply it to web development?

16:29 Michael Kennedy: Yeah, that's really cool. So, it started as a Kickstarter, huh?

16:33 Michael Herman: Started as a Kickstarter, each of the courses were Kickstarted, I was heavily involved in the second and the third Kickstarters, but we really started because there were just no beginner courses out there and now, it's kind of a dime a dozen, which sort of leads to testdriven.io, but yeah, we started because there was just nothing really practical out there.

16:54 Michael Kennedy: Yeah, it's super interesting. I don't think I saw the original Kickstarter. I probably saw your last Kickstarter that you all did and I was really impressed. I mean, you guys, you ran it well, it was super successful, it was actually a big inspiration to me as I was thinking about starting my own teaching platform, over at training.talkpython.fm, and I was sort of exploring the, how am I going to get the word out about this? What is the right way? Should I just talk about it on the podcast? What should I do? And I came up across your Kickstarter, thinking wow, there's actually a real need here, people seem to be really into this, and it was well done, good job.

17:35 Michael Herman: Yeah, thank you. I actually wrote a blog post. I don't remember if it was after the second or the third Kickstarter, but it's on segment.com or something like that, but it's on how to use Kickstarter to model the lean philosophy. How can you get something out there real quick, just to see if you can get product market fit? And I was really into the lean philosophy of the time and still am, so I think you can use Kickstarter for that.

17:59 Michael Kennedy: I do too. I think Kickstarter is a little bit of a challenge because you have to have a little bit of an audience or you've got to have a really good marketing team or you have to be lucky. You already had maybe a little bit of an audience around the Real Python stuff, so it was enough to get it rolling.

18:16 Michael Herman: Yeah, you really want to get to your hundred percent level really within the first couple days, 'cause it's really the popularity bias. Kickstarter will start promoting it, people will want to invest and be part in something that's popular, so really, getting to that hundred percent of your goal within the first couple days and that was really what I really focused on at first, so if you need $5,000, maybe actually put it at $2,000, so that way, you get up there much quicker.

18:43 Michael Kennedy: I absolutely agree. Anyone who is out there thinking about having a Kickstarter, it's absolutely about getting to your goal as quick as possible, even if that's not your real goal, because like you said, the way a Kickstarter... I launched my first course on Kickstarter as well and it was funded in 12 hours and then it spent three weeks in the number one Kickstarter on software on Kickstarter. I could've put $20,000 for it and it probably would've funded, maybe, but I put, I don't remember what I put, like three or something silly, something small, because I was going to do it anyway. I was going to write the course anyway, so it's not like it was hardware and I would have to invest in a bunch of CNC machines and dyes. I'm going to do it anyway and I don't exactly need the money to pay to do it, although money would really help, basically, take the edge off of the nervousness of quitting your job and doing that, but it's super important to get it funded quick.

19:44 Michael Herman: Yeah, I mean, we would've done it anyway too. It was just an extra way to bring in a little bit of revenue and then, yeah, it was just also sort of the popularity around that. We got our name out a little bit more with Kickstarter.

19:56 Michael Kennedy: Yeah, absolutely. You know, one thing that was really surprising to me was, I thought the vast majority of the funders of the Kickstarter would be people that I would somehow tell about, either on social media or on the podcast or some other way, and 40% came just from Kickstarter, not from any... It was really surprising, so I think it was quite a good deal. This portion of Talk Python To Me is brought you by Linode. Are you looking for hosting that's fast, simple, and incredibly affordable? Well, look past that bookstore and check out Linode at talkpython.fm/linode. That's L-I-N-O-D-E. Plans start at just $5 a month for a dedicated server with a gig of RAM. They have 10 data centers across the globe, so no matter where you are or where your users are, there's a data center for you. Whether you want to run a Python web app, host a private Git server, or just a file server, you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly support even on holidays, and a seven-day money back guarantee. Need a little help with your infrastructure? They even offer professional services to help you with architecture, migrations, and more. Do you want a dedicated server for free for the next four months? Just visit talkpython.fm/linode. So you had these three courses originally. Do you remember what they were, the names?

21:17 Michael Herman: It was basically Real Python 1, 2, and 3. We didn't really have names for it, but the first Real Python course was just the Python fundamentals, the second one was web development, and I guess, unofficially, Flask, and then, the third one was just more of a little bit more of an advanced course and that was all Django-based.

21:35 Michael Kennedy: Yeah, that's really cool. How long did it take for you to write the courses?

21:40 Michael Herman: I'm the author of the second course and I want to say six months.

21:45 Michael Kennedy: Yeah, sounds about right. How long is it for the students to take the course?

21:50 Michael Herman: Oh, gosh, there is so much content there. There's way, way too much content. Yeah, I would probably say it's like 6 or 700 pages of content there and it goes into web fundamentals, it goes into HTTP, it goes into web scraping, and then you sort of build a CGI-based framework and then you go into Flask and I do a little bit of web2py. Oh, and then actually, at the end of the course, there is a bit of Django that sort of leads into the last course.

22:19 Michael Kennedy: Yeah, that's a lot of content. You got to get yourself in the right mindset to work on something that's going to be six months out before you know whether it's successful and just work on something that long before you figure out whether it was a good idea.

22:33 Michael Herman: Yeah, it takes a lot of planning, a lot of discipline, a lot of pain, a lot of lonely nights.

22:40 Michael Kennedy: But it's rewarding in the end, right?

22:42 Michael Herman: Yes, yes, I think so. Although, I would say, if you actually want to make money, don't write a book, but I keep writing books, so should probably actually listen to my own advice here.

22:52 Michael Kennedy: Yeah, someday maybe, right? Yeah, that's funny.

22:55 Michael Herman: Another life.

22:56 Michael Kennedy: Yeah, for sure. So, Real Python now, realpython.com now, has more than just those three courses. There's like a ton of content and when I throw it into the various analytics systems that'll tell me the amount of traffic going to realpython.com and stuff, it's pretty seriously impressive. That site that you built shows up quite high on a lot of Google searches for anything to do with Python.

23:21 Michael Herman: Yeah, it's pretty incredible. I don't own Real Python anymore. Dan Bader actually took that over, but yeah, he has done an amazing job of really kind of creating a sort of like New Yorker-esque-type magazine for Python. He hired somebody to do all the graphic design and each individual article has its own unique sort of graphic to it, and then, yeah, there's more courses on there now, so it's really incredible just to see what he has done.

23:48 Michael Kennedy: Yeah, I'm super impressed with what Dan has done and he's really turned the knob up a little bit more and he's got a lot of people participating and whenever there's an article on there, it's not just one of these three-paragraph and then a bunch of weird, unrelated other articles at the bottom. Those are like little mini-books, almost. Those are serious articles that Dan's putting together.

24:11 Michael Herman: Yeah, his articles focus a little more on the Python basics or fundamentals, so they'll probably stand the test of time a little bit more. I enjoy the website and so I focused a little bit more on the practical sort of tutorials and those are out of date, could be within hours, depending on what happens. They definitely don't stand the test of time quite as well as the fundamentals.

24:34 Michael Kennedy: Yeah, that's definitely a challenge, for sure. So, I think Dan is doing a super job with Real Python, but why did you guys sell it?

24:40 Michael Herman: Well, I mean, different opportunities came our way. We wanted to focus on other things. The original founder, Fletcher Heisler, he was getting into security and he actually started a company called Hunter2 and he went through Y Combinator and I believe he's still working on that. Jeremy ended up, he had a software testing business, he lived abroad in Malaysia for a number of years, he moved his wife and his family to Cambridge and got a job at Harvard and yeah, I wanted to focus a little bit more on teaching, and also, I wanted to focus on sort of teaching more intermediate to advanced level developers, just those that could already build, sort of pick right up, and so that transitions us into testdriven.io.

25:27 Michael Kennedy: Yeah, absolutely, that sounds totally normal. You have a couple people working on stuff and they just kind of start to drift in different directions and working on something like realpython.com, it takes a lot of not just effort, but enthusiasm. You have to wake up and go, okay, there's this great new topic I want to write this article about and if you're just distracted with other things that seem more valuable to you at the moment, then it's hard to do that, right?

25:53 Michael Herman: Mm-hmm.

25:54 Michael Kennedy: Do you think it would've been different if just one person ran it? Say if it was just you running it by yourself?

25:59 Michael Herman: I think I would've burned out quicker. I think I would've moved on quicker.

26:04 Michael Kennedy: Interesting.

26:04 Michael Herman: Yeah, I don't know. That's difficult to say, but yeah, I think if it may have just been my baby, I may have just stuck with it and seen it through, but since it was all three of ours, all of us were at a point where it's like, hey, this is a good time to transition.

26:22 Michael Kennedy: Yeah, that makes sense. I couldn't guess really whether it would mean you'd be done with it sooner or if you would've had a little more, I'm just going to guide it my way. Interesting. Alright, so yeah, you mentioned TestDriven. Let's talk about TestDriven. Your current project is testdriven.io and it looks somewhat similar to the way you described the origin of Real Python itself.

26:45 Michael Herman: Yeah, so TestDriven really came from a similar origin as Real Python, whereas Real Python, there were no beginner courses on the market, TestDriven came about because there were basically too many beginner courses on the market and there were not enough intermediate to advanced level courses and also, I was sort of transitioning from, I'd say, application development, more towards infrastructure or platform development. I kind of wanted to write a little bit more about that, microservices, Docker, Kubernetes, all the latest buzz words these days.

27:16 Michael Kennedy: Yeah, yeah, yeah. We'll definitely talk about that a little bit. It sounds to me a little bit like some of these courses are coming from your experience of running things like Real Python and other consulting projects that you're doing, kind of like I mentioned before, the build versus buy story.

27:31 Michael Herman: Yeah, yeah, they definitely come from real world experience. Just my last couple full-time gigs, just moving a little bit more towards DevOps side of things, or platform development and helping companies transition into more of like a DevOps-y-type mindset.

27:47 Michael Kennedy: Yeah, yeah, that's really cool. So right now, it looks like you have microservices with Docker, Flask, and React, and Real-time apps with Django channels and Angular and you definitely have this flavor of Python on the backend and rich JavaScript front end frameworks like React or Angular. Is that kind of your vibe these days, how you like to build web apps?

28:08 Michael Herman: Yeah, yeah, the stacks that I work on are usually Django or Flask on the backend and then, some sort of single-page application type framework like React, Angular, Vue, on the client side.

28:20 Michael Kennedy: Nice. I've been doing some stuff with Vue lately and I'm really enjoying it. What's your favorite front end framework these days?

28:26 Michael Herman: I like Vue, too. You can move a little bit faster. With Vue, you do get the two-way binding with Vue that you don't get from Angular and React, so just spitting out forms is so much easier. I don't know as much about Vue as scale though. I don't know if you can lock down two-way binding back down to one-way binding, but I definitely like the Vue way of doing things.

28:46 Michael Kennedy: Yeah, I do too, it's quite nice. Testdriven.io itself, is this built on Python? How are you running that site?

28:53 Michael Herman: It's a Django backend. I am using server-side templating, 'cause I don't think single-page applications are for everything, especially when you're a single-person development team, so I can move a little bit faster with server-side templating and then, I just use just vanilla JavaScript on the client.

29:09 Michael Kennedy: That's always an interesting tension, isn't it, of having just a full-on JavaScript front end type of app versus, like you said, a server-side app. I'm still a little bit partial to the server-side stuff. I feel like the SEO is a little bit simpler a lot of times. There's less compatibility to worry about, like if I send the HTML, I know that's the HTML they got, not what kind of JavaScript platform are they running, like some crappy old browser or something like that.

29:33 Michael Herman: Right, yeah, if you're using a single-page application, then yeah, you have to actually guide the search engine to crawl through, kind of trick the search engine almost to crawl all the pages so you get SEO out of the box with server-side templating. Also, I'm not maintaining a lot of state between views on the client side, so it just made sense to stick with server-side templating.

29:53 Michael Kennedy: Yeah, right, if you're going to pull down a bunch of data and continually work with it, like Gmail or Google Maps or something like that, then all of a sudden, it makes a lot more sense, perhaps. Okay, cool, so people can check that out. That's definitely a nice project and I think, maybe, let's dig into the some of the philosophies or steps that kind of got you to running that on Django. Originally, were you working with Flask and then got converted over to Django? Is that right?

30:19 Michael Herman: Yeah, so, we go back five or six years, something like that, and I was entirely Django. Well, and somewhere along the way, it was like, oh, Flask is really cool, so let's work with Flask. I can sort of rebuild Django in the way that I see fit for that particular application, and then, was talking to my friend, William Vincent, over the summer, and he's a big Django guy. He wrote a couple of Django books, Django for Beginners, and an API development one for Django, the name is escaping me right now.

30:53 Michael Kennedy: Yeah, I just had him on the show, actually.

30:55 Michael Herman: Yeah, and he convinced me to move to Django and he wanted hack an application as well and so, it was an opportunity to look back at Django and pick that up, so, just ran with it.

31:06 Michael Kennedy: Yeah, it's cool. It feels like Django's definitely still going strong. They just did their 2.0 release and dropped a legacy Python support and are talking about the async future, whatever that might be, so it seems like things are going well there.

31:19 Michael Herman: Yeah, yeah, I'm really impressed. Django 2.2 is coming out here soon. That's the next LTS release and then, Django 3 at the end of the year should have a bunch of async madness in it.

31:28 Michael Kennedy: Yeah, actually, that'll be really fun. I think async is interesting because it's something that most people don't really need, but it's often something that people feel like, oh, I can't use Python for this, because it doesn't have this amazing async support on the server or whatever and in practice, most of the time, people don't actually have the problem that they feel like they're trying to avoid or get out of. I mean, sometimes, they do, but it will be great to have async on the server and there are some already. We have Quart, we have Sanic, we have Responder from Kenneth Reitz. There's certainly some options, but it'd be cool to have these more mainstream, really popular frameworks just get this feature, right?

32:09 Michael Herman: Yeah, I see, actually, asyncio more and more in code bases these days, just little things here and there, but yeah, it will be exciting to have that full potential, the full async capabilities and the Django views.

32:22 Michael Kennedy: Yeah, absolutely. Alright, so another thing that I think was interesting is this whole monolith versus microservices debate. You can have a little bit more complicated, big monolith application, where everything works together and fits together and the complexity's kind of in the code or you can say, let's break it into a bunch of little pieces or a bunch of little, simple services that work together and then the complexity kind of shifts to the infrastructure a little bit, right? I got to keep 'em all running and talking and what happens if one goes down and the other's not and all that?

32:54 Michael Herman: I think it's a really great way of looking at it. You're sort of shifting the complexity around, so it's not so much in the application code base and then it's more on sort of the infrastructure or the DevOps sort of people, so you should, in theory, have smaller code bases, a smaller code base is, you should have less bugs in them, you can throw juniors on them easier, you should be able to move a little bit faster.

33:16 Michael Kennedy: Yeah, which is interesting because, if you were at a big company and you've got some big site you can break into little pieces, and like you said, you can throw some junior folks to maintain this little microservice and that, you don't have to understand the whole giant thing, so you can sort of have each person divvy up the work in a more clear, simple way, and if you have a lot of people working on it, that's great, but I feel like a lot of folks want to say, well, I need to have all these microservices, but really, there are just one or two devs on that project. Now I know, it's like, well, does that really help, is that really a good idea, what do you think?

33:52 Michael Herman: Definitely not a great idea. I think, with microservices, I think too many folks tend to focus on sort of the technology side, so learning Kubernetes or learning Docker, learning whatever it is.

34:04 Michael Kennedy: It's always fun to learn these things, right? You're like, oh, this'll be my chance to learn this way and then microservices and then on pods and we're just going to scale it and it'll be beautiful, right?

34:12 Michael Herman: Right, but I think it's more of a culture shift. I think you have to focus more on top-down culture shift, where you can't just take your normal silo'd teams, maybe a backend team, front end team, QA, operations, and sort of introduce microservices in an environment where each time is silo'd and just tossing artifacts over the fence to the next team. You sort of have to look at the culture, maybe introduce feature teams, but start bringing in folks, bringing in teams that can start product conception all the way to delivery and introduce that type of change in your organization before introducing microservices and then let microservices sort of gradually come into play.

34:52 Michael Kennedy: Yeah, also, I think it makes a lot of sense too, play to your strengths. If your strengths are running the infrastructure and Kubernetes and all of these things, microservices are probably the right way to go, 'cause you can balance that really well, but if you just learned Django and you're thinking, well, I need to get my app out there, you're probably better off focusing on just, well, let's just push it to Heroku or something like that.

35:15 Michael Herman: Yeah, exactly.

35:16 Michael Kennedy: Interesting. So, on Python Bytes, the other podcast, we spoke about this a while ago about how you're not Google, you're not Facebook, you're not LinkedIn, and a lot of engineers will see the really cool stuff, like let's say Instagram is doing with Django, and they're like, well, that's how you do it. I want my app to be good and professional, so it's going to be like that. But their app gets a hundred or a thousand or 10,000 visitors a day, not per second. There's not 20, 30, 50 people working on it and so, I think in the industry, there's a lot of sort of admiration of the big, successful applications, and then trying to model that and a lot of times, I think it's a little bit like the code level equivalent of premature optimization, where you're like, ah, this has got to be super fast. You know what, make it right. Worry about making it fast when it matters. What do you think?

36:10 Michael Herman: Well, yeah, you definitely have to pick and choose your battles. You can't do everything, so if you're a single-person team or you have two or three developers, you probably want to focus a little bit more on the application, rather than the infrastructure, unless the infrastructure is sort of your bread and butter. You just really need to think from a product standpoint, what is differentiating my product from the market? Is it what's in the application or is it something to do with the infrastructure?

36:41 Michael Kennedy: This portion of Talk Python To Me is brought to you by STELLARES, the AI-powered talent agent for top tech talent. Hate your job or feeling just kind of meh about it? STELLARES will help you find a new job you'll actually be excited to go to. STELLARES knows that a job is much more than just how it sounds in a job description, so they built their AI-powered talent agent to help you find the ideal job. STELLARES does all the work and screening for you, scouting out the best companies and roles and introducing you to opportunities outside your network that you wouldn't have otherwise found. Combining deep AI matching with human support, STELLARES pares things down to a maximum of five opportunities that tightly match your goals, like compensation, work-life balance, working on products you're passionate about, and team chemistry. They then facilitate warm intros and there's never any pressure, just opportunities to explore what's out there. To get started and find a job that's just right for you, visit talkpython.fm/stellares. That's talkpython.fm/S-T-E-L-L-A-R-E-S, or just click the link in your show notes in your podcast player. Generally, the rule probably should be, if whatever the thing is, the part you're talking about, is not your core business, outsource that, get a package that does that, or find some easy way to just make that get solved and focus on what's really important, what makes you special.

38:04 Michael Herman: Right, you don't have to reinvent the wheel for everything.

38:07 Michael Kennedy: Yeah, there's always Awesome Python you can go look up and find. Probably something out there. So, how are you deploying testdriven.io? How's it running? Is it a monolith, is it a microservice, where's it run? Things like that.

38:18 Michael Herman: So, it's a monolith, and yeah, I just did the easy thing, I just deployed it right directly to Heroku.

38:23 Michael Kennedy: Okay, nice, I don't have that much experience with Heroku, more work with the virtual machines and stuff, but the people who I know who do use it, they seem to really like it. What do you like about Heroku?

38:34 Michael Herman: I guess, first off, yeah, I am using a monolith and I am using Heroku, so it feels a little bit old-school, even though these tools and technologies, they're not that old, like 2005 or something like that, but it does feel dirty saying, yeah, TestDriven is a monolith.

38:50 Michael Kennedy: Well, I think that just speaks to some of this culture that I was talking about, like it's so easy to look and go, well, this is the way these big web apps are run and yours isn't like that, so it must be wrong. It's like, no, it totally is a different calculation when one or two or three people work on something versus a whole group or whole sets of teams.

39:10 Michael Herman: Yeah, definitely.

39:11 Michael Kennedy: Yeah, interesting. So, what features of Heroku are you using? Are you using Postgres, what else, tell me about it?

39:18 Michael Herman: Yeah, I think the powerful thing about Heroku is the add-on system, so instead of having to build a number of different tools and services and link them all together, you really just pop Gunicorn on there, pop Django on there, and then, you can focus on using the Heroku add-on system for your remainder of tools that you need. So yeah, I use Postgres, Redis, use SendGrid, use Sentry, use Logentries as my log aggregator, and then I use New Relic, and those are all just, they all come from the add-on system, so takes minutes to basically set up, so now I can just focus 100% of my time on the actual application.

39:59 Michael Kennedy: Yeah, that's kind of the opposite of focusing on the microservices and juggling the infrastructure. Let them handle all that. Here's my code, make it go.

40:09 Michael Herman: Yeah, and I mean, again, it depends on what you want to focus your time on. Yeah, I love tinkering with the infrastructure and whatnot, but I did not want to do that for testdriven.io because I just wanted to get it up, out the door, and yeah, maybe I'll start scaling out some bits and pieces of it, like there's a separate service in there, or there's a couple separate services that I want to actually break out, or a couple separate pieces of an app that I want to break out into separate services, so maybe I'll look into doing that here soon, but you know, the backlog is just full of bugs and features and stuff that I need to tackle first before I start looking at the fun stuff.

40:43 Michael Kennedy: Yeah, it's more important to just get content out there. It's more important that it's working than it is to get some cool feature refactored. Whatever, right? Interesting, well, it sounds like that's working out really well for you, and like I said, people I've talked to also have said the same thing. That's cool. Now, another thing that you have going on that I want to make sure we get a chance to talk about before we run out of time is PyColorado. So, what's the story? This is one of the local, regional PyCons in Colorado, I would guess, given the name, eh?

41:12 Michael Herman: Yes, so, basically PyColorado, yeah, it's going to be a regional PyCon, it's going to be the sixth, seventh, eighth, and ninth of September of 2019 and it really just came about because Denver seems to get overlooked right now in terms of tech conferences and whatnot and there's really a lot happening here. There's a lot of Python developers, there's a lot of JavaScript developers. I run a meet-up in the area, I've ran it since 2013, but there's really a lot going on here. You also have the Boulder market here too, so a lot of tech companies are moving their second headquarters here, Slack just moved their second headquarters a couple. Quizlet as well, a couple of their companies, but yeah, there's a lot going on here and so, we just felt like we needed some Python representation.

41:56 Michael Kennedy: That's nice. So, you're involved with this and is it basically, it's one of these stories of, well, why isn't there this conference here? Well, maybe you just have to be the change you want to see in the world, right?

42:06 Michael Herman: Right, yeah, so, I'm on the education side of things. I'm going to be holding workshops together, so I think I'm officially the educator chair of PyColorado.

42:15 Michael Kennedy: Okay, nice. I know the tickets are not even on sale yet, so that's... No, maybe they are at the time of the release, but at the time of the recording, they're not yet on sale, so how big are you aiming for in terms of number of people? What are you expecting and things like that?

42:31 Michael Herman: I think it's somewhere between 3 and 400 people are what we are shooting for and that includes volunteers and whatnot, but 3 to 400 people, and so, yeah, tickets will be going on sale on March 4th, which yes, by the time that this airs, they will already be on sale, so the call for proposal and ticket sales do open March 4th, and then, the CFP and ticket sales close on May 9th.

42:54 Michael Kennedy: Yeah, so, if you're anywhere near Colorado or you want to go to Colorado, because you know, Denver and Boulder, they're just some of my favorite cities. Those are really nice places.

43:03 Michael Herman: Yeah, we'll probably put together some hikes and whatnot the days before, days after, a lot of breweries out here, there's just a lot of cool-type things that are happening right now in Colorado.

43:15 Michael Kennedy: Yeah, that's awesome. Yeah, so people could check that out. Is there a website they can go to?

43:19 Michael Herman: Yes, pycolorado.org.

43:21 Michael Kennedy: Alright, perfect. I'll put that in the show notes as well. But yeah, so if people want to speak there, a call for proposals should be open now by the time, due to the magic of time-shifting in podcasting that this release is, so they can check that. If not, it should be any day now. So, you said you're the education chair and I've been to the education summit at the main PyCon in North America and I felt it was a little interesting. I feel like I'm in education more or less in the Python space with the podcasts and with the training courses and so on and that feels like education to me, but I didn't feel exactly like that's what the focus of the education summit at PyCon was. It felt that was more a little bit towards teachers at regular high schools or working on projects with students that live in that space. What's the focus here?

44:11 Michael Herman: Yeah, so, with really the education chair, I'm still forming what it means, but it's really just going to be workshops. We're going to have three different tracks for workshops. We're going to have Python, web development, and then, data science, and the Python one is just going to be generic Python and then, from that, we'll have the beginner track and then have intermediate to advanced tracks, where I am modeling it sort of after the PyCon workshops, where they're a little bit longer, they are on a separate day, some of the regional Python conferences, they do workshops, but they kind of stick them into the other talks, so I did a tutorial/workshop at a regional conference and I would say 90% of the people that came to it didn't even realize it was a workshop. Just trying to do a good job of differentiating between hey, this is a workshop, and these are actually talks.

45:02 Michael Kennedy: Right, you should probably bring your laptop and prepare to be participating in a way, right? So, it sounds to me like this is education for people to learn stuff about Python more than it is a separate segment for educators of Python, is that right?

45:19 Michael Herman: Yeah, and we have been talking about maybe doing some sort of education summit similar to PyCon, maybe a little bit different, not targeting so much high school and university-type teachers, maybe targeting more people like yourself, but for right now, I am focusing most of my time on the workshop aspect of it.

45:36 Michael Kennedy: No, that's cool. Well, it sounds like it's going to be a great conference. I'm sure you're going to be worn out by the time September 10th arrives.

45:43 Michael Herman: Oh, I'm already worn out.

45:46 Michael Kennedy: It's a lot of work?

45:47 Michael Herman: It has, yeah.

45:48 Michael Kennedy: Yeah, that's cool. I mean, I'm sure people will love it, but there's so much stuff that happens behind the scenes and not glorious stuff and not necessarily that you're doing, but who's going to make sure there are napkins, who's going to make sure that there's food and proper food choices and just, what happens if this hotel sells out? There's just so much logistics, right?

46:06 Michael Herman: Yeah, we do have a napkin chair. Joking, joking. There is a chair just about for everything else though.

46:14 Michael Kennedy: Yeah. That's funny. Cool, alright, well, like I said, it sounds like a cool conference and maybe I'll see if I can get out to Colorado as well. I don't know yet, it's a ways out, but it definitely sounds fun. So glad you're doing this, cool. Alright, well, Michael, I think we should probably leave it there for all the main topics, because we're getting short on time, but let me ask you the final two questions before we call it a day. If you're going to write some Python code or other code, even, what editor do you use?

46:43 Michael Herman: I like VS Code. I typically go back and forth between front-end JavaScript and backend Python, so it feels good, provides a nice balance for me.

46:53 Michael Kennedy: Yeah, Visual Studio Code's pretty nice these days and I hear, when I started this podcast, there was a lot of Vim sort of answers and then, a sprinkling of other, and I would say VS Code's probably the most popular choice these days. It's pretty impressive.

47:07 Michael Herman: Yeah, yeah, I moved away from Vim when I started teaching 'cause I wanted to use an editor that students understood when they saw me coding in front of them, so I moved back to Sublime, moved to Atom, and now I am on VS Code.

47:22 Michael Kennedy: Yeah, do you think it's interesting that Microsoft made Visual Studio Code? Do you feel like they had to overcome a little bit of resistance, people going, oh, I don't want to use this from Microsoft, what are they up to? Or do you think a lot of people stay that way?

47:35 Michael Herman: Microsoft is like a different company today than it was five years ago, so it seems like they got GitHub, they got VS Code, a number of other tools and technologies that I can't think of now. They're just a very different company. I think, pretty soon, they're probably going to have the developer ecosystem.

47:53 Michael Kennedy: Yeah, it seems like what they're definitely going for and you know, I think that's kind of the heart of the company, so it's not that surprising, right? Alright, so, notable PyPI package, maybe not the most popular, but something like, people should know about this, I saw it the other day, it was awesome.

48:06 Michael Herman: So, I use a lot of Django-RQ, so that's Django flavor of Redis Queue. It just allows you to use Redis Queue a little bit easier inside of Django.

48:16 Michael Kennedy: That's cool. Is that to kick off background work or for caching or what is it?

48:23 Michael Herman: Yeah, yeah, it's a task queue, so just kicking off background work. It's an alternative to Celery. It's a little bit easier to use than Celery.

48:30 Michael Kennedy: Yeah, I get the sense that Redis might be a little bit simpler than Celery. Okay, cool, got anymore? You have a couple here on this list that you were sharing.

48:37 Michael Herman: Oh yeah, I use flake8 a lot, I mean, every single day, that's running in the background. It's just a linter and then, Hypothesis, which I use for Hypothesis testing.

48:47 Michael Kennedy: Hypothesis testing is interesting, or property-based testing is quite interesting. We've covered that on the show quite a long time ago, I had the creator of that on and it was, it's an interesting way to do tests, right? It's like, well, it takes a number in a string and just go make some numbers in strings and figure out what the right ones to put in here are.

49:09 Michael Herman: Yeah, I mean, if you're really focusing on testing the contract between functions, between modules, whatever it is, Hypothesis definitely really works really, really well for that.

49:20 Michael Kennedy: Yeah, it's cool. Definitely a cool project. Alright, so, final call to action, people are excited about what you're doing over at TestDriven or maybe the conference or, what do you say to folks?

49:29 Michael Herman: Yeah, definitely check out testdriven.io and also check out PyColorado. So, two call to actions there, but yeah, I really appreciate you having me on the show.

49:37 Michael Kennedy: Yeah, it's great to have you on the show and get a chance to catch up with you, so thanks for being here and sharing the history of Real Python, what you're doing today, and some of your other thoughts as well.

49:45 Michael Herman: Yeah, likewise, thank you.

49:46 Michael Kennedy: You bet, bye.

49:47 Michael Herman: Bye.

49:48 Michael Kennedy: This has been another episode of Talk Python To Me. Our guest on this episode was Michael Herman and it's been brought to you by Linode and STELLARES. Linode is your go-to hosting for whatever you're building with Python. Get four months free at talkpython.fm/linode. That's L-I-N-O-D-E. Find the right job for you with STELLARES, the AI-powered talent agent for the top tech talent. Visit talkpython.fm/stellares to get started. That's talkpython.fm/S-T-E-L-L-A-R-E-S, STELLARES. Want to level up your Python? If you're just getting started, try my Python Jumpstart by Building 10 Apps course, or if you're looking for something more advanced, check out our new Async course that digs into all the different types of async programming you can do in Python and of course, if you're interested in more than one of these, be sure to check out our Everything Bundle. It's like a subscription that never expires. Be sure to subscribe to the show. Open your favorite podcatcher and search for Python. We should be right at the top. You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm. This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it. Now, get out there and write some Python code.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon