Deploy Your App: Announcing the Talk Python in Production book.

A Python mentorship story

Episode #254, published Fri, Mar 6, 2020, recorded Fri, Feb 14, 2020

How do you go from poking around at Python code to actually solving real problems, the right way?

There are many paths. The longest one probably is to get a 4-year CS degree. Maybe faster, but pricy as well, is a solid in-person developer bootcamp.

Have you considered reaching out to the community to find a mentor? Many Python meetups have project nights where folks who could help will be attending. If you're up for giving back, maybe you could become a mentor too.

That's what this episode is about. We'll hear from two former guests of Talk Python, Rusti Gregory and Doug Farrell. They teamed up and are back to share their mentorship story!

Episode Deep Dive

Guests Introduction and Background

Rusty Gregory

  • Formerly taught kindergarten and worked in technology support at a small school in rural Vermont.
  • Began exploring Python for data tasks like cleaning up spreadsheets, building small scripts, and eventually creating web apps with Flask.
  • Transitioned to a position as the data manager in his school district, bridging education and programming.

Doug Farrell

  • A self-taught developer with a background in physics.
  • Works at Shutterfly building Python-based REST APIs; also writes tutorials, articles, and is writing “The Well-Grounded Python Developer” book for Manning.
  • Enjoys teaching as well, especially refining ways to mentor new Python programmers.

What to Know If You're New to Python

Here are a few essentials to help you follow the mentorship story and technical points:

  • Have a basic grasp of variables, loops, and functions in Python.
  • Familiarize yourself with Flask for simple web apps before diving into advanced features like Blueprints or SQLAlchemy.
  • Understand basic Git usage to share code and track changes, even if you’re working solo.
  • Recognize the value of code structure: Don’t let your entire program live in a single file.

Key Points and Takeaways

  1. The Power of Mentorship Building a direct one-on-one connection dramatically accelerated Rusty’s growth. Having someone to bounce questions off and offer immediate, relevant feedback helped him learn at a faster pace. Both Rusty and Doug benefited: Doug improved his teaching skills while Rusty advanced his Python proficiency.
    • Links and Tools:
      • GitHub for code sharing and collaboration
  2. Evolving a Single-File Flask App into a Modular Design Rusty started with all views, logic, and routes in one Python file. Doug showed him how to separate concerns into modules, reducing cognitive load and making code more maintainable. This modular organization is critical for any app as it grows.
  3. SQLAlchemy and Object-Oriented Programming SQLAlchemy was a huge leap forward: Rusty moved from dictionary-based solutions to an ORM that manages tables and objects seamlessly. This transition clarified how to think in objects rather than just working with raw data.
  4. Remote Collaboration using Git and Videos Email, GitHub, phone calls, and screen recordings played a big role in bridging the geographical gap. Rusty could send short videos showing issues; Doug would respond with a lightweight proof-of-concept or partial solutions.
    • Links and Tools:
  5. Practical Debugging and IDEs Rusty realized the advantage of a debugger for stepping through code rather than just print statements. Doug advocated PyCharm’s built-in debugger or similar tools to visualize variables and program state.
  6. Expanding Use-Cases at Work Rusty applied Python for real tasks in his school district, such as data cleanup with pandas and generating reports. Seeing the immediate impact of Python on these tasks fueled his motivation even more.
  7. Finding Community via Meetups Despite not living near a big tech hub, Rusty tried local gatherings and recognized how meetups can help identify mentors or potential mentees. Doug similarly found that a Python meetup was a place to share knowledge and find people who wanted help.
    • Links and Tools:
      • PyCon for broader Python community
      • Local user groups listed on python.org
  8. Stepping into Teaching and Speaking Both guests highlighted the value of teaching or presenting at meetups to refine concepts and connect with other developers. Public speaking, such as short lightning talks, can bring new mentors or mentees into your orbit.
  9. Balancing “Help vs. Doing the Work” Doug intentionally avoided coding all of Rusty’s solutions, instead offering partial examples. Letting Rusty discover the final piece himself improved Rusty’s confidence and deepened his understanding.
  10. Bridging Education, Tech, and Personal Projects Rusty’s experience underscores how educators can leverage Python to solve real problems in schools, which often lack robust custom software. Meanwhile, Doug’s example shows that personal curiosity can lead to writing, teaching, and professional growth.

Interesting Quotes and Stories

"It's easy to know how to use a hammer, but it's another thing to know how to build something with it.” , Doug

"I basically won the lottery when Doug reached out to mentor me." , Rusty

"You can do a lot with Stack Overflow, but it's not the same as having someone you can just ask a question." , Rusty

Key Definitions and Terms

  • ORM (Object-Relational Mapping): A technique that lets you query and manipulate data in a database using object-oriented paradigms instead of raw SQL statements.
  • Blueprints (in Flask): A way to organize Flask applications into distinct, modular components for cleaner and more scalable code.
  • Debugger: A tool in an IDE or editor that lets you step through code execution, inspect variables, and pause the program, making it easier to find and fix bugs.
  • pandas: A Python library for data manipulation and analysis, especially popular for cleaning and transforming CSV and spreadsheet data.

Learning Resources

Overall Takeaway

Rusty and Doug’s story is a testament to the power of mentorship and collaboration in Python. By sharing strategies for breaking down large projects, moving to object-oriented approaches, and using professional tools like Git and PyCharm, they highlight just how transformative a supportive guide can be. The outcome is not just better code, but also increased confidence, deeper understanding, and a sense of community, a reminder that Python grows best in environments of cooperation and shared curiosity.

Guests

Rusti Gregory: talkpython.fm
Doug Farrell: @writeson

Doug's Real Python articles: realpython.com
Code Mentor Program: codementor.io
D-Tale Project: github.com
Let Me Google That For You Example: lmgtfy.com
JustPy Web Project: justpy.io
Doug's Well-Grounded Python Dev Book: manning.com
Episode transcripts: talkpython.fm

--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy

Episode Transcript

Collapse transcript

00:00 How do you go from poking around at Python code to actually solving real problems the right way?

00:05 Well, there are many paths. The longest one probably is to get a four-year computer science

00:10 degree. Maybe faster, but pricey still, is a solid in-person developer bootcamp.

00:16 But have you considered reaching out to the community to find a mentor?

00:19 Many Python meetups have project nights where folks who could help will be attending.

00:24 And if you're up for giving back, maybe you could become a mentor at one of these events.

00:29 That's what this episode is about. We'll hear from two former guests of Talk Python,

00:34 Rusty Gregory and Doug Farrell. They teamed up and are back to share their mentorship story.

00:39 This is Talk Python to Me, episode 254, recorded February 14th, 2020.

00:58 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem,

01:03 and the personalities. This is your host, Michael Kennedy. Follow me on Twitter where I'm at,

01:07 mkennedy. Keep up with the show and listen to past episodes at talkpython.fm. And follow the show on

01:13 Twitter via at Talk Python. This episode is sponsored by Brilliant.org and Linode. Please

01:18 check out what they're offering during their segments. It really helps support the show.

01:22 Rusty and Doug, welcome back to Talk Python to Me.

01:25 Thanks, Michael. Glad to be here.

01:26 Good to be back.

01:27 Yeah, it's great to have you back. So, Rusty, you were on episode 194 previously about learning

01:34 and teaching Python in a vacuum. And back then, we talked about how you were in not super populated

01:41 part, a small town in Vermont, and you were working at elementary school, right?

01:46 Correct. Yep.

01:47 Yeah, yeah. Helping teach kids programming concepts and other things. And then, Doug,

01:53 we had you on back like 12 episodes before then.

01:58 I was teaching kindergarten directly and then basically just kind of made sure everybody else

02:03 could do whatever they needed to do with computers, whether it was teachers or students, and basically

02:09 just kind of all-around resource for people. We had another person that worked with the equipment.

02:14 I was the people person, the bridge between that kind of the technology and all the students

02:19 and teachers. And I also taught web design at a community college.

02:22 That's super cool. And Doug, you were on episode 182, Picture Python at Shutterfly, where you

02:29 talked about how you guys are using Python over at Shutterfly, which is a photo sharing, photo

02:33 book site, right?

02:34 Yes, correct. We use it quite a bit and doing more of that.

02:37 Super. You guys got a lot of API stuff going on there, I'm guessing.

02:40 Oh, yeah. A lot of rest calls and RabbitMQ stuff. And we're actually getting into AWS. So

02:45 that's an interesting twist for us.

02:47 Oh, yeah. That's going to be exciting. And I know you because you were on the show before,

02:51 but also I've read some of your articles on RealPython and you're writing a book. You're

02:55 doing a lot of things. You're keeping yourself busy for sure, right?

02:59 Thank you. I've been enjoying writing the articles for RealPython and that actually led to a book

03:04 proposal and actual book that I'm writing for Manning Publishing, which is fun and a little

03:08 nerve wracking. Yeah, that's for sure. What's the book title?

03:11 The Well-Grounded Python Developer. The proposal is, and I'm going to try to fulfill it, is that

03:16 there's a lot of beginner books and there's a lot of expert books and cookbooks, but not much stuff

03:20 that helps a beginning developer transition more towards an expert. So that's kind of what I'm

03:26 trying to do is convey how to help somebody who's got a basic tool set move into thinking about bigger

03:33 projects, the big picture stuff and think like a developer.

03:35 You know, that's a really big step, I think.

03:38 Yeah.

