Learn Python with Talk Python's 270 hours of courses

#195: Teaching Python at Apple Transcript

Recorded on Wednesday, Jan 9, 2019.

00:00 When you think of learning Python, what type of developer or technologist comes to mind?

00:04 Is it someone looking for their first job or maybe making a move from something like .NET

00:08 over to Python and looking for a shift in their careers? While these are common moves,

00:13 you may be surprised how many folks within a tech company learn new languages like Python

00:18 just to stay within that company. On this episode, you'll meet Ron Hayden. He founded

00:22 the Software University internal training program at Apple and is now doing his own

00:27 independent training around Python. I think you'll find his story an interesting element in the mosaic of Python.

00:33 This is Talk Python to Me, episode 195, recorded January 9th, 2019.

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

00:56 and the personalities. This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.

01:02 Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via

01:07 at talkpython. Hey, everyone. I want to tell you about a new course we just launched, Introduction to

01:13 Ansible. This one was created by Matthew Mackay of Full Stack Python. If you're involved with deploying a

01:19 web app or managing servers, especially Python web apps, you owe it to yourself to check out Ansible.

01:25 It provides a declarative way to provision, configure, and evolve infrastructure and applications. What

01:31 makes it even better is it's written in and can be extended in Python. Check out the course over at

01:36 training.talkpython.fm. Corporate and team options are available too. Ron, welcome to Talk Python.

01:43 Thanks. Glad to be here.

01:44 It's great to have you here. I'm really looking forward to this peek inside how Apple teaches

01:50 their internal folks Python. I think that's going to be a lot of fun.

01:53 This is my very first non-Apple thing in 25 years, so it's also a big new experience for me. And I'm a

01:59 big fan of the podcast, so really happy to be here.

02:01 Yeah, thanks. And that's really cool. So you've, as we'll get into, you've been at Apple for a really

02:05 long time and now you're just starting off to do a more independent thing. And I think that's a super

02:10 interesting perspective. So definitely dig into that. But before we get to it, what's your story?

02:15 How'd you get into programming in Python?

02:16 It started actually pretty much at the beginning. So I've been at Apple about 25 years. And early on,

02:22 when we started creating an engineering team and documentation group, I worked in the technical

02:28 publications. We went to an O'Reilly conference that was for Perl mostly. And I went to a couple of

02:35 Perl things and Perl did not speak to me. And I ended up in the corner with probably the very first

02:42 edition of a bunch of the Python books and wanting to use Python. But the problem was the people I was

02:49 working with on the team all knew Perl. So we created our entire production pipeline in Perl,

02:56 which I refused to learn for like two years. I was so annoyed about it.

02:59 I'm not doing this.

03:00 Exactly. Eventually, I learned a number of things I learned being an engineering manager.

03:04 It doesn't work to be an engineering manager if you don't know the technology your team is using.

03:09 So I had to break down and learn it. And I got a lot out of it. And I actually kind of liked something.

03:13 How good do you think you have to be? Do you have to be able to kind of read and follow?

03:18 Do you have to be able to write basic code? Do you have to be really, really good to understand?

03:22 No, when you do this, actually, that uses too much memory. Use this other technique or this

03:27 other library. What's the level when you say that?

03:29 Also, this is coming from kind of an Apple perspective where the engineering managers are

03:33 very technical and involved. You know, there are other companies where that's not so much the case.

03:37 What I found was if I couldn't get down to those details you were talking about, things would go off

03:43 the rails. In fact, what happened for a while was the team was developing our production pipeline and

03:49 things were not working out. And eventually, and this is probably not the greatest engineering manager

03:56 thing to do. But eventually, actually, when they went off to the next O'Reilly conference,

04:00 I spent the days they were gone learning Perl and rewriting the production pipeline. Once I realized,

04:07 oh my God, this is not in good shape. That was a huge lesson for me as an engineering manager.

04:13 From then on, I never let myself get out of touch with the technology of the team. And later on,

04:18 remember when we were releasing the first iOS SDK and doing a bunch of web stuff related to that. And

04:25 they had a web guy. These were good web guys. It was like, oh, it's not possible to do that. And

04:29 I was like, well, I was working on my personal website yesterday doing this and I did this. So yeah,

04:34 I think it's possible.

04:37 And here's a small example on how it's going to work, right? Yeah.

04:40 Yeah, exactly. Exactly.

04:41 You know, it's so funny. You get into some of these debates of, should we do it this way? Should we do

04:46 things that way? Is that going to work? I don't know. It always seems like there's someone that's

04:49 like, well, that's, you can't do that. That's not going to work. Or it might work in a simple case,

04:53 but not really. But the thing that solves that debate better than any other is to just have,

04:58 just go, but this does it.

04:59 Here it is.

05:00 Like that's something beautiful about programming is you can say, no, click the button and it happens.

05:05 And then we can discuss that, right?

05:07 And a theme for me, and I think we'll probably talk about it a couple of times today,

05:09 is the biggest jumps in my career and where I made the biggest impact have always been when it was that

05:17 thing. Oh, this is not possible. And I would go home that night or that weekend and I would figure it

05:21 out and I would do it and come back with the solution. And there's nothing more effective,

05:26 like you're saying, than that. And if you just sit there and say, well, I guess they're not going to

05:30 let me do this. Then you kind of put yourself in a box, you know? Yeah.

05:33 Getting to the actual Python part. So Zoom, so I always wanted to use Python. I used it a little

05:38 bit personally. That's not what our technology was built on. So Zoom forward, you know, 20 some years

05:43 and I'm running a team called Software University, which we'll probably talk a bit more about.

05:48 And we had an intern come in who was really into Python. And so he did a presentation. We do a weekly

05:57 engineering presentation that gets put on an internal website and the engineers can look at.

06:01 Like a brown bag lunch type thing where it's sort of an internal education thing.

06:06 Yeah. Yeah. Except being Apple, it's really high production value and, you know, huge amounts of

06:11 effort are put into each one. And it's something I'm really proud of that program. But so this intern

06:16 comes in and does a Python topic and we're like, well, okay, this is, this is Apple. We have Swift,

06:22 we have Objective-C, that's what our interns need. This is going to be really niche, but hey,

06:26 we're, you know, we'll let the intern do this. It'll be a good experience for him.

06:29 The interest level, just when we announced the talk was off the charts, people were emailing

06:34 saying, when is it happening? Can I show up? When are you going to post the video? And we're like,

06:38 what, what's going on here? Why does anyone care about this little scripting language?

06:42 And then it was a sellout crowd. And, you know, we actually had to turn people away.

06:47 And I'm like, hmm, that's interesting. So I started looking into it and it turned out

06:53 that everybody who didn't need to be using Swift or Objective-C was either using Python or wanted to

06:59 use Python, either just to do daily workflow tasks or more and more to do data science stuff.

07:06 So I ended up getting back into Python, developing classes. I spent two, three years just developing

07:13 these classes. And one of the great opportunities you get working in a big company like that is I had a

07:19 built-in audience. And I could also, I could kind of suck at the beginning because they're getting free

07:25 training. So they get whatever I got. And then I got to do it over and over hundreds and hundreds of

07:30 times and eventually got to really know my stuff and to get really, really good responses from the

07:36 students. And in fact, by the time I left, I never had less than two to three thousand people signed

07:41 up to take the class. It turned out that Python actually was really, really in demand. And that

07:47 kind of changed the whole trajectory of my career. And it's some of the reason that I'm here talking to

07:52 you now was I also, I knew I liked Python, but in the process of developing these classes and doing more

