#130: 10 books Python developers should be reading Transcript
00:00 One of the hallmarks of successful developers is continuous learning.
00:03 The best developers I know don't just keep learning, it's one of the things that drives them.
00:07 That's why I'm excited to bring you this episode on 10 books Python developers should read.
00:12 You'll meet Timo Kola, who is an avid reader and self-learner in the Python space.
00:17 He's found 10 books from his experience that have had a huge effect on him,
00:21 and we'll discuss those now. This is Talk Python to Me, episode 130, recorded July 18, 2017.
00:28 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
00:49 This is your host, Michael Kennedy. Follow me on Twitter, where I'm @mkennedy.
00:53 Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.
01:00 Talk Python to Me is partially supported by our training courses.
01:04 Have you tried to learn Python but got stuck or lost focus?
01:07 We know how it feels to try and jam fact after fact, loop construct after turn hair expression, into your head.
01:15 At best, it's boring. At worst, it can turn you off programming altogether.
01:19 That's why we built our course, Python Jumpstart by Building 10 Apps.
01:23 This course guides you through carefully planned applications.
01:26 It starts simple, but progresses to quite real apps.
01:30 Best of all, you won't be learning dry facts.
01:33 You'll be learning like the pros do, by building real applications and learning in context.
01:37 If you want to start building with Python, just visit talkpython.fm/course to get started.
01:43 Timo, welcome to Talk Python.
01:46 Thank you.
01:47 It's great to have you here.
01:48 I'm really looking forward to talking about these books.
01:50 You and I are both avid readers, and I think one of the best things you can do for your career,
01:56 or just even as a person, is to keep reading.
01:59 And so maybe we can use this episode to inspire a bunch of people to do some technical and some not-so-technical reading.
02:06 Sure. Sounds great.
02:08 Yeah, sounds fun.
02:09 But before we get to that, let's start with your story.
02:11 How did you get into programming in Python?
02:12 I started with Python in 2005.
02:15 I started programming professionally in like 97.
02:20 I was a philosophy major, and I was thinking whether I should be starting an academic career or get a real job.
02:30 Then I ended up getting a real job.
02:32 Then I did something like CE and Perl and all sorts of stuff and slowly wandered into sort of a middle management in big companies.
02:44 And 2005, I figured out that I don't want to do that.
02:51 I want to be a programmer and kind of relearned programming back then.
02:55 I had done something like, I always did something like Perl programming, very small throwaway scripts.
03:03 And then I was given a task of writing an Excel for time reporting in a team.
03:12 It was quite funny.
03:13 It was a really big company, but they handled time bookkeeping with an Excel sheet.
03:18 That's really funny.
03:19 Isn't it weird how like some of these huge companies, like they'll waste crazy amounts of money on certain things.
03:26 And then others like, no, we can't do anything.
03:28 There's no system we're going to buy.
03:29 We're not going to build one or anything.
03:30 We're just going to like, here, use Excel.
03:32 Yeah.
03:32 It was like, here's a network drive and everyone writes down their own Excel sheet.
03:38 And we need a summary report for the management.
03:41 And it was like a 60,000 people company.
03:45 And they didn't have like a centralized process for that.
03:49 And then I ended up writing first that reporting system in Perl.
03:54 Then I thought, well, my friend was using Python.
03:56 And I thought, well, this looks neat.
03:58 Although I hated, of course, the white space first.
04:01 I got used to that in two weeks.
04:04 Figured out that, hey, this is actually a feature.
04:06 Reading is more important than writing.
04:08 And then, well, I wrote that.
04:11 And a couple of years later, my friend said, well, it's still reporting full hours for you.
04:17 The system that you did back then.
04:19 And that's how I got into Python.
04:22 And I've done, after that, I've done web stuff.
04:25 And previous project before this company that I'm now working in, I was two years doing Android programming.
04:33 And all the time I've been doing something a little with Python.
04:37 I've done quite a few of Twitter bots.
04:41 That's a kind of a fun way to keep up your Python programming skill.
04:46 Oh, cool.
04:46 Yeah.
04:46 So tell me about some of your Twitter bots.
04:48 The most interesting ones are in Finnish.
04:50 But I have two James Joyce readers.
04:54 Ulysses Reader that reads Ulysses perpetually by James Joyce.
05:01 And also Finnegan's Wake.
05:03 These two kind of really hard books split to 140 characters at a time.
05:09 And sometimes it's quite funny.
05:12 And most of the time it's quite boring to follow them.
05:15 Yeah.
05:15 I'll put the two Twitter accounts in the show notes so people can follow them if they want.
05:19 Yeah.
05:20 Nice.
05:22 And you said you also do some chatbots, like some AWS Lambda chatbots or something like that?
05:26 Yeah.
05:26 That's what I do at the work right now.
05:28 We define it something like a conversational commerce.
05:32 We take, let's say, a product catalog, any kind of a structural data associated with that.
05:40 Add some like handmade rules and try to make it as automated as possible and generate a chatbot that you can talk to a product catalog with.
05:51 Oh, that's really cool.
05:53 So are you using like Alexa skills or like how are you understanding the words there?
05:58 Well, we are both experimenting with like wit.ai, which I think is the state of the art at the moment.
06:06 And then we need to have our own bits that understand Finnish or take the Finnish sentences and then take out the stuff that Finnish language adds there.
06:17 Finnish language is quite different from many of the other European languages like English and Germany or even Swedish.
06:24 Yeah, sure.
06:25 Nice.
06:27 So are you enjoying working on chatbots?
06:29 Yeah.
06:29 It's also, well, it's kind of interesting to see.
06:33 We are quite aggressive in user testing and how to see what's like the expected level of intelligence that people want from them.
06:42 And the bar is quite high.
06:44 Yeah.
06:44 I've heard people describe both the like the voice assistants and the chatbot text equivalents and having this problem of the uncanny valley.
06:54 Yeah.
06:55 And I think this problem originally it was stated in terms of like animated movies.
07:00 So think Shrek or something like that, where if it clearly, the characters clearly look animated, people are fine.
07:06 If they look perfectly real or are real, people are fine.
07:11 But if they're really, really close to real, but not quite, it kind of creeps people out.
07:15 And things are getting good enough that we're getting a little bit into this uncanny valley where it works, it works, it works.
07:22 Wait a minute.
07:22 You don't understand that?
07:23 That doesn't make any sense.
07:24 Why don't you understand that?
07:25 Right?
07:25 What do you think?
07:26 Yeah, exactly.
07:27 I think that's exactly what's going on there.
07:29 And also, it's kind of a, even if the system is quite smart, it makes different mistakes than human would do.
07:38 What we found out in our user studies is like that.
07:42 You really need to concentrate on a task, satisfy the user's need on a single task.
07:48 That's how you get the, and then concentrate on one specific domain.
07:54 That's how you get the most satisfactory results.
07:57 When you open it up, people start expecting it to be able to answer everything.
08:04 And that's when it goes sour.
08:06 Yeah, but it's going to get better, right?
08:08 I mean, it's already in the last five years gotten so good.
08:11 And all of these Amazon Echoes and Siri and HomePod and all these things are really going to push these companies to make it legitimate.
08:19 Google Home, for example.
08:20 Yeah, exactly.
08:21 I have an Echo and I, you quickly forget how magical it would have been five years ago.
08:27 It's like, it can pick up your speech on another room.
08:32 And usually it's quite, at least it understands what you said.
08:36 It doesn't necessarily do anything smart with it, but it understands you.
08:40 Yeah.
08:41 What are your three favorite things that you do with your Echo?
08:43 Setting up timers and alarms.
08:47 Like wake me up tomorrow at 6.30?
08:49 Yeah, wake me up tomorrow.
08:51 And I almost exclusively do my calendar appointments through Echo because it's quite natural.
08:58 And you can have your shopping bags in your hand and start that I need to do laundry tomorrow.
09:03 Add that to my calendar and stuff like that.
09:06 Yeah.
09:06 Then one of the favorite things is to watch my kids interact with that.
09:11 I think even if I'm a bit skeptical that they will be as big as, let's say, mobile apps or something like that.
09:18 But when you see kids interacting with them, it's just like they really genuinely try to have a grasp on what is going on there.
09:26 And they are really entertained by something like Alexa.
09:30 Oh, sorry.
09:30 Probably someone else.
09:32 Alexa went off there.
09:34 But sing a song.
09:35 And sing a song.
09:37 Or tell a joke.
09:39 And it's kind of funny how kids interact with that.
09:43 And I think it's going to lead something like that.
09:46 Voice is going to be something like a touchscreen in the sense that you expect that feature to be there.
09:53 If you go to a vending machine and you could do something more quickly by saying something to it or be frustrated with it and you expect it to listen to you.
10:05 It's quite the way.
10:06 Like after iPhone, you started touching every screen even if they didn't work that way.
10:13 Yeah.
10:13 That's right.
10:14 After the iPad came out, there were videos of kids touching real magazines.
10:18 Like little two-year-olds going, this one is broken.
10:20 Yeah, exactly.
10:21 Voice will probably be like that.
10:23 It won't listen to me.
10:24 It's a refrigerator.
10:25 It doesn't talk.
10:26 I'm sorry.
10:26 Yeah.
10:28 Nice.
10:29 All right.
10:29 Yeah.
10:29 I think it's definitely going to be an interesting wave.
10:31 And I think it must be fun to work with it.
10:33 Yeah.
10:34 So that's probably a good place to switch over, start talking about the books.
10:38 So you've chosen 10 plus 1 books for us that you feel are pretty essential reading for Python programmers.
10:45 Yeah.
10:46 I don't know if these are like the definitive 10 books to read.
10:51 But I tried to pick up things that are relevant for a newcomer and relevant for someone intermediate.
10:59 And then there are a couple of books that are totally outside of the box of a regular Python programmer.
11:06 Everyone is going to read Python programming at least at some point.
11:10 And everyone probably ends up seeing like starting with the learning Python.
11:18 But I hope I picked a nicer alternative to learning Python in this system.
11:24 Yeah.
11:24 Nice.
11:25 So your first book is Automate the Boring Stuff, Python Practical Programming for Total Beginners
11:30 by friend of the show, Al Swigert.
11:33 Yes.
11:34 I've listened to that episode.
11:35 And today when I was preparing for this and I was checking through the book and I realized,
11:40 hey, this is actually really relevant still to me.
11:44 It's a really good introductory book.
11:47 But then there are chapters like Automating Excel Workflow.
11:51 Or today I discovered that there's a chapter about image manipulation that I will almost
11:58 immediately take into use after this when I go back and start writing stuff.
12:03 Yeah.
12:03 It's really cool.
12:04 It's a very gentle introduction.
12:06 And one of the things I like about it is it has some applied aspects.
12:11 Because a lot of times I feel like the biggest mistake people, books, presentations, whatever,
12:17 make when they're trying to teach programmers is they go, here are all the facts.
12:21 And assume at the end of this, you know, semester course or this book or whatever, you'll be able
12:28 to do something interesting.
12:29 But for now, here's how you define a variable.
12:31 Here's what a string is.
12:32 Here's how you define a loop.
12:33 Here's how you define a function.
12:35 And it's just boring, boring, boring.
12:37 Right?
12:37 Yeah.
12:38 And so this book actually comes with a bunch of little problems you can solve.
12:41 Like one is automating workflows with Excel, which I'm sure resonated well with you, given
12:46 your background.
12:47 Yeah.
12:47 Yeah.
12:47 I think that kind of solve a problem is really essential for someone trying to learn a new
12:55 skill.
12:55 It's especially if you are not a programmer yourself.
12:59 There's this book.
13:00 And I think that many of the Raspberry Pi books are extremely good examples of those.
13:05 Either they are funny or either they solve your real problem.
13:09 And that's a good motivation to go through all that string and list and do all the stuff
13:16 that you end up doing with Python.
13:18 Yeah.
13:19 It's really great.
13:19 So I also had Al recently on the show on episode 106 for his Invent Your Own Computer Games with
13:26 Python.
13:27 So depending on your experience level and what makes you tick, if you want to actually get
13:33 work done, check out the Automate the Boring Stuff to learn Python.
13:35 If you want to write games, like maybe you're trying to get your younger kid who's in high
13:41 school or something interested in Python, maybe the Invent Your Own Computer Games would be a
13:44 good one.
13:45 Yeah.
13:46 You also pointed out that Al has this as a video course on Udemy.
13:50 And so I feel a bit of a kinship to Al here.
13:53 Like he and I both are living a similar life.
13:56 Like he writes the books and has the courses.
13:57 I do the podcasts and have the courses.
14:00 And so, yeah, if you want to take this as a video course version, that's available as
14:04 well.
14:04 Yeah.
14:04 Yeah.
14:05 Nice.
14:05 Okay.
14:05 And then the next one is actually a really short book, right?
14:08 Yeah.
14:08 This is something that I, when I was learning, was on my desk.
14:12 Also often I carried with it because it's kind of a, I had trouble wrapping my head around
14:19 Python lists.
14:21 There was something really, really, I couldn't tell when the method was mutable and when it's
14:29 going to create me a new one.
14:30 And then that kind of stuff is, and it's kind of a thing that you really need to be
14:35 to just put it in your long-term memory.
14:37 It doesn't.
14:38 Right.
14:38 Like sorted of list versus list.sorted.
14:41 Things like that.
14:42 Yeah.
14:42 Exactly.
14:43 So the book you're referencing is Python Pocket Reference, Python in Your Pocket by Mark Lutz.
14:49 Yeah.
14:49 Yeah.
14:49 Sadly, it's like two or three years old already.
14:53 And I think it's Python 3.3.
14:55 If, oh no, no, actually it's Python, Python 3.6 is as well as covered.
15:01 So.
15:01 Oh, great.
15:02 Yeah.
15:02 Yeah.
15:03 Yeah.
15:03 And most of the stuff, like long as it's Python 3 hasn't actually changed.
15:07 Yeah.
15:08 That much.
15:08 It's more additive rather than changes too.
15:10 Yeah.
15:10 Yeah.
15:11 And it's always with this kind of a technical books, there's some sort of risk of
15:18 obsolescence if it's tied to a certain version of something.
15:22 And the books that I chose here should be so that they are either up to date or then are
15:30 timeless.
15:31 Yeah.
15:32 Yeah.
15:32 Yeah.
15:32 There's a few books in this list that are definitely timeless and then more timeless than others.
15:37 But yeah, this is really nice.
15:39 Like I, I'm pretty good at memorizing these obscure details of programming languages and whatnot.
15:45 But you know, the one that I really need a pocket reference for is JavaScript.
15:49 I'm always like, God, how do I iterate an array correctly in JavaScript again?
15:54 And this, like, it's always, I feel like I'm always Googling for JavaScript stuff, even though
15:58 I've been doing it for years.
15:59 But Python, yeah, this is cool for people learning Python.
16:01 Yeah, exactly.
16:02 I have the JavaScript one and CSS one.
16:05 And I, the only thing is that JavaScript and CSS, they are moving, moving so fast that
16:12 you're probably learning something that you don't need to learn when you're trying to
16:17 learn.
16:18 Yeah.
16:18 Yeah.
16:19 So then the next one you picked, I think, is a really interesting book as well.
16:23 And that's the Python Cookbook by David Beasley and Brian Jones.
16:27 Yeah.
16:28 It's, I had it before and I don't know where I lost my copy, but it was really essential.
16:35 So I think when I started learning Python, Stack Overflow didn't exist at all.
16:40 So this kind of a ready-made recipe for your program that you can just drop in.
16:46 Yeah.
16:46 So the idea is that it's broken into general areas like stuff to do with strings, stuff to
16:51 do with data structures, numbers, iteration, files.
16:55 And then for each one of these, there's maybe 15 to 20, how do I do this?
17:00 How do I iterate over a fixed set of records?
17:02 How do I print a file to the console?
17:05 How do I communicate with serial ports?
17:06 How do I print bad file names?
17:09 And so on and so on, right?
17:10 Yeah.
17:11 And this was really essential back then.
17:13 Nowadays, it would be a good reference, but often you just type something into Google
17:21 and end up in Stack Overflow.
17:23 Sure.
17:24 So I think this is interesting coming at it from two ways.
17:26 Like the way that you're talking about where you type something into Stack Overflow is, I
17:32 know I want to like make a temporary file in directory.
17:36 So you type maybe that into Google and it probably finds something on Stack Overflow and you're
17:40 kind of good.
17:41 But it could be that you're coming from a place of less experience and you want to learn
17:47 how, you kind of want to get a feel for it.
17:49 What can I do with the file system and files in Python?
17:52 Yeah.
17:52 You could go through these 15 or 20 things.
17:54 You're like, whoa, actually you would be pretty capable if you could almost treat each one
17:59 of these as a project.
18:00 You know what I mean?
18:01 Like people who are new often have a hard time finding something concrete to practice.
18:06 Yeah.
18:07 And it seems like there's, you know, hundreds of little practices with the solution right
18:11 here.
18:11 And I think that's pretty nice.
18:12 Yeah.
18:13 And also kind of a guaranteed quality of these.
18:16 When you Google and Stack Overflow stuff, you may end up.
18:21 Yeah.
18:21 Well, you also waste a lot of time on Stack Overflow because they're trying to do a thing,
18:25 but they're trying to do it slightly differently than you were trying to do it.
18:28 So it doesn't quite fit.
18:29 You know what I mean?
18:30 Yeah.
18:31 And especially if you're new to technology, you really can't tell good answers from bad
18:36 answers.
18:37 And it doesn't mean that the most upvoted one is the best one.
18:41 Yeah.
18:42 Sometimes you're like, if I could just uncheck that accepted answer because you know the next
18:47 one's better.
18:47 Yeah, exactly.
18:48 It's one of those first steps of understanding technology is to start understanding which
18:54 of the Stack Overflow questions are bad and which ones are good.
18:57 Yeah.
18:58 I think, you know, looping it back to book one, I'm pretty sure Al Swigert shows you like
19:02 how to take like a traceback error and use Google to find the answer for that.
19:08 How to fix it.
19:09 Yeah.
19:10 And that's one of those things that has really changed in 20 years.
19:13 It's like you were completely screwed 20 years ago if something like that happened and it
19:20 didn't show up on Altavista or something.
19:22 It's like the way of working has changed and I think it's really cool and it's sometimes
19:28 you lose the sight of how much we have progressed and how much easier stuff is.
19:34 Yeah, it's for sure.
19:35 It's not only good, but it's mostly good.
19:38 It's mostly good.
19:40 I agree.
19:40 It's mostly good.
19:42 This portion of Talk Python to Me has been brought to you by Rollbar.
19:45 One of the frustrating things about being a developer is dealing with errors.
19:49 Ugh.
19:49 Relying on users to report errors, digging through log files, trying to debug issues, or getting
19:54 millions of alerts just flooding your inbox and ruining your day.
19:58 With Rollbar's full stack error monitoring, you get the context, insight, and control you
20:02 need to find and fix bugs faster.
20:04 Adding Rollbar to your Python app is as easy as pip install Rollbar.
20:09 You can start tracking production errors and deployments in eight minutes or less.
20:13 Are you considering self-hosting tools for security or compliance reasons?
20:17 Then you should really check out Rollbar's compliant SaaS option.
20:20 Get advanced security features and meet compliance without the hassle of self-hosting, including
20:25 HIPAA, ISO 27001, Privacy Shield, and more.
20:30 They'd love to give you a demo.
20:32 Give Rollbar a try today.
20:33 Go to talkpython.fm/Rollbar and check them out.
20:36 The next one is switching us over to working with data, mostly from a data science, not
20:43 database perspective, with Python for data analysis, data wrinkling with Pandas, NumPy, and
20:49 IPython with Wes McKinley.
20:51 McKinney.
20:52 Sorry, Wes.
20:52 Yeah, exactly.
20:54 And I thought this was something like that.
20:56 It was already years old, but it seems to be that there's a new version coming in September.
21:02 So IPython stuff is updated with also Jupyter stuff and all that kind of stuff.
21:09 So this is very good for most of the machine learning, deep learning, and that kind of stuff
21:16 is most really boring, cleaning up and finding data.
21:21 And this covers that part.
21:23 You need to know.
21:25 Right.
21:25 And that, to me, is the primary goal of Pandas, right?
21:28 Yeah.
21:29 Pandas is all about loading up semi-structured data, putting it into a consistent structure,
21:35 maybe reorganizing it like a group by or something like that, fixing the bad data or filtering
21:41 out the bad data and getting it ready to then go do a thing with, right?
21:45 Yeah, exactly.
21:46 And it's like filtering out noise and either filtering out the missing data or adding default
21:54 values for that.
21:55 And that kind of stuff that is, you really need to know is, I think if you come somewhere from
22:01 like R, that's like the forte of R is cleaning up data and putting it up in a, let's say,
22:09 table structure.
22:10 And this is the same thing for Python and very important when getting into machine learning
22:17 and all kinds of data analysis and maybe data visualization tasks.
22:22 Yeah.
22:23 Yeah.
22:23 It's pretty cool.
22:23 So it starts by introducing you to IPython and Jupyter and NumPy and Pandas.
22:29 And then it really talks about like loading, cleaning, transforming, merging, reshaping data,
22:36 which it's, you know, that is so, so powerful with that and even some visualization stuff.
22:42 So yeah, it's pretty cool.
22:44 If you got to do a lot of that kind of thing, then yeah, Pandas is a good place to look.
22:49 And this book seems like a really good one.
22:51 It's from Wes McKinney, who is the creator of Pandas.
22:53 So that's a good, definitely a definitive source of knowledge for that library.
22:58 Yeah.
22:59 Nice.
22:59 Yeah.
22:59 Okay.
23:00 Yeah.
23:00 So the next one that we're going to talk about is not as new as the 2016 version of that last
23:06 book.
23:07 It's called Working Effectively with Legacy Code.
23:10 What's the story of this one?
23:11 This is kind of like a, more like a book that teaches you how to think about code.
23:18 And in a realistic situation, you rarely get to start something new.
23:22 Usually, if you are done consultation like me, it's like you end up somewhere that it's already
23:29 late and already not delivering what should be there.
23:33 And this is answering questions.
23:37 What can you do about that?
23:38 What can you do there?
23:39 And it's like, comes with the definitions of what is legacy code?
23:44 It's bluntly defines legacy code as something that doesn't have a test.
23:48 And then it goes on like slowly teaching you how to move from that zero state to something
23:58 that is almost enjoyable, building up, decoupling the system, building up unit tests.
24:04 Yeah.
24:04 I feel like this book is certainly required reading, even though it's not based on Python.
24:10 I think it does some C++ and some Java.
24:13 Maybe there's even a C Sharp version.
24:15 I can't recall.
24:15 But this book is kind of part of a trifecta of the working with effectively legacy code,
24:22 the original refactoring book by Martin Fowler.
24:26 Yeah.
24:26 That's an excellent book.
24:27 Yes.
24:28 Yeah.
24:28 Yeah.
24:28 And then the agile principles, patterns, and practices by Robert C. Martin.
24:33 Like those three kind of come together to attack like the same problem from multiple directions.
24:38 And the concept that I still remember, so I'm looking here at my Amazon page for this book,
24:43 and it says, you purchased this item on June 10th, 2005.
24:46 So it's not a new book, but it's a, it's really, like you said, does teach you to think in interesting
24:52 ways about systems, especially systems, which they called brownfield systems, not greenfield,
24:59 where it's like, you know, here's half a million lines of code.
25:02 It's been working for 15 years.
25:04 It's mission critical.
25:05 Please, you do not break it, but you have to now take it over and add features to it.
25:10 Like, what do you do?
25:11 Yeah.
25:12 So there's all these interesting ways of like, how do you get it under test?
25:16 How do you create what, the biggest thing that comes from this one in my mind is this
25:21 concept of seams.
25:22 How do you create these seams where this huge monolithic brittle thing becomes flexible in
25:28 the certain ways that you need to extend it?
25:31 And how do you carve off these little subsystems that change frequently that are very maintainable
25:36 without breaking the thing?
25:38 I think that's just really very interesting.
25:40 Yeah.
25:40 I really like the notion of seam.
25:43 It's like, oh, this, it has a name.
25:47 I've been doing this 10 years, but I didn't know this, this technique had a name.
25:52 It's cool.
25:53 Yeah.
25:53 Here's this thing that is inflexible, but in this one little axis, it is flexible and that's
25:58 what I needed.
25:58 So it's good.
25:59 Right.
25:59 Yeah.
26:01 Yeah.
26:01 So definitely recommend, I actually recommend all three of those books, but working effectively
26:05 with legacy code.
26:06 Well, it's definitely something that will change the way that you think about programming
26:11 and especially large old systems.
26:13 Yeah.
26:14 Yeah.
26:14 And that's where we all end up at some point doing old big systems.
26:19 Yeah, that's right.
26:20 We all, we all end up there somehow.
26:22 All right.
26:23 The next one is a perfect carry on from this concept of testing, but zooming forward in Python
26:29 to something that's just now being released by my friend and Python Bytes co-host, Brian
26:36 Hawken.
26:36 Yeah.
26:36 Python testing with pytest.
26:38 Yeah.
26:38 It's, I bought it and I, I started reading it.
26:42 It is one of those books that after each chapter, you need to go and change something in your code.
26:48 I've used pytest before.
26:49 Like I've been doing it wrong for years.
26:51 Oh my gosh.
26:51 I got to put this down and go fix it right now.
26:53 Yeah.
26:54 I like the pytest philosophy compared to like a unit test and knows it's more PyTonic.
27:00 And reading this book, I realized, oh, I've used like 10% of the possibilities there.
27:06 It's like, and it's quick read.
27:08 You probably will read it through in one evening or two.
27:11 And it's, if you are not like a super familiar with pytest, it will probably make you change
27:19 your project structure and make it more pytestable.
27:23 Yeah.
27:24 That's awesome.
27:24 Yeah.
27:25 Brian did a really good job with this.
27:26 And so he talks about writing test functions, using the search stuff, all the standard things,
27:31 you know, fixtures, but also things like the tempter fixture, the monkey patching stuff,
27:38 the doc test namespaces and plugins, like finding and using the pytest plugins, even how to create
27:46 your own.
27:46 So yeah, very, very cool stuff.
27:48 Yeah, exactly.
27:48 All right.
27:49 The next one we have is sort of the other side of the Panda story.
27:54 Once you have the data, how do you get going?
27:56 I would say this is one of the hottest developer software areas around just with machine learning.
28:04 So the book is hands-on machine learning with scikit-learn and TensorFlow.
28:07 Yeah.
28:08 I had like half a dozen of these books.
28:12 And I think this one was like the best companion to all those online courses that everyone probably
28:19 go through, either the Coursera one or the Udacity one.
28:23 Or one of my favorites is course.fast.ai.
28:27 It's like you go through the course and then you have a like a vague understanding of the
28:34 concepts.
28:35 And then you need to read the book.
28:37 There's like the definitive books like the deep learning by Ian Goodfellow or the elements of
28:45 statistical learning.
28:46 But they probably are too heavy to start with.
28:51 This is kind of goes through like many of the algorithms quickly.
28:56 It has like a practice questions and is all around good reference to accompany you with learning through trial and error and through perhaps some online course.
29:11 And well, this is probably one of those books that wouldn't appear on this list maybe in a year or two.
29:18 There probably are going to be many, many other books.
29:21 But this one was like the books that have come out this year.
29:26 I think this one was my favorite on this topic.
29:29 It's really cool.
29:29 So it has like the fundamentals of machine learning for the first part.
29:33 And it just goes into like what is an end to end machine learning project look like, classification, models, or vector machines, decision trees, all that kind of stuff.
29:42 And then it gets into actual neural networks and deep learning things with TensorFlow and training deep neural networks and stuff like that, which is really cool stuff.
29:52 Even how to just like do distributed computation of TensorFlow across multiple machines and GPUs and all kinds of good stuff.
30:00 It sounds really, really fun.
30:01 All right.
30:02 Do you get to do any of this kind of stuff with your chatbots?
30:05 I've mostly done stuff with Finnish language.
30:09 Like I have this huge data set of Finnish cursing.
30:13 And I've been going through that with like Word2Weck and other kinds of machine learning and clustering algorithms to see what kind of patterns I can find.
30:25 And it's kind of a funny way to look at data that makes you lose your belief in other human beings.
30:37 But also it really, really gets you nice patterns around what kind of things make people curse.
30:44 What are people really passionate about?
30:47 Well, it's this kind of stuff that, well, probably would get moderated in a forum.
30:54 It's like any type of day-to-day politics.
30:58 But then there's sports and human relationships and stuff like that.
31:04 Well, you could probably, well, this is Finnish.
31:07 So you could probably follow Finnish sports team, how they are doing through how people are cursing.
31:15 They are either cursing because we are losing or cursing that, well, we won this time.
31:22 Yeah.
31:23 Or how are they expressing their extreme emotion in a positive or negative way?
31:29 Well, it's mostly about the same.
31:32 Yeah, it's tough.
31:33 I'm sure it's actually a really tricky natural language processing problem.
31:38 Yeah, it's something that I have a data set of like 100 million Finnish tweets that contain a curse word.
31:45 And I'm trying to figure out a way to make that somehow public and usable to everyone.
31:51 It's really interesting data.
31:52 That is actually pretty cool.
31:53 Nice.
31:55 All right.
31:56 All right.
31:56 So the next one that we're going to talk about is About Face, The Essentials of Interactive Design by Alan Cooper and some co-authors.
32:05 And this one had been on my list, my reading list for a very long time.
32:09 I haven't read it.
32:10 And it's kind of grouped in there with, you know, Stephen Krug's Don't Make Me Think, 100 Things Every Designer Needs to Know About People and the Design of Everyday Things.
32:19 A couple of those are about physical things, but this is about interface design, right?
32:23 Yeah, this is interface design.
32:25 And it's, well, it starts with like on the conceptual level, how to design systems.
32:31 That's kind of probably only good to know if you're a Python programmer.
32:37 But then it goes on like stuff like that are like immediately usable or that make you think stuff like that.
32:47 Don't make stupid error messages.
32:49 Make the software that you're creating.
32:51 Think it as like a service person.
32:55 You don't want to forget things that you have promised to a user.
32:59 You don't want to pester the user with unnecessary questions all the time.
33:04 And you don't lose your customer stuff.
33:07 If they give you something, you don't lose that.
33:10 It has really, really good metaphors of how your program should be that it solves the user problem.
33:19 Not only your problem as a business or as a developer.
33:23 Right.
33:23 And it has a, I think this might be one of the first places where the concept of personas came from.
33:29 I think this is the origin of that, but I'm not 100% sure.
33:34 Yeah.
33:34 So the idea is to break up the users into prototypical groups and then try to think through the interacting with your software, whether it's a website, it's an app, it's whatever.
33:46 Think through using it.
33:48 I guess you could even do it for an API like an open source library if you want.
33:52 Yeah.
33:52 Yeah.
33:53 Think through like working with it with that persona, the various personas and like, what are their goals?
33:57 What do they want out of this?
33:58 What are they bringing to the table?
34:00 How are they going to work with it?
34:01 And things like this.
34:02 Yeah.
34:02 Yeah, exactly.
34:03 Thinking your software through your users point of view.
34:07 Yeah.
34:07 That sounds really cool.
34:08 Yeah.
34:09 It's something that I revisited lately.
34:11 I had read it like 15 years ago when it was first or second edition.
34:16 And it's really good book.
34:18 It's, it has really good, like a one sentence summarizations of what makes software good and not only the user interface good.
34:26 Yep.
34:26 And this one is from September, 2014, the fourth edition.
34:31 So very nice.
34:32 Yeah.
34:32 It's up to date to iOS seven level or something like that.
34:37 So it's, it has pretty recent UI screenshots in there.
34:42 Nice.
34:42 And then the next one that you chose is more of a high level thinking about stuff, not necessarily software in particular, but even politics and society and governments and whatnot.
34:56 It's thinking in systems, Primer.
34:58 Primer, take your pick.
35:00 Yeah.
35:00 By Donald L.H.
35:02 Meadows.
35:02 It's, I think it's one of the lesser known books, but it's one of those.
35:06 I think the classic that everyone thinks is, is the fifth discipline by Peter Senge.
35:12 And it's, I think it's kind of a, you step an abstraction level or two up from your code.
35:21 And this is kind of a stuff that you end up worrying about.
35:24 It's like a very simple systems that have like an actors and they have interfaces.
35:30 Then there are stuff in the system that make it work as an entity.
35:36 And it doesn't need to be anything complicated.
35:41 It's it can be like a bathtub that has an incoming water flow and outgoing water flow.
35:47 It can be a store inventory.
35:48 You have stuff stolen from you.
35:51 You have the stuff that is delivered from the factory.
35:55 And then there are the customers that buy from you.
35:58 Or if you have fresh produce, something may go bad before it's sold and stuff like that.
36:05 And you end up in those systems.
36:09 You easily end up in situations that you can't really predict or fix with any kind of a simple solution.
36:19 You need to consider that.
36:22 What are the delays?
36:24 What are the feedback loops?
36:25 What is the system doing itself?
36:27 It's not just that someone who is making sure that store has everything.
36:33 It's not their smartness or stupidity that makes the store run out of beer on a hot summer day.
36:40 It's all kinds of interfaces that convenience store has to other people and even weather that affect everything.
36:50 Yeah.
36:50 It's really an interesting way to say, look, sometimes you need to go to a higher level and see all the things moving together.
36:58 And you said you think this can apply to software systems or human systems, right?
37:04 Yeah, exactly.
37:04 It's kind of a...
37:06 I've done like...
37:07 I've mostly been in pretty small companies lately.
37:11 But I've also gone to big, big IT departments to like cloud consultation and stuff like that.
37:18 There are a thousand people that everyone is smart when you take them apart.
37:23 But then when they work together with all the systems that have piled up during like 20 years, it's really slow.
37:33 And you sometimes end up stuff that you really can't understand.
37:37 Why?
37:38 If you ask anyone, they will say that, well, this is not an optimal way of doing things.
37:44 When I was young, I was like a gung-ho nerd going there and telling them, hey, you need to fix it like this and this and this.
37:53 But you can't really, really do that unless you go like a step up or step two and ask, is there something that I don't know?
38:04 If this ticketing system makes everything last two weeks, whenever I want something, it takes two weeks.
38:12 These people are not stupid.
38:14 You understand that.
38:15 So what is it there you can do to perhaps make things faster?
38:21 Why does it take two weeks for me to get a new keyboard when right across the street there's a store that sells the keyboard I want?
38:26 Yeah, exactly.
38:27 Yeah.
38:28 When you have big organizers and those things start adding up.
38:33 Yeah, yeah.
38:33 There's a nice quote from the book that says, Pretty cool.
38:53 Yeah.
38:54 Yeah.
38:54 I like the book.
38:55 And it's one of those like one evening or two evening books.
38:58 And then you can, if this is something you really like, there are a lot of books about systems thinking, this area in general.
39:06 And also design thinking, which is kind of a perhaps the more fashionable choice nowadays compared to systems thinking.
39:15 Yeah.
39:15 The next one that you chose is somewhat related to this called Thinking Fast and Slow by Daniel Kahneman.
39:21 Yeah.
39:21 And this is a really cool book.
39:23 I haven't read it.
39:24 I've sort of put it on my list of things to read, but I haven't got to it.
39:28 Tell us about it.
39:29 Yeah.
39:29 This is the word irrational is not the right word, but it's about people can't help themselves.
39:36 They have like this fast thinking system, which is evolutionary creation of like you detect the danger and you need to react immediately.
39:48 I heard a noise.
39:49 Is that a lion or a squirrel?
39:50 Yeah, exactly.
39:51 Stuff like that.
39:52 There's this slow deliberate side of you that can solve mathematical puzzles and can learn other languages and make programs and stuff like that.
40:04 And it's kind of pairing with the other one is also the about face and thinking in systems.
40:10 It's kind of you need to understand people and people aren't as like as left brain as our industry often thinks.
40:21 Yeah.
40:22 You are a philosophy major, right?
40:23 A lot of the people in the like Hobbes and those guys, they talked about like the rational person versus the irrational.
40:32 And they often treated people as just rational thinkers.
40:36 A lot of the economic policy and capitalism and John Keene's and those types of guys, they always say, okay, people are going to act rationally for themselves, but maybe not, right?
40:48 No.
40:49 Yeah, it's exactly.
40:50 And it's not like the rational means that you follow the same rules all the time.
40:55 And it's this book is full of examples that show that no, it's really easy to trick people and it takes a conscious effort.
41:04 And sometimes it doesn't even help you.
41:07 It's just like you can't help yourself that if someone says that this is worth $1,000 and you know that it's not true.
41:16 That's called a price anchor.
41:17 You know that it's not even close to that.
41:20 And even knowing that and even knowing the effect, you still have the $1,000 there affecting your evaluation of the price.
41:31 Right.
41:31 Like here, this thing is normally sold for $1,000, but it's on sale for $599.
41:35 Yeah.
41:36 You can trick people to make them think it's a good deal versus, well, it's just for $599.
41:41 They might go, that's not a good deal.
41:42 It's way too expensive.
41:43 Yeah.
41:43 And when you see the price $599, you start thinking through your needs and your values.
41:48 But when you contrast it with the $1,000 going rate and it's like, oh, well, it's practically free.
41:57 Can I buy it?
41:57 Yeah.
41:58 The craziest example that I can think of is Black Friday, the crazy shopping experience after Thanksgiving in the U.S.
42:04 Yeah.
42:05 Yeah.
42:05 So bring this back to software.
42:08 Like what lessons can we take from this for helping like users, helping designer software, things like that?
42:14 All these books like build up like a toolbox of things that are outside the like immediate day-to-day programming.
42:23 And it's really good to understand people.
42:26 Even if you are writing like backend software, you are still writing software for people.
42:31 And people are not, well, you are serving them.
42:35 You are in a service business.
42:36 You need to be the like really good waitress that serves them with the stuff that they need, with the stuff that solves their problem.
42:46 Right.
42:47 Even if they don't necessarily know they need it, maybe.
42:48 Yeah.
42:49 That's like a really good software stuff that solves a problem that user is not even aware of.
42:56 This portion of Talk Python is brought to you by us.
42:59 As many of you know, I have a growing set of courses to help you go from Python beginner to novice to Python expert.
43:04 And there are many more courses in the works.
43:07 So please consider Talk Python training for you and your team's training needs.
43:11 If you're just getting started, I've built a course to teach you Python the way professional developers learn by building applications.
43:18 Check out my Python jumpstart by building 10 apps at talkpython.fm/course.
43:22 Are you looking to start adding services to your app?
43:25 Try my brand new consuming HTTP services in Python.
43:29 You'll learn to work with RESTful HTTP services as well as SOAP, JSON, and XML data formats.
43:34 Do you want to launch an online business?
43:36 Well, Matt McKay and I built an entrepreneur's playbook with Python for Entrepreneurs.
43:40 This 16-hour course will teach you everything you need to launch your web-based business with Python.
43:45 And finally, there's a couple of new course announcements coming really soon.
43:49 So if you don't already have an account, be sure to create one at training.talkpython.fm to get notified.
43:54 And for all of you who have bought my courses, thank you so much.
43:58 It really, really helps support the show.
44:00 Those were the 10 books.
44:02 And then you gave us a plus one, right?
44:05 Yeah, this plus one is like, I think everyone should have a fun book outside your...
44:11 Outside your specialty, right?
44:12 Yeah, outside your specialty, you should have one book.
44:15 One fun book.
44:16 And mine is Learn Your Haskell for Great Good.
44:19 It's like, I'm fascinated by Haskell.
44:22 I really don't understand anything about it.
44:24 But it's this book, I occasionally pick up and read a chapter there, look at more dads and look at higher order functions, which is also...
44:34 That is very applicable to any kind of a Python application.
44:38 But this is kind of a...
44:40 You probably have your own fun book that you go every now and back to every now and then.
44:45 And this is mine.
44:47 Yeah, this is really cool.
44:48 It's illustrated.
44:50 It's supposed to be funny, but it also is supposed to teach you Haskell.
44:53 And I think from a programming perspective, there's real value in knowing a language that's really different from what you do day to day.
45:00 Yeah.
45:01 And it's...
45:01 Right.
45:01 I believe that you also need to like know pretty theoretical stuff.
45:07 And I...
45:08 Well, somebody might disagree with me, but I think Haskell is mostly a theoretical thing.
45:13 It has a nice type system and it has nice abstractions on side effects and stuff like that.
45:20 But it's...
45:22 I probably wouldn't write production code with it.
45:25 Sure.
45:25 The closest thing that I learned and studied and know a little bit close to this is Lisp or Scheme.
45:31 And I would not go write anything in that at all.
45:36 There's like four languages I would choose before I would pick that language for a thing at least.
45:41 But it really opened my eyes to, oh, the way we can write programs and think through solving problems algorithmically is way broader than I thought.
45:51 Yeah.
45:51 One of those Scheme, Lisp, or Haskell are really good at that.
45:56 My programming languages 101 was an AFL.
46:01 I don't know if you remember that language back from the early 90s.
46:05 Which language?
46:05 AFL.
46:06 Yeah.
46:06 I do remember the name, but I don't know anything about it.
46:09 Yeah.
46:09 It's like object-oriented programming due to the max.
46:14 It's like all sorts of things that you have multiple inheritance there.
46:19 One of the really cool things about that language was like a design by contract.
46:25 It had like a language level support for assertions in classes like preconditions for functions and postconditions for functions and invariants for classes and all that kind of stuff.
46:37 It's probably something you wouldn't use today, but it gives you a nice perspective on how other people think of the problems that we face as a programmer.
46:47 Yeah.
46:48 Absolutely.
46:49 All right.
46:49 So, learn you a Haskell for great good.
46:51 Very nice.
46:53 Okay.
46:53 So, this has been a very interesting list.
46:56 And everyone has their own list of things that they really like.
47:00 And certainly, many of these books are on my list as well.
47:04 I would say, if people are listening, check out the episode page and go to the bottom.
47:10 There's a discussion section.
47:11 Put your favorite book or two on there, and we can have a really nice list if everybody comes and contributes something that's not there yet.
47:18 I think that'll be lots of fun.
47:20 Yeah.
47:20 Yeah, nice.
47:21 Okay.
47:21 So, before we get out of here, let me ask you the two questions.
47:24 If you're going to write some Python code, what editor do you run?
47:27 I used to be a solid Vim guy.
47:31 When I'm not coding, I used to be like, this can handle a broken terminal after a nuclear war.
47:39 I can really do anything with this.
47:42 And then I realized maybe this is not a reason to choose a programming environment in 2010.
47:52 And then I started learning things.
47:54 When doing Java, I really enjoyed IntelliJ.
47:57 I've also used IntelliJ stuff like resharper on .net.
48:03 And it was quite easy to jump to PyCharm.
48:07 And I'm now a PyCharm convert.
48:11 I really use it.
48:13 That's the only thing that I open up when doing Python.
48:17 I've tried Visual Studio Code.
48:20 I really liked it.
48:22 But I already had familiarized myself with PyCharm.
48:25 Cost of change was not justified, I would say.
48:29 Yeah.
48:30 I hear you.
48:30 All right.
48:31 Go PyCharm.
48:31 That's my favorite as well.
48:33 And notable PyPI package.
48:35 Yeah.
48:36 Well, I had to, in my mind, it's like the old one, the natural language toolkit for Python,
48:43 which solves many problems, which solved many problems like 20 years ago that people are
48:49 struggling today with any kind of text processing and splitting text to sentences or paragraphs
48:56 and stuff like that and any multiple languages.
49:00 But the one that I picked today is called Newspaper.
49:04 I'm so fascinated with this one right now.
49:08 It's just like I was writing one of those web scraper things a couple of months back.
49:13 And then I just, there must be something that you could do with newspapers directly.
49:19 And it's like a full-blown system for picking up newspaper, like articles from a newspaper page.
49:29 And then when you have the article, pick up its title, its main text, pictures, and stuff like that.
49:36 I'm flipping through the GitHub page here.
49:38 This thing is incredible.
49:39 There's some things I'm like, oh, that's pretty neat.
49:42 I could probably use that someday.
49:43 This just makes me want to try it, like straight up.
49:45 Yeah, it's like one of those Python comes with that batteries included thingy.
49:50 This just made me happy when I found this.
49:53 This is exactly, it's like the batteries included and you don't need to write your own web scraper again for the thousandth time.
50:01 Yeah, yeah.
50:02 So let me give people a sense of this.
50:04 So I'll put the link, of course, in the show notes.
50:06 But you go and you install it and you say, from newspaper import article.
50:10 And then you say, create an instance of the article.
50:12 And you give it a URL, like some news article, literally.
50:16 Give it like the page of that.
50:17 Say download.
50:18 You can get the HTML.
50:19 You can parse it.
50:20 And it has a list of authors.
50:22 Publish date.
50:23 It has the date.
50:24 You can say, what's the top image?
50:26 You can run an NLP processing on it.
50:29 It has the keywords and a summary and all sorts of craziness.
50:32 It's really, really fascinating.
50:34 It doesn't work as well on all web pages.
50:37 But it's really, really impressive that you even have something like this.
50:41 Cool.
50:41 All right.
50:42 That's a really great recommendation.
50:43 I've never heard of it.
50:44 So thank you.
50:44 Yeah.
50:45 All right, Timo.
50:45 It's really fun to talk about these books and reminisce on some old ones and learn about
50:49 some new ones for me.
50:50 So thanks for being on the show.
50:51 Yeah.
50:52 Thank you.
50:52 You bet.
50:53 Bye.
50:53 This has been another episode of Talk Python to Me.
50:57 Our guest has been Timo Kola.
51:00 And this episode has been brought to you by Rollbar and us right here at Talk Python Training.
51:05 Rollbar takes the pain out of errors.
51:07 They give you the context and insight you need to quickly locate and fix errors that might have
51:12 gone unnoticed until your users complain, of course.
51:15 As Talk Python to Me listeners, track a ridiculous number of errors for free at
51:20 rollbar.com slash Talk Python to Me.
51:22 Are you or a colleague trying to learn Python?
51:25 Have you tried books and videos that just left you bored by covering topics point by point?
51:29 Well, check out my online course, Python Jumpstart by Building 10 Apps at
51:33 talkpython.fm/course to experience a more engaging way to learn Python.
51:38 And if you're looking for something a little more advanced, try my WritePythonic code course at talkpython.fm/Pythonic.
51:45 Be sure to subscribe to the show.
51:48 Open your favorite podcatcher and search for Python.
51:50 We should be right at the top.
51:51 You can also find the iTunes feed at /itunes, Google Play feed at /play,
51:57 and direct RSS feed at /rss on talkpython.fm.
52:01 This is your host, Michael Kennedy.
52:03 Thanks so much for listening.
52:04 I really appreciate it.
52:05 Now get out there and write some Python code.
52:07 Now get out there and write some Python code.
52:07 Thank you.
52:07 Thank you.
52:08 Thank you.
52:08 Thank you.
52:08 Thank you.
52:09 Thank you.
52:10 Thank you.
52:10 Thank you.
52:10 Thank you.
52:11 Thank you.
52:12 Thank you.
52:13 Thank you.
52:13 Thank you.
52:13 Thank you.
52:13 Thank you.
52:14 Thank you.
52:15 Thank you.
52:16 Thank you.
52:17 Thank you.
52:18 Thank you.
52:19 Thank you.
52:20 Thank you.
52:21 Thank you.
52:22 Thank you.
52:23 Thank you.
52:24 Thank you.