03:38 It's easy to go around and say, I want to learn language X. So I want to learn what a loop is,

03:44 what a variable is, how do I call a function? But then you go to actually create a program and you're

03:50 like, it's like deer in the headlights or, you know, writer's block or something. It's just like,

03:54 I don't really know how to put the pieces together. Right. And the advanced stuff is too hard.

03:59 Yeah. It's like knowing how to use a hammer, but he doesn't know how to build anything.

04:02 Yeah, exactly. Yeah. So I think that sounds like a cool project that you're working on. Great.

04:06 Yeah. It'll be fun.

04:07 Yeah. So at the beginning, Rusty, I think maybe it would be fun. You talked about a little bit

04:13 before we hit record about sort of the progress that you've made. So maybe give people a sense of

04:19 the challenges. You know, that was a really popular episode that you did with me way back when,

04:26 and I guess that's probably a year and a half ago. So it's, it's been a while, but so you've

04:30 made a lot of progress and I guess to sum it up, like one of your main challenges was you're in this

04:35 position where you need to have a fair amount of expertise in the software that you're working with.

04:42 And yet being in a small town, it's really hard to go to meetups or to find folks to collaborate

04:47 with. And if you're the only one at the place you work, well, that's also doesn't help, right?

04:51 Yeah. That was, I was actually learning with a colleague of mine who was kind of interested

04:56 in getting into Python a little bit. And so we were both learning at the same time and then he

05:01 promptly got another job with a different school district. So then I was, by myself again.

05:05 And, it was, you know, it's a lot more fun when you can bounce ideas off people and everything.

05:10 So I was getting started to get a little bit frustrated. I was starting to want to be able

05:13 to do more than I, than I could.

05:14 You know, what I think is interesting is everyone gets stuck when they're doing programming

05:20 or they're working on software projects. You know, I remember not long ago, some library

05:25 I was trying to use, I'm like, why does it not do the thing it's supposed to do? You know,

05:30 and I've been programming for like 20 years. Right. But still I'm, I'm sitting here pulling

05:34 my hair out because it seems like it says it's going to do X and it's not doing it for whatever

05:39 reason. Right. And the thing that I think somebody somewhere knows how to make it do that.

05:44 Exactly. But here's what I think is interesting is I think, you know, everyone gets stuck,

05:49 but they don't always get stuck in the same place. Right. I might get to a part and I'm

05:53 stuck here, but you've already figured that out, but you're stuck on something else. Right.

05:56 But if we could just talk to each other and go, Hey, I tried this and I'm, I'm stuck. Like,

06:00 you know, I did that. And it was, yeah, I remember that was hard, but now here, you can just like

06:04 help each other over these little hurdles much easier if you can interact with somebody.

06:09 Right. Stack overflows there, you know, when you have the time to, you know, craft a half

06:14 an hour question about, you know, two lines of code to make sure you don't get ridiculed or,

06:19 or whatever's going to happen if you don't, you know, freeze your question in the correct way and

06:23 show that you've, you know, tried all these other things. And, and yeah, so there, yes. Being able

06:28 to just ask somebody that, you know, is, is awesome.

06:30 These public spaces that you can go like stack overflow or Reddit or whatever, they can be kind

06:36 of rough, but let me tell you, I learned a program when it required a book when there was like

06:41 hardly even in the internet. And when you got stuck, it was like, you know what, let's go get

06:47 in the car and drive for 20 minutes and hope that there was a book at Barnes and Nobles or one of

06:53 these other weird places that kept all these trees and buildings in square form. And you would go there

06:58 and you would go through it. Like, so I guess the reason I put it out is like, it's kind of a love,

07:04 hate relationship. Like I can type an error into stack, into Google and likely a stack overflow thing

07:10 helps me nine out of 10 times. I don't have to ask the question. Right. But it can be rough to get out

07:15 there and ask questions like, didn't you read the manual or that's a stupid way to do it or whatever.

07:20 You're like, well, how about you just say a better way to do it would be this, because I only asked this

07:24 way because this is the best I got. Right. I'm trying to learn, like, take it easy on me.

07:28 Yeah. Lots of times in the early days, you don't have the vocabulary to explain what it is, or you don't

07:33 understand this concept that you want to go. Like for me, it was databases. Like I didn't even know how to get

07:37 started or how to, how to do things like that. So I had to like think through all of that. You can't

07:41 do that in a, in a forum really. Right. Right. It's too general. So yeah. So I guess long story short,

07:48 long question short, give us a quick update on what you've done. You've taken a couple of courses.

07:53 Obviously you found a great mentorship story, which we're going to dig into, but just give us the recap.

07:59 Yeah, it was great. So when we talked last time, I was doing a few things, processing, you know,

08:05 pictures and, and writing a few little apps that interacted with Google sheets. And then

08:10 I took a Java course, a Python course at an access course at the community college that I teach at,

08:15 because I was able to do them, you know, pretty much for free. And I only took access because the

08:20 SQL course kept getting canceled. So I figured that was the best I could do. And it worked out. I

08:25 understand, you know, I wasn't happy, but I did it. Yeah. And then, I got a call from Doug

08:34 afterwards, which we'll talk about after we talked last time, but, and after Doug and I connected,

08:39 I was able to build a flask app that was like asynchronous play for this board game that I was

08:44 interested in. It was basically just, it held your cards, you know, in between, but I built a

08:49 dashboard for users, put a database on it, notification emails when it was your turn.

08:54 I was really just kind of, I was spending like 25 hours a week on it at the time. Cause I was using

08:59 this thing called walk a time that talks to Adam and I think it works for a PyCharm as well.

09:04 Cool. So walk a times like time tracking, if you want to know how you're spending your time.

09:07 Yep. When you open up your editor, it keeps track what language you're using at the time.

09:11 Oh, interesting.

09:12 Yeah. And it was, it's really great with Adam. I couldn't get it to work very well with Python,

09:16 with a PyCharm, but, I'm sure there's a way to make that happen. Yeah. So, I mean,

09:21 that was just really exciting to go from, I was a web guy before, but, to be able to make

09:27 an app that did all these things was just blew me away. And I had a blast that I, you know,

09:31 try and stop me from coding on the weekend, getting up at seven in the morning and working on it. It was a

09:35 good time.

09:36 It's such a cool experience when you're like, just, you wake up, you're like, I gotta, I gotta get back

09:41 to it. I really was. I'm not done. I still have these ideas. It's wonderful.

09:43 Yeah. It was, it was a lot of fun. It even made me want to put up with the question of like, can I

09:47 download this in the app store? You know, that's the first question I would show it to people. I'd be

09:51 so excited. Like, Oh, can I, no, it's, it's not an iOS app. It's, it's actually a web app and

09:56 it's in Python and nobody really cares. But anyway, I was pretty excited.

10:00 You just got to show them how to put like a little icon, like save a shortcut to the desktop.

10:05 Yeah. Their eyes just glaze over after you say no.

10:07 I hear you.

10:09 I started to, rebuild one of my first apps as well. Since then, try and do, you know,

10:15 build on what I had done before. And what was that experience like with, more experienced eyes?

10:21 It was wonderful. I was able to go back in and just make everything so much simpler to read. I

10:27 discovered, flask sessions, which just made a world of difference. Once I was able to put things

10:33 into a cookie then and persist it over pages was awesome because before I had,

10:37 I had to come up with this hack that I was doing it. I went from sending it as a hidden piece in a web

10:43 form. So every page had to be a form to figuring out how to do that. And yeah, it was, it was good.

10:49 It was really rewarding.

10:51 Nice. Well, it sounds like you're making really, really good progress there. And I now know about

10:56 walk a time, which is apparently a thing I'm going to have to dig into.

10:59 Check that out.

11:01 For sure. And Doug, how about you? What have you been up to?

11:03 You might not want to know.

11:04 I have another article coming out on real Python, which was insane to do with the book. And then,

11:10 all of my free time, every spare second, that's not tied to work is involved in the book.

11:15 And then just work has been very busy. the fourth quarter for us is insane. So

11:20 it's been a very busy time. And then, right.

11:23 Yeah. So I've just been very busy with that stuff.

11:25 Yeah. This is like the big holiday rush. Everyone's going to get photo books for Christmas

11:30 or something like that, right?

11:32 Yeah. The fourth quarter is like a huge.

11:34 So Black Friday, that's like a, a legitimate thing that makes the business go for you guys,

11:40 right? Like gets you back in the black.

11:41 Yeah. They put us, they put, they, they try to put like the police tape around the entire system

11:45 so that we don't touch it after that. So it doesn't break. But at the same time,

11:50 it's constantly like wants new features.

11:52 Can't have it both ways, can you?

11:54 Yeah. I saw a really cool joke cartoon type of thing. And it just said the first rule

12:00 of programming is if it's not broke, don't touch it.

12:03 That's really an excellent optimization.

12:08 Yeah. I'm not sure if it's really good advice, but I certainly know the feeling and you know,

12:13 I know the feeling even more when it's software that I didn't originally write and I'm not especially

12:19 fond of or, or think it's like well written. Yeah. Yeah. It's like, if you touch that and break it,

12:24 it becomes yours. Like, no, no, it's fine. We don't need to, it's fine over there. It's just,

12:29 we're going to let it do its thing. If you want to touch it, you can fix it, but not at all.

12:32 Cool. All right. So let's jump into the main topic here, which I think is going to be a lot of fun.

12:41 So as I mentioned before, both of you have been on the show, episode 194 and 182. And I don't remember