08:00 and more work with it, I really fell in love with it. And if it had been some other language, I might've

08:06 taught it, but I wouldn't have gotten to where I was. And I wouldn't have gotten so passionate about it

08:10 that I really wanted to devote myself to it.

08:12 That's a great story. You know, I had a similar experience in that I started learning Python and

08:19 we started working with it in the company I was at around a training perspective. And just the initial

08:26 demand was so much higher than what I expected compared to what everyone else was doing. Wow,

08:33 there's really something to this. I better personally pay more attention to this because this seems like

08:37 it's been way more important and it's going to have a bigger impact than the perception of a lot

08:42 of people around me, you know? Right. Yeah. That sounds like a little similar for you as well.

08:47 So you said you have been at Apple for 25 years, but this is one of the first things you're doing

08:52 outside of Apple. So what are you doing day to day now? What are you working on?

08:57 To my surprise, I ended up getting a book contract because once I had resigned and there was a couple of

09:02 months between me resigning and when I was actually leaving, I happened to see a book publisher on

09:07 Twitter say, hey, send us proposals, anybody. Right. And I thought, well, what the heck? And I sent them

09:13 a proposal and they accepted it. So I thought I was going to be starting up kind of external training

09:19 right now because that's something I passionately want to do. But it turns out for a little while,

09:23 I'm writing a book instead. So that's what I'm just starting to do now. And it's really interesting

09:28 and a little scary. I mean, I've written many books as being a technical writer and I've edited

09:33 many books, you know, over the years, but it's a whole different world to be writing the official

09:39 documentation for a technology, to have all the technology experts available to you and to know

09:46 that people have to read this, right? If we're documenting the API for iOS, well, if you want to use

09:52 iOS, you're going to have to read the documentation. Now I have to write a book that people don't have to

09:58 read. So I got to make it really compelling and interesting and, you know, come through on all

10:05 that. So it's a really different approach and very interesting challenge.

10:10 Yeah. Well, congratulations on the book. That's awesome. I've heard writing a book is a lot of work,

10:16 but it's going to be fun too. And you should know, right? It sounds like you've done quite a bit.

10:20 Oh yeah. Yeah.

10:20 That's cool. So that's going to be a lot of fun. You can't talk about it yet?

10:24 Unfortunately not, but I look forward to being able to in a few months.

10:27 That's really great. So right now you're working on the book and you just left Apple,

10:32 I guess maybe to give some folks a little perspective, because a lot of what we're talking

10:37 about is the stuff that you did at the time you were at Apple. Maybe just tell folks what you did

10:42 day to day while you were at Apple and then we'll get into the topic.

10:45 It changed a lot. I had this kind of weird career. I was a manager almost from day one in Silicon Valley.

10:50 It was another one of those things I was mentioning where what happened was I started at Oracle

10:55 and two months after I started, the person who hired me left. And I went into the director and said,

11:01 I want to run this team. Now I was like 20 something and I had no experience. I had no right.

11:06 And he was like, okay, give it a try. And so I became a manager early on. Over time,

11:12 I ended up running developer publications at Apple for a while. And that meant as an engineering manager,

11:19 first we created the publication workflow. So we needed to take XML and turn it into the websites

11:25 and HTML and PDF. And we also needed to parse all the headers and everything and put that all

11:31 together into the documentation. So I was an engineering manager. Then I was running developer

11:35 publications, which was really interesting, intense experience at a place like Apple, because

11:40 basically everything coming down the pipeline for the next couple of years is aimed at you.

11:46 And you have a certain amount of resources and you have to figure out what you're going to cover and

11:51 how you're going to cover it. One of the things I really appreciated about the way Apple works is

11:56 you're expected to know your job. So of course, people have opinions and they may have insights,

12:02 but for the most part, you are not told what to do. So let's say there are five really important

12:08 projects coming up. And you can't put a hundred percent on every one of those projects. You can't

12:14 put your best people on every one of those projects. Part of my job was simply to look at what was

12:20 coming, look what the impact on developers would be and decide where the resources were going to go

12:25 and how we were going to accomplish that. An interesting case, for example, was Swift.

12:30 Chris Latner, who originally created Swift, came to me two, three years before it launched and said,

12:37 we're working on this language. There are about 25 people who know about it. It was one of the most

12:41 secret projects in all of Apple. And he said, we don't know when or if this thing is ever going to

12:47 launch, but I would like you to put one of your best people on it now. And that's an interesting

12:53 call, right? Because things, projects like that come up all the time. So I mean, oh, I have a new

12:57 idea for a language or whatever. They don't go anywhere or they kind of half go somewhere and

13:01 then they drop or whatever. So to decide to put serious resources into something that might never

13:06 happen, but if it did happen would be really significant. It was an interesting call. And

13:11 fortunately, I had a good relationship with Chris and I trusted him. And so I did it. And we hired some

13:16 great people and put them on the project. That's the kind of thing I was doing from day to day.

13:21 Yeah. Yeah. That's cool. So let me ask you a little bit about Swift. I think there's a lot

13:26 of interesting parallels in that language with Python. You know, the playgrounds feel very much

13:32 like a REPL or Jupyter in some sense. The language has a lot of syntactical similarities. The thing I

13:39 want to ask you is why do you think it was successful? It's not very common that there's some big company

13:44 like Apple that's standardized on a language and says, you know, we're just going to completely

13:49 switch our most important stuff to this new API. And I felt like it was an immediate and complete

13:55 switch when Swift came along. That kind of surprised me, but I think it's a positive one more or less.

14:01 Why do you think that was?

14:02 Well, I'll also say, at least for me, and I think for us in general, the immediate adoption and the

14:08 language was a surprise to us. You can think, oh, a company like Apple, you know, we're going to say

14:14 do X and everyone's going to do X. No, we could have put out Swift and everyone could have said,

14:18 we're not going to use it. So we didn't know what would happen. We didn't know if playgrounds would be

14:22 good. We didn't know. We just had to put it out. And we also knew that it wasn't ready. But one of the

14:28 great things about Chris was he knew that they had to put out the language before it could be technically

14:32 completed. Because there was no way on earth we could come out with a 1.0 of Swift without that process of

14:40 developers using it and providing feedback. In terms of why it was successful, I think that a simple answer is

14:48 it simply works or it looks much more like programming languages that people are used to. And Objective-C

14:55 always had that oddness. I mean, back from when I worked at Next before Apple, and so we would go around trying to get

15:00 people to use Objective-C. And it was the number one barrier to getting Next Step into businesses,

15:07 because the engineers would look at these square brackets and they'd be like, what is this? We can't

15:11 possibly teach our engineers this. And it was a huge problem. So I think that when people saw a language

15:19 that looked like languages they were familiar with, that was a big, big win. And then the fact that it

15:25 incorporated a lot of really modern concepts. Interestingly, Swift actually made Objective-C

15:30 better because a lot of the improvements they made to Objective-C were actually in preparation for switching to Swift.

15:37 This portion of Talk Python to me is brought to you by Cloudbolt.

15:47 Friends don't let friends violate PEP 8, nor do they let them spend their days in an unfulfilling work environment.

15:52 Good news. Your friends at Cloudbolt want your help developing their state-of-the-art cloud management software.

15:58 Built with Django and ranked as the number one product of its kind, Cloudbolt's looking for talented engineers of all kinds.

16:04 Located in beautiful Portland, Oregon, Cloudbolt is an hour from the Pacific Ocean and Mount Hood.

16:09 You're not in Portland? Not a problem.

16:11 Cloudbolt offers a relocation stipend to the Pacific Northwest and is also hiring solution engineers everywhere.

