#427: 10 Tips and Ideas for the Beginner to Expert Python Journey Transcript
00:00 Getting started in Python is pretty easy.
00:02 There's even a t-shirt that jokes about it.
00:04 I learned Python. It was a good weekend.
00:06 But to go from knowing how to create variables and writing loops to building amazing things like FastAPI and Instagram,
00:13 well, there's this little gap in between those two things, don't you think?
00:17 On this episode, we welcome Eric Matthews to the show.
00:20 He has thought a lot about teaching Python and comes to share his 10 tips for going from Python beginner to expert.
00:26 This is Talk Python to Me, episode 427, recorded July 19th, 2023.
00:33 Welcome to Talk Python to Me, a weekly podcast on Python.
00:49 This is your host, Michael Kennedy.
00:51 Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython.
00:56 Both on fosstodon.org.
00:58 Be careful with impersonating accounts on other instances.
01:01 There are many.
01:02 Keep up with the show and listen to over seven years of past episodes at talkpython.fm.
01:07 We've started streaming most of our episodes live on YouTube.
01:11 Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of that episode.
01:18 This episode is brought to you by GlareDB.
01:23 GlareDB is an open source database for querying distributed and disparate data.
01:28 Connect your data sources and use the Python tools you already know to ask questions and
01:34 integrate data across data sources.
01:36 Get started today at talkpython.fm/GlareDB.
01:39 And it's brought to you by Sentry.
01:41 Don't let those errors go unnoticed.
01:43 Use Sentry.
01:45 Get started at talkpython.fm/sentry.
01:47 Eric, welcome to Talk Python to me.
01:50 Thank you.
01:51 It's very nice to be here.
01:52 It is very nice to have you here.
01:53 The last time we were sitting around talking was at a beautiful cocktail bar
01:58 at the tail end of PyCon 2023 in Salt Lake City.
02:02 Not a bad place to wrap that up.
02:04 No, it was very nice.
02:05 What a fun event.
02:06 We're going to talk about how people go from being a beginner-ish.
02:11 That's a pretty broad term of what a beginner is in Python and programming.
02:16 And sort of moving towards, you know, how do you take that journey, maybe more deliberately,
02:22 a little more quickly, to the expert side of the software developer spectrum?
02:26 It's going to be a lot of fun.
02:28 Yes.
02:28 Yeah.
02:28 And so before we get into that, though, let's just start with your story.
02:32 How did you get into programming Python?
02:34 How did you end up writing books?
02:36 All those things.
02:37 Oh, boy.
02:38 I have to be careful because it's a long story and I like telling it.
02:41 I was fortunate in that my father was a software engineer in the 70s and 80s.
02:46 And so when I was growing up, we had a kit computer in our basement before most people had home
02:52 computers.
02:53 So I got to write my first program as a basic number guessing game.
02:58 When it was all about the go-tos?
02:59 Yes.
03:00 Line 10.
03:01 Go to 10.
03:01 What is your number?
03:02 Yeah.
03:03 Exactly.
03:03 Yeah.
03:04 I always had an interest in programming.
03:05 And so I got to watch in real time the development from basic to logo for teaching kids to C to
03:12 Pascal, Fortran, and all that variety of languages that led up to Python.
03:16 My journey into Python was I was using Java in the early 2000s.
03:22 And I thought I'd be a Java programmer for life.
03:24 And a friend told me that, hey, you should check out Python.
03:27 Your Java programs would be about a third as long as they are.
03:30 Your programs would be about a third as long as they are in Java.
03:33 And I couldn't really believe that because it's a pretty big claim.
03:37 But I tried to end it.
03:38 Yeah, that's a bold claim.
03:39 Yeah.
03:39 And it worked.
03:40 And I was amazed.
03:41 And people talk about this, but it was just plain fun.
03:44 There was something more fun for me about writing Python code than Java.
03:48 And I have never really looked back.
03:50 That's a bit of an exaggeration.
03:52 I do keep my eye out for other languages.
03:54 I don't always assume that Python is always going to be the best for me.
03:57 And I certainly use other languages as appropriate.
04:00 But my core, I need to do something.
04:02 I don't have a particular reason to choose another language.
04:04 I do everything in Python.
04:05 Yeah, I'm very similar in a lot of ways, actually.
04:08 My background was in C# and C++, not Java.
04:12 So a little bit different, but more similar than different, right?
04:16 And I recall coming to Python and thinking at first, like, it's kind of a weird, interesting,
04:22 but weird language.
04:23 It's white space stuff.
04:24 I don't know.
04:24 Curly braces are pretty tried and true.
04:26 What are we doing with all this?
04:27 And before I really became super comfortable with Python and just like, yeah, that looks at
04:33 it.
04:33 It feels great.
04:34 It feels right from how I perceived programming should be.
04:38 I went, worked with it for a while, went back and why are all these symbols on the page?
04:43 Like how it's just in the way of reading.
04:45 And, you know, I used to thought I had to have the parentheses on the if statement, but it turns
04:50 out you don't.
04:50 So why does this language make you write the parentheses?
04:52 And, you know, all those things, you're just like, what?
04:54 What a hassle.
04:55 Not even the static typing, just the, just the syntax is more syntaxy.
05:00 And I'm kind of interested in how your experience with that was.
05:04 Yeah, I'm going to save that for a little bit because it's going to come up in,
05:07 in the points that we go over.
05:09 I'll share though that for my background, that's one of the big piece that, that plays
05:13 into all this.
05:13 I, I went into college, into undergrad, focus on chemical engineering because I had a really
05:20 good chemistry teacher in high school.
05:22 And I thought I wanted to apply what I knew about chemistry in my intro chemical engineering
05:27 classes.
05:27 We were doing problems about running nuclear power plants.
05:30 And I was like, gosh, I don't want to run a nuclear power plant.
05:33 And I really enjoyed my physics classes because they were just playing about understanding.
05:37 how the world works.
05:38 So I ended up doing an undergrad in physics and I tutored throughout undergrad because so
05:43 many people struggled with math and science, the two subjects that I loved the most.
05:48 And I found that most people who struggled, it was because of how they were taught, not
05:53 the subject material itself.
05:54 And so I got a strong interest in teaching and I wanted to be a particle physicist, but
05:58 I didn't want to be a student forever and get on the PhD track right away.
06:02 So I started teaching and I loved teaching.
06:04 I found that the challenge of reaching every person in a classroom was as hard as hard and
06:10 satisfying as hard science.
06:12 And so I just stayed in teaching.
06:14 So I taught public school, fifth grade through high school for about 20 years.
06:18 And I would, I was a hobbyist programmer throughout all of that.
06:21 And so I taught intro programming classes whenever I could.
06:24 And in the early 2010s ish, I was looking for a Python book that I could give my more motivated
06:29 students and just kind of stand on the sidelines and answer their questions and let them go at
06:34 their own pace.
06:34 But everything either made too many assumptions about what you already knew, or it was written
06:40 for kids and kind of spoke down to you.
06:41 And so that's how I ended up writing a book because the book I wished to teach from did not
06:46 exist.
06:47 Sure.
06:47 I know how that feels.
06:48 Yeah.
06:48 Yeah.
06:48 What's the title of the book?
06:49 Share that with everyone.
06:50 That is Python Crash Course.
06:51 No starts, right?
06:52 Yes.
06:53 From no starts.
06:53 And it's been the bestselling introduction.
06:57 It's been the bestselling Python book for close to 10 years now, which is really satisfying
07:01 because I kind of had a 10 year vision.
07:04 I had the naive notion that I could write a book in the summertime and then revise it during
07:09 the school year and it would be done.
07:10 And it was two and a half years instead of that.
07:14 So I had a 10 year vision.
07:16 I thought if I'm going to do all this work, then I should support the book for 10 year period.
07:20 And so it's been very satisfying to see it be meaningful to so many people over that.
07:24 Yeah.
07:25 That's really awesome.
07:26 So your book is in like LTS, long-term support.
07:29 Say that again?
07:29 It's an LTS release of the book, a long-term support, right?
07:32 Not one of those off-brand releases.
07:35 Right, right.
07:36 No, that's really great.
07:37 And it's cool to connect with so many people.
07:39 You probably go to PyCon and other events and people are like, oh, I read your book.
07:44 And it really, you know, probably have stories to tell you about it.
07:46 Yeah.
07:47 It was amazing.
07:47 You know, you go to PyCon or any of these conferences and you see a bunch of booths
07:51 with people hiring or selling something.
07:53 And I used to go to those booths and just have conversations.
07:56 And a year or two after the book came out, those people started telling me, oh, hey, I
08:01 learned Python from your book.
08:03 And I was amazed at how quickly people could learn Python and then start to work at these
08:07 companies and organizations.
08:08 Yeah.
08:09 Yeah.
08:09 It's interesting.
08:10 So they learn Python through your book and now they're working at Bloomberg or whatever.
08:14 And now they're talking to you through these booths.
08:16 Interesting.
08:16 Got it.
08:17 Yeah.
08:17 And as a teacher says, I'm glad to say I've read that book and learned a lot from
08:22 it.
08:22 Yeah.
08:22 Very cool.
08:23 Yeah.
08:23 I'm glad I worked for you.
08:24 Yeah.
08:25 I was going to say, you know, as a teacher.
08:26 Yeah.
08:27 I have always been happy for my students to end up better at whatever I introduced them
08:31 to than I am.
08:32 My focus has been on teaching for a long time.
08:35 And so I learned my subject well enough to be able to do whatever I need to with them.
08:38 But anybody who chooses to focus on one area over a lifetime is going to be better
08:43 than I am at it.
08:44 And so meeting those people at the booths who are honestly now probably better programmers
08:48 are certainly within their discipline than I am.
08:50 It's a privilege.
08:51 Yeah.
08:52 So along this idea of how do you go from beginner just starting Python to whatever we call intermediate
08:57 or advanced or expert.
08:58 It's an interesting, interesting topic.
09:01 And I think it's one that really deserves some attention.
09:03 I think it does too.
09:04 I think I hear for so many times from beginners, like I'm learning the language or I'm learning
09:09 this or I'm learning that.
09:11 And now I just don't really know what to do to keep making progress.
09:15 Right.
09:15 Right.
09:15 And you mentioned your situation where you are sort of a hobbyist programmer to some degree.
09:21 Right.
09:21 And you just compared it against people who are, you know, maybe scaling out some DevOps
09:25 thing at like a huge tech company.
09:27 Right.
09:28 Those are really different ways you spend your day.
09:31 Right.
09:31 As a hobbyist programmer, you have something you're interested in.
09:34 Maybe you, you poke at it a little bit, you work at it, but you don't have the, the real
09:39 demands of it's, it's got to work at this crazy scale.
09:41 And also that it something you can, can you focus your entire effort on all day.
09:46 Right.
09:46 Cause you're, you're teaching or you're, you're doing other things besides that.
09:50 Right.
09:51 As a hobbyist.
09:51 Yeah.
09:51 And I think that, you know, when we label ourselves or others, beginner, intermediate
09:57 expert, beginner is the one label that is objective or I've never programmed before.
10:02 I'm a beginner or I have never used Python.
10:04 So I'm a beginner at Python.
10:05 Although even that, if you're experienced in another language, it's hard to call yourself
10:08 a beginner again.
10:09 Exactly.
10:10 And then, you know, when I've looked at say intermediate resources, it's a hard world
10:15 to classify and categorize because what is intermediate?
10:18 And I think it's good to recognize that in the early days of a language, say like mid nineties
10:24 to 2000 for Python, the language was small enough that somebody could call themselves an expert
10:29 at some point.
10:30 I know everything that there is in Python and a language is so big and the ecosystem is so
10:34 huge and it covers so many domains that it's hard for anybody to objectively call themselves
10:39 an expert in Python.
10:41 What does that even mean?
10:42 And so it really is about relative statement.
10:44 Yeah.
10:44 How do you get out of those?
10:46 I'm just learning the language and now I'm using it.
10:48 Those, that evaluation is interesting.
10:50 Yeah, it is.
10:51 And I think one, you know, it's a good point you bring up about when Python was smaller.
10:55 There's this teacher that was a joke.
10:57 It says, I learned Python.
10:58 It was a good weekend, you know, which there's a truth to that.
11:02 And it's, it's also cute, but at the same time, I've been doing this for many years and
11:06 I'm still learning Python all the time, right?
11:09 Yes.
11:09 How do you square those two things?
11:11 How can those both be true?
11:12 And part of what that, the difference is, that's not obvious, I think to beginners, but
11:18 it's obvious to you.
11:19 When that person said, I learned Python, it was a good weekend.
11:21 They meant they rocked the for loop.
11:24 They can create a class and they can create a function, you know, that's, they can do if statements
11:29 and they now write and instead of double ampersand.
11:32 That is one interpretation of what Python is.
11:35 But then you look at PyPI with its, I haven't read the numbers in a few weeks or something,
11:41 but it's close to half million packages.
11:43 If you completely, truly learned a new package every day, you're still falling behind, right?
11:50 Continuously, every day, just nonstop for the rest of your life.
11:54 You're like, ah, Molly, I'm more behind than I started 20 years ago, right?
11:57 In a sense.
11:58 And so what is Python?
12:00 I think when people say, I want to be good at Python, I want to learn Python, I want to
12:05 be an expert in Python.
12:06 You need to understand that there are these different layers or tiers of what that means.
12:12 And you can, you can be focused on one or another.
12:15 But right, it's, it's when people are comparing, like I've done this much and I've got, I'm
12:21 an expert at Python.
12:21 Like, well, are you an expert at the language?
12:23 Are you an expert in FastAPI?
12:24 What are you an expert in?
12:26 Right.
12:26 And so I think just kind of setting the stage with there's different meanings to what I'm
12:32 good at Python is.
12:33 Yeah.
12:33 And I'll, I'll say right now that I have a hard time classifying myself.
12:37 I'm definitely not a beginner.
12:39 I wouldn't necessarily call myself an expert, but I don't even know about intermediate somewhere
12:43 between intermediate and expert.
12:45 And I've been writing a weekly newsletter at mostly Python.
12:49 It's on Substack.
12:50 And I started writing a newsletter because I wanted to get out of that LTS you're mentioning
12:56 about the book where all my writing is about a book.
12:59 It's always about the same material.
13:01 And so writing a weekly newsletter forces me to pick a topic each week and then be able
13:06 to explain that well.
13:07 And I think a lot of people think that somebody in my position just knows all this stuff and
13:12 just write something up each week.
13:13 And really it's a whole bunch of research every time because there's nooks and crannies around
13:18 every topic in Python that I didn't know about after 20 years in the language.
13:22 I mean, it's really enjoyable to fill out that understanding and then explain it well to other
13:26 people.
13:26 Yeah, it really is.
13:28 Maybe final thought on this.
13:30 Tony out there points out and says, adding on to what we were saying, and an expert in
13:34 Python for data science doesn't necessarily look like an expert in Python for web and so
13:38 on.
13:39 Yeah, and I was going to add basically something similar that I would consider myself an expert
13:43 in web development and API stuff and those kinds of things, right?
13:48 I've been running production Python apps for a long time and really just polishing them.
13:53 But put me in front of some machine learning situation or, you know, too much
13:59 advanced pandas.
14:00 And I'm like, well, I'm a beginner over here.
14:03 And those are both also called Python, right?
14:05 So there's just this, all these different contexts and spheres of relevance that I think people
14:11 got to keep in mind, right?
14:13 And it's probably good to hear them say like, you're an expert in some things, but not, it's
14:17 not like you just know it all, right?
14:18 Right.
14:19 It's good to recognize that expertise in one area is oftentimes transferable.
14:22 You aren't immediately an expert in the new domain.
14:26 But what you've learned in one domain is oftentimes makes it easier to gain expertise in another
14:32 one.
14:32 Absolutely.
14:32 Like if the data science side, right?
14:34 You're still good at Git.
14:35 That's not a new thing for you, right?
14:38 You're not like, why?
14:38 What is this source control thing?
14:39 Like you can still completely rock that.
14:41 But maybe you're not embracing the vectorization of style of programming and so on.
14:47 This portion of Talk Python to Me is brought to you by GlareDB.
14:51 GlareDB is an open source database for querying distributed data.
14:55 Here's how it works.
14:56 First, you connect your data sources.
14:58 GlareDB makes it easy to connect to your data, no matter where it's stored, with integrations
15:03 into many popular databases, data warehouses, and more.
15:06 This includes Snowflake, Postgres, MongoDB, BigQuery, and object storage.
15:11 Now you can query everything.
15:13 You use the full power SQL to query your data across these many different data sources, join
15:19 data across production databases and analytical warehouses without limits.
15:23 Finally, you can use the tools you already know and love.
15:26 Visualize and query your data using tools you know from Python's data science stack.
15:31 With just a single import, you can query Pandas and Polar's data frames using just
15:36 SQL.
15:37 You'll be asking questions, extracting insights, and driving decisions with your data without
15:42 waiting for an ETL pipeline to move data around.
15:45 So if you have distributed data and disparate data sources, and you love open source, you
15:50 owe it to yourself to give GlareDB a try.
15:52 Visit talkpython.fm/GlareDB to get started.
15:56 The link is in your podcast player show notes.
15:58 And please use the link to let them know that you came from us.
16:01 Thank you to the team at GlareDB for sponsoring the show.
16:06 Maybe this is a good time to start talking about the ideas.
16:10 So what I did is I said, you know, Eric, you've got this cool book.
16:14 How about you try to extract some ideas that you've learned from writing the book and working
16:19 with people for this whole topic of transitioning from beginners towards the expert side of programming.
16:25 So let's go through the list.
16:27 Sure.
16:27 I like, first of all, I like that structuring.
16:29 I kind of forced me to think specifically about what I can say.
16:32 I want to clarify.
16:33 This isn't a countdown.
16:35 A lot of times lists are like, here's the top 10 things you should know about Python.
16:38 So these are ideas for specific things that people can do to move away from wherever you
16:44 were as a beginner and more into that intermediate and expert and be comfortable with justifying
16:49 that.
16:49 So for this kind of list, I start with the most important things first because everything
16:54 else builds on that.
16:55 And so when I think about what do people need to do to move away from beginner and towards
17:00 being fluent and comfortable and competent and able to solve a variety of problems, the
17:05 first thing is when you're learning, know your goals.
17:08 Why are you learning in a program?
17:09 And so we see this all the time.
17:11 If you follow conversations about learning Python, I want to learn Python.
17:14 Okay.
17:14 But should I focus on?
17:16 Well, what are your goals?
17:17 Why are you learning it?
17:18 What do you want to do?
17:19 And I think the answers to that tend to be, I just like programming.
17:23 I'm curious.
17:24 For a lot of people, it is about money.
17:26 People know that software development jobs can pay well.
17:30 And I think it's quite appropriate and reasonable and important to name that if that is one of your
17:36 goals and there's nothing wrong with that.
17:37 Right.
17:38 And also it could be career, but not money in the sense that.
17:41 I have a decent paying job now, but I don't like my job.
17:44 If I could just have the same money, but actually work on programming all day, that would be awesome,
17:49 right?
17:49 Yes.
17:50 Yeah.
17:50 The money thing comes up for me because I'll say one of the things I'm proud of as an author
17:55 is I've replied to pretty much every single email anybody has ever written to me about the book.
18:00 I think that's part of why the book has done well, because I notice I look for patterns.
18:05 And so if people start to write about the same thing, then I adjust the book a little bit to
18:09 address that.
18:10 And so it keeps my email volume reasonable, but also it means it's still meeting the needs
18:14 of readers.
18:15 But it also means I've had interactions with thousands of readers.
18:18 And one of the things that comes up in anything that goes beyond a, can you help me fix this
18:23 one problem?
18:24 I oftentimes ask like, what are you learning this for?
18:26 What's your, what's your story?
18:28 And a lot of those people are doing career transitions.
18:31 It's a mix of people looking for better pay.
18:33 And oftentimes that's tied in with to support my family.
18:35 Those larger life decisions other than just, you know, it's never greed.
18:39 It's never, I want to be rich.
18:41 It's always, I want to, to live reasonable life.
18:44 And what you say, people being tired of a different line of work and looking for something where
18:49 they can have more power, more, more independence, more control.
18:52 You know, when you say know your goals for most people, their goals, it's not one goal.
18:56 It's a balance of those.
18:58 And recognizing where your balance sits is really important because it guides the rest
19:03 of your learning and what you do.
19:04 Yeah, it absolutely does.
19:06 Somebody who's just plain curious.
19:07 Go ahead.
19:08 Sorry.
19:08 Well, yeah.
19:09 And I think when we're talking about beginners, there's a lot of people who get pulled into Python
19:15 without an explicit intent of becoming a software developer.
19:19 In fact, like they would maybe start out by saying, I don't want to be a software developer.
19:23 I'm a biologist.
19:24 I'm an economist.
19:25 I'm a philosopher or whatever.
19:27 But I need a little bit of programming because I learned that if I do these six lines of
19:32 Python, like magic happens way better than if I had to force it through Excel or something.
19:37 Right.
19:37 And I think a lot of the beginners are in that realm of like, well, I'm here now.
19:42 I'm still not a programmer.
19:43 Don't call me one of those.
19:45 But I use programming for my thing.
19:47 And that's also a pretty interesting angle, I think.
19:50 Yeah.
19:51 And I think that's a really, really good thing for people to recognize.
19:53 It is interesting to have this conversation about labels and beginners and intermediate.
19:57 Because how do you know when you're no longer a beginner?
20:00 One of the clearest signs is when you have used programming to solve a real problem that you have.
20:06 And you can throw in like with a level of understanding rather than copy pasting.
20:11 But for a lot of people...
20:13 Or now ChatGPT also.
20:14 Yeah.
20:15 Yeah.
20:16 That's a super interesting dynamic to throw into all of this.
20:19 But that is the end goal.
20:20 It should be the end goal for most people.
20:22 Not just to know how programming works, but to use it to solve a real world problem that you or somebody else has.
20:29 And so as soon as you're doing that, you can start to consider yourself moving out of the beginner place.
20:34 Yeah.
20:34 You might still feel awkward, but you're doing it.
20:36 Really interesting comment that I think is worth highlighting.
20:39 And Foxo says, I'm an anesthesiologist.
20:42 You cannot imagine how much Python has helped me with different tasks.
20:45 Amazing.
20:46 That's really cool.
20:47 Thank you for sharing that.
20:48 Yeah.
20:48 Yeah.
20:49 Yeah.
20:49 Yeah.
20:50 Okay.
20:50 So tip number one, know your goals.
20:53 Like, why are you here?
20:54 Because that'll help guide you somewhat.
20:56 Yes?
20:56 Yes.
20:57 I'm taking a few notes about throwing things in there later in the list.
21:01 Beautiful.
21:01 All right.
21:02 I agree.
21:02 I think it's important to know your goals.
21:04 And there's a lot of reasons why people get into programming, right?
21:07 And so...
21:09 Yeah.
21:09 Last thing on that is if somebody is just plain curious, as far as teaching and learning,
21:13 if somebody is just plain curious, that's their main goal, you have a lot more flexibility
21:17 in the examples you present to them and the pace at which you present material, as opposed
21:22 to somebody who says, you know, I really want to do a career transition as soon as possible.
21:25 That person needs a much more grounded and practical and timely approach.
21:30 Well, and you also might look out and say, okay, web framework do I need to choose?
21:34 What database experience do I need to get?
21:36 Because I'm looking at Indeed job listings and I'm trying to hit the largest set of those
21:42 rather than what project am I trying to work on or what am I curious about?
21:46 You're like, I need to start checking the big boxes.
21:48 Let's check those boxes so I can get a job in six weeks.
21:50 Yep.
21:51 All right.
21:51 Tip number two.
21:52 Yeah.
21:52 Tip number two.
21:53 What do you got?
21:53 Have a project in mind.
21:55 And so whatever your goals are, having a specific project in mind helps put everything else in
22:00 context.
22:01 If you are learning about a for loop and you have a project, I'm going to name one, one of
22:07 the projects that I've worked on.
22:08 I live in Southeast Alaska.
22:09 And one of the impacts of climate change here is an increasing frequency and severity
22:14 of landslides.
22:15 And so Southeast Alaska is a rainforest for anybody who isn't aware of that.
22:20 It's not all snow in Southeast because we're right next to the ocean.
22:23 And so we're still getting as much rain as we always have, but it's coming instead of
22:27 light rain throughout the year with some periods of heavy rain, we're getting a lot more nice
22:31 weather.
22:32 We just had two or three weeks of no rain, which was really unusual here.
22:36 But we'll get heavier fall storms that can lead to landslides.
22:41 And so I had a project that monitored a local river's level to correlate that with landslide
22:47 risk and helped develop a warning system.
22:50 And so a project like that in mind, that's a big project.
22:55 And so if somebody is just learning Python, that's hard to say, like, here's everything
22:59 you need to know to build that project.
23:00 But if you're teaching a for loop and you know that somebody is interested in a project
23:05 about monitoring climate, then you can make your for loops about processing data related
23:09 to rainfall, river levels, things like that.
23:12 Yeah, absolutely.
23:13 And Python is really interesting in that you can, it's pretty good at the IoT thing as well,
23:19 which opens up a lot of, you know, we've got CircuitPython and Adafruit and all those
23:23 areas to play with as well, which is a whole different kind of project.
23:26 Yeah, yeah.
23:27 And so there's an infinite number of projects.
23:29 And so if you have a project in mind, being clear about that with yourself and with anybody
23:34 that you're learning with or from is really helpful as far as tailoring what you're
23:39 learning to your purposes.
23:40 I'm curious.
23:41 It's always easier to teach somebody who has a specific goal in mind than somebody who
23:46 is just vague.
23:46 Just teach me something.
23:47 Yeah.
23:47 Well, because it's focused.
23:49 Yeah.
23:49 Right.
23:49 I find a lot of people try to boil the ocean metaphorically when they're trying to learn
23:54 these things.
23:54 Like, well, I saw somebody saying, well, all these CS topics are really hard for me.
23:58 Like people keep telling me all these CS things I need to know.
24:01 And do I really need to know them?
24:03 Well, maybe eventually, but not all at once.
24:06 You know, like, what are you doing now?
24:09 How big is your program?
24:10 You really need testing.
24:12 Maybe you do.
24:13 Maybe you don't.
24:13 Do you really need classes?
24:14 Maybe you do.
24:15 Maybe you don't.
24:15 Do you need generators?
24:16 Do you need anything?
24:17 Like there's all these things that you probably could say, don't need them now.
24:20 Maybe in a year or two, I can.
24:22 I will need them.
24:23 Then I'll be motivated to learn them.
24:25 And so when you have these projects, you can say, I need these five things or I need these
24:29 four things.
24:30 I need to know them.
24:31 And then my project is working, right?
24:34 Instead of trying to say, well, what do I start with even?
24:36 Yeah.
24:37 And one of the criticisms of many learning resources, and I'm a little sensitive to this
24:42 because I've written many of these examples, is when people do a for loop and the for loop
24:46 is about like kinds of pizza or something or toppings of pizza.
24:49 And people look at that and say, why do I need this?
24:51 I don't care about pizza toppings.
24:53 Okay.
24:54 You need that because the person creating the resource has to have something, some kind
24:57 of context for the example.
24:59 And so when I'm teaching a class in person, I don't come up with, all right, we're going
25:03 to do pizza toppings.
25:04 I ask people in the class, hey, what are you interested in?
25:06 And then we pick something that somebody in the class that day mentions.
25:10 And then there's relevance right there.
25:13 You don't have that if you're learning on your own, but what you can do, if you do know your
25:18 own project, you work through the example about pizza toppings, but then you write a loop
25:22 that relates to the project that you want to work on.
25:25 And so that knowing that project is really helpful, regardless of how you're, you're learning.
25:30 Yeah.
25:30 Let me pull up another comment.
25:31 I think this is worth covering for people as well.
25:33 So Bishnielder says, for me, it was all good while I was learning programming Python.
25:37 But as soon as I was out there in real life, looking for jobs and looking at the requirements,
25:42 it drained a lot of energy out of me.
25:43 Suggestions.
25:44 What do you think?
25:45 Oh boy.
25:46 I don't think there's an easy answer to that.
25:48 And I think it's important to be honest about that.
25:51 Personally, I have never worked as a full-time programmer.
25:54 And that puts me in a weird spot for talking about things like career transitions.
25:58 I have helped thousands of people make career transitions, but I don't sit in the interviewee
26:05 chair.
26:05 Not very often.
26:06 Yeah.
26:07 And having spent a good part of my life as a teacher, teacher hiring and teacher, the
26:12 structure of employment for teachers is so vastly different than programming.
26:16 Yeah.
26:16 The timeframe of teacher teaching jobs is so weird.
26:19 It's like, yes, there's a time sort of once a year often that you can apply or change jobs.
26:25 And otherwise you can't.
26:26 It's not exactly true, but generally true.
26:28 Yeah.
26:28 I'm in an interesting position now where I'd kind of like to work as a professional programmer,
26:32 but honestly, I have to spend 10 to 20 hours a week supporting the book.
26:36 That LDS stuff is ongoing.
26:39 I know.
26:40 I got a bunch of courses and stuff.
26:41 I know.
26:42 Yeah.
26:42 I was just redoing some videos that had a mistake in them that somebody noticed.
26:46 So anything I do is on top of that work.
26:48 And so I can really only consider part-time work and then it becomes a, is this worth
26:53 it?
26:53 So to be more direct, I don't think there's an easy answer to the grind of looking for work.
27:00 And as a network thing of once you have a job, it can be easier to find the next job.
27:04 The couple of things I'll share for people is if you, so we talked about solving real world
27:09 problems.
27:09 If you have a story that you can tell about how you have, you have made something better
27:15 through programming, what employers are looking for is that yes, you have capability for programming.
27:20 You can pass whatever lead code tests or screenings are necessary, but also have you use what you've
27:26 learned about programming to solve something.
27:28 And so the stories I always come back to are people who are working non-programming jobs and
27:33 start to learn programming and then use that to solve something in their work that they weren't
27:38 expected to solve.
27:39 And that becomes a huge selling point in interviews.
27:41 My favorite story is a guy who was working for, I believe it was UPS.
27:45 And this was quite a while ago.
27:46 I feel comfortable telling that story, partly based on time, but they were working for one
27:50 of these large delivery companies and they were aware of people getting fired in warehouses
27:55 for damage to the goods that were supposed to be delivered.
27:58 And so the person was learning Python and they wrote some data analysis and they were able to
28:03 pinpoint that the damage was coming from a manager or management group that was not
28:09 training end line employees well enough.
28:11 And so that was really interesting story because the people being fired were not the people who
28:17 are causing the damage.
28:18 They caused the physical damage, but it was more systemic.
28:22 Yeah.
28:22 Yeah.
28:23 And so that person saved their company millions of dollars and they got like a $5,000 a year
28:27 raise.
28:27 What they really did was they used that story in interviews to gain an actual programming
28:34 position at a different company.
28:36 And so it's hard when you're starting out.
28:40 And so all I can say is look for the selling point for yourself and know that once you do
28:45 get your first break, it becomes easier to stay on that path.
28:49 I have one more thing to add.
28:50 A lot of times when people are looking for their first programming job, they have experience
28:54 somewhere else.
28:55 I realized some people are young.
28:57 They learn programming.
28:58 That's kind of their totality of work experience.
29:01 But a lot of people maybe studied something else and became a programmer like you studied
29:04 physics.
29:05 Embrace that, right?
29:06 So imagine you studied, I don't know, logistics.
29:09 Instead of trying to look for a programming job because you don't want to do logistics,
29:13 look for a programming job at a logistics company.
29:15 Because then you could say, I have programming skills, plus I have an expertise in your area
29:20 of specialization.
29:21 And once you intersect those things, you are in a much smaller set of competitors, right?
29:27 Like I'm looking for a biology job.
29:29 There's a ton of people doing biology.
29:30 If I'm looking for a programming job, there's a ton of people doing programming.
29:33 How many are doing biology and programming maybe in the specific area that you're focused
29:40 in, right?
29:40 That all of a sudden gives you an opportunity.
29:42 But it also means you need to look somewhat differently for jobs, right?
29:46 You don't go apply to FANG the same way that everyone else thinks they should apply to FANG.
29:50 Look for these small companies because not only will they appreciate it more, you'll get a
29:55 better chance to grow because you'll get a bigger responsibility to write more broad software.
29:59 And the interviewing process is not nearly as terrible, I think, for small companies, right?
30:04 Right.
30:05 It's a chat with a couple of people and they're like, we think you can do it.
30:08 Give it a try for a week.
30:10 Whereas places like the large tech companies, right?
30:14 They've got these pretty horrible, here's your take-home exercise, write it.
30:18 We'll consider it if it works out well, maybe amongst the other thousands, right?
30:22 It's like a really different experience.
30:24 I think that first step in the door, that first job is the one that is hard to get.
30:28 Yeah.
30:28 I'll throw one more piece in there and it's a quick thought.
30:31 And that is, you know, contributing to open source projects is something we need to be careful
30:35 about because oftentimes it's privileged work.
30:37 You have some extra time and you can do that.
30:40 But one of the real benefits of making meaningful contributions to established open source projects
30:46 is it throws you all the way into professional workflows of managing, you know, using source
30:52 control and just the bigger piece, communicating with a larger team.
30:55 So as I've gotten more into open source, for me, that scratches that itch of wanting to work
31:03 as a professional programmer.
31:04 It's hard to simulate.
31:06 Yeah.
31:07 It's hard to simulate proper CI, CD, merge conflict, PR discussions on your own little
31:13 hobby project.
31:14 That's for sure.
31:14 This portion of Talk Python to Me is brought to you by Sentry.
31:19 You know Sentry for their error tracking service, but did you know you can take that all the
31:24 way through your multi-tiered and distributed app with their distributed tracing feature?
31:28 Distributed tracing is a debugging technique that involves tracking requests of your system,
31:34 starting from the very beginning, like a user action, all the way to the backend, database
31:38 and third-party services.
31:40 This can help you identify if the cause of an error in one project is due to the error in
31:45 another.
31:45 Every system can benefit from distributed tracing, but they're especially useful for microservices.
31:50 In this architecture, logs won't give you the full picture, so you can't debug every
31:55 request in full just by reading the logs.
31:57 Distributed tracing with a platform like Sentry gives you a visual overview about which services
32:02 were called during the execution of certain requests.
32:05 Aside from debugging and visualizing your architecture, distributed tracing also helps you identify
32:11 performance bottlenecks.
32:12 Through a visual like a Gantt chart, you can see if a particular span in your stack took longer
32:17 than expected and how it could be causing slowdowns in other parts of your app.
32:21 Learn more and see some examples in the tracing section at docs.sentry.io.
32:26 To take advantage of all the features of the Sentry platform, just create your free account.
32:31 And for all of you Talk Python listeners, use the code TALKPYTHON, all one word, and you'll
32:36 activate a free month of their premium paid features.
32:39 Get started today at talkpython.fm/sentry-trace.
32:44 That link is in your podcast player show notes and the episode page.
32:47 Thank you to Sentry for supporting Talk Python to me.
32:52 So we're number two.
32:54 We'll cover, get a project.
32:55 Yeah, we can go through some of these a little faster.
32:57 Yeah, no, of course we can.
32:58 What's number three?
32:59 Number three is don't limit your learning to what's needed for your project.
33:02 So it's important to have a specific project in mind to give context for what you're learning
33:07 and give purpose and steer you towards feeling success and knowing like what's good enough.
33:14 But always be ready to expand your toolbox and your understanding and it'll serve all your
33:18 projects in the end.
33:20 And learning is fun.
33:21 Learning in good ways is fun.
33:23 Learning with good resources, with good people.
33:25 You want to learn FastAPI, here's your FastAPI worksheet.
33:28 The answers are in the back.
33:29 Yeah.
33:30 I have a kid in middle school, so we shouldn't talk about worksheets.
33:34 But a quick example is I'm working on a project called Django Simple Deploy that automates
33:41 deployment for projects in Django.
33:43 It's not just for beginners.
33:44 When Heroku collapsed its free tier a couple years ago, we saw a bunch of very experienced
33:49 Python web people en masse go look at other platforms.
33:53 And we saw them talking about how difficult it is to go through each platform's documentation
33:59 and get a simple app deployed just to see the process.
34:02 And so this tool is a core command, manage.py simple deploy.
34:07 And then you name the platform and it configures your project for that platform.
34:12 And then you can push it.
34:14 And so it's set up as a core command that then calls out to a platform-specific command
34:20 and configures your project for those commands.
34:22 And so when I first wrote it, my first pass was just a bunch of classes that they work together
34:26 because I wrote them and they're all nice.
34:29 But I had learned about abstract-based classes but never had a purpose for using one.
34:33 And so when this project is becoming, as this project is becoming more refined, I need to enforce a structure so that the platform-specific code works with the platform agnostic code.
34:44 And so if I hadn't, or I should say this the positive way, because I had done some general learning about more advanced object-oriented principles,
34:54 I have some sense of how to enforce that structure as the need arises.
34:59 So it's good to have a project in mind, but don't limit what you're learning just to that project because you'll become a better programmer and you'll do your projects better.
35:06 Sure.
35:06 One of the ideas I think is really powerful is that inspiration is perishable, right?
35:13 If you are inspired about something, you might not be that inspired in a couple of weeks.
35:17 And that doesn't mean it's not cool anymore.
35:19 That just means, you know, you moved on, your focus is elsewhere, whatever.
35:24 And so, yeah, sure, you need to learn the things you need to learn to do your project or to check some boxes.
35:29 But if you find something, you're like, I am really interested in that.
35:34 Like, you know, leverage that inspiration.
35:36 I don't know about other people, but for me, I'm like two or three times more productive in learning and writing code and all sorts of things.
35:44 If I'm like really on fire about something versus like, ah, I guess I'll get in there and like fix that bug.
35:49 And like something that I'm not inspired about is MailChimp just changed their API and deprecated their, you know, shut off their old one.
35:56 So now to have people on my mailing list, I got to go rewrite that.
35:59 There's no, what I get in the end is I get to just keep having them on my mailing list.
36:03 There's zero inspiration there.
36:04 But if I ran across like, oh, there's this new feature in Python 3.12, or there's this new package that I found on PyPI that's awesome.
36:12 Like, and I just really want to like leverage that.
36:15 Right.
36:15 But while it's, while it's there, take advantage of it.
36:18 All right.
36:18 Number four.
36:19 Yeah.
36:20 Number four.
36:20 What do we got?
36:21 Read good code.
36:22 And this is one of those things that I wish I had been told a lot earlier in my programming career than I was.
36:29 I went a long time, decades, just looking at code that was presented in the classes and books I read and then writing my own code and then only reading what I needed to in order to do my projects.
36:41 And then at some point, I forget if I saw a suggestion to do this or if I just started to do it out of curiosity.
36:47 I think it was probably around the time when a lot of code became very visible through platforms like GitHub.
36:53 But if you're using a library like, say, Pandas, that is out in the open.
36:57 And so rather than just using Pandas functions, you can go look at the code that runs that function.
37:06 So Pandas has, I shouldn't say Pandas because I'm just starting to get more fluent with that, more comfortable.
37:11 So I'll say like matplotlib.
37:13 So if you're making a scatterplot, fig.scatter or something like that, you can go look at that scatter function and see what it does.
37:19 You see the full set of arguments that it can take.
37:22 You see all of its capabilities.
37:23 And you see how the people writing and maintaining matplotlib take your information and turn it into a plot.
37:30 And when you look at that code, you're seeing professional quality code.
37:34 It can be overwhelming.
37:36 There's probably going to be parts that you understand and parts that you don't.
37:38 But the more you look at it, the more you understand.
37:40 And you start, your code becomes better because you're seeing high quality code.
37:44 It's good to recognize that those people writing that did not write that polished code the first time they wrote the scatter function.
37:50 So don't think, I'm a bad programmer because my code doesn't look like this.
37:55 The polished code that we look at from large, popular, well-established frameworks has been well-refined.
38:00 And so it's something to aim for.
38:02 Yeah, it totally is.
38:04 It's one of those things that's hard to get experience with if you're kind of not yet working as a professional developer.
38:10 Or even if you are, but you're a one to two person shop where you don't collaborate a lot.
38:16 Right.
38:16 Right.
38:17 It doesn't have to be that you're not working as a pro, you know, working as part of your job in that, right?
38:23 It could be that you just don't have enough collaboration or enough people.
38:26 Yeah.
38:27 Yeah.
38:27 And a good thing.
38:28 So good advice.
38:29 It could be hard to know where to look.
38:30 All right.
38:31 So if I look at the Python source code giant, I have no idea where to look.
38:34 Look at the most recent commits.
38:35 So just pick a commit, look at the files that were changed and get some sense of what people are doing to modify the language and these larger libraries.
38:44 Look at the newest issues.
38:46 What are people discussing about what they're trying to work on and how they're trying to solve that?
38:50 And maybe look at some of the longest open issues.
38:52 What are the hardest problems that people are wrestling with in some of these projects that we all use?
38:58 All good advice.
38:58 I would say the larger the open source project and the more popular, maybe harder it is to read, you know, because it has to be more polished and more optimized and more, you know, it's just it's got that extra layer of, well, it's going to make it harder to read, but it'll make it 2% faster.
39:17 And people will appreciate that.
39:18 So we're going to do that.
39:19 Whereas there's a tier below that of open source things that are professional level, but not yet kind of beyond approachable.
39:28 Yeah, I did two newsletter posts recently about exploring recent Python repositories to get at this exact issue.
39:35 So the idea, if you're looking at contributing to Django, it's hard.
39:38 Django community is doing a lot of work to make it more approachable for people wanting to contribute.
39:43 But it's absolutely true that it's hard to contribute to and get into larger, well-established code bases.
39:49 So I use the GitHub API to find, say, all the Python projects that have pushed to GitHub in the last three weeks that have at least 10 stars.
39:58 And those are the fresh projects that are getting attention.
40:00 We don't have all this long-term stuff.
40:03 And so I ended up actually contributing to one of those projects because it's just what you described earlier, just pulled me in and fascinated me.
40:09 And it's so nice to have some concrete contributions to a project that is in that fresh stage.
40:14 Yeah, that's fantastic.
40:15 All right, what's the next one?
40:17 Know your tools.
40:19 I laugh at this one because I think about this is one of the reasons I transitioned into an equal focus between programming and teaching.
40:28 I used to, my priority was 98% teaching and 2% programming.
40:32 And now I'm probably 60% program, 40% teaching.
40:36 Tools for teachers are terrible.
40:39 Teachers, public school teachers still write most of their lesson plans in Microsoft Word.
40:43 And that sounds like, oh gosh, they just have to like write out onto a blank page.
40:48 But what it really means is we as programmers are used to working with structured data.
40:53 And so if we have a workflow and we're writing something and then we update the structure of our information, we don't have to go back and rewrite everything.
41:01 We have tools that manage restructuring projects.
41:04 If you write three years of lesson plans in Word and then you figure out how to teach better and you want to restructure all your lessons, there's no automated way to do that.
41:13 It's a mess.
41:13 And so I'm grateful as a programmer to have things like IDEs, formatters, linters, Git, any version control system, GitHub hosting platforms.
41:23 And so my core advice here is to, as you're becoming more established as a programmer and as a Python programmer, start to recognize what are the tools that you personally find value in?
41:35 What is your favorite IDE?
41:36 What is your preferred formatter?
41:38 What's your preferred linter version control system?
41:41 And then just take a little time to focus on that tool itself.
41:44 So if you've been using VS Code for six months, spend three days and just read about configuring VS Code.
41:50 You'll almost certainly come up with some things that make your day-to-day work more efficient, more effective, more enjoyable.
41:56 Every time I've taken time to do this, I've come out better for it.
42:00 Yeah, whether it's VS Code or PyCharm, they both have a ton of options that you can pick from.
42:06 They're discoverable or less discoverable in different ways.
42:09 Like PyCharm makes it kind of obvious what all the things it can do, but there's so many things that people are like, well, I'm just going to stick to my lane and just stay over here and do the thing.
42:18 VS Code is a little less discoverable.
42:21 But maybe it makes it even harder to take full advantage of it because it's like the command shift P to pull up the palette and then like, well, there's a huge list.
42:28 What'd I do with this?
42:29 Yes, yes.
42:30 But they're being really good with your editor.
42:33 I know some of the things that are coming as well on your list, this adds on top of it, but it makes a huge difference.
42:39 It makes things like being comfortable navigating your code feel better, testing your code, changing your code, right?
42:46 Doing some of these workflows you talked about, like Git and PRs, all of that stuff.
42:51 All of those things are in those tools, plus way more.
42:54 That's not even talking about the extensions or plugins that you might go after, right?
42:58 And so, but it's easy to see like, well, I've fired it up and then now it's an editor, right?
43:04 It's a thing and then, oh, it has cool autocomplete.
43:06 And then just kind of forget about the hundred other things that it can help you with.
43:10 Yeah.
43:10 And particularly with IDEs, they do a lot for us.
43:13 And that can be a good thing and it can be a bad thing.
43:16 I have steered a lot of people back towards simpler editors like Sublime Text and even Genie is a fantastic one that a lot of people don't know about.
43:24 Because the tools like VS Code, PyCharm, whatnot, when everything's working, what they do for us is fantastic.
43:31 When things stop working, if you don't know what it's trying to do for you, it can just make things much more confusing.
43:36 And particularly that comes down to things like tools that build virtual environment for a new project for you.
43:42 So if you understand what that's doing and it stops working, you can go troubleshoot it.
43:46 But if you don't know what it did for you and now like it says this module is not found, it can be a mess.
43:52 And so, yeah, you can.
43:53 Virtual environments seem to be just like, they just go wrong so often.
43:58 Yeah.
43:58 I'm not in the pure, I've created one on the terminal and like I've acted, like that's solid.
44:04 But in the tooling, it's like, sometimes it finds it, sometimes it doesn't.
44:08 Sometimes it really doesn't want to find it.
44:10 You know, like it's nuts.
44:12 Yeah.
44:12 Yeah.
44:12 And so I'm glad you brought that up.
44:14 So the core advice there for me has always been people have a tendency to want to go find another editor or IDE that's going to manage that better.
44:22 And what I tell them is, no, it's going to manage it differently and you're going to run into the same issue and then you're going to need to solve it.
44:27 So when that stuff happens, taking the time to learn what your editor is doing for you and then be able to troubleshoot that, that's going to serve you well in the long run.
44:36 All right.
44:36 What's next?
44:37 Learn how to test your code.
44:40 And I wrote here, you won't sleep more, but your sleep will be more restful.
44:44 I went probably 20 years programming without ever writing a test.
44:47 And I always had this notion that it was difficult.
44:50 It was separate from programming.
44:51 And the first time I wrote a test, it was so much easier than I thought.
44:54 And so cool to see my program run automatically and have the output validated.
45:00 I love testing.
45:01 It's probably my biggest interest these days beyond deploying Django projects.
45:05 And I love it because, you know, when we write code, we want it to work.
45:09 When we have a project, we want our project to be successful.
45:13 And so testing validates that.
45:15 Testing gives you confidence that your project is working correctly.
45:20 And if you fix a bug, you just fix it once.
45:22 So testing is its own podcast for some people.
45:25 So I'll just say that testing is easier than a lot of people think it is.
45:29 Go use pytest.
45:30 I used to teach unit tests because it's in the standard library.
45:33 But pytest has become well established enough.
45:36 It's one of my favorite Python packages of all because it's one of those few that serves
45:41 pure beginners and experts equally well.
45:44 It's the best way to be introduced to testing.
45:47 And if you're testing professionally, there's no tool better than that.
45:50 That's the Zen of Python, right?
45:52 That it's really serves beginners well, but also experts well.
45:55 I think that's one of its special capabilities.
45:58 Yeah.
45:58 I will encourage people.
46:00 And Michael, I'd be curious if you agree with this or not.
46:03 I'd encourage people to not necessarily look at unit tests right away because unit tests are
46:08 brittle for newer projects.
46:09 I really like end-to-end testing.
46:11 And that is where you run your project, you get some output, and then you run tests against
46:15 that output.
46:16 And that is not testing the implementation of your project.
46:19 That's just saying, does your project work?
46:22 And so the project I've been pulled into recently is one called git-sim, git-sim.
46:26 And you run it against your own project, and it gives you a visualization of all your commits.
46:31 And so for people trying to understand how git works or how git is working for their particular
46:35 project, you run git-sim merge, and it shows you visualization of what that merge would
46:41 look like.
46:41 And so that project is newer, and it had no tests.
46:44 And so I helped write the initial test suite.
46:47 And I told the person, like, we shouldn't test your implementation because you should
46:52 be free to change how you're building this new project, but we should absolutely start
46:56 to test the images that you're generating so that when you do change your implementation,
47:00 you know whether the images that your users are going to see are the ones that you think
47:05 that you've been seeing and you think they're going to see.
47:08 And so that's really nice because you don't have to aim for 100% coverage of your code.
47:13 You just start to get that big picture.
47:16 Yes, my project is still doing what I think it's doing.
47:18 That makes for better sleep, and all of your non-computer activities are more enjoyable because
47:23 you have more confidence that things keep working.
47:25 Yeah, I'm with you on not going too far down the unit test side.
47:29 I used to write tons and tons of very low-level focus unit tests.
47:34 And when I was on a team, I always had a hard time having everybody have buy-in.
47:39 Some people would.
47:40 Some people wouldn't.
47:41 They'd go do something that would break the test.
47:43 You're like, you broke the bill.
47:45 They're like, oh, yeah, I guess I did.
47:47 You're like, you realize that we don't all participate in this.
47:51 It just becomes a hassle for me, chasing after, trying to patch up the tests as you make these
47:58 changes.
47:58 And as you're lower level in the world, that's just a more constant problem.
48:04 And it also requires more effort, right?
48:07 So maybe that effort is worthwhile.
48:08 But if you're new, maybe it's not.
48:10 And so I'm a little bit more on board with just like, let's do the main things at kind of
48:16 top to bottom in the app.
48:17 And if that stuff hangs on, we got a real good chance.
48:20 And over time, my experience has been, for the most part, things blow up hard.
48:26 They don't just like, oh, there's some little subtle problem.
48:29 Generally, not always true, but generally, like if I screw something up, a lot of tests start
48:34 failing, even when they're these high-level things, because something's pretty, pretty messed
48:38 up.
48:38 And in that regard, that other person probably didn't intend to change the output or the overall
48:43 behavior of the app in well-known ways.
48:46 They just changed some implementation detail, and they weren't being sufficiently rigorous
48:51 with their software lifecycle.
48:54 So yes, I'm on board.
48:56 The web equivalent, the easiest web equivalent that I can think of is if you've got a website
49:01 and it has a sitemap, your website should have a sitemap for all of your data-driven pages.
49:06 Just go get the sitemap and request every page.
49:09 Does it give you a 200 or does it give you a 500 or a 404?
49:12 Because 404s and 500s should not be found in your sitemap.
49:16 Right?
49:16 But that's a really easy test, right?
49:19 Like loop over that, call every one of those with your, you know, self.client.get or whatever
49:24 your HTTP test thing looks like.
49:26 And just call all of them.
49:27 That's one thing you could do that's in that category.
49:30 And as an author, I wrote tests for most of the code in Python Crash Course.
49:34 And so Python Crash Course was first written, I think, on Python 3.5.
49:38 And so it's been through like, what, six or seven iterations of Python and all kinds of
49:42 iterations of the libraries that the projects use.
49:45 And so whenever a new issue comes out or new, sorry, version comes out, I just run tests
49:50 on most of the code in the book.
49:51 And it pulls the, the test pulls the code from the GitHub repository for the book and just runs
49:56 it with the new versions.
49:57 And that's been part of how I've been able to maintain the, the, the upkeep and maintenance
50:02 on a 500 page book that covers a lot.
50:05 Yeah.
50:06 Yeah.
50:06 That's awesome.
50:07 Yeah.
50:07 Let's keep going.
50:08 There's a couple of good comments and questions in the audience, but I think we're on, we're on
50:13 a schedule.
50:13 So let's keep going.
50:14 Yeah.
50:14 Yeah.
50:15 Last comment about testing.
50:16 I love it because I think that when you test your code, you learn things about your code
50:20 that makes development better as well.
50:21 So it's not just, does it work?
50:23 It's also gives you insight into, into how your code is working.
50:27 I'm looking forward to exploring more.
50:29 All right.
50:29 Next point.
50:30 Know what's good enough for any given project.
50:32 As a teacher, students would say like, am I done?
50:35 Am I done?
50:36 Is this good enough?
50:37 And I watch other teachers say like, don't ask me that.
50:40 Always work harder.
50:41 And I always tell the students, that's a great question.
50:44 What is good enough?
50:45 And so whatever your project is, knowing your benchmark for what's good enough and when
50:49 it's done, when you can move on to the next thing is really helpful because you'll never
50:53 write perfect code, but you can certainly write good enough code.
50:56 Yeah.
50:57 And there was a really popular article, blog post, something like that, that was, you're
51:02 not Facebook.
51:03 You're not Google.
51:04 You're not Microsoft.
51:05 You're not LinkedIn.
51:06 Something along those lines.
51:08 Right.
51:08 And the admonishment or the advice there was, you might read about how somebody like Google
51:14 has this, all these containers doing all this scale out and failover and geo location.
51:21 Your app that manages like reporting for managers at your app, at your company, there's five managers
51:28 and they do it once a week.
51:29 You don't need global scale out techniques.
51:32 You don't need the zero downtime that containers offer.
51:36 You don't need load balancers.
51:38 Like none of that stuff applies to you.
51:40 And so, in fact, I would say if you start applying those things to it, you make your application
51:45 harder to deploy.
51:46 You make it harder for other people and your team to work on.
51:50 You make it less good for that situation.
51:53 But at Google scale, the opposite is true.
51:56 It's less good if it doesn't have those things.
51:59 And so it's not just, well, this is a crappy project.
52:02 So it gets crappy level CS attention.
52:05 It's a small project.
52:07 So it can be written and managed and worked on in a way that allows for, you know, optimizes
52:14 for small teams, not worrying, not optimize it for uptime and all those kinds of things so
52:20 that you can make it work better in that situation.
52:22 And so I totally agree.
52:24 Knowing what is good enough is super important.
52:27 But what is good enough, it's not like a spectrum.
52:30 Like I'm at the really good level.
52:31 It's like you've got a, it's a multidimensional thing.
52:34 Like you're at a good level for the context that you're in, the situation you're in.
52:37 Hey, you're walking right into bullet point or tip number eight, I think it is.
52:41 We are.
52:42 Yeah.
52:43 And that's embrace refactoring.
52:44 And so my notes about this was that good enough is situational.
52:48 So when a project proves its worth, like say you have an idea for a project, you build it
52:52 out, you get an MVP functional and you've reached your good enough to see whether the idea works.
52:58 If nobody ever uses it, it doesn't catch on.
53:01 It worked.
53:02 It was interesting, but it's just not catching on.
53:04 You move on, move on to something else.
53:06 But if that product has started to gain interest, now good enough moves.
53:11 And so maybe it needs to be more efficient.
53:13 Maybe it needs more testing.
53:14 Maybe it needs to be deployed in a different way.
53:16 And so refactoring tied in with that idea of what is good enough is the road for evolving
53:22 a project.
53:23 And all of these projects that we're talking about, the well-established ones, the Googles,
53:26 the Fangs, those projects are constantly shifting bars of what is good enough.
53:31 And they're constantly being refactored in very careful ways to reach those new goals.
53:35 Yeah.
53:36 I love refactoring.
53:37 Your tools.
53:37 Yeah, I do too.
53:38 I think it's fantastic.
53:39 So many people who are getting started will tell me things like, I'm not sure how to get
53:45 started.
53:45 I don't know what the best way to do this is.
53:47 I'm thinking about it and I've tried something, but it didn't, I wasn't sure.
53:51 So I went back to thinking and the best way to get started is just give it a shot.
53:56 Just create something.
53:57 You'll learn what of that is working and what is not ideal.
54:00 And more importantly, something that's awesome about software is it's plastic, right?
54:04 You can change it.
54:05 Plastic in the soft plastic way.
54:07 You can evolve it as you learn more about it.
54:10 You're like, oh, I thought that should have been a separate module, but this should be just
54:14 part of that class.
54:15 So we're just going to move that in through refactoring and not feeling like you have to
54:20 have a full visibility of what you're working on to get started.
54:23 I think that that's, maybe it sounds counterintuitive, but I feel like that's kind of an expert perspective.
54:28 It's like, I think I need to go that way.
54:29 We're going to start down the path that way.
54:31 And we're going to evolve and sort of course correct as we go rather than completely stressing
54:37 about how do I get started?
54:39 How do I see the whole end line before I start writing it?
54:42 And this is part of why this is not a countdown because, for example, if you have even a small
54:47 set of tests that test your final output, refactoring is easy.
54:51 It's fun because if your tests break and you don't like the idea, you can go back to where
54:55 you started.
54:55 Another fun thing about refactoring is the whole concept of code smells.
54:59 And I think becoming an expert, there's a lot to be learned from the code smells.
55:05 And the idea of the code smells is the code works, but there's something a little bit
55:08 off.
55:08 It kind of makes your nose turn up.
55:10 You're like, oh, oh, okay.
55:12 Yeah, I guess it works, but oh, right.
55:14 You know, it's just, it's just kind of an ooh.
55:16 And that's, there's a lot of lessons of how things get out of control and they get into
55:21 a bad state and how do you fix them?
55:23 And having that intuition, I think is great.
55:26 So some of the code smells are like long method, method with too many arguments.
55:30 One, probably my favorite is code comments because you hear you should comment code
55:35 all the time and there should be places that need a comment.
55:38 There should be comments or help, help strings, whatever.
55:41 But a lot of times code comments are deodorant for these code smells, right?
55:47 It's like, oh, this is kind of gross.
55:50 Let me make a comment about why it's gross.
55:52 Or this is poorly named.
55:53 People won't know what this is.
55:55 So let me make a comment about what it is.
55:57 And like halfway through that comment, you should realize like, oh, what if I just named it?
56:01 The thing I'm trying to tell people, it kind of does.
56:04 Then I don't even need a comment because it has a really good name that is its own thing,
56:09 right?
56:09 And so four names, too many parameters, all these things are deodorant.
56:14 And you're trying to like justify how gross this part of your code is.
56:18 Maybe you could just apply some of these refactoring techniques to make them better.
56:22 Not going into a whole refactoring detail, but I really, really like this idea.
56:27 Yeah, I write a lot of exploratory code.
56:29 So you're describing a lot of my work.
56:31 But because I'm fine with refactoring and enjoy it and I'm comfortable with tests, that workflow
56:36 works.
56:36 And I think it can work for a lot of people.
56:38 Yeah, sure, sure.
56:39 Well, and those things don't necessarily start out that way.
56:42 The long method didn't necessarily start out long.
56:44 Grew and grew until it was a monster.
56:47 Same thing with too many arguments.
56:49 It probably started out with one or two, but then now we need this other one.
56:52 And what about that?
56:53 And then all of a sudden it's like, again, a monster, right?
56:55 And so it's an evolution.
56:57 And it's long because it works.
56:58 And so at some point you pause and clean it up, make sure it still works.
57:02 All right, number nine, write things down.
57:04 Yeah, write things down.
57:05 And I don't say that as a writer.
57:07 Writing for me, I started writing when I was young because I saw somebody else write a journal
57:11 and I was like, oh, I'm going to try writing.
57:13 And so I've just written things all my life and most of it is messy.
57:17 And some of it, very small amount of what I've written has been polished and put out in the public
57:22 world.
57:22 But I have found that almost everybody I talked to who writes in some way, not for public,
57:28 but writes in some way, enjoys their work a little more and does a little better.
57:31 My suggestions are things like keep an ideas notebook.
57:34 Those are once you know how to build things, ideas come to you and you're like, oh, I could
57:39 make that at some point.
57:40 And if you have a place to record those ideas when you're not sure what to do, you can go
57:44 back to it.
57:44 Write comments, despite what Michael said.
57:47 Comments in a professional, well-established project with many collaborators are different
57:53 than comments for your own new projects.
57:55 So whatever you're doing, write comments.
57:57 So do put the information in that needs to be in there to work, let them be cleaned up.
58:02 Yeah, I don't mean to say you shouldn't write comments, right?
58:04 I just, there's a lot of times where the point of the comment is to justify why something's
58:09 bad.
58:09 If that's the case, it probably doesn't need to be bad.
58:13 But if it's help docs, if it's like, well, here's the different stuff that you could pass
58:17 and these are what we expect, there's certainly valid comments, no doubt.
58:20 So write comments to yourself and others.
58:22 And even if nobody else is using your project, if it's something that might be shared at some
58:25 point, those are good.
58:26 Learn to write documentation.
58:28 If you write an ideas notebook, if you write comments, documentation kind of flows out of
58:32 that.
58:32 It just becomes a more polished version of what you're writing.
58:35 Write questions down when you're not sure about something.
58:37 GitHub issues are amazing.
58:39 I haven't used project management software because GitHub issues are so useful.
58:44 And so even if you...
58:46 No Gantt chart.
58:46 No Microsoft project.
58:48 Yeah, yeah.
58:49 Even if you don't ever plan to write anything public, write about the code that you're working
58:54 on and write for yourself.
58:56 And it will almost certainly benefit the work that you do.
58:58 Writing helps you crystallize your thoughts and make sure you have them all coherent, right?
59:03 All right.
59:04 All right.
59:04 Last one.
59:05 Big tip.
59:06 And this is a fun one to close on.
59:07 Go meet people.
59:08 It has long been said about Python that I came for the language and stayed for the community.
59:13 People have talked about that for years because it's still true.
59:16 Join online communities.
59:18 Go to local, regional, national, international conferences when you can.
59:22 Go to coffee shops.
59:23 Ask questions.
59:24 Tell stories.
59:24 You will meet good people like Michael.
59:27 And you, yeah, as we met at PyCon.
59:30 So I think this is really good advice.
59:32 I was thinking as I looked at your list that you are somebody who is not particularly metropolitan
59:38 in terms of like tons of user groups and meetups, I'm guessing, where you live.
59:42 It's probably a little bit of an extra challenge being in Alaska, right?
59:45 Yeah, it's actually...
59:46 I mean, I lived in New York City for seven years before I moved here.
59:49 Right.
59:50 As a contrast, right?
59:51 So...
59:52 Yes, yes.
59:53 But most of my programming work, serious programming work has been done while I've lived here.
59:57 And yeah, I don't know anybody else here who programs.
01:00:00 And so for me going to conferences, I talk about programming the entire time at conferences
01:00:05 because I never get to in regular life.
01:00:06 Honestly, that's true for me as well.
01:00:08 Even though I'm here in Portland and we have user groups and there are plenty of people who
01:00:12 do programming, it's not that different for me, right?
01:00:15 Because I don't go to a company where I have a team of developers.
01:00:19 Like the people I work with, it's as real as this meeting with you and me here on a video
01:00:24 screen share sort of thing, right?
01:00:26 And I think this is the story of more people than just if you live outside of some big metropolis.
01:00:32 Yeah, yeah.
01:00:33 Quick story.
01:00:34 First time I went to PyCon, I was intimidated because I was a teacher and not a programmer.
01:00:38 And so I thought I would not find my place.
01:00:41 And I walked into the hotel the first night and people pulled me right into conversation.
01:00:46 And what I found was that roughly half the people who go to PyCon are primarily programmers
01:00:51 looking for what to work on.
01:00:53 And roughly half the people are people who care about some other domain than programming.
01:00:57 And they're looking to use Python and programming to solve the problems they care about in their
01:01:01 domain.
01:01:02 And so it's true.
01:01:03 Everybody has a place in the Python world if you are respectful and appropriate to other
01:01:07 people.
01:01:08 And so if you're shy or intimidated about going out to meet people because you're not sure of
01:01:14 your place, just go meet people and you will find your place.
01:01:17 And it's magic.
01:01:18 Yeah.
01:01:19 I think I'm hopefully I'm not misremembering this.
01:01:22 I think almost half the people at PyCon this year were first time attendees.
01:01:26 So if you're thinking.
01:01:27 Oh, no.
01:01:28 It was like 78.
01:01:29 It was over half.
01:01:30 It was like 80%.
01:01:31 Yeah.
01:01:32 Yeah.
01:01:32 I was amazed.
01:01:33 Yeah.
01:01:33 I'm not sure how much of that's a COVID hangover sort of thing, because not there were not
01:01:38 as many people who came as say in 2019.
01:01:42 So maybe they were more icon curious folks than say the people who had been there for the
01:01:47 last 10 years.
01:01:48 Like, I still want to skip this one.
01:01:50 I will see where it shapes up.
01:01:51 But there's a really high number, whatever that that number turned out to be.
01:01:55 And the equilibrium is that there's a ton of people at these types of events who are
01:02:00 like, this is my first time here.
01:02:01 So if you're concerned about going to these events and feeling like, oh, I'm going to be
01:02:05 the one newbie and feel out of place, like probably the opposite.
01:02:09 Yeah.
01:02:09 You know?
01:02:10 Yeah.
01:02:11 You end up with lifelong friends.
01:02:12 Absolutely.
01:02:13 People are in a great mood.
01:02:14 They're on their geek holiday.
01:02:15 It's all good.
01:02:16 Yes.
01:02:17 It's pretty easy to make friends and have a good time there.
01:02:20 So that could be PyCon or EuroPython or something like that.
01:02:24 Or it could just be a local.
01:02:25 There's a lot of regional Python meetups like PyCascades here in the Pacific Northwest,
01:02:30 PyTexas, PyOhio, all these things.
01:02:33 And none of those work for you.
01:02:35 You know, there's forums like this, to be honest.
01:02:37 Like part of the reason I created the podcast was to kind of get to know people better in a
01:02:42 way that I knew wouldn't be possible for me.
01:02:45 Right.
01:02:46 My goal was, where do I go find the podcast to listen to, to do this?
01:02:50 And then there was none.
01:02:50 I was like, all right, fine.
01:02:51 I'll create the podcast so we can do this.
01:02:53 But my intent was just to listen to a podcast to kind of get to know people like this.
01:02:57 It's a pretty one-way conversation as a podcast listener.
01:03:00 Not 100% as people have seen in the audience.
01:03:03 But it's still valuable to like eavesdrop in a sense on these conversations if you're a new
01:03:09 person.
01:03:09 Right.
01:03:09 Absolutely.
01:03:10 Yeah.
01:03:11 All right, Eric.
01:03:11 Well, what a fun conversation.
01:03:13 Thank you for the awesome list.
01:03:16 And hopefully you've inspired a lot of people out there to, you know, make forward progress
01:03:21 on this journey that they're on.
01:03:23 Well, thank you for having me.
01:03:24 I've listened to you for a long time and really enjoyed your work and very happy to connect.
01:03:28 Yeah.
01:03:28 Same here.
01:03:28 So final call to action.
01:03:30 People are interested.
01:03:31 You know, maybe tell them how to check out your book.
01:03:33 Tell them how to put some of these ideas into action.
01:03:36 My book is Python Crash Course from No Starch Press.
01:03:38 Third edition came out this year.
01:03:40 And so everything works.
01:03:41 It's good.
01:03:42 I keep it updated.
01:03:43 If you buy it, you get a copy with the newest updates.
01:03:46 Yes.
01:03:46 I also write weekly at MostlyPython.
01:03:49 And that's MostlyPython.substack.
01:03:51 There are paid subscriptions, but there are also free subscriptions.
01:03:54 And so the only advantage for paid subscriptions is that some posts are locked for six weeks.
01:03:59 Everything I write, I want to be available to everyone.
01:04:03 And so if you're curious about what I'm thinking about on a weekly basis, MostlyPython.
01:04:08 Excellent.
01:04:08 All right.
01:04:09 Well, thanks again for being here.
01:04:10 See you later.
01:04:11 Thanks everyone for listening.
01:04:12 Yes.
01:04:12 Thank you.
01:04:15 This has been another episode of Talk Python to Me.
01:04:17 Thank you to our sponsors.
01:04:19 Be sure to check out what they're offering.
01:04:21 It really helps support the show.
01:04:22 GlareDB is an open source database for querying distributed and disparate data.
01:04:28 Connect your data sources and use the Python tools you already know to ask questions and
01:04:33 integrate data across data sources.
01:04:35 Get started today at talkpython.fm/GlareDB.
01:04:39 Take some stress out of your life.
01:04:41 Get notified immediately about errors and performance issues in your web or mobile applications with
01:04:46 Sentry.
01:04:47 Just visit talkpython.fm/sentry and get started for free.
01:04:52 And be sure to use the promo code talkpython, all one word.
01:04:55 Want to level up your Python?
01:04:57 We have one of the largest catalogs of Python video courses over at Talk Python.
01:05:01 Our content ranges from true beginners to deeply advanced topics like memory and async.
01:05:06 And best of all, there's not a subscription in sight.
01:05:08 Check it out for yourself at training.talkpython.fm.
01:05:11 Be sure to subscribe to the show.
01:05:13 Open your favorite podcast app and search for Python.
01:05:16 We should be right at the top.
01:05:17 You can also find the iTunes feed at /itunes, the Google Play feed at /play,
01:05:22 and the direct RSS feed at /rss on talkpython.fm.
01:05:27 We're live streaming most of our recordings these days.
01:05:30 If you want to be part of the show and have your comments featured on the air,
01:05:34 be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
01:05:38 This is your host, Michael Kennedy.
01:05:40 Thanks so much for listening.
01:05:41 I really appreciate it.
01:05:42 Now get out there and write some Python code.
01:05:44 We'll see you next time.
01:06:05 Thank you.