12:50 which direction it went, but I know that one of you guys reached out to the other after you were both

12:55 on the show saying, Hey, it sounds like there might be some chance for us to work together or help each

13:00 other out. And you all started working together through that, right? Let's give us the story there.

13:06 I had listened to the episode that Rusty was on and I really liked, I really enjoyed it. And I thought,

13:12 you know, I thought to myself, there's a real opportunity not only to help, help out, but to

13:17 have him help me. I am teaching sometimes at this STEM place near me. And of course the writing,

13:23 the articles is sort of like teaching. And plus I had taught many years ago and realized how difficult

13:30 it is. And I was struggling at the STEM course with STEM place teaching kids. And I thought,

13:36 you know, Rusty could really be helpful. And I, I've been in that position as a self-taught programmer.

13:40 I learned myself all of the languages that I know. And so I've been subject to trying to figure things

13:47 out. And I've been at the hands of divas who didn't really want to help me as much as give me a hard

13:51 time. And I thought, you know, I could save Rusty some time and avoid that. I reached out to him

13:56 through you to see if he'd be interested in connecting. And, and he was, which was great.

14:01 That's really cool. And I'm pleasantly surprised to see that you all have gotten so much and made so

14:06 much progress and done so much collaboration. That's, that's great. And so Rusty, I guess it's

14:12 also maybe worth mentioning that you got a new position where you're actually doing more programming

14:17 and this, this aspect of life is actually even more relevant to you these days, right?

14:23 Yeah, it's, it was, it was really good that we had a new, with a change of kind of leadership

14:27 and our tech team in the school district that I'm at. And the new guy was not as technical as perhaps

14:33 the guy before him. So I got to help out with a lot of different reports that had to be filed and things,

14:39 which the average person would probably not find that exciting, but it was great. I got to,

14:43 you know, use some Python pandas to clean data and all the things I'd heard about basically listen to

14:48 your podcast. And I was like, why would somebody want to use a Jupyter notebook? And then,

14:51 you know, I figured out a reason why I might want to do that. Yeah, it was good. So now I'm the data

14:56 manager for my district. I left teaching. I still leave in the middle of the day from programming and

15:01 go and teach kindergarten. And then I will come back and finish off my day writing a SQL and,

15:08 and plugins for a power school and things. But so it's an interesting break.

15:14 No, they didn't have anybody to do it when I, when I took the job. So this year, so.

15:19 Oh, you're a voluntold. I understand.

15:21 Exactly. You can do this, but.

15:24 Here's a, you got to help out here. That sounds wonderful. You describe it. It's always like

15:28 these reports. A lot of people really wouldn't be that keen to do it or whatever. But I remember

15:32 my first programming job, it could have been almost anything they were having me do. I'm just like,

15:37 I'm sitting here at this computer. I was C++ at the time. Like I'm writing C++ code. They're paying

15:43 me. And I have this book and I get to learn it while they're paying me. Like this is heaven,

15:48 right? Like, I mean, it wasn't even that advanced to stuff. Right. But for me, it was like,

15:52 I'm in, I can't believe it. Like, how have they not found out I don't belong here? I'm going to

15:56 figure out this before they catch out onto it and get me out of here again.

15:59 Yeah. Where's security being escorting me out?

16:01 Exactly. Right. Exactly.

16:03 It's been really good. I've been really enjoying the kind of the blending of, you know, education and

16:08 programming at the same time. So I'm still involved in school and I've never had an adult job that

16:13 didn't involve school, you know, working at school. So it's been, it's been a great process.

16:17 This portion of Talk Python to Me is brought to you by Brilliant.org. Brilliant's mission is to help

16:24 people achieve their learning goals. So whether you're a student, a professional brushing up,

16:28 or learning cutting edge topics, or someone who just wants to understand the world better,

16:32 you should check out Brilliant. Set a goal to improve yourself a little bit every day. Brilliant

16:37 makes it easy with interactive explorations and a mobile app that you can use on the go.

16:41 If you're naturally curious, want to build your problem solving skills, or need to develop confidence

16:46 in your analytical abilities, then get Brilliant Premium to learn something new every day. Brilliant's

16:52 thought-provoking math, science, and computer science content helps guide you to mastery by taking

16:58 complex concepts and breaking them into bite-sized, understandable chunks. So get started at

17:03 talkpython.fm/brilliant, or just click the link in your show notes.

17:09 Do you feel that schools, elementary, middle, high school types level of schools are underserved from

17:18 like custom software or software that solves their problems?

17:20 That is a perfect question. Yes, because we don't have the money that industry has. So all the services

17:27 go towards people who can pay for it. And schools have to, we get this generic thing that can be bent to

17:34 our will, but have a lack of resources amount of people who can do it. You know, there's a district

17:39 down in, in Burlington. It's the big city in Vermont. And you know, there's a data team of six people.

17:44 You know, they, they hired a data scientist and stuff. And, and in my school district on the,

17:49 on the edge of civilization, we have me and I've been there for eight months, you know?

17:55 You're on the outpost way out there.

17:57 That's right.

17:57 Yeah.

17:59 Yeah. That's an interesting point because if I go to any major fortune 500 company or pretty much any

18:08 startup, almost any startup or, you know, even middle-sized companies, right? They all have a

18:13 software IT group, right? Right.

18:16 Maybe it's only five people and they're not super advanced, but there's a team of people who write

18:20 software to make that place run. Like the place I was telling you about where I was doing the C++

18:25 stuff. That was like six people, you know, and they still had somebody hired to work there as a

18:31 developer and build software. So I just feel like there's probably a lot of opportunity to give a

18:37 little bit of programming skill to folks at the non-college, non-university level schools to empower

18:43 them to do, do more.

18:44 I agree. You always say that, you know, Python is maybe your superpower at work and it's very much true

18:49 where we're at. You know, there's very few people have the time to slow down and write

18:54 code like I do at the moment. A lot of people that have my job around the state, it's been added on.

18:59 Oh yeah, you're going to do this data portion as well as whatever. And I'm in the pretty unique

19:03 position where I was hired to do that. So it's, it's been, it's been great.

19:08 That's cool. And you want to, right? You're not voluntold.

19:10 Exactly. I asked.

19:11 Nice. And Doug, you had mentioned that you're a self-taught developer. Like I am mostly, I took,

19:19 I needed a couple of credits at the university for a minor in computer science and other types

19:24 of stuff. But for the most part, I'm pretty much self-taught. So I'm pretty sympathetic about

19:29 those sorts of challenges and whatnot, but maybe just give us the quick story of, of that for you.

19:35 Cause I'm sure that'll resonate.

19:37 I graduated with a BS in physics, which I tell the joke all the time with a BS in physics,

19:42 I'm completely qualified to get coffee for the other physicists.

19:45 But by the senior year, I did a project where we built a very primitive cat scanner, which was a

19:54 computer controlled cat scanner. And I got hooked. I bought a Radio Shack color computer,

19:58 taught myself a basic and a little bit of assembler. And that was enough to get my first

20:04 job as an engineer after college, doing process control. And I was off and running doing

20:09 programming and I worked in Fortran and Pascal and CC++ PHP and then now Python and

20:16 JavaScript quite a bit.

20:17 Yeah. You've seen a lot of them. That's, that's super cool.

20:19 Yeah.

20:20 Yeah. So that, that starts when there are books before the internet, before Stack Overflow, right?

20:24 Oh, this was, this starts before that, before books, this was like BBSs.

20:31 So BBSs, that's like the internet that you go to. That's really slow and it makes sound and only

20:35 one person can be on at a time, right?

20:37 Yeah. My education was continually slowed down by getting phone calls from friends.

20:42 Yes.

20:42 I remember that. We actually had two phone lines at my house just so my brothers and I could

20:48 all be on either internet dial up or on BBSs at the same time. And it was still a problem,

20:53 right?

20:54 Yeah.

20:54 We'd have like call waiting come in and knock us off and oh my God. All right. So fun,

21:00 fun time. So tell me about what you guys have worked on, especially in the beginning, I guess,

21:06 Rusty, go ahead and maybe start this conversation now. Like, so Doug reached out to you and you're

21:11 like, wait, this guy, just this random guy on the internet. That's really, yeah, that's really

21:16 knowledgeable, wants to help me out. Like, what is this? And so where did you start? And like,

21:20 what was that like when you got that message?

21:22 I'd said earlier that, well, I didn't say on the podcast, but it was great because Doug

21:25 wanted to exchange kind of some teaching knowledge with Python knowledge. And I said that I basically

21:30 won the lottery and got somebody who knew exactly what I wanted. And Doug lost out because he's

21:35 already a good teacher, but I still needed lots of help. So I just started asking questions. I wanted

21:41 to go further with Flask and started to build that, you know, database app, the kind of asynchronous

21:46 kind of card playing app. And I had no experience with, with databases or not. So he kind of showed

21:54 me a, luckily he was writing an article on something very similar and kind of talked me through starting

22:00 to use SQLAlchemy. And it just kind of got started. And I asked him questions about database design and

22:07 I would, I would craft emails. And then, you know, there's a, we had about one or two day delay just

22:12 because we're both busy people and that's how we kind of started. And then I started to ask more and

22:18 more questions and it helped a lot that we had a lot of common ground. We're both cyclists. We both

22:24 enjoyed Python and teaching. So there was a lot of, you know, banter. And I, I tend to try and ask a lot