16:17 Whether you're interested in containers, hypervisors, or just writing clean performant Python code,

16:23 Cloudbolt would love to hear from you.

16:25 Visit talkpython.fm/cloudbolt for more information.

16:30 So you were at Apple for a long time.

16:32 It sounds like if you wanted to work there, definitely knowing Swift and Objective-C might be worthwhile.

16:37 But also, it sounds like there's just quite a rich community of Python programmers there.

16:43 What advice would you have for people listening to this show who are really mostly passionate about Python if they want to work there?

16:51 I've run into this, too.

16:52 I went to my first PyCon this year, and I was talking to someone, and they're like, oh, I had no idea Apple used Python.

16:57 I might have applied for a job there if I'd known that.

17:00 I think that it is absolutely a big part of things, especially if you're doing any machine learning or data science, you will be using Python going in.

17:08 Unfortunately, the big caveat, I have to say, is because macOS ships Python 2.7, that's what's used internally and almost everywhere.

17:19 Not everywhere, but almost everywhere.

17:21 And that's going to be a challenge, right?

17:24 Especially as we hit 2020, especially as pandas and things are dropping support.

17:29 Yeah, pandas just announced that they're dropping support soon.

17:33 Right, right.

17:34 I mean, these things are happening, right?

17:36 I think in the data science fields, then, you have a good chance of being able to go to 3.

17:41 And if I were continuing there, I would have really been pushing that.

17:44 There are a lot of QA people using Python.

17:47 There's a lot of internal QA Python libraries.

17:50 And unfortunately, in that case, I don't see it changing anytime soon.

17:55 And I think part of my discussion today is that I know we're all excited to get to 3.

18:00 I'm excited to be using 3 now.

18:02 The shackles are off.

18:04 Do whatever you want.

18:05 And I've been listening to a lot of your recent episodes where people are like, okay, finally, we're there.

18:10 I have to say, we still can't forget about the fact that there are going to be thousands and thousands of developers in these large organizations with huge amounts of built up technologies that aren't going to switch anytime soon.

18:23 And I think that's interesting.

18:28 When you have, let's say, when you have a QA library that is highly specific to what your team does and that has been built up over five plus years and has a huge amount of code in it, we can all say, okay, they're dropping support for Python 2, so you've got to move to 3.

18:46 Where are you going to go?

18:50 And I think that's a huge amount of time to do that.

18:54 I think what I would encourage in any organization at this point is don't let yourself get in that trap.

19:01 If you're going to go to 3.5 million.

19:06 And if you're dealing with a technology like this, you've got to take responsibility.

19:09 It's like those projects I was talking about before.

19:11 Like, go home and start it in 3 and say, here it is.

19:16 And start, you know, whatever you can do to move it forward.

19:18 Don't just accept it.

19:20 Because what I fear in some of these cases is you're going to be another five years down the road.

19:26 And then you're really not going to have a choice at some point.

19:28 You're going to have to switch.

19:29 And you're going to be kind of up a crick.

19:32 Yeah, you definitely are.

19:34 You know, I feel like the two big sticks in this debate.

19:38 There's lots of carrots.

19:39 But the two sticks.

19:41 One is security.

19:43 And sometimes it doesn't matter, right?

19:45 Like an internal QA testing library probably is not exposed on the internet.

19:49 It probably is not a security risk, really.

19:51 But then there's also the new shiny things that you don't get.

19:56 Right now, the machine learning libraries are Keras, TensorFlow, and so on.

20:01 But, you know, wait until either they drop two and come along with some really great feature that you almost have to have.

20:08 Or there's something better that's Python 3 only, right?

20:12 At some point, there's going to be like, why can't we keep up with this company?

20:17 Well, they have all the good tools.

20:19 And we're stuck on these tools that are last generation.

20:21 But that's not a this week, next week, one year.

20:25 That's a by the time you realize it, right?

20:28 That technical debt is bad.

20:29 Yeah.

20:30 It's deep, deep, and it takes a long time to get out of it.

20:33 Here's a funny thing.

20:34 In the teaching I would do, I would talk about here's how it works in three.

20:39 Here's what we don't get if you don't move to three, et cetera.

20:42 I actually think one of the features most likely to get people personally motivated is F-strings.

20:49 Yeah.

20:49 They love them.

20:50 They're great.

20:51 I actually have a theory that if that feature had been rolled out early on in three and not put into two, they would have had more conversion because it's just one of those things where you're like, I want that.

21:01 And then that gets you to start making changes, you know?

21:04 Yeah.

21:04 It's definitely really much more concise and it's faster, right?

21:08 Yeah.

21:08 So there's like, it's good just all across the board.

21:10 You say faster.

21:11 I wonder, you know, in some cases, probably faster is going to be a thing as well, right?

21:15 Like Python 3 is starting to be faster in general, right?

21:18 So if you can run a quarter fewer servers, you know, 50 instead of 80 servers, I don't know, maybe that starts to add up.

21:24 But that's a rare, it's a big company problem, not most people's problems.

21:28 Most people aren't, you know, scaled that far out.

21:31 In my experience, the scale issues would be mostly in the data space.

21:35 And so they've already got lots of reasons, right?

21:37 It's just one more big reason for them to do it.

21:40 Yeah, for sure.

21:40 Okay.

21:41 So let's talk a little bit about this software university thing.

21:44 You talked a bit about it.

21:45 How did you end up founding that, the team there?

21:48 Tell us what it is and then how you got started on it.

21:50 Yeah.

21:50 Well, it's the thing I'm most proud of in my career at Apple.

21:54 And I first have to say, it's not Apple University.

21:57 There's a thing called Apple University.

21:58 And people always confuse them, which is my fault because I worked with Apple University.

22:04 I was big fans of the people there.

22:05 They teach sort of culture and how to be successful at Apple.

22:09 And so when I was coming up with the team, I wanted a way to kind of associate ourselves

22:14 with them and kind of make it clear what kind of thing we were.

22:17 Unfortunately, then everybody just thought we were Apple University.

22:19 But Software University was focused on teaching software skills.

22:24 We do onboarding and teach software skills across the company.

22:27 And it started out with that weekly program I talked about.

22:31 The head of software engineering had asked me to put together this program.

22:35 And we ran it for like 10 years.

22:37 Literally, me and a colleague, a couple of colleagues in our lunchtimes would do all the work necessary

22:42 in addition to our regular job to have this weekly presentation.

22:45 It was very popular.

22:47 And eventually, you know, after literally 10 years, we I think there was a big performance move.

22:52 There was a release where they had to the mandate was to improve performance across the board,

22:58 like 20 percent or 30 percent or something like that.

23:00 And we said, well, you know what?

23:03 We have this mechanism.

23:05 We have this way that we're able to broadcast stuff that everybody likes and uses.

23:09 We can help you with this.

23:11 We can do a special program to educate people about what they need to do to improve performance

23:16 across the board.

23:17 And so we did a whole bunch of focus topics on that and had real experts across the company

23:24 doing it.

23:25 And we put out white papers, which each one of their talks to help out.

23:28 And that was so impactful that I was then able to say, well, you know, we could keep doing

23:34 this kind of stuff if you gave us some headcount.

23:37 And that became Software University.

23:39 So a very small team, huge impact across the organization, you know, teaching because one of

23:46 the funny things for a few years after Swift came out and still true in large part is the

23:51 outside world was using Swift.

23:52 We were not because we had such a massive, massive code base in Objective-C that, you know, it was

23:59 going to take a long time to begin that transition.

24:02 So we're actually in a situation where before each worldwide developers conference, we would