22:29 of personal questions when I'm working with people as well, just to kind of get to know them better.

22:33 So started to build my app and, and I was able to go, you know, and say, Hey, I'm having problems with

22:40 this. I didn't have to explain everything from the beginning or, yeah, it was just a really

22:44 wonderful experience for me to be able to, just have get stuck and, you know, within a day,

22:51 be completely unstuck and probably looking at a different feature.

22:54 Yeah. That's really interesting. You know, like those types of assistance or whatever,

22:59 when you're new, you can be stuck on something for like five hours and you're like this,

23:03 I just don't know. I just tried everything. And somebody who's gone through it a few times,

23:09 like, Oh yeah, that's confusing. But when I figured it out, it was X. Right. And then,

23:13 so there's a lot of effort and that's potentially for like staying in touch and coordinating, but

23:18 sometimes you can just look at something, Oh, that's really easy. And it's, it's just such a

23:23 service to you. Right. To just be able to receive that and go, Oh my gosh. Right. I so appreciate it.

23:28 Whereas like the person who do it, like, it's okay. Well, I just called it out of my memory. Right. I kind

23:31 of know. Right. Yeah. I put everything on GitHub. I was starting to get a big into GitHub,

23:37 as much. I'm still afraid that I'm not going to be able to recover what, you know,

23:42 two or three versions back. And so I don't have that much faith in it, but it was good to be able

23:46 to have everything there. So you've moved on past the, I've made some progress on this project.

23:51 Let me zip up the directory and give it like a version.

23:55 Doug, you're laughing. Have you seen that as well?

23:57 I knew GitHub was great before I knew how to use it. Yeah. So we were able to do that. And then I

24:03 could just say, Hey, you know, I've, I've done the update and Doug could pull it down on his end and,

24:07 and run it and see what the error was or whatever it might be that way. So that was pretty cool.

24:12 I always made sure that before I asked a question, I wasn't going to waste his time that I had

24:16 exhausted everything. So it wasn't a flippant. Oh, I'm stuck for five minutes. Go and do this. It was,

24:21 you know, I'm really stuck here. So now I'm going to have to ask. Yeah. Yeah. And I, you know,

24:25 I have some folks who periodically ask me questions, whatever. And when it's like that, I totally don't

24:30 mind. It's fine. Right. The thing is, you know, sometimes you have people are just like, well,

24:35 this isn't working. Why? And, you know, it's pretty obvious that like a little bit of take the

24:41 error message, put it in Google would come up with a really good answer. you know, it's one of those

24:45 types of things. And yeah, so that's really, I think an important part of trying to make something

24:51 like this work is if you're going to work with Doug and ask him questions and, you know, basically

24:57 take some of his extra time and energy, cause he's got so much when he's not working on his book or his

25:03 book articles or all the other stuff he's doing that it's really like, you know, that someone's put a

25:10 lot of effort into it because then it's like, okay, well they really tried and they're really stuck and

25:13 I can probably help them as opposed to just this person didn't even Google it. Like I really don't want to,

25:19 you know, it really was a lot more. Yeah. Sometimes people will shoot me a message and I'll

25:25 ask, could you help me with this? I'm really, it's like clearly not like from one of my courses or

25:30 from an episode. It's just like random Python question. I'll take the question, put it in Google,

25:34 grab the link one and shoot it back and go, how about this? Oh my gosh, that totally fixed it.

25:39 That's an incredible skill.

25:41 Yeah.

25:41 You need to let me Google that for you as a site.

25:45 I know. Is it still a, is that still a thing?

25:49 Yeah. It was mostly concepts that when I would get to, to ask, you know, that's, I needed to know

25:55 how to go about something. And I had to be careful because Doug would actually just write me the

26:01 program and send it back. And I would be like, oh my God, how long did this take? And it was like a

26:06 complete, you know, Ajax program that updated your database for you. It wasn't exactly what I was doing.

26:12 So I would still have to create my own, but it was a working example of here. This is what it might

26:16 look like that I could go into it and dissect it. I would have to be like, okay, I'm at work right

26:21 now. I'm going to need three hours at home to like, look through all this that he's just sent me. And so

26:26 it was pretty good that way.

26:27 That's awesome.

26:28 For me, that was the key with Russell was that he would always ask me, you know, I could see that he

26:33 had looked for stuff and well-researched and intelligent questions, which was great for me because I,

26:38 you know, I don't have a lot of time to spend, but the other thing was, I often didn't give him complete solutions. I would do the left as an exercise for the reader

26:47 kind of thing where I would give him a sample that I knew that he could extend and extrapolate

26:54 from in order to solve the bigger problems he was facing.

26:57 Right. Like here's a really, really simple proof of concept of like some Ajax thing or something,

27:02 right?

27:03 Yeah. Some of the things were just conceptual Python stuff, like, you know, moving away from

27:08 everything as a dictionary. Dictionaries are extraordinarily powerful.

27:12 but to get into object oriented stuff, it's kind of a hurdle, but it has a really great

27:17 use. And I knew that I wanted to take him, you know, from, from dictionaries to object oriented

27:21 and then onto SQLAlchemy, which of course is dependent on objects to get into databases.

27:26 Yeah, absolutely. I think SQLAlchemy is really special and ORMs in general. I think they're very special because I remember when I was learning to talk to databases and you had to write SQL embedded in strings, embedded in your programming language. You're like, I just want to like get some data. Why do I have to learn a whole new programming language for this? And then, you know, you got to go and put stuff back in the database and like, how do you get the right types? And then obviously you can't string.

27:56 concatenate it. You got to figure out how to use parameters. There's just, there's all those layers of either best practices or just understanding or, you know, lazy loading or whatever. And with SQLAlchemy, you can kind of learn a skill that is also applicable in general Python, this object story. And databases are easy again. It's wonderful.

28:15 Yeah. I mean, I've been in, had both feet in the object oriented camp since C++, you know, 20 years ago. And I didn't really want to have to deal with tables of raw data from SQL. I wanted things to come to me in an object form because I want to think in terms of objects.

28:31 Yeah. I mean, usually a real common pattern, if you weren't using an ORM would be to do a query and then load up an object with the data that you caught back and then give that back, give that over. Right. It's like, well, why am I doing this?

28:42 Like from an object and once coming in and then trying to update the database and make, Oh, this is fun.

28:48 Yeah, exactly. Couldn't we let a framework do this? Which, which is really nice. And it creates the tables for you and all that. So I guess I'll throw this out to either of you. I don't know which one wants to take it, but Rusty, you spoke about using Git and source control and how that was a little bit mysterious. Like you knew it would be good for you and you knew you should do it, but it was kind of something you didn't really know. So it was just another layer of something you have to deal with while you're trying to learn all these things. And finally you got there. So that worked out as a super way for collaborating, right?

29:18 Yeah, it was fantastic. I was using it really to go from my work computer to my home computer. You know, if I had 10 minutes at work for lunch or 20 minutes, I would go ahead and, you know, it'd work on my program and then sync it, upload it and then get home and then pop it, keep going. So that was pretty cool that I could switch between computers. That was kind of my initial impetus for using it. And then when Doug actually asked to be a contributor one time, so he could do a pull request. Then I had to like do like two hours worth of research when that came back to figure out how to merge and things like that.

29:47 I think I did it right because it worked afterwards, but Oh my gosh, there's a merge conflict.

29:51 What are we going to do?

29:52 Yeah. So that took some time, but you know, we, I figured that out and I use GitHub for all my, my projects now just to kind of keep it there. But yeah, that was a part of the learning curve as well. It was really cool. I was still the only time I've ever collaborated with someone on GitHub. I've, I'm actually to the point now where I'm, I'm asking questions of a plugin, not plugin, package authors on GitHub as well, which has been pretty cool.

30:15 It's a really nice place to be able to go and have a conversation as well. Right. We've had source control for a long time, but the fact that it's got this kind of social component to it is really cool.

30:24 Yeah. Yeah.

30:25 For me, it was great because, you know, Rusty and I had used a couple of ways to collaborate email, of course, and then we had done some screen captures and then screen capture movies and Skyping. And, some of that, you know, that was useful to me, but sometimes I was like, what is he talking about?

30:41 I need to see this thing because I needed the context of, what it was running. And so having access to the whole code base through GitHub was really helpful for me for that context. And you know what the goal was that he was trying to achieve.

30:53 Absolutely. I've certainly had people send me videos of like, here's what I'm trying to do this part. I'm stuck on, but when I click this, here's what's happens. And you know, that is actually really better than just a random email trying to describe it.

31:06 But it's not necessarily as good as being able to just poke around yourself.

31:09 Yeah.

31:10 I'll make a video in, you know, in 30 seconds that would take me, you know, 20 minutes to type. So I'm definitely much more and I'm more comfortable in front of the camera and I've been using it in teaching for a long time to, to make videos. So that was probably the most common way I would send issues. I would say.

31:25 That was great for me too, because I could think at length and, you know, I sort of could type my way to an answer within code instead of keeping rusty on the phone or trying to send another video back and forth. Cause some of those concepts are kind of abstract, like, you know, OO and things like that are a little abstract to try to talk about.

31:42 Yeah, definitely. A good written example is nice there. You know, I've used that screen recording trick for bug reports, you know, for like random software. Like, I know you say this is not a problem, but here I've recorded it.

31:55 This button that says do X, it doesn't do X anymore. Can you just help me out here? And that's pretty effective as well, but it's not so much of a mentorship, I have a relationship as well. Now, one of your philosophies, Rusty, is that you're not keen to use code that you don't understand outside of say pip install a thing and just leverage that directly. So how'd that play into this whole interaction?

32:20 Like I say, unless it's a package, I'm really not that comfortable. Like if, you know, if somebody were to give me, here's a bunch of code that does exactly what you want. Now I wasn't doing this for a job at the time. These were personal projects that I was trying to learn. And I really feel like if that happens and I try and debug it, I, and I don't understand what's going on. It's going to be really, really tough for me to use that in any kind of a meaningful way. And that's one of the things that Doug helped me understand was actually, I listened to his interview on your show.

32:48 And he was saying that he doesn't understand why people don't use an editor that has a debugger in it. And now I wouldn't now, you know, if I was going to write something because it's just that important. And I didn't really understand how important it was being able to look inside the variables would be.

33:02 So I just really want to understand it at its base level because I just feel it's going to be so much better going forward. So yeah, there's even some packages I wouldn't use that took over my Flask app in a way like the Flask users package is just this huge invasive thing. And I didn't really understand what I wanted to do. If I was building something that I was just going to build it for a month and then leave it or whatever, I might use it.

33:23 But otherwise, I'd rather understand that whole process so I could use it later on or use that knowledge later on.

33:30 Yeah, I totally agree. And that Flask example is pretty interesting because I feel the same way.

33:34 Right. Like I put together a course on Flask and it doesn't have any of the extensions, right? It doesn't use Flask login or any of that stuff because I just want to talk about the primary thing and every one of those layers.

33:47 While it saves you a few lines here, it adds layers of complexity and understanding along the way. If people want to go grab that later, that's fine, right? They can go use that. But sometimes you just want to just like, what is the essence of what I'm doing? Right?

34:00 Yeah. What do you think? How's your philosophy around this, Doug?

34:03 I do like to use packages, mostly because I work particularly. I just don't have the time to build everything myself. But I spend a lot of time vetting stuff that I want to use.

34:13 For instance, we write a lot of REST APIs and I looked around a lot to find a tool that I thought worked for me, which is why I use this thing called connection rather than some of the Flask RESTful stuff.

34:26 Because it just fit my style of work. It seems well supported. It has current updates and all that stuff. There are things that I do want to build myself because I have to have that much control. It depends on how much my OCD kicks in.

34:40 If I build it myself or use a package.

34:43 Yeah, I think there's just so many trade-offs. And it's interesting to talk about because it's like, what's the right action? What's the right choice? You know, for example, like just take like Flask login or authentication or Flask users as an idea.

34:58 On one hand, it's great to let that whole thing be someone else's problem. But as soon as it doesn't do what you need and you're like outside of its box, then all of a sudden you're jumping through all these hoops to try to understand how to juggle it plus what you're doing and so on. Right. And so it's just attention. I think people just got to get used to.

35:18 When you download a good package like Flask users, it's great that a lot of that works for you with some hidden complexity. It's like a black box. But when you have to open the black box and try to do something with it, that can be a bit of a hassle.

35:32 This portion of Talk Python to Me is brought to you by Linode. Whether you're working on a personal project or managing your enterprise's infrastructure, Linode has the pricing, support, and scale that you need to take your project to the next level.

35:47 With 11 data centers worldwide, including their newest data center in Sydney, Australia, enterprise-grade hardware, S3-compatible storage, and the next-generation network, Linode delivers the performance that you expect at a price that you don't.

36:01 Get started on Linode today with a $20 credit and you get access to native SSD storage, a 40-gigabit network, industry-leading processors, their revamped cloud manager at cloud.linode.com, root access to your server, along with their newest API and a Python CLS.

36:16 Python CLI. Just visit talkpython.fm/Linode when creating a new Linode account, and you'll automatically get $20 credit for your next project.

36:25 Oh, and one last thing. They're hiring. Go to linode.com slash careers to find out more. Let them know that we sent you.

36:35 One of the things I think could be helpful from a mentor-mentee relationship is when you're new in writing code, and I kind of touched on this a little bit earlier, Rusty, when I asked you the question about going back to your other project, is a lot of times beginners, when they're working on something, they're like, if I can just get this to work, that's it.

36:54 It's working now, right? But then there's the, oh, this is not very Pythonic, or did you know that Python has this language feature that makes those five lines be one, and it's real simple?

37:05 Or even there's a standard library thing, like, why are you sorting this by hand? You know what I mean? Things like that.

37:10 So maybe talk a little bit about, kind of helped him make his code more Pythonic, or make it a little more professional, or whatever.

37:16 Well, I guess one of the early things that I did, or I tried to do, is when we first started to work together on the Flask app that Rusty put together, I recall it being a single file. It was a single Python file.

37:29 And for me, I got, you know, I looked at that, and I said, oh, this is, it's hard for me to keep all of what's happened, this giant file, in my mental model all at once.

37:38 The cognitive load on me was just too much.

37:41 One of the things I did, and I think in one of the pull requests, was to introduce the idea of modules, and how to break code up into logical modules, where, you know, this kind of stuff should live here, this kind of stuff should live here, because you could think about, that sort of separates the work, or what you're doing, into a domain, a little domain, where that's all it really does.

37:59 And you can sort of depend upon that. It makes the amount of stuff you have to keep in your brain a little bit smaller and more manageable.

38:06 And then, you know, the idea of how to, creating your own modules, how to import your own modules, rather than just the system modules.

38:12 I think for me, that was a big step that we took forward into making the work that Rusty was doing more along the lines of a developer, rather than just a programmer.

38:21 Yeah, yeah, I certainly agree with that.

38:24 It was great. Blueprints was a big part of that.

38:26 Blueprints are interesting.

38:27 These are things in Flask.

38:29 You know, Flask, through, I don't know if I would put this on the people who were, like, writing the early tutorials for Flask, or just other people who are passionate about Flask and written tutorials.

38:42 But whatever the origin is, it feels like Flask a lot of times gets sold as, like, Flask is amazing.

38:48 It's so simple, you just need this one file.

38:51 Just put your stuff there.

38:52 Go.

38:53 You know what I mean?

38:54 You can do that.

38:56 You can do that.

38:56 For the really simple example, it's fine.

38:58 Yeah.

38:58 When your website has 300 views.

39:00 For the whole world on a browser, that's fine.

39:01 Yeah.

39:02 You have 300 views and 10 database classes.

39:05 And yeah, it's crazy.

39:06 What nobody could get through to me until Doug and I worked together was why you'd want Blueprints.

39:12 You know, while we got to a point where, like, you needed to break it up into these different pieces.

39:16 And he must have shown me Blueprints two or three times before it finally clicked with me.

39:20 Because I'd watched YouTube videos of the Flask site itself, or the docs.

39:25 Yeah.

39:25 Assumes you already know exactly why you'd want to do them.

39:28 And yeah.

39:29 So I just didn't understand why I'd want to start to break it up.

39:31 I mean, one of the great things about Python is that it's supposed to be written clearly instead of cleverly, I suppose.

39:37 You know, overly clever, I should say, rather.

39:39 So Blueprints allowed you to kind of break that up, just like you would break up, you know, a function into smaller pieces, which was awesome.

39:45 But yeah, it took a long time.

39:47 And then even then, it's not super well documented.

39:49 So watching somebody, a pro who had done it before was instrumental.

39:53 And it really, really opened my eyes to why you'd want to do that.

39:57 But it took a lot.

39:58 Yeah, yeah.

39:59 It's definitely one of those things.

40:00 It's hard to sell.

40:01 Like, why do I need this?

40:02 Because a lot of times when you're getting started, you have three views.

40:05 You're like, you're just making it complicated.

40:07 Like, why are you putting all this stuff everywhere else?

40:09 But when you have 300, all of a sudden, you know, having those categorized, like, here's the stuff about users.

40:14 Here's the admin stuff.

40:16 Here's the, I don't know, the blog stuff, whatever you're writing, right?

40:19 Like, it's massive.

40:20 And it's kind of like you said, Doug.

40:22 I think one of the things that's really important for people to, as they're getting into programming to learn, is that you can think at different levels of building blocks, right?

40:31 You can think, you talked about this with modules as well.

40:34 Like, you can think of line by line what's happening.

40:37 Or you can think of function by function.

40:38 But if you use modules, you can sort of think, okay, that's the thing that I use for working with sending email.

40:45 And I go to it and I say, send email, send debug message, send error.

40:49 And that's, I don't care what, how that happens.

40:51 I just ask it to do those three things.

40:52 And so now you're just thinking at the, here's my email building blocks for the rest of my app.

40:57 And so there's like these different conceptual layers that you go.

41:00 And I think that's kind of being productive is really about identifying the right level and thinking of those Lego pieces, right?

41:07 Oh, yeah.

41:08 I mean, you know, that whole, why would I want to do this?

41:10 You know, you start out simple and you think, oh, this is, you know, I can get something running pretty quickly.

41:15 And then it starts to get more and more complex.

41:18 And why would I want to do this?

41:20 It's like, from my point of view, it's like, well, you know, you're already running into name conflicts with functions because you've got so many of them in one module.

41:27 And you're crossing over where you're sending email in 10 different places.

41:31 And it's hard to, it's hard to think about, you know, all those things that are going on there.

41:35 If you put it in a module or the namespace and even, you know, what a namespace is, is so useful.