24:07 run special boot camps to teach the people who are going to be at the conference.

24:12 Here's what's going on in Swift.

24:13 Here's what you need to know.

24:14 Here's the new features.

24:15 Because they wouldn't personally have been using it.

24:18 So that really blows my mind.

24:20 I've seen that before.

24:21 But it, you know, you think about it, it makes sense.

24:23 But just from the outside, it doesn't really.

24:25 Right.

24:26 Like I've seen that other big tech companies that, you know, have similar technology stacks

24:32 and whatnot.

24:32 And what's really surprising is they'll bring in external training companies to teach their

24:38 own programming language to their people or their own developer APIs to their people.

24:44 And it's like, how can this possibly be that you work at company X and, you know, someone's

24:50 coming in to teach you about the premier technology.

24:53 It's a big group of people, right?

24:55 And they all come with different skill sets and they don't all work on the same thing.

24:58 But it's, it sounds like a similar story here.

25:00 And you also have to realize they're not necessarily all bought in, right?

25:04 Like, so something like Swift comes along, a small group of people did it.

25:07 Yeah.

25:07 They had, it's a very opinionated language and different people have different opinions.

25:12 And since they have the option of using another language, they may be like, eh, I don't

25:16 like it.

25:16 Our team isn't going to use it.

25:17 And then you have a whole kind of, you know, education and process.

25:22 Or even if you like it, you might think it won't succeed.

25:24 So you're not going to mess up your product and your, your thing by choosing this other

25:29 library or language.

25:30 All right.

25:31 So maybe we talk a little bit about your experience teaching Python at Apple.

25:35 So you had, sounds like you've done a lot of classes there internally.

25:39 Yeah.

25:40 Yeah.

25:41 So what was that experience like?

25:42 Well, when I started out, I would teach one set of content two ways.

25:49 So one was for new programmers and one was for experienced programmers.

25:53 It was the same content, but for new programmers, I would go about half the speed.

25:57 And over the years, what I learned was that was the entirely wrong approach.

26:02 The need of experienced programmers versus new programmers and new programmers, at least

26:06 my students, these were people who were probably not trying to get a job programming.

26:11 They had stuff in their, in their job that they wanted to solve with programming.

26:14 Although for QA people, many QA people came in and did manual, what we call black box testing,

26:21 especially on iOS.

26:22 Almost with a script and a checklist, right?

26:25 Yeah, exactly.

26:25 And for a long time, that was okay because, you know, there weren't that many features,

26:29 but now that it's cloud and this and that and five zillion apps and, you know, your whole

26:34 life is on it.

26:35 And there are many different models of the phone.

26:37 We could no longer just do manual testing.

26:39 So people who had never intended to be programmers were suddenly now being required to be a programmer

26:44 as part of their job.

26:45 They were also my students.

26:47 What I found was the goal for new programmers versus experience is very different.

26:53 I originally thought my job was to give them a survey of like, this is what, here's a

26:57 little bit of everything in programming.

26:58 So you have an idea of what programming is about.

27:00 And by the end, I dropped probably 75% of my content.

27:06 And I decided, no, the goal is by the time you leave this class, that you're comfortable

27:12 with the idea of sitting down, starting a Python file and trying to solve a problem, any problem.

27:20 So that's what I just tried to get to.

27:22 And so I put a lot more repetition in because I also realized having been programming for

27:27 so long and writing about it for so long, I would think, okay, we talked about for loops.

27:31 Now we move on to the next topic.

27:33 Well, no, you know, they needed it three, four or five times to understand what a for loop

27:39 was.

27:39 Because there's different levels to that, right?

27:42 Like if you're a professional programmer, you just need to learn Python.

27:47 So you programmed in C# or Java or whatever, and you've for looped it to death, right?

27:53 You know, the concept of the for loop perfectly.

27:56 It's just like, okay, well, how does the syntax work?

27:58 And what are the gotchas?

27:59 You're good, right?

28:00 Like you can get that really quick.

28:01 But if you're like, well, I got to do this a lot.

28:04 And I don't want to just write it over and over.

28:06 Like the whole idea even of a loop, that's a different thing.

28:11 And that's where the repetition, I think, is super, super important.

28:14 Because maybe you take one slice of that onion each time through, and eventually you get the

28:19 whole concept.

28:20 Yeah, yeah.

28:20 So that is where I ended up.

28:22 The other thing I started doing right toward the end that was really successful, to my surprise,

28:26 is different classes go at very different speeds.

28:29 So I would have people who just couldn't even get through all the material because the people

28:33 in the class needed a lot of time.

28:34 And I would have another class, still a new programmer, that would just zoom through the

28:37 material.

28:38 And I'd be kind of like, well, okay, we're done for the day.

28:41 Go home.

28:41 And people are like, well, what?

28:43 We've got another hour or two left in the class.

28:46 And so what I started doing was saying, okay, we're going to do bonus topics.

28:49 Does anyone have a question?

28:51 Or I would even start to teach one of the experience topics or something.

28:55 Because someone would ask about regular expressions, which I had stopped teaching to new programmers.

28:59 And I'd say, okay, let's talk about regular expressions.

29:01 And that turned out to be really valuable.

29:04 People really appreciated that because they were, first of all, they seemed to really enjoy

29:10 the fact they could ask any question and I could answer it because I'd been spending so

29:14 long doing this stuff and I'd developed so much content.

29:16 And it let them see things that they wouldn't normally see.

29:20 So that was interesting.

29:21 It's that combination then of repetition and not teaching too much, but also being willing

29:26 to satisfy their curiosity and spend a good deal of time just talking about whatever the

29:31 students wanted to talk about.

29:32 Yeah, I think that's a good point.

29:33 Basically, any presentation and teaching training is like a really long presentation, right?

29:40 Leaving some room for a little bit of slack for exploration, right?

29:46 Like, I'm going to show them all this stuff, but let's leave five minutes here in like a

29:51 conference speech or let's leave an hour at the end of this week so that when they say,

29:55 that's great, but I want to put that on the web.

29:58 How does that work?

29:59 Or, you know, I actually need to work with CSV files.

30:03 How does, is that possible, right?

30:05 Like, well, actually import, you know, dictatorator, right?

30:09 So things like that.

30:10 I think that's a huge value.

30:12 It often gets lost because you're like, well, we've got to cover all these things.

30:15 Yep.

30:15 Yep.

30:16 And then for experienced programmers, the goal I developed was, of course, a lot of times

30:20 they are just coming in wanting to know how does a for loop work in this and how to,

30:23 and my goal was to kind of trick them into saying, okay, I'm going to teach you Python.

30:29 But what I really focused on was teaching them to be Pythonic and really getting across like,

30:34 don't do that thing where you learn a little bit of the language over the weekend and then

30:39 you never really know how it works.

30:41 And I can't tell you how many times people who had been using Python for a while would

30:45 take the class and they'd say, oh my God, I never actually understood what a comprehension

30:50 was before.

30:50 I was just copying and pasting these things.

30:52 I didn't really know what they did.

30:54 Now I understand what they do.

30:55 And that, so that was my goal was to get them to actually understand it.

30:58 And also to use things like comprehensions, which as I'm sure you've experienced non people

31:05 who've not immersed themselves in Python don't end up using something like that because it's

31:09 not, it doesn't exist in where they came from.

31:11 Right.

31:12 If you don't, you don't change your mindset.

31:14 Yeah.

31:14 You don't even know this is now a tool in your toolbox or when it applies, right?

31:18 Same with generators.

31:19 I have to believe that generators are out there in other languages, but I never ran into that myself.