41:40 And what Rusty said about that, we were over this a few times, part of the benefit for me, besides just enjoying helping him, was for me to find the right way to phrase it.

41:50 You know, how do I convey this information that would help him hit?

41:54 Because it's not like I gave him perfect examples and he took off of it.

41:58 What I was doing was trying to find a way to show him an example or say it in a way where Rusty arrived at that aha moment all by himself.

42:07 And suddenly realized, oh, this is why I want to do that.

42:11 And then he would pursue it because it's not just because I told him to, it's because he suddenly saw the value of it.

42:17 I think half the time he spent just stripping out my imports and everything imported in every single file.

42:23 And that's one of the things I learned as well.

42:26 Just in case you need it.

42:27 I guess it's worth really quickly, just for folks who are out there who are using Flask, but they're like, wait, Flask Blueprints?

42:34 Is this like an extra package or something?

42:36 Flask Blueprints are awesome and I massively encourage people to use them.

42:41 But Doug, maybe give us the quick elevator pitch on what those are.

42:45 For me, Blueprints is a way to segregate functionality in the Flask app.

42:49 So if you have a lot of URL endpoints, some of those are going to be related together like logins or these are the endpoints that I need to feed a page or provide a view.

43:00 And you can have, you know, you have in a basic Flask app, you have one templates folder.

43:03 And in that templates folder, you might have JavaScript and CSS and HTML.

43:07 But as you get more pages in an app, that starts to pile up and you start coming in with these weird names and stuff like that.

43:14 And then across, they don't really logically go together.

43:17 So Blueprints is a way to separate the URL endpoints, the API, I guess, into modules which exist in separate files.

43:27 And now you have all of these modules that contain that functionality, which they have their own template files, their own static files, you know, all those other things that make up the functionality of that page.

43:40 I usually try to break it up by page because that's always complex enough for me.

43:43 You have all the functionality of that page in one place, which is super handy because you can think about it in one place to the other.

43:50 And nothing else in there, right?

43:51 And nothing else.

43:52 The other great thing, I haven't done this too much, but the other great thing is you can actually take that module, that Blueprint module, and use it in a separate app just by picking up that, you know, copying that directory or that folder, the project, what do they call it, a package, to another Flask app.

44:09 And it would work.

44:10 In my project, I had the main part where you actually played your cards or whatever.

44:14 And then I just made another Blueprint.

44:16 That was the member section.

44:18 So then you'd check in, it'd pick up your deck, and then it'd shoot you over to that other module.

44:22 And then there was a little point where it said, oh, if you're logged in, go back to here.

44:26 Then you'd have to wait.

44:27 And then when I wanted to build an admin section, that was a whole other Blueprint.

44:31 Boom.

44:31 Then I could work on that completely separate.

44:33 Yeah.

44:34 And so it's beautiful.

44:35 So the reason I think it's less obvious in Flask and also, but still important, is Flask normally has you go app.route on all the view methods.

44:46 And the place you create that route is in the main thing.

44:49 So it's hard to share it to other files, which then have to be pre-imported.

44:53 And it creates like this circular nightmare that you run into.

44:57 And so it gets challenging.

44:59 So people should, if they're not using them, they should definitely check into Blueprints.

45:02 I use this idea even more extreme than that, maybe.

45:05 So I've got separate modules for my related view methods, like say stuff about admin.

45:10 And then there's functions in there that handle the views.

45:15 And then I have my templates organized that way as well.

45:18 So my template folders has maybe an admin subfolder.

45:21 And then the names of the template files are the names of the functions.

45:24 So there's like this kind of hierarchy of, I'm here, I know exactly where to go.

45:28 There's not 500 templates in one file.

45:30 And I also use this idea of view models, which is like classes that exchange and validate the data between the HTML request and the rest of your site.

45:40 So like this data comes from the URL, this data comes from the form, this data comes from a header.

45:45 Let's validate that and pass it on.

45:47 And those also have the same structure, right?

45:49 They're view models and then the module name and then the name that's associated.

45:53 So I really love this idea of organizing it.

45:55 It just, it means like almost no matter how complex your project grows, you just follow.

46:00 It's like a little tree traversal and you found what you need on all the different layers.

46:04 I love it.

46:05 I think that's a really valuable part of Blueprints.

46:08 I think one of the things you're alluding to, one of the more difficult parts of using Blueprints as a, not being familiar with it, is that idea of the app, the app instance and how to, how to share that in the other, the other modules in the Blueprints.

46:22 Still working on that one.

46:23 Yeah.

46:24 Cause you, you created in the, in the main Flask app and then how do you access it elsewhere?

46:27 That's, that's hard.

46:28 I tried and said, I couldn't.

46:30 My dog crashed.

46:31 It won't let me.

46:32 You start breaking up your code like this.

46:33 You need to do it before you understand why you reach a point past where you should have done it.

46:38 And then you start to understand that maybe I needed to start doing that.

46:41 So having somebody there to kind of help you along with that process was, it's pretty key.

46:45 Yeah.

46:45 To kind of precipitate it and get it started.

46:47 That's for sure.

46:48 So what are some of the other tools you talked about using GitHub?

46:52 You talked about recording, like sharing screen recordings.

46:55 What are some of the other communication tooling that you used?

46:58 Well, we just talked on the phone.

46:59 Yep.

47:00 It was harder to set up cause we're both busy folks.

47:03 It's harder.

47:04 It was harder to get the actual conversations, but it was great.

47:07 So I would say every couple of weeks we'd chat on the phone and then we actually set up a video conference once as well, which was good.

47:14 That was, that took a lot of doing to make sure we were both at a place.

47:16 Cause you know, you can't do that necessarily quickly at work or whatever.

47:19 Yeah.

47:19 That can be challenging.

47:20 It's also fortunate that the Rusty and I are both on the East coast.

47:23 So there's no time zone issue for that video conferencing or trying to share a Skype call or something.

47:29 Yeah.

47:30 I do think that the tooling is around to make this much more possible for distributed folks.

47:36 It's not like, well, I've got to find somebody in my town to help, which that may be great.

47:41 Right.

47:41 It may be great to find someone locally.

47:42 Cause then you could just, Hey, every Wednesday, let's get lunch together and I'll bring our laptops or something like that.

47:47 But you know, that limits the options of who you can work with pretty dramatically.

47:52 If you restrict it to your town versus the world.

47:54 Well, one of the other things that I tried to do, which I think is important for me as a mentor is that I try to be responsive to Rusty, that he sends me a question or he's updated his, the Git repository and asked me something about it.

48:07 Is that I try to look at it pretty quickly because one, I want to help him.

48:12 But two, I don't want to fall behind where he's, he's moved on because he hasn't heard from me.

48:16 And, you know, suddenly my assistance is irrelevant.

48:18 Right.

48:20 Right.

48:20 Right.

48:20 You've already gone so far to help him out.

48:22 You gotta, gotta keep going.

48:24 Doug, how did you work with the, I guess there's probably this tension around, am I just doing the work for him versus teaching him, you know, give him a fish versus teaching him to fish?

48:37 Yeah.

48:39 Well, I think about that a lot because I teach at a STEM place where, with kids, you know, that range from age from eight to 16 and, they'd be happy to have me give them all the fish I have rather than figure it out themselves.

48:53 So I'm onto that trick.

48:54 Not that Rusty does that, but, oftentimes I guess one of the, I guess I do two things.

48:59 I don't try to solve the entire problem for me and I'll give him a working example, but it's really a prototype that he's going to have to extrapolate from in order to do everything that he intends to do.

49:09 And then the other thing I try to do is I really try to listen more than talk because I've found, I'm sure both of you have seen this, over time, over time.

49:20 Listening more gives the person a chance to put their thoughts into words in a way that they're trying to explain it to them.

49:27 They just keep nodding.

49:28 Some, but quite often they come to the solution themselves by the act of expressing it.

49:34 Yeah.

49:34 You've kind of shaken up their thought patterns and got them to focus from a different perspective, right?

49:40 To try to verbalize it and whatnot.

49:42 Yeah.

49:42 Silence is powerful.

49:43 Yeah.

49:44 Plus I know that, you know, I can tend to ramble on and on myself.

49:47 So I want to give, I want to give him an opportunity to tell me what he's really trying to do.

49:51 Well, that was a great story you told me, Doug, but that's not what I was asking.

49:56 That's a real possibility.

50:00 Yeah.

50:01 Yeah.

50:01 Well, for me too.

50:02 So this sounds like this has been working out really well for you guys.

50:06 And certainly I think it's great, Rusty, that you've got this job where it sounds just looking in from the outside.

50:12 It sounds to me like you've leveled up a little bit in terms of what you're doing with Python and with code and the impact that you're able to have doing more analysis of what's going on and so on.

50:23 And I'm sure this, this hasn't hurt that process at all.

50:26 So it sounds like it's going really well.

50:28 And I guess maybe the last thing I'd like to explore while we're together is just, you know, how do we help other people make these connections and help each other out and, you know, get, get benefits on both sides.

50:41 It's a tough one.

50:42 And I think before I actually connected with you to talk about, you know, kind of learning Python by myself, I'd gone to a couple of meetups in Burlington.

50:50 And, you know, for me, it's an hour drive down there, an hour drive home and, and stuff.

50:55 And I ended up there and everybody there is like working at a startup and, you know, is, is pretty savvy.

50:59 And we had this like presentation.

51:02 We're doing this with Dockers.

51:03 And here's the thing about Kubernetes cluster.

51:05 You're like, what is a loop?

51:07 It was a lot of people who knew each other, you know, from different projects and stuff, you know, it was kind of a, an old boys club kind of thing or young boys club, I guess.

51:15 And I, we had a presentation one night when I was there, there's a bunch of different organizations came out and said what they were doing with code in the area.

51:22 And I would actually, I was thinking to myself, well, I'm just going to, next time there's one of these things, I'm going to show up with a slideshow and say, Hey, I want to try and bring, you know, coding to Franklin County as a teacher.

51:32 And if I could have a mentor, I think I could get to the point where I could do that kind of thing.

51:36 So I was not necessarily that desperate, but I was like, that was like my next big plan because I didn't really have anything else up my sleeve, you know, to try and make connections as far as that goes.

51:46 It is tricky.

51:46 I do think these meetups are very valuable.

51:49 People are pretty humble or they're not really, you know, they, even though I'm sure people are doing stuff that sounds intimidating.

51:56 I don't find very many people are condescending, I guess is what I was looking for is like, they're pretty welcoming of newcomers, especially in the Python meetups.

52:05 And so I do think coming out to these are, you can really make some good connections at them.

52:10 Yep.

52:10 This was a general, like, I don't think there is, there is a Python group there, but it never has a meetup.

52:15 So it was just kind of a general code.

52:17 But it was a, you know, it was a comfortable atmosphere, but I wasn't necessarily going to walk out, you know, with the kind of connections that I was looking for.

52:23 I don't know.

52:24 I think I just kind of got lucky to get connected with Doug.

52:30 So yeah, I don't know that I have any help.

52:32 Yeah.

52:33 It's funny how life takes these turns, right?

52:34 Yeah.

52:35 Doug, what do you think about finding mentors?

52:37 Well, I think for me is, it's interesting.

52:40 You know, I approached, I approached Rusty because there were some things that I wanted to help him with, but there's also some things I wanted to help me with.

52:46 And so it's kind of a two way street about the mentoring.

52:49 But I think part of it is just asking someone to do so is probably a big thing.

52:54 I go to a Python meetup in Hartford, Connecticut, and I've given presentations there and I've met a lot of people.

53:00 And some people, you know, have gotten in touch with me afterwards and, you know, enjoyed the presentation or whatever.

53:06 But very few of them have asked me for help.

53:08 And at the meetup, it was clear to me that they were really looking for help.

53:12 And I thought, just ask me, you know, why not?

53:14 Yeah.

53:15 Yeah.

53:15 Just, you know, the worst that could happen if somebody says no.

53:18 I don't know how prevalent this is.

53:21 And I honestly haven't been to it here in Portland, but at least in Portland, one of the Python meetups here has like a weekly, I'm sorry, not weekly, a monthly project night or something.

53:31 Where you just come with whatever project you're working on and you could just talk to other people.

53:36 And either they have a project or they're just there to give advice or whatever.

53:40 And that seems like a really great thing to set up if it doesn't exist near you.

53:44 I suggested that to the guy who runs the Hartford meetup that I've gone to.

53:47 You know, they usually have two presentations a night and then he's had hackathon kind of things.

53:52 But they're sort of free form.

53:54 And I suggested to him that they might do exactly what you suggested is a tutorial night where people, somebody comes and they focus on a thing.

54:02 And they work on that thing to try to kind of like a class, I guess.

54:06 Yeah.

54:07 Yeah.

54:07 Like we'll do a hands-on workshop on SQLAlchemy or something like that.

54:12 Yeah, exactly.

54:13 Yeah.

54:13 You know, another thing I'll throw out there, it doesn't work for super, super beginner, but it does work, I think, for even intermediate, like advanced beginner, I guess I would call it, is one of the things that really changed the interaction and trajectory for me was when I started doing presentations at my local meetup.

54:34 Yeah.

54:35 And at CodeCamps.

54:35 Because other people who were really bright and really experienced, like, oh, that was really interesting.

54:40 I didn't know that thing, but they knew other stuff that I definitely needed help with, right?

54:44 And so I had dove into some small area and wanted to present on it.

54:48 And that got me sort of connections, not exactly like a mentorship, but like a peer group that I could then start talking to them about these other things that I needed.

54:58 And that actually really made a huge difference.

55:01 And I know a lot of these meetups, they're looking for people to present.

55:05 And you don't have to be an expert in everything.

55:07 If you just know one thing you can spend 15 minutes on, there's a good chance you could talk about it and get connections you would otherwise wouldn't.

55:14 Oh, absolutely.

55:14 I mean, I got started writing articles to publish because I was doing presentations at works at our various engineering all hands at work.

55:24 And people responded well to these presentations about various things in Python.

55:28 And I got the idea to turn them into some articles.

55:31 And I've been working with Dan Bader at RealPython.

55:35 And they've been very popular.

55:36 So that's what got me into that.

55:38 I think the short form, I think, is probably the key there to getting people up to present.

55:43 If you only had 10 minutes or 15 minutes to say something, that's a lot less intimidating than if you were going to give a half hour, 45-minute presentation and then take questions.

55:53 If you could, you know, everybody stand up and do like a lightning, you know, here's 10 or 15 minutes.

55:57 A lightning talk, yeah.

55:58 Yeah, absolutely.

56:00 I think that would be huge.

56:01 I don't know.

56:02 I guess part of it is, look, if you're looking for a mentor, you've got to take a few steps to get out there, right?

56:06 Certainly sitting behind your computer at home and not talking to anyone is not going to get anyone to help you because they don't even know that you're out there.

56:14 But also, you know, it's also a bit of a give and take, right?

56:18 Like you said, you both helped each other with various things and whatnot.

56:22 I guess the one other thing to maybe mention is there are people who help with speaking in the Python space.

56:29 Like if you apply to PyCon, you can get a mentor that will help you craft your application and craft your presentation.

56:37 Basically, whatever it is you're going to present, they'll give you feedback and advice on that.

56:42 I guess the danger is that they accept it.

56:44 Yeah, then you're committed.

56:48 Oh, we've chosen you for the keynote.

56:49 Oh, super.

56:50 Oh, my God.

56:51 This is going to make me sweat.

56:52 But yeah, it's still, I think, I do think there's ways out there.

56:56 I mean, obviously, there's communities.

56:58 You can join like different Slack communities and whatnot.

57:02 There's codementor.io.

57:03 Never use them.

57:05 Not a recommendation or endorsement.

57:06 I just know they're out there and you can.

57:08 I think it might even be a paid relationship.

57:11 But if you're like, I really need somebody to help me with this project.

57:13 And if I spent a month or two, maybe, you know, with one-on-one help, it might help.

57:17 So, you know, that's another thing that you could do.

57:19 I don't know if anyone has experience with that.

57:21 Yeah.

57:22 I went to, this is a long time ago now, but I went to Toastmasters near me for a while

57:27 to help with public speaking, which is not necessarily, it's certainly not code oriented,

57:31 but it helped me a lot to improve my public speaking.

57:35 I wish a lot of people who I work with would go.

57:37 Sure.

57:39 Well, I hear you.

57:40 And I was going to say that one of the really important things that you can learn that is

57:44 not taught in any sort of computer programming background is this public speaking, putting

57:51 yourself out there.

57:51 Yeah.

57:52 It really makes a big difference on a lot of different levels.

57:55 And so, whether it's Toastmasters or it's more like organic, hey, I started giving talks

58:00 at my local meetup and then at, you know, small local PyCons or whatever, like I highly encourage

58:06 it.

58:06 It's a rare skill.

58:07 And if you have it, it'll put you in a different place.

58:09 Oh, I really think it helps your career to be able to do that.

58:12 I've been telling my own kids that for a long time, dealing with kids, you know, in public

58:16 schools and things like that, that if they can just communicate and get their information

58:20 out there and they don't mind putting themselves out there a little bit, that's going to be,

58:23 that's going to be like Python.

58:24 It's going to be like your superpower at work.

58:25 You can actually communicate it because, you know, these kids have their heads in their phones

58:30 and, you know, I'm not saying that's horrible, but there's not a lot of my own children are

58:33 scared to call people on the phone.

58:34 You know, it's.

58:35 Yeah.

58:35 Yeah.

58:36 Yeah.

58:36 I know like my daughters are not huge fans of talking on the phone either.

58:39 Yeah.

58:40 I think they mostly hate the numbering system dial 472 for this system or whatever.

58:45 Right.

58:45 So I understand it.

58:46 Like they don't want to wait there for 20 minutes, but yeah, I do think that this is a

58:50 skill that is going to be more special, not less.

58:54 It's not like everyone's now a good speaker.

58:55 When I was a kid, no one was, but now everyone's so good at public.

58:59 Like, no, that's not true.

59:00 Right.

59:00 It's certainly not.

59:02 So I think it's really a great thing as well.

59:04 I mean, it's not directly related to being a mentor in a technical space, but I do think

59:09 having that, you know, I think it helps you with other places.

59:12 Like I talked about like presenting the meetups and whatnot.

59:14 Sure.

59:14 Yeah.

59:15 Which gives you an opportunity to meet other people who you could either ask to be a mentor

59:19 or be a mentor to.

59:20 Yeah, absolutely.

59:21 Yeah.

59:21 That's very cool.

59:22 All right.

59:23 Well, you guys, this is a really interesting story and I appreciate you coming on here to

59:27 share it.