31:24 And so I would have to spend a lot of time explaining not only what they were and how

31:29 they worked, but like why you would want to use these.

31:32 And of course, if you're dealing with large amounts of data, that can be a really critical

31:36 feature.

31:37 I think generators and generate expressions and all that are, they're just like magic and

31:41 people haven't taken the time to get to know them.

31:44 Like you say, if they're doing anything with lots of data that coming off of the network,

31:49 it's coming off of disk, like it, it can just make all the difference.

31:52 Yeah.

31:53 There's some other languages.

31:54 I think maybe even JavaScript is getting it.

31:57 I haven't been tracking the new JavaScript that much, but I heard something about, about

32:01 that.

32:02 But anyway, it's, it's out there some other places, but I, it definitely is really well

32:06 embraced in the Python language.

32:07 Right.

32:07 I think that's great.

32:08 Yeah.

32:09 There was a recent article blog post, whatever you call it by somebody who said, I can't remember

32:16 what the name of it was.

32:16 Something to the effect of like eight reasons.

32:18 I hate Python and I'm just going to say it.

32:20 I hate Python, something like this.

32:21 And it was, it was basically the prototypical example of the person that you described not

32:28 going through the process.

32:29 Right.

32:29 Right.

32:30 They had to work in Python and they really just liked C and some other languages that

32:37 were basically C languages and they just learned enough to make it work.

32:42 Right.

32:42 They're like, okay, well I have to type this to get the library.

32:44 I have to type this to, but they didn't actually bother to, to learn.

32:48 Learn very much about any of those features.

32:49 So they're like, this thing completely sucks.

32:51 The way that you import stuff is horrible.

32:53 I don't know where stuff comes from.

32:55 It's like, well, there's a different way you can do it.

32:59 You don't have to do imports, you know, from this import star, there's other options.

33:03 Right.

33:03 But it was, it was basically, this person was really frustrated with Python because they

33:08 had said, well, look, Python is easy.

33:10 I'm going to learn it in the weekend.

33:12 I'm going to learn it really quickly.

33:13 But soon as I get it to work, I'm going to stop investigating.

33:17 As soon as I get something that works.

33:18 And I think that's actually a little bit of, a little bit of the language is curse of

33:22 its success, right?

33:24 Like you can get a cursory understanding of it quickly, but then if you don't keep going,

33:29 you actually miss why people like it.

33:31 Right.

33:31 And I would say for myself, the feature that I really just started using more and more,

33:37 and the more I understood it, the more problems it solved is the exception handling.

33:41 I wish there was a different phrase than even exception handling, because that implies, oh,

33:46 this is just what you do to deal with errors.

33:48 When the more you absorb the full set of features around exception handling, the more you start

33:54 to realize, no, I can really solve code problems and structure my code around this in ways that

34:00 other languages just don't allow for, right?

34:02 The fact that you can basically return any kind of value in an exception allows you to

34:09 do just really great things that if you just think of it as, oh, this is what I have to

34:14 do when there's some error that might show up.

34:16 You'll never do those things.

34:17 Yeah, absolutely.

34:18 And the more subtle stuff like with statements and context managers for sort of durability

34:24 and all those kinds of things.

34:25 Absolutely.

34:25 This portion of Talk Python to Me is brought to you by Rollbar.

34:31 Got a question for you.

34:33 Have you been outsourcing your bug discovery to your users?

34:36 Have you been making them send you bug reports?

34:38 You know there's two problems with that.

34:40 You can't discover all the bugs this way.

34:42 And some users don't bother reporting bugs at all.

34:44 They just leave, sometimes forever.

34:46 The best software teams practice proactive error monitoring.

34:50 They detect all the errors in their production apps and services in real time and debug important

34:55 errors in minutes or hours, sometimes before users even notice.

34:59 Teams from companies like Twilio, Instacart, and CircleCI use Rollbar to do this.

35:04 With Rollbar, you get a real-time feed of all the errors so you know exactly what's broken

35:09 in production.

35:10 And Rollbar automatically collects all the relevant data and metadata you need to debug the errors

35:15 so you don't have to sift through logs.

35:17 If you aren't using Rollbar yet, they have a special offer for you.

35:20 And it's really awesome.

35:21 Sign up and install Rollbar at talkpython.fm/Rollbar.

35:25 And Rollbar will send you a $100 gift card to use at the Open Collective, where you can

35:31 donate to any of the 900 plus projects listed under the Open Source Collective or to the

35:36 Women Who Code organization.

35:37 Get notified of errors in real time and make a difference in Open Source.

35:41 Visit talkpython.fm/Rollbar today.

35:46 When you're teaching the class, you said you use Jupyter.

35:50 I want to tell people a little bit about how that works.

35:52 Yeah, I actually, this came out of going to the PyCon.

35:56 I knew about Jupyter, IPython, et cetera, but I'd never really got around to playing with

36:02 it.

36:02 And then when I saw, I took some tutorials there.

36:04 And when I saw how it was being used, I was like, oh my God, I have to use this in class.

36:08 And I literally went that evening from the conference and rewrote all my material in Jupyter.

36:14 And now I've become obsessed.

36:17 I basically, I write my website in Jupyter.

36:19 I do my coding in Jupyter.

36:22 And I've written my own conversion scripts to produce things in HTML and that sort of thing.

36:28 And I've just found it to be this amazing environment.

36:31 And I'm also a big fan of Markdown.

36:35 And I think that Jupyter is a great way to get more use out of Markdown because what

36:40 people would typically do, and this is where you end up with restructured text and all that,

36:43 right, is they just keep adding features.

36:45 And the brilliance of Markdown is simplicity.

36:48 And if you start adding more and more tags to it, you lose the benefit.

36:52 Jupyter, because each cell, you can put tags in there and do other things.

36:56 You can put a structure on top of the Markdown.

36:58 So for example, what I'll do is I will add a tag to a cell that says center.

37:04 And then when I output the HTML, I center that content.

37:07 Well, I didn't have to add to Markdown some kind of center tag.

37:10 And so Markdown does what it does.

37:13 Jupyter does what it does.

37:15 And I just find the combination to be really brilliant.

37:18 And I think one of the reasons I'm so passionate about it is because I spent my career dealing

37:23 with documentation formats and creating formats, you know, creating templates in XML and such.

37:30 So what I saw how hard it is to do a simple format is almost impossible to design a simple

37:37 documentation format because the minute you have customers start using it, they start saying,

37:41 oh, well, I want you to add this and I want you to add that.

37:44 And I spent a lot of my career saying no to writers.

37:47 We're not going to give you that because we give you that.

37:49 It's going to cause this problem and this problem later down the track.

37:52 So when you look at that combination or you like you look inside a Jupyter file and see

37:57 that it's just a JSON file, a very simple JSON format that is extremely easy to parse, you

38:02 realize this could only happen by one or two people doing this thing and then not letting

38:07 themselves get sucked into adding all these features that would then turn it into a mess.

38:13 Right.

38:13 They didn't try to write Word for Python.

38:15 Yeah, exactly.

38:16 They just tried to create this nice little notebook format.

38:19 That's cool.

38:21 I think, I do think there's a lot of value for using Jupyter notebooks.

38:25 It must be nice to have as like class handouts, like here's the notebook that we went through

38:30 because it lets, you know, it's great to have like a PDF of the slides, right?

38:34 Okay, super.

38:34 I can type that back in or get it somewhere.

38:37 But, you know, the Jupyter version, you get to explore.

38:40 Right.

38:40 It solves many class problems for me because I used to, I have the students using Sublime

38:45 Text usually.

38:46 I like Sublime Text for teaching because in addition to having good syntax coloring and general good

38:51 Python support, it shows the results of the script in line, which is most other things

38:57 you use, you know, it either a DB editor or something's going to pop up a different window

39:01 or people have to look somewhere else for the results.

39:03 So Sublime Text is really good for students.

39:05 And I was teaching with Sublime Text live, but then someone would ask a question and I'd had

39:10 to comment out some of the code and put in some new code.

39:13 And then especially for new programmers, they would have no idea what was going on because

39:17 I'm changing around everything.

39:18 When I moved to Jupyter and someone asked a question and I can just enter a new cell and

39:24 put the code in and run it, it solves so many problems.

39:28 So it's really elegant for teaching.

39:29 Yeah, it definitely seems like it.

39:31 I mentioned earlier that I felt that the Playgrounds was something like Jupyter, the Swift Playgrounds.

39:38 Do you think if Jupyter had been something that, say, Chris Lattner and folks had been playing

39:44 with already and maybe had a little more traction, do you think Swift Playgrounds would not exist?

39:48 And there'd just be a Jupyter version that ran Swift?

39:51 It's a good question.

39:53 And I know that I've seen there's at least a couple of projects out there of people working

39:56 to get Swift integrated into Jupyter.

39:59 I know, I mean, Chris and company were experts on all sorts of languages.

40:04 And I know that there were various influences on Playgrounds.

40:08 I guess the way I'll answer your question is I would say if I had known about Jupyter at

40:13 the time when our department got to be somewhat involved in the process of designing Playgrounds

40:19 because it was in part a documentation feature.

40:22 And so we worked with them on all that.

40:25 I think if I had been aware of it, I certainly would have pushed for more of that because I

40:31 feel that that simplicity would be served.

40:33 However, it may not have been the right thing for Apple.

40:36 An important thing about something like Playgrounds is that the fact that you can run these really

40:41 cool little games and other things and show visually what's going on there, that's a really

40:45 helpful thing to promoting the language and promoting the learning aspect of it.

40:49 So, you know, you have other concerns that you have to think about.

40:53 Yeah, of course.

40:54 So you've had a lot of experience at these large tech companies working with Python.

41:00 And we talked a little bit about the two and three divide and some of that technical debt.

41:06 You had a story about converting from one language to another back in the publishing days.

41:12 Tell us a bit about that.

41:13 Well, so we had this whole publication workflow and we decided to do the next big jump, right?

41:22 And we wanted to get out of Perl and we wanted to fix all the problems, you know, that you

41:28 have when you have a big thing that's been running for a long time.

41:30 You just think if we could just write this from scratch, it would be all the problems would

41:34 be gone.

41:34 It'd be perfect.

41:35 I made every mistake and I've learned now that this is a pattern, right?

41:39 And it's a pattern that I warn people about, which is, okay, well, yeah, we're just going

41:44 to write the new thing.

41:44 And then what we will do is because in the meantime, we have to keep things publishing every day,

41:51 we'll write a bridge script.

41:54 So it will bridge from the previous stuff, you know, the previous version of the content,

41:59 source content to the new version.

42:01 And then at some point, we'll just cut off the bridge and we'll go forward with the new

42:06 stuff.

42:06 That's not how it works.

42:09 And what happens is when you have an enterprise level production workflow that's been around

42:16 for a long time, there are hundreds or thousands of edge cases in business cases that have been

42:23 built in or bolted on or whatever to fix all sorts of problems.

42:28 When you write the new thing from scratch, you're rediscovering all of those.

42:33 So what happens is you start saying, well, we'll have the bridge script fix those things.

42:39 Well, the bridge script is supposed to go away, but it starts becoming the biggest part of the

42:44 project and it starts taking up all of your time.

42:46 And now you're doing duplicate work often because some new feature will come along and you have to

42:49 put it in your old production workflow because you're still using that.

42:52 And you have to put it in your new one or you have to do something.

42:54 And so the end of the day, we had this great new version of our workflow.

42:59 The HTML output was wonderful.

43:01 It was a huge improvement.

43:02 And I had to kill the project because every time you clicked around, every third or fourth

43:07 link would crash this thing because it couldn't deal with all of those edge cases and everything.

43:15 And so at the end of the day, what I learned, and I think a lot of people have learned this,

43:19 is if you have a large enterprise level workflow, accept it.

43:23 You have it.

43:24 Your only option is to gradually convert it piece by piece.

43:29 Find ways to isolate certain pieces of functionality and then upgrade that portion of it and do it

43:36 piece by piece.

43:37 But don't think that you're going to be able to run two different workflows and then switch

43:40 from one to the other.

43:41 Maybe someone out there has made it work, but I think it's a recipe for disaster.

43:45 And it's one of the biggest mistakes I ever made.

43:48 That sounds really not so good.

43:50 So you had the Perl one before and you tried to switch it over to Python through this bridge

43:56 thing, right?

43:56 No, we weren't doing Python.

43:58 I even forget what it was we were switching it to at the time.

44:01 This was before Python was a factor.

44:03 Sure.

44:03 So, but if that one got canceled, did you just go back to the Perl one or is there now

44:07 something new?

44:08 Well, I haven't been doing that for a long time and I know, I think they finally did do

44:12 a whole new production workflow.

44:13 But yeah, we were stuck with the Perl for another five plus years.

44:18 And it wouldn't surprise me if there's still a bunch of it in there because, you know, it's

44:23 really hard to get rid of all that.

44:24 Then you get into the situation.

44:25 I think this is where we're headed with Python 2 as well, where you start having to ask engineers

44:31 to join your team or join your company to do something like Perl, right?

44:37 And you get fewer and fewer people who know how to do it and you get fewer and fewer people

44:41 who want to do it.

44:42 I'm always going to do this classic joke.

44:44 If you've heard this of the guy who's a COBOL programmer and he was so sick of everybody hiring

44:48 him for COBOL because there weren't COBOL programmers around that he had himself frozen so that in

44:53 the future he could have a different career.

44:54 And when he's unfrozen and wakes up, you know, Bill Gates is standing over him and he's like,

44:59 oh, Bill, great.

45:00 What can I do for you?

45:01 And Bill's like, you're the guy who knows COBOL, right?

45:03 Exactly.

45:04 Yeah, I can totally see that.

45:06 And there are so many projects that are stuck in these old languages, you know, BB6 even.

45:14 There's so much in the enterprise space that people put together.

45:17 Really complicated.

45:18 And there's better paths forward.

45:20 But I think it is all these little tiny details, right?

45:24 You know, it's one thing to say, well, it has to do X, Y, and Z.

45:28 It's like, well, but there's like a hundred little bizarre tweaks that we catch it under this

45:33 circumstance or we do that differently if it's from that department or whatever, right?

45:36 It's crazy.

45:36 Yeah.

45:37 Well, I definitely think there's going to be some good consulting opportunities for people

45:42 that know how to take Python 2 code to Python 3 code.

45:46 I don't know when the peak of that opportunity will be, but, you know, maybe spring 2020 or

45:53 after the first really bad security problem found, it's Python 2 that's not going to be fixed.

45:58 But like this COBOL programmer type person, having those skills and knowing how to do that

46:03 switch actually might be really valuable.

46:05 In the meantime, what people can do, and I started pushing this really heavily in my experience

46:09 classes, is start using Python 2 like 3.

46:13 You know, use the features that were backported, especially for dictionaries and such.

46:18 As near as I could tell, I could rarely find a tutorial or a book that talked about the features

46:23 that had been added, say, to dictionaries after the fact that turned them into the same