59:27 Glad to.

59:27 Excellent.

59:28 Yeah.

59:29 And Doug, I do want to ask you really quickly before we move on to the last two questions.

59:33 Just really quick.

59:34 You talked about your book.

59:35 When's it going to be out?

59:36 Well, it won't be out probably till 2021 because it's, I've only gotten four chapters written

59:41 and I've got 16 total to do.

59:43 So I got a while to go, but I'm supposed to be producing one chapter a month for the Manning's

59:49 early release program.

59:50 So I'll be chugging away.

59:52 That's cool.

59:52 Well, keep slow and steady.

59:54 All right.

59:55 That's the way to do it.

59:56 That's, it's cool though.

59:57 I'm looking forward to it.

59:57 It sounds great.

59:58 Yeah.

59:58 Thank you.

59:59 All right.

59:59 Now, before you all get out here, the last two questions.

01:00:02 So when you write some Python code, I'll go with you, Doug, first.

01:00:06 What editor do you use?

01:00:07 I primarily use PyCharm, which I really like, but I'm getting up to speed on Visual Studio

01:00:14 code because that's what I recommend in the book because it's freely available and it's

01:00:19 a great tool.

01:00:19 Yeah.

01:00:20 Those are both really good.

01:00:21 Obviously, I'm a huge fan of PyCharm, but basically I use VS Code for anything that's not

01:00:25 a Python project as well.

01:00:27 So yeah, it's definitely a good one.

01:00:29 Rusty, how about you?

01:00:30 I prefer Adam if I'm going to do something that's a one-off or if I'm going to be working

01:00:35 in multiple languages.

01:00:36 Jupyter Notebooks has been really big for me this year as well.

01:00:40 And if it's a big project, I do PyCharm.

01:00:43 But like I say, I'm in a relationship with PyCharm, but willing to try new things.

01:00:47 I've really lost all of my love for it.

01:00:50 My PyCharm stopped telling me when my functions are used or it stops telling me if I need an

01:00:55 import and things like that.

01:00:56 And I can't figure out how to fix it.

01:00:57 So yeah.

01:00:58 Oh, that's not good.

01:00:59 There is a way in the settings that you can go in and tell it to clear its cache.

01:01:04 I've done it all.

01:01:06 Okay.

01:01:06 Well, what a bummer.

01:01:11 Yeah.

01:01:13 All right.

01:01:13 Cool.

01:01:13 Well, yeah.

01:01:14 So Adam, that's cool.

01:01:16 That's like the grandfather of VS Code in a sense, I guess.

01:01:20 That's where Electron came from, right?

01:01:22 I really like it.

01:01:23 It's really, really, really customizable and really fun.

01:01:25 And until I really enjoyed it until Doug convinced me that I needed a debugger and there's no good

01:01:31 debugger built in.

01:01:32 So yeah, I had to switch.

01:01:33 I couldn't let him go down the path of being one of those Vim guys who just loads his code

01:01:37 with a print statement.

01:01:38 Nice.

01:01:41 Nice, nice.

01:01:42 And while we're talking about this, it's not either of your answers, but let me just

01:01:46 throw it out because it's pretty interesting.

01:01:47 So Rusty, you bring up Jupyter Notebooks, which is super common in the data world.

01:01:52 Have either of you all heard about Carnets, C-A-R-N-E-T-S?

01:01:57 No.

01:01:57 So Carnets is an open source, free, local Jupyter Notebook platform for iOS.

01:02:04 Wow.

01:02:05 So yeah, it comes with like NumPy, SciPy, Matplotlib, all that.

01:02:10 And it runs like on the device, not just a browser talking to something.

01:02:14 So it works with no internet and stuff like that.

01:02:16 Anyway, who knows how long it'll be until someone says that's their answer, but it's still a pretty

01:02:20 cool little option to help people about.

01:02:22 That's cool.

01:02:22 Yeah, for sure.

01:02:24 And then notable PyPI packages.

01:02:26 Doug, you want to go first?

01:02:27 Well, I have two kind of.

01:02:29 One is not a PyPI package.

01:02:30 I've been using P-Y-E-N-V to run multiple Python versions, which I find fantastic.

01:02:36 Very handy.

01:02:38 I was just thinking this morning, like I should probably start playing with that more because

01:02:41 it was nice to say this one is a 3.6 one and this one is a 3.8 one.

01:02:45 Yeah.

01:02:46 Right?

01:02:46 And with the book, I've had to update my Python version for the book twice already.

01:02:51 It's probably going to happen two more times.

01:02:55 Yeah, right.

01:02:55 Exactly.

01:02:56 And then the other one that I like, I just discovered this a couple of days ago is this

01:03:00 thing called JustPY, all one word.

01:03:02 It's an object-oriented web framework, but everything is done in Python, including the rich JavaScript

01:03:08 web application, which uses Vue, but is embedded in the Python.

01:03:13 Yeah, this is really interesting over at JustPY.io.

01:03:15 I just learned about it as well.

01:03:16 And it's like, yeah, it's a pretty cool little framework for sure.

01:03:19 Cool.

01:03:20 All right.

01:03:21 Well, that's a good recommendation as well.

01:03:22 I have no idea if you can pay up and install it, but it's definitely cool.

01:03:25 Rusty, how about you?

01:03:26 Package?

01:03:27 I'm going to go with pandas.

01:03:28 I've been cleaning data for 2,000 students for about six months, and it's been amazing.

01:03:34 And I never really knew why I'd want it before, but yeah, it's been a lot of fun to use, actually.

01:03:38 Yeah.

01:03:39 I wish it looked like the rest of Python, but...

01:03:41 It's its own special thing.

01:03:43 Yes.

01:03:43 So that's cool.

01:03:45 And something I just learned about recently is through Brian Okken, who I think learned

01:03:52 about it through another one of our Python Bytes listeners, is detail.

01:03:56 details, but D-T-A-L-E.

01:03:59 I don't know if you guys are familiar with that, but it's a cool framework that lets you

01:04:04 visualize Panda data frame.

01:04:06 So if you click on the link, you can click on, there's like a little interactive demo tutorial

01:04:11 thing you can check out somewhere.

01:04:13 There's a live demo right at the top.

01:04:15 But it's like, think a super reactive Excel hype thing that you just point at your data

01:04:21 frame and it just comes to life and you can even see like example data.

01:04:25 Wow, that's cool.

01:04:26 Yeah, it's super cool.

01:04:27 So anyway, if people are taking your advice and using pandas, they might also want to check

01:04:32 that out.

01:04:32 It's a pretty cool little visualizer.

01:04:34 Excellent.

01:04:34 Yep.

01:04:35 All right.

01:04:35 So final call to action.

01:04:37 People are out there.

01:04:38 Either side of this relationship that they're looking to set up to work together, what do

01:04:43 they do?

01:04:43 Well, just reach out and make themselves public.

01:04:45 Put yourself out there.

01:04:46 And yeah, just got to take the chance and maybe somebody will take you up on it.

01:04:50 On both sides.

01:04:51 I reached out to Rusty to think that I could help him out and he was willing to let me

01:04:57 do so, which was very great of him.

01:05:00 That's awesome.

01:05:02 Yeah, I'm sure he didn't see it that way.

01:05:03 That's awesome.

01:05:04 I could have had no information at all on the national offering to help him.

01:05:07 This crazy guy that has no idea about programming.

01:05:11 Let's talk about the program on the internet.

01:05:12 No, obviously he knew you were on the show and stuff, right?

01:05:16 So very cool.

01:05:17 Great.

01:05:18 I think that's good advice.

01:05:19 And I do think that that is what it takes, right?

01:05:21 No one is going to be willing to help you if you don't get out in the community, make

01:05:25 some connections and take some steps, right?

01:05:27 Like if there is someone showing effort to make progress, you're way more willing to put

01:05:32 in a little effort to help them rather than someone just like, you know, looking to get

01:05:36 someone to figure stuff out for them.

01:05:37 Yeah, absolutely.

01:05:38 Awesome.

01:05:39 All right.

01:05:39 Well, this is really interesting peek inside what you guys have been up to and I'm sure it'll

01:05:43 help some folks along the way.

01:05:44 I hope so too.

01:05:45 Yep.

01:05:45 Thanks for being on the show.

01:05:46 Thank you very much.

01:05:47 Thanks, Michael.

01:05:47 Thanks, Rusty.

01:05:48 Yep.

01:05:48 Bye guys.

01:05:49 Bye guys.

01:06:19 you'll automatically get a $20 credit when you create a new account.

01:06:21 Want to level up your Python?

01:06:23 If you're just getting started, try my Python Jumpstart by Building 10 Apps course.

01:06:28 Or if you're looking for something more advanced, check out our new Async course that digs into all the different types of

01:06:34 async programming you can do in Python.

01:06:36 And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.

01:06:41 It's like a subscription that never expires.

01:06:43 Be sure to subscribe to the show.

01:06:45 Open your favorite podcatcher and search for Python.

01:06:47 We should be right at the top.

01:06:49 You can also find the iTunes feed at /itunes, the Google Play feed at /play,

01:06:53 and the direct RSS feed at /rss on talkpython.fm.

01:06:58 This is your host, Michael Kennedy.

01:07:00 Thanks so much for listening.

01:07:01 I really appreciate it.

01:07:02 Now get out there and write some Python code.

01:07:18 I'll see you next time.

Talk Python's Mastodon Michael Kennedy's Mastodon