46:28 thing that they do in 3, right?

46:29 So it's where you're getting those different objects.

46:33 Instead of getting a list, instead of everything being a list, you're getting the objects back

46:38 that don't take up memory and such.

46:41 Like X range and that kind of stuff, right?

46:43 Yeah.

46:44 And in the dictionaries they have, what they have is for each thing, if you ask for values

46:47 or keys, there's another method, which at the moment now I'm spacing on it, which will,

46:52 instead of giving you a list, will give you what you would get in Python 3.

46:56 And so that's an easy way, because I think that's some of the code that is most problematic,

47:00 right, are things that are relying on you getting a list back, and it's no longer a list in Python 3.

47:05 So some of the easiest ways to future-proof your code is just to use those things when they're

47:10 available.

47:10 Yeah, for sure.

47:11 So on these big projects, do you think you can test your way through that?

47:17 Like, if you could imagine every single case that is like one of these weird edge cases,

47:23 and you just wrap up the app and you feed it the inputs and you check the output, possible?

47:27 Reasonable?

47:29 I think it's great if a team has been disciplined enough to do that.

47:34 And there are times when I, like anybody, well, I really like unit testing.

47:38 I literally like test-driven development.

47:40 I fall in and out of it, as I think most engineers do.

47:43 But when I was really good, especially on projects like when I created, say, a CSS parser,

47:47 and so for every single feature that I would put in tests, then my parser wasn't very fast,

47:54 so my team got annoyed about that.

47:55 And one of them did to me what I did to people, which is went home and wrote a faster version.

48:00 But because I had put a test in for every single feature, we were able to just swap in the new code with no problem.

48:07 Right.

48:07 Run it.

48:08 Does it pass?

48:08 Good.

48:09 Yeah.

48:09 But I would argue it's, I think it's getting more common as people have gotten better about this,

48:14 and testing functionality has gotten integrated into the languages and frameworks.

48:19 It's relatively rare that people have done that amount of testing.

48:22 Yeah.

48:22 That's probably true.

48:24 All right.

48:26 Well, it's definitely an interesting problem.

48:27 And I know a lot of people have it both trying to cross languages, and we're going to have it with this 2 to 3 thing that's coming.

48:34 I do think it's less bad with 2 to 3.

48:37 It's not like you're starting completely from scratch.

48:40 I mean, you may decide to start from scratch with Python 3 and rewrite the thing,

48:45 because that's both tempting and sometimes the right way to go.

48:48 But at least it's more of an upgrade, like it's a really big upgrade to your project,

48:53 rather than you can't add Python to Perl progressively to it, right?

48:59 I think there's the same risk, which is if you don't spend some time truly learning

49:03 what's different about 3 and the philosophical changes to deal with memory usage

49:09 and such more generators everywhere, that kind of stuff.

49:12 If you start converting your code without philosophically understanding the differences,

49:16 then you're not going to get the benefits from 3.

49:19 And you may not even realize some of the stuff that you need to change.

49:22 Yeah, that's a good point.

49:23 It's very similar there.

49:24 All right.

49:25 Well, you've done all this cool stuff at Apple, and you've been there for a long time,

49:28 and you hear a lot of good things about the company, but leaving and breaking on your own, that's a pretty big step.

49:35 I know from personal experience, it's a big deal.

49:38 What was the decision making there?

49:40 Yeah.

49:41 Well, it was great working at Apple.

49:43 I had a great career there, and people were very supportive of me and let me do all these wonderful different things.

49:49 And actually, I feel a little unfortunate that there's been some stock hits recently and stuff.

49:56 So people have been saying to me, oh, you're getting out because of that.

49:58 And it's like, no, no, no.

50:00 Actually, if anything, that would make me want to stay because as one of the people

50:03 who's been around a long time, you know, I have experience with the ups and downs of things.

50:07 It's been a lot lower historically at some point.

50:10 Oh, yeah.

50:12 So every once in a while in your job, something comes up that's a little annoying,

50:16 and you think about things.

50:17 And I realized, oh, it has been 25 years.

50:22 And oh, I'm really loving this Python stuff, and I want to be part of the community.

50:27 And for all the wonderful things at Apple, the way it works right now is that you kind

50:32 of have to be invisible when you work there.

50:34 You know, you're not really allowed to speak, or you have to do a lot of work to be able

50:38 to speak.

50:38 You know, you can't necessarily write articles or write a book or whatever.

50:42 So realizing that, okay, I've been here 25 years.

50:46 This is a really nice career progression.

50:47 I want to be a part of the Python community.

50:49 So I want to be able to be on a podcast, for example, and write a book.

50:55 And also, honestly, to say, you know, well, if this is what I'm going to spend the next

51:00 chunk of my career on, yeah, I want to be working in the latest, greatest stuff.

51:04 And I felt personally that my responsibility, if I stayed, would be to put a lot of time and

51:10 effort into, you know, some of your other episodes have covered getting the whole organization

51:15 to switch.

51:16 And I've been through those conversions many times in my career, and it's just not what I

51:21 wanted to focus on.

51:22 I just wanted to make the jump.

51:24 And so you combine all those things, and it's like, yep, this is the right time to

51:27 do this.

51:28 Yeah, it's definitely a good time to switch into Python.

51:30 It's, you know, so much energy, and it's definitely building.

51:33 And I can relate to a lot of those things.

51:35 You know, I worked at many small companies, but also at a large company.

51:39 And I just, for me personally, I just decided, you know, every day I get up and I go to these

51:44 meetings and I work on these features and these projects.

51:47 And there's a non-trivial chance this project is getting killed.

51:51 I'm pretty sure this feature is not actually going to make a difference to anybody, you

51:55 know?

51:55 And I just thought, well, is that kind of stuff what I want to put my energy into every

51:59 day?

52:00 Like, what if I could wake up every day and work on what I think is going to be most valuable

52:05 to the community or people or customer, whatever, right?

52:08 Like, that would be really great, right?

52:10 So that's kind of what gave me a similar boost is just like, I feel like maybe I'm giving

52:15 like 20% of what I could to the world at my job.

52:18 Right, right.

52:18 Not because I'm not trying, but because I'm being told to work on X, Y, and Z.

52:22 And like, only Z is like partially valuable, right?

52:25 Yep, exactly.

52:26 Yeah.

52:26 Interesting.

52:27 Okay, so you're starting off on this journey to do training, teaching, and your sort of own

52:33 thing.

52:34 How can people, you already have some classes that you're teaching, right?

52:36 Yeah, I am definitely set up, as it happens, both in Python 2 and 3, to do the general new

52:42 programmers and experienced programmers.

52:43 And the same focus I talked about, for new programmers, it's just getting them comfortable

52:48 with what programming is and that they can solve problems and kind of setting them up to learn

52:53 more.

52:54 And with experienced programmers, it's really teaching them how to be Pythonic and how to

52:58 use the language the right way.

53:00 Nice.

53:00 And where can people find out about it?

53:01 So I have a site, which I'm still kind of, you know, working on getting up to speed.

53:06 But that is conquerprogramming.com.

53:08 So I like the concept of conquer programming by learning Python.

53:12 And they can go there.

53:14 And I'm on Twitter as conquerprogram1.

53:17 There was some other conquer program out there.

53:20 And that will do it.

53:21 Nice.

53:21 Okay, yeah.

53:22 So people can check that out if they're interested.

53:23 That's great.

53:24 All right.

53:25 Well, I guess we'll probably leave it there for the teaching at Apple topic.

53:30 And I'll just ask you the final two questions.

53:32 So if you're going to write some code, and based on what we talked about, I may have two good

53:38 guesses.

53:38 But what editor do you use for Python anyway?

53:42 So basically, I have three answers, right?

53:43 Sublime Text I use in classes, at least for students.

53:46 PyCharm I use if I really am needing to solve some bigger problems and use more of the profiling

53:53 and debugging sorts of stuff.

53:55 As you can guess, at this point, my day to day coding and what I'm doing all my personal

54:00 stuff in is Jupyter.

54:01 Because I actually find it to even be a good development environment.

54:05 Because everything is in memory, when I'm having a problem, I just, I can interact live with what's

54:12 going on.

54:12 It's like a super debugger, right?

54:14 You can just go, what is X?

54:15 And I love the fact that I can have actual documentation and links.

54:20 So I think now, if I were doing team development in Python, I would seriously consider having

54:26 the source be in Jupyter with actual documentation and actual links, and even things like screenshots.

54:30 So you can actually put in screenshots to show what it is that you're dealing with, say, on

54:34 a web page or something like that.

54:35 And then if necessary, just export it to Python to be run on a day-to-day basis, but do the

54:41 actual source in Jupyter.

54:42 So I know that there are then challenges about importing things and other stuff.

54:46 So there'd be things to figure out.

54:48 And I know that there's these JupyterLab and other stuff, which I haven't played with yet.

54:51 But that's definitely where I'm at.

54:53 And that's an interesting idea.

54:54 OK, notable PyPI package?

54:56 Well, I was thinking about what made the biggest difference.

54:59 And so in Python 2, the biggest difference to me was a package called Unipath, because it

55:04 brought all the file functionality under one class.

55:06 And so you didn't have to have three different libraries and different APIs.

55:10 And it really cleaned up my code.

55:12 And I know they proposed it.

55:14 There was like a PEP for it at one point.

55:16 It got turned down.

55:17 And now there's Pathlib, which is part of Python 3.

55:22 So I guess I would just say, if you're doing all the file stuff, I really would consider

55:26 looking at Pathlib, because it just cleans up your code a lot.

55:30 And it's a much nicer way to deal with things.

55:32 Yeah, that's a good recommendation.

55:34 And way to grab one out of the standard library.

55:35 That also works.

55:36 So the other thing that I've started pushing in my experience classes when getting to the

55:41 data science stuff is in figuring out how to teach pandas, I started splitting out series

55:46 and teaching that first as kind of a fancy list and dictionary.

55:49 And then a data frame just becomes a dictionary of series.

55:52 And it was easy for the students to absorb.

55:54 And I started to realize, you know, as far as I'm concerned, I think the series class should

55:59 be thought of as more of a general case problem solver, because it's a dictionary and it's

56:05 a list and it does things really fast.

56:06 And it takes regular expressions, which is huge when you're doing a lot of the tech stuff.

56:10 So I've started pushing the idea of, hey, don't think of series as a spreadsheet thing.

56:19 Think of it as a really useful list class that you could use for anything.

56:23 So that's the other notable thing.

56:25 Yeah, very interesting.

56:27 I definitely like the Pathlib stuff these days.

56:29 I'm starting to really appreciate it and think about, you know, ditching OS.path and all

56:34 because of the fluent API, the chaining, right?

56:37 Like create a path, dot, rename, you know, dot ensure the parent stuff, all that kind of

56:43 like all in one line.

56:44 It seems really, really clean.

56:45 So yeah, I like that recommendation as well.

56:47 All right.

56:48 Final call to action.

56:48 People are out there learning Python or they want to teach Python.

56:52 You know, what advice do you have for them?

56:53 Well, I think I'm going to come back to a theme of this whole thing, which is if you're in an

56:58 organization that's in Python 2, you've got to take personal responsibility to do something

57:04 about it.

57:04 Either get your organization to change or think about your own role in that because do you want

57:09 to be in a 10-year-old version of the language for the next five years or more?

57:13 You know, coming from where I'm coming from, that's sort of the biggest thing for me.

57:17 I think the one other thing I would say in terms of teaching is one of the things I'm

57:22 evolving towards and working on in this book I'm working on is I kind of think that teaching

57:27 new programmers programming is almost the wrong thing.

57:31 And for many people, they're not there to become a programmer.

57:36 They're there because they have stuff in their work life that they want to improve and they want

57:42 a new tool to do it.

57:44 And I think that if we focus more of our teaching of new programmers around, hey, here's a problem

57:51 you can solve.

57:52 And by the way, along the way, you're going to learn some programming.

57:54 That's a much more practical way to do it.

57:57 One of the books I really like along those lines is the Automate the Boring Stuff with Python,

58:01 which is very focused on that and influential to me.

58:04 So even though I teach a generic learn how to program class, more and more I'm moving away

58:09 from that and I'm going to focus on helping people solve specific problems.

58:12 Yeah, unless you're committed to a four-year computer science degree, you need those short

58:18 little wins.

58:18 It's not like, well, this year I'm going to learn all about loops and data structures.

58:22 Next year I'll do something with it, right?

58:24 Yeah, exactly.

58:24 That's not reasonable for most people, especially if it's a week-long class or something online

58:29 for a few hours or something like that.

58:31 I totally agree.

58:32 All right, Ron.

58:34 Well, thank you for sharing your experience and your story.

58:36 It's really interesting.

58:37 Appreciate you being on the show.

58:38 Thank you very much.

58:40 This has been another episode of Talk Python to Me.

58:43 Our guest on this episode was Ron Hayden, and it's been brought to you by Cloudbolt and Rollbar.

58:49 Spend your work time fulfilled.

58:51 Write Python and Django code at Cloudbolt, developing their state-of-the-art cloud management software

58:56 in beautiful Portland, Oregon.

58:58 Visit talkpython.fm/cloudbolt to join the team.

59:02 Rollbar takes the pain out of errors.

59:05 They give you the context and insight you need to quickly locate and fix errors that might have

59:10 gone unnoticed, until users complain, of course.

59:12 Track a ridiculous number of errors for free as Talk Python to Me listeners at talkpython.fm slash

59:18 rollbar.

59:19 Want to level up your Python?

59:21 If you're just getting started, try my Python Jumpstart by Building 10 Apps course.

59:26 Or, if you're looking for something more advanced, check out our new async course that digs into

59:31 all the different types of async programming you can do in Python.

59:34 And of course, if you're interested in more than one of these, be sure to check out our

59:38 everything bundle.

59:39 It's like a subscription that never expires.

59:41 Be sure to subscribe to the show.

59:43 Open your favorite podcatcher and search for Python.

59:45 We should be right at the top.

59:47 You can also find the iTunes feed at /itunes, the Google Play feed at /play,

59:51 and the direct RSS feed at /rss on talkpython.fm.

59:56 This is your host, Michael Kennedy.

59:58 Thanks so much for listening.

59:59 I really appreciate it.

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

01:00:02 Bye.

01:00:03 Bye.

01:00:04 Bye.

01:00:05 Bye.

01:00:06 Bye.

01:00:07 Bye.

01:00:08 Bye.

01:00:09 Bye.

01:00:10 Bye.

01:00:11 Bye.

01:00:12 Bye.

01:00:13 Bye.

01:00:14 Bye.

01:00:15 Bye.

01:00:16 Bye.

01:00:17 Bye.

01:00:17 Bye.

01:00:17 Bye.

01:00:17 Bye.

01:00:17 Bye.

01:00:17 Bye.

01:00:18 Bye.

01:00:19 you Thank you.

01:00:21 Thank you.

01:00:22 Thank you.

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