#186: 100 Days of Python in a Magical Universe Transcript
00:00 The key to making anything a habit, including learning a program, is to make it fun.
00:04 That's exactly what Annalena Pupkes did with her 100 Days of Code Challenge.
00:09 She created a magical universe where Python-derived creatures and castles live.
00:13 Join us on this episode as we explore some of the Python concepts she encountered on her journey,
00:18 as well as how she made her way to Microsoft Research in the UK, where she's doing an AI residency.
00:24 This is Talk Python to Me, episode 186, recorded November 13th, 2018.
00:30 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
00:50 This is your host, Michael Kennedy.
00:52 Follow me on Twitter, where I'm @mkennedy.
00:54 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 This episode is brought to you by Coder.com and us at Talk Python Training.
01:06 Annalena, welcome to Talk Python.
01:09 Hi. Nice to meet you.
01:10 Nice to meet you, as well. It's so great to have you here.
01:12 And I'm really looking forward to our topics.
01:15 We're going to talk about your 100 Days of Code project and its interesting angle.
01:19 And then a little bit about what you're doing with machine learning as well, because I think that's super interesting.
01:25 But before we get to the stories, let's start with yours.
01:29 How did you get into programming in Python?
01:30 So I got into programming way too late, in my opinion.
01:33 So I was studying cognitive science in my undergraduate degree in order to become a neuroscientist.
01:39 And at the very end of the program, I attended an intro to machine learning lecture.
01:43 And I became so fascinated by the idea that you could have algorithms that are able to learn from data and detect patterns and then even make predictions on data that I decided to switch fields.
01:56 So I looked for a computer science graduate program that would allow me to focus on machine learning.
02:02 And of course, I had to start programming.
02:05 So I looked for a suitable programming language.
02:08 And when I tried out Python, I knew that it was the perfect choice.
02:12 So I really liked that it was so easy to get started with, that it has such a nice syntax.
02:17 And it's, yeah, it's just so readable.
02:21 Yeah, it's, I think it's very approachable for beginners because it doesn't have all those symbols that look super scary, right?
02:26 You're like star, star, you know, void, star, star.
02:30 You're like, whoa, what is this crazy stuff, right?
02:32 I agree.
02:33 Yeah.
02:34 Yeah.
02:34 And since then, I've been working with Python almost all the time.
02:37 So it's really nice.
02:38 Yeah, that's great.
02:39 I think, I don't know if you were just very smart or very lucky, but having chosen Python is perfect for machine learning, right?
02:46 I mean, it's exactly where most of the action is these days, right?
02:50 What other languages were you considering?
02:51 Oh, that's a good question.
02:53 I don't even remember.
02:54 My brain is like a thief sometimes.
02:56 So I'm sorry for that.
02:58 I think I did my research and there were quite a, I think I looked into R for a while, which was popular for data science.
03:06 But Python is just like a general purpose programming language.
03:12 And I just liked it a lot.
03:15 So I decided to stick with it.
03:16 Yeah, I think that's a really great choice.
03:19 So you were studying cognitive science previously.
03:22 And then you decided to just jump into programming.
03:26 How hard was that transition?
03:28 Really hard?
03:29 Was it scary?
03:30 Well, yeah, it was really scary since I started the computer science graduate degree, which is usually not intended for people who have no idea about coding.
03:40 I would think of a computer science graduate degree.
03:45 Yes, exactly.
03:46 So I was lucky that I found a graduate program that you could do without a corresponding undergraduate degree.
03:53 But in the beginning, I had to do so many things at my classes.
03:57 And I had all the assignments that required coding, but I had to study the coding part at the same time.
04:04 So I basically just left out all the classes that weren't using Python and just used the ones such that I could focus on studying one programming language.
04:15 But it was hard.
04:16 But it was definitely worth it.
04:18 So it was the perfect decision for me.
04:21 I'm really happy right now.
04:23 Oh, that's awesome.
04:23 Yeah, and you're doing such cool stuff, which we'll get to in detail later.
04:29 But I think it's really admirable that you were able to do that.
04:32 Like you saw what you wanted and you just took a turn.
04:36 I think there's a real fear when you get really good at something or you're about to get your degree in something or you're even a professional in it to make a change.
04:46 Because maybe you think you'll like that thing more, but you don't want to give up what you've earned in terms of knowledge.
04:53 Exactly.
04:53 It can be quite scary, especially when you spend quite a few years on learning about all the other stuff.
05:00 So how much does the cognitive science, neuroscience stuff still factor into what you're doing?
05:07 I think it factors in indirectly sometimes so that I think when I see the algorithms, I sometimes think about, hey, how is that implemented in the brain?
05:16 Or do we even know whether there is an equivalent thing in the brain?
05:21 And I still study or read articles on cognitive science since I'm just really fascinated by how the whole power of the way, where the power of the brain comes from and how the brain is working.
05:34 So, yeah, many machine learning algorithms are actually based on the brain, for example, like neural networks.
05:40 Right.
05:41 At least the original ones.
05:42 Yeah.
05:43 They've gone a long way since then, right?
05:44 You've got deep learning models and all that.
05:47 But it is very similar.
05:48 You know, I work for my first programming job was at a company that was a startup that was a spinoff from a cognitive science research lab in California.
05:59 And it was just such a cool place to be there.
06:01 A bunch of cognitive science PhDs and a couple of programmers.
06:05 And we were just building fun software to explore and test some of these ideas.
06:09 And I think cognitive science doesn't get enough credit in terms of how much programming and technology happens there.
06:17 Yeah.
06:17 Yeah.
06:19 It's a very, very fascinating subject.
06:22 Yeah, it definitely is.
06:23 So, I remember good times there as well.
06:25 Okay.
06:26 So, speaking of machine learning and neural networks, what are you doing today?
06:30 So, I'm currently at Microsoft Research in Cambridge in the UK.
06:34 And I'm an artificial intelligence resident.
06:37 So, that's like an educational program.
06:39 We're about 20 people.
06:41 And the overall goal of the program, I would say, is to teach us all the necessary skills to become great research engineers.
06:49 So, I work on a project that is based on applying Bayesian learning to healthcare data.
06:55 But, of course, there are lots of projects within Microsoft here in Cambridge that work on lots of different stuff.
07:01 So, yeah, during the day, I usually try to understand how the algorithms are working and try to figure out the math to actually implement them afterwards.
07:10 That sounds so interesting.
07:12 You know, I think I was really surprised to learn about Microsoft Research and how many PhDs they have there and how much research is actually happening at Microsoft Research.
07:22 So, this lab here in Cambridge is really a research lab.
07:26 Microsoft does a lot of work on customer projects and so on and products, of course.
07:31 But this research lab here is about 200, 250 people, of which I think 150 are really working for Microsoft Research in Cambridge.
07:43 They're always temporary people, interns, and so on.
07:47 And I think, or I don't know how many of those are really researchers, but there are also, of course, a lot of software engineers and research engineers and maybe about 80 researchers.
07:59 But that's just a guess.
08:00 I would have to ask about the number.
08:02 And that's just Cambridge, right?
08:03 Yes.
08:04 Yeah, that's just Cambridge.
08:05 So, I think I saw a presentation somewhere where they were saying Microsoft has more PhD researchers than Stanford or something insane like that.
08:15 You know, it's just like – Yeah.
08:16 It's really – Yeah, they are huge.
08:18 It's really huge.
08:19 And so, there's a lot of stuff going on.
08:20 I'm sure that's a super exciting place to work and AI as well as a big research area.
08:25 I didn't know that Microsoft was doing so much research in AI before I started the program.
08:30 So, I was surprised, too, that they were so active and had so many interesting projects going on.
08:36 Yeah.
08:37 So, when you were doing your cognitive science stuff before you got into programming, did you see your career, or at least at the moment, being working at Microsoft?
08:45 No.
08:46 Not at all.
08:48 I never thought about myself getting into computer science.
08:51 That was really so far from what I had planned.
08:54 Yeah.
08:55 I think it's really cool, though, that you were able to find your path into it.
08:59 Yeah.
08:59 Okay.
09:00 So, let's talk a little bit about this 100 Days project.
09:03 I think – you know, I first saw about it because people were talking about it on Reddit.
09:08 And it was just so – you know, it was such a unique take on it, and people were so excited about it.
09:13 So, it started out as 100 Days of Code with a Harry Potter theme.
09:19 But it turned out you had to cancel the Harry Potter part, right?
09:22 Yes.
09:22 Regrettably, I had – like, Harry Potter is so heavily copyrighted, and there are so many licenses and so on that it wasn't a safe thing to do to stick to the Harry Potter one and use all the names and places and so on.
09:36 So, now you have a Harry Potter-inspired 100 Days of Code project.
09:40 Exactly.
09:41 Yes.
09:42 So, I came up with my own little magical universe, which was actually quite a lot of fun, too.
09:47 I bet it was.
09:48 Instead of just copying what they got, right?
09:49 You're like, forget it.
09:50 I'm going to make my own space.
09:51 You could spend time on researching names and what they mean.
09:55 And, yeah, there's so much stuff on the internet.
09:58 It's amazing.
09:59 Yeah.
10:00 That's great.
10:01 So, let's start with 100 Days of Code.
10:03 Just what is it?
10:05 I know some people know it.
10:06 Many people have probably seen it go by on Twitter because that seems to be where people put all of their – I'm on day 92 and this is what I did, which is great.
10:16 But maybe they don't know the real history and details.
10:19 Tell us about it.
10:20 I think you might be the expert on the real history behind it.
10:24 But I heard on it on your podcast for the first time.
10:27 So, that you basically spent 100 days each day on learning about new coding stuff and really spent every day.
10:37 I think the original one was 30 minutes coding.
10:40 I adapted it to 15 to fit my needs.
10:42 Yeah.
10:43 And, yeah, and then really spent the time, those 100 days, to learn a lot of new cool stuff.
10:48 I think it's such a cool idea.
10:50 Just, you know, you're going to spend some time every day.
10:54 And I think – I don't know if this was conscious as part of it, but I think one of the underlying ideas here is that we often overestimate what we can do in a couple of days or a week.
11:05 We think we can do a bunch and not really.
11:07 But we really underestimate what we can do in the long term in three months or six months in a year.
11:12 You can make way more progress.
11:14 And I think the underlying idea of 100 days of code is you put in the time and you build the sort of the habit of doing that for over three months.
11:25 And by the end, you're like, wow, look what I did.
11:27 Yeah.
11:28 Yeah, the habit building is a big part of it.
11:30 Yeah, and you also said when you first started writing about it that there was this sort of no more procrastination thing going on on Reddit.
11:38 What's the story of that?
11:39 Yeah.
11:40 So, actually, I had two things that I combined.
11:43 I found this awesome post called The X Effect on the subreddit that is called Get Disciplined.
11:49 And it's basically about how you can create a new habit.
11:53 It's a very easy strategy like that you just have a card and you draw lines on the card such that you get small squares.
12:00 And then every day that you spend on working on your habit, you can cross out one of the squares with a big fat X.
12:10 Not a light one.
12:12 A big fat one that makes it really obvious like you've done it right.
12:15 So it feels good.
12:16 Yeah.
12:16 And it's quite a lot of fun to visually track your progress.
12:21 Yeah, I'm sure it is.
12:22 It sounds great.
12:23 So I'll link to the Get Disciplined post on Reddit.
12:26 And I didn't know about that subreddit, although I'm interested in it now.
12:30 That's cool.
12:30 Yeah, you can find a lot of interesting stuff on it.
12:33 Yeah, I bet you can.
12:34 Where were you in your journey into programming and machine learning when you started the 100 Days of Code?
12:40 I just started an internship at Bosch, the Center of Artificial Intelligence.
12:45 So I was about, so I had applied a few machine learning algorithms already to data sets and so on.
12:52 But I had not spent so much time really on Python and all its advanced features.
12:57 I looked at Dan Bader's book a little bit.
13:01 I don't remember the name at the moment, but it's a pretty good.
13:04 Python tricks.
13:04 Yes, exactly.
13:05 I can definitely recommend it.
13:07 But yeah, I wanted to spend a bit more time on Python and all the advanced features.
13:12 Since I think that with Python, at some point you get to a stage where you feel comfortable and you can write code.
13:20 But you miss out on all the great features that Python has to offer.
13:24 So I wanted to bridge that gap somewhat.
13:28 Yeah, that's cool.
13:29 I think that's one of the challenges of Python actually is many people learn,
13:33 just enough to solve their problem.
13:36 And because it's so simple, you can kind of just learn a little bit and live in that space.
13:41 But you're not really taking full advantage of everything that's possible, right?
13:45 I agree.
13:46 It was the same for me.
13:47 Yeah.
13:48 This portion of talk by Python to me is brought to you by Coder.com.
13:54 Coder.com has really nailed the idea of developer tools in the cloud.
13:57 Have you heard about how amazing Visual Studio Code is lately?
14:01 How would you like to have VS Code in the cloud on powerful infrastructure?
14:05 I don't mean something similar to Visual Studio Code, but the full actual VS Code with built-in collaboration and instant access to massive Linux-based computing resources.
14:16 Whether you're working on Windows but developing for Linux, running local Linux but need way more computing power, or even if you want to do development on a Chromebook or iPad, Coder.com has a full browser-based instance of VS Code just waiting for you.
14:30 One annoying thing about cloud-based dev tools is you don't control the platform.
14:34 You can't install or configure anything.
14:37 With Coder.com, you get full root access to a Docker container with a gig of RAM and 3 gigs of disk space, and that's just with the free account.
14:45 On top of that, you have fast time for when you have serious computing to do.
14:49 You'll get access to 96 CPU cores to crunch that Python code fast.
14:53 Finally, we know that Google Docs has made online collaboration enjoyable and an important part of many people's daily work.
14:59 Coder.com brings this type of collaboration to your software projects.
15:03 That makes them perfect for interviews, teaching, and teamwork.
15:07 After just a couple of minutes of using Coder.com, you'll forget that you're even using a browser.
15:11 It's the Visual Studio Code experience you love, just with way more power and available everywhere.
15:17 Visit talkpython.fm/coder to get started for free.
15:21 So let's talk about some of the things you covered in your 100 days of code that were...
15:28 You had a different world you created called Castle Kilmer.
15:32 Is that right?
15:33 Yes.
15:34 Yeah, exactly.
15:35 Because Hogwarts wasn't an option.
15:38 So Castle Kilmer.
15:40 And let's talk about some of the things you created there.
15:42 So your 100 days of code didn't cover 100 days of the Castle Kilmer characters.
15:49 It was sort of half-half, right?
15:51 Yes.
15:51 So I started out with this magical universe, but I decided that I would stop when I wouldn't find anything else to really look at.
16:01 Not to keep working on it just because it was there.
16:04 I really wanted to have blog posts of high quality and interesting things.
16:08 And there was also so much other stuff I wanted to take a look at, which was not necessarily related to this concept of the magical universe.
16:17 So I basically split it in half.
16:20 Yeah, that makes sense.
16:21 Sometimes it's hard to cram some feature into a program that just doesn't make sense.
16:26 Yes.
16:27 Yes.
16:28 So all of your code is on GitHub.
16:30 And I'll link to that, right?
16:31 And you also...
16:33 Did you blog every day on this?
16:34 No.
16:35 I created one blog post for each big concept.
16:38 So for example, I spent several days on abstract base classes.
16:42 But of course, I created one blog post about abstract base classes and not several ones for each day.
16:48 But each big concept or each big thing has its own blog post with details and the examples.
16:55 And then there's also the full version of the code for each day.
16:58 Yeah.
16:59 Okay.
16:59 Yeah.
17:00 Very cool.
17:00 All right.
17:01 So let's go through a couple of items that are pretty interesting that you covered.
17:05 that were in the Castle Kilmer world.
17:09 So you started out with object-oriented programming as one of them.
17:13 Why were you thinking about that?
17:15 I had used classes before.
17:16 And what I wasn't so used to using object-oriented programming.
17:21 So I really wanted to take advantage of this project and turn it into one that was based on object-oriented programming.
17:28 So I started looking at the very basics again, which I really liked.
17:34 It turned out to be a great choice in the end.
17:36 Yeah.
17:36 Just looked at what is object-oriented programming.
17:39 How does it work in Python that you have classes?
17:42 And what are classes?
17:44 Namely, that they act as like blueprints for creating objects.
17:48 And that these classes then define how objects are structured, what attributes they have, what kind of behavior, so what methods, what functionality.
17:57 And then I started out with my first class since all of the members of my universe or the universe was based on this Castle Kilmer.
18:07 And I created the first class called Castle Kilmer member.
18:12 And then I went on to inheritance.
18:15 All right.
18:15 So what are some of the ones that you covered in inheritance?
18:17 Like, so you have this member.
18:18 This is like anything that can be a human in this world or a character in this world, right?
18:23 Yeah.
18:23 It can be any character, like any member of the class.
18:26 Of course, within the school, you have the students, you have the professors, you have the ghosts, you have lots of other people.
18:34 And I wanted to have different classes for them.
18:37 So I created one for the pupils.
18:39 I created one for the professors and extended the universe over the course of the next days.
18:45 Yeah.
18:45 Nice.
18:46 You even have a ghost.
18:47 I like it.
18:47 Yes.
18:48 Yeah, I do.
18:49 Of course.
18:50 Yeah.
18:50 Of course.
18:51 You got to, right?
18:51 And so I think one of the things I like about this is when people are learning programming, it's a real, it's easy to connect with the way the characters fit.
19:02 But, you know, and if you sort of model it back to Harry Potter and your mind, right, it's pretty easy to think, okay, I can see how we have all these students and all the professors and they're kind of all magicians.
19:13 And it really does make it pretty approachable to learn objects and classes and inheritance, I think.
19:18 Yeah, that's why I went for this magical universe.
19:21 I really wanted to have something that makes it fun for me to sit down every day.
19:25 And originally the project wasn't even attended to be public.
19:29 So I really started it for myself and to have a theme that spans through the entire thing and makes everyday fun.
19:36 And it really was a lot of fun for me.
19:39 Yeah, I'm sure it was.
19:40 It looks really interesting.
19:41 And I still remember back to some of the programs that I first wrote when I was learning programming.
19:46 And it's the sort of weird ones that you force yourself to do that are not just homework assignments or whatever that really, you know, stand out, right?
19:55 Yeah.
19:55 Yeah, for sure.
19:56 Okay.
19:57 So another concept that you covered, which I think is still quite confusing to many folks, is different types of methods on classes.
20:06 So functions on classes are called methods.
20:09 And then you have instance methods, class methods, static methods.
20:12 And then we'll even see some more variations, right?
20:16 So maybe tell people your take on that and maybe what they are.
20:21 Yeah.
20:21 So I started out using instance methods most of the time, which I think everyone is using most of the time.
20:27 Yeah, I agree.
20:28 And they have this self parameter, at least the self parameter as an input.
20:32 And when I started out working on the types of class methods, days of code, I really had no idea that there was something else and how it might be useful.
20:43 So yeah, for the instance methods and the self parameter points towards when you call a method, it points towards an instance of the class or really an actual object.
20:53 So these instance methods are quite powerful because they can modify both the object state and the class state.
21:00 And I had my example was that the Castle Kilmear members were able to say something.
21:06 So they had a say function and then a certain object.
21:11 So a certain member was able to say a few words.
21:14 And they'd have to use some of their properties, right?
21:16 Like their name or other thing or what type they are, right?
21:19 The professor, whatever says such and such, right?
21:23 Yes.
21:24 Yeah, and that's pretty standard.
21:25 And then you get into class and static methods.
21:27 And I think the existence of either a class method or a static method makes a lot of sense.
21:32 But the existence of both is like, wait, why are there two of these?
21:36 Why are there two ways to do this?
21:38 Yes, that was also what I thought.
21:39 Right now, I really like class methods.
21:41 And I even used a few static methods now at work.
21:45 And they can be very useful, especially if you want to communicate your intentions when you write your code.
21:52 And it makes it much more readable.
21:54 But only, of course, if the other people also know about class methods.
21:57 Right.
21:58 What I used class methods for a lot was to create alternative constructors for a class.
22:04 Yeah, to really create different members of the universe.
22:07 So what I understood about class methods is that instead of the self parameter, you have the CLS, which points towards the class, not a particular object.
22:17 So a class method is restricted in some sense that it can only modify class state, but not the object state.
22:25 So what I had as class methods for, for example, their use as alternative constructors.
22:33 So I could create lots of different members of the universe without always having to write out all the names and birth years and so on over and over again.
22:41 Yeah, I think that's a great use of it.
22:43 And, you know, we don't talk about design patterns and stuff like that in Python as often as other languages.
22:48 But it's kind of a factory pattern or something like that where you don't have to know how to create the thing.
22:55 You just say, hey, type, make one of yourself.
22:57 And it can put all the pieces together.
22:59 I think that's cool.
23:00 Yes, I like that a lot.
23:00 Yeah, I do too.
23:02 And honestly, with the static methods and class methods, I know the difference.
23:07 I know the class method has the type available so it can work with it.
23:11 And the static one doesn't.
23:12 The class method kind of knows what level it's on in terms of if there's inheritance, which type you've called it on.
23:20 The static method doesn't necessarily.
23:22 But beyond that, I honestly don't really know when I would use static over class.
23:28 I guess if I don't feel like dealing with a class parameter, I'd use static.
23:32 But I don't have a great recommendation either there.
23:35 Static methods are a little weird, I guess.
23:38 But I don't remember the use case now.
23:41 I had at work for static methods.
23:44 But I came across a use case and I was like, wow, I can use a static method.
23:49 I know what it's for.
23:50 It really makes sense to use it.
23:51 Yeah.
23:52 I do find that I like having sometimes you have a class and then you want some functions that, you know, work with it, but they don't work with instances of it.
24:02 So either having a class or a static method is nice just for the grouping together.
24:07 It's like all on this thing.
24:09 Right.
24:10 So if you import the class, you don't have to also import the functions, for example, to work with it.
24:15 It's a little more obvious, I think.
24:16 Yeah.
24:16 It's good to communicate that it really somewhat is related to the class, even if it's independent in a sense.
24:24 Yeah.
24:24 So another interesting thing you covered was some of the magic methods or the Python data model with the repper and the stir and things like that, right?
24:35 Yes.
24:35 Of course, I wanted to get a nice representation of my pupils and my professors and so on.
24:42 So when you print an object, you usually don't get a very useful representation, but you get, I guess, the class name and then the ID, which is basically the memory address, if I'm correct.
24:52 I looked into the adunder methods you have for that.
24:56 And there are actually two ones.
24:58 That was also interesting for me to realize.
25:01 I had never implemented them myself.
25:04 And I only learned then that they have different purposes.
25:07 So one should rather function as a debugging aid for developers.
25:13 So the output should be as unambiguous as possible.
25:16 But then there's also the other one where the output should really be readable so that you as a human can read it.
25:24 Right.
25:24 So the repper is the more developer debugging side of things.
25:28 Yes.
25:29 And the stir is sort of the print curly bracket.
25:33 What goes in there.
25:34 Yeah.
25:34 Yeah.
25:35 Yeah.
25:36 Exactly.
25:36 I think it's definitely interesting.
25:38 that's a nice trick as well, just for working on Python projects is if you're using a debugger or anything like that, or even, you know, stack trace type stuff.
25:48 Go and write a specialized repper for your classes.
25:52 Because if you're like pausing a debugger or you're showing a list, you know, it'll put that information there instead of just this type at that address, this type at that address.
26:01 It's like, oh, here's the description.
26:02 And it can really be helpful.
26:04 And it doesn't take that much time.
26:06 No.
26:06 So, yeah, I agree.
26:07 It's really useful.
26:08 Yeah.
26:09 I agree.
26:09 And with data classes right now, you even get that implemented for you, right?
26:15 Yeah.
26:15 I think you do with data classes.
26:16 That's right.
26:17 Yeah.
26:17 3.7.
26:17 Very nice.
26:18 Data classes are really sort of simplify a lot of the stuff that we're talking about.
26:23 Yeah, yeah, yeah.
26:23 Yeah.
26:24 I like them.
26:25 Another one that takes a while for people to get.
26:28 And sometimes I don't know that people ever get to creating their own just because, you know, so we talked about stopping once your problem is solved and not digging all the way.
26:36 The decorators, right?
26:38 Those can be kind of mind-blowing, right?
26:40 Yeah, absolutely.
26:41 So, it was a big challenge to wrap my head around how they work.
26:45 And I think I understood how they work now.
26:48 But, yeah, don't test me on it.
26:50 No test.
26:52 But looking at your project, it looks pretty nice.
26:54 So, in your world, in your Castle Killmere world, you could have characters that say things and then you create a whisper decorator.
27:04 And if you put the whisper decorator onto that, it'll make it say it more quietly, right?
27:08 Yes, exactly.
27:09 Since, of course, there are also the mean people in my universe.
27:12 They are called the Dark Army.
27:14 And they have the leader, which is Lord Odin.
27:17 And when they take over the school, of course, the people are not walking around anymore and just talk to each other and make jokes.
27:25 But they would only be whispering.
27:26 So, I had my application for creating a decorator that turns this saying function into a whispering function.
27:34 But, of course, what is important about decorators, I guess, to understand it, is that they only modify the behavior of the function when you decorate it.
27:43 They don't really permanently change the function itself.
27:46 Right.
27:47 And you've got to put the decorator on.
27:49 And if you don't, it's not like somehow importing it is going to sort of patch and rewrite all the functions.
27:56 Yeah.
27:56 Yes.
27:57 Yeah.
27:58 So, with decorators, you've got this sort of, you take a function and its job is to take another function.
28:03 And then it can add behavior before, after, and then, you know, hopefully at some point call that function.
28:11 And all of that takes a little bit of interesting juggling with like star args, star star KW args.
28:17 And I think that's probably why decorators are challenging because you've got to learn the decorators.
28:21 You've got to learn like some of the closure data capture stuff in there.
28:25 And you've got to learn all these, how to, you know, juggle star args and star star KW args all at the same time.
28:32 So, that's all a little bit crazy.
28:33 But you also talked about not losing the metadata.
28:37 So, if, you know, there's either a crash or you want to ask what is this function that I'm calling, right?
28:44 A regular sort of unsophisticated decorator would say the function is the decorator function, not the internal wrapped function, right?
28:52 So, you also had some work on that.
28:55 Yeah.
28:55 So, I only learned about it then, too, that there's actually when you apply a decorator, the metadata of the function is replaced by, for example, the name, the doc string, and so on by the wrapper function.
29:08 So, when you want to look at the doc string, you don't actually get the doc string off your function anymore.
29:13 Right.
29:13 Which is not so nice.
29:14 You get help on the decorator or something, right?
29:16 Yeah.
29:16 Yeah.
29:17 Which is usually not so useful.
29:19 So, of course, that's also what I learned during the 100 days of code.
29:23 There are packages for almost anything.
29:26 I'm not sure whether there are many things left that haven't been solved or at least there were attempts to solve it.
29:32 Yeah.
29:32 So, there's the functools module.
29:34 And then there is the functools.wrap wrapper that you can apply to the wrapper function.
29:41 That sounds confusing now.
29:43 But that carries over the name and the doc string.
29:46 It's very easy to use.
29:47 And, yeah, I think it should be, you should use it by default to make sure that you don't lose the information related to your original function.
29:56 Yeah.
29:56 That's a really nice touch and, you know, makes it sort of a proper decorator for sure.
30:00 This portion of Talk Python to Me is brought to you by us.
30:06 Have you heard that Python is not good for concurrent programming problems?
30:10 Whoever told you that is living in the past because it's prime time for Python's asynchronous features.
30:16 With the widespread adoption of async methods and the async and await keywords, Python's ecosystem has a ton of new and exciting frameworks based on async and await.
30:26 That's why we created a course for anyone who wants to learn all of Python's async capabilities.
30:31 Async techniques and examples in Python.
30:33 Just visit talkpython.fm/async and watch the intro video to see if this course is for you.
30:39 It's only $49 and you own it forever.
30:41 No subscriptions.
30:43 And there are discounts for teams as well.
30:46 You talked earlier about data classes and how there are these sort of simple little containers, but they implement things like the wrapper function.
30:55 The thing that predates data classes really was named tuples, right?
31:00 Yeah.
31:01 So you spent some time on that as well.
31:03 And I'm a big fan of named tuples because...
31:06 Me too, yes.
31:07 They're so much nicer than...
31:09 What is the third thing in this tuple?
31:11 Is that the right one?
31:13 You know, the string representation is not that helpful, right?
31:17 And also you get confused so easily with like usual normal tuples with assigning the fields with the order.
31:24 When you have more fields, it gets so confusing.
31:27 Yeah, it definitely does.
31:29 So maybe tell us how named tuples appeared in Castle Kilmere.
31:34 Kilmere.
31:35 Yeah.
31:36 So I talked about these dark army members before.
31:40 And of course, once you switch to the dark side, there's no way back.
31:44 Either you get killed by the leader or you just stick with it.
31:49 So that was perfect since tuples are immutable and named tuples are basically an extension of tuples.
31:56 So I created my dark army member class as a named tuple so that once you create a dark army member, it is definitely going to be a dark army member at all times.
32:08 That's really cool.
32:09 I love it.
32:10 I love it.
32:10 That's a really creative use of it.
32:12 Interpretation of the immutability of named tuples.
32:16 Another area that you covered was abstract base classes.
32:21 And I feel like that's a pretty advanced topic as well.
32:24 What did you find to use abstract base classes for in your universe?
32:27 So, of course, I found a great thing again, namely spells.
32:30 That was also something I learned that there are actually many different kinds of spells.
32:35 You have a curse, you have a jinx, you have a hex, you have a charm, a transfiguration, and so on and so on.
32:40 But all of them are, of course, spells.
32:43 And abstract base classes are very useful when you have classes that all belong to one base class.
32:51 And all of these subclasses should implement certain methods from the base class.
32:56 But you don't want to be able to instantiate this base class itself.
33:00 So for the spell, each spell should have a name and then an incantation and a certain effect.
33:06 And I also added a defining features, for example, that a curse should make people suffer or it should harm people.
33:13 Yeah, it sounds mean, but that's what curses are for, right?
33:16 That's right.
33:17 It's a tough world.
33:19 Yeah.
33:20 So I had the abstract base class for a spell.
33:24 And then you flag all the methods that must be implemented by the subclasses with the abstract method decorator, which was nice to know about decorators at that point.
33:34 Then I had all these different subclasses like curse, transfiguration, and so on.
33:41 Yeah.
33:42 And one of the things I think is really powerful about that is when you have regular inheritance, if you had, say, a charm that was derived from a spell, right?
33:51 There's no normal way to say it has to do its own version of cast and its own version of defining features.
33:58 But if you make it an abstract base class, you can say those abstract methods.
34:01 It makes sure that you implement them or you just can't use the charm, right?
34:05 So that's a really nice way to make that work.
34:07 Yeah.
34:08 Yeah.
34:08 Yeah.
34:09 I agree.
34:09 Absolutely.
34:10 Yeah.
34:10 That's something I don't see that often in Python, but I do like it.
34:14 It's very cool.
34:14 And then you've got to test your universe once you build it, right?
34:19 Yes.
34:19 So that was quite nice since I hadn't spent a lot of time on testing.
34:23 Although that's so important.
34:25 I just realized it then and now that I'm working at Microsoft, how important it is to really test your code from the beginning and how much it can tell you about your code and really think about,
34:37 well, how can this function be broken by a user or what kind of silly inputs could you put in there?
34:44 Yeah.
34:46 It's all the bad inputs and things you don't check for.
34:48 It's easy to put in the right number or the right value and go, oh, that worked.
34:52 But it's everything else, right?
34:53 And once you created the test, you can always rerun them.
34:56 So if you completely change your code base and run your tests, you at least can be sure that most of this functionality is still working.
35:05 Yeah.
35:05 I think it's great.
35:06 It's probably a little extra challenging in your day job compared to Castle Kilmer.
35:11 Yeah.
35:11 Because machine learning seems kind of hard to understand.
35:16 It's a little opaque.
35:17 And it's just hard to think about, I think.
35:21 Do you find it to be challenging?
35:22 Yeah, absolutely.
35:23 But it was also very useful to start looking at it with such a more simple example like My Magical Universe since it got me started with pytest.
35:34 And right now, I know all the basics of pytest, and I can make sure that I use the more advanced features.
35:40 And yeah, pytest is just so powerful.
35:43 I didn't really realize that before.
35:45 You can do so many things with it.
35:48 Yeah, it's amazing.
35:49 Yeah, it really is amazing.
35:50 It's great.
35:50 And I think there's a good lesson here in the learn the one thing at a time, right?
35:56 Learn testing in a simple space where you understand the other stuff, the stuff you're testing.
36:00 And then you can apply it to things that are more challenging like machine learning.
36:04 Yeah, absolutely.
36:05 Yeah, cool.
36:05 And it was also nice to look at like how to write proper test functions.
36:11 I think that's also a big part of it.
36:13 Yeah, I think a lot of times people don't put enough attention to writing proper test functions,
36:17 and they just throw something together, and then it becomes hard to work with because it didn't get the same attention the other part of your program did.
36:25 Yes.
36:25 And then the testing gets hard, and then you stop doing it, and then you have bugs, and it's not good.
36:30 Yeah.
36:32 So that pretty much covers the magical universe side of things.
36:36 But there's a few other areas maybe worth just touching on really quick.
36:40 One is if Dunder name equals Dunder main, right?
36:47 That's always confusing, isn't it?
36:49 Yeah.
36:50 It was actually one of my favorite blog posts since before that I used that line so many times, but I never thought about what is actually happening here.
37:01 Yeah.
37:01 Yeah, yeah.
37:02 Yeah.
37:02 And when I started looking at it, I was first so confused, but then I broke it down into individual steps.
37:08 And right now, when I see it, I really know what is happening, and that is nice.
37:12 Yeah.
37:13 I think this is the first place when I first encountered it where I realized that there were, like, special variables or things that were set, like, Dunder name.
37:23 I'm like, oh, wait, there's a Dunder name?
37:25 Where does that come from?
37:26 Yeah.
37:26 But there's also Dunder file and other stuff, right, that you can, like, oh, there's other things like this that I can, you know, work with if I need them.
37:34 Yeah, you usually don't know about them if you never, like, took a look at the different things.
37:40 Yeah, it's pretty cool.
37:42 So, it's not super hard once you learn, right?
37:45 Like, if you run the program directly and you print out Dunder name, you'll see main, you know, Dunder main.
37:52 But if you import it, you'll see whatever the name of the module was, right?
37:56 And you can kind of work your way through, and it's not super confusing.
37:59 It's just when you first see it, you don't know where it comes from, right?
38:02 Yeah, and it looks, for me, it looked quite scary with all these Dunders and the, yeah, I was really confused.
38:10 What is all this?
38:10 Why are these symbols back in my Python?
38:12 What's going on?
38:13 Yeah, yeah, for sure.
38:15 I don't know.
38:16 Some languages have, like, a convention that if a function is called this and you run that module, then it will just run that function.
38:26 Like, C has its main and C# has a main, a static void main sort of thing.
38:33 I don't know.
38:34 Maybe it's worth adding something like that to Python.
38:36 Because once you learn it, it's fine.
38:38 But as a beginner, I think it's one of the things that you have to encounter pretty soon that just looks weird and out of place.
38:44 I agree.
38:44 Yeah.
38:45 Yeah.
38:45 It's used a lot of times, even in the beginning, without knowing what it's actually doing.
38:51 Yeah.
38:51 Right.
38:52 Exactly.
38:52 Yeah.
38:53 I think probably the two big confusing starting points are this Thunder name thing and then virtual environments.
39:00 Right.
39:01 Both of those can get you right away when you're not really ready to think about them.
39:05 Yeah.
39:06 Absolutely.
39:07 Yeah.
39:07 And I guess also maybe just underscores, right?
39:10 You talked a bit about how underscores are serving so many purposes.
39:13 Yeah.
39:14 That was also a really nice thing.
39:16 I really liked spending time on it.
39:19 Since I think when you don't know about the naming conventions in Python and how to use underscores appropriately and you're used to some different programming language.
39:27 For example, I came across code once of a colleague that I think he was programming in C before.
39:33 And he named all the magic, his methods with Dunder name and another double underscore.
39:41 And I was like, you shouldn't do that in Python.
39:44 Like, that has a special meaning.
39:46 That's not good.
39:48 And he had just no idea about it since he never looked at the different underscore patterns, which can be.
39:54 Yeah.
39:54 They are just different sometimes.
39:56 Yeah.
39:56 Yeah.
39:56 There's you have at least five listed here and there maybe are even more.
40:02 Yeah.
40:02 There's a lot of different uses for the underscore.
40:04 So Python is a language without too many symbols, but they love the underscore for sure.
40:09 They do.
40:10 Absolutely.
40:11 That's definitely one that shows up.
40:13 All right.
40:14 So, yeah, I think you had a really interesting take on this 100 days of code and I really like how you created your magical universe and that's great.
40:22 So what are your main takeaways from this whole experience?
40:25 So one of the main takeaways was that it can be extremely rewarding to share your work with others and get feedback from other people, especially when it's something that can be useful also for other people.
40:37 And it's really, really, really useful if you directly apply what you learn.
40:42 So if you learn about decorators, but never try to build your own decorator, you never actually, I think, fully understand what is going on.
40:51 So that is a really important thing.
40:55 Yeah.
40:55 It's one thing to learn something, but if you don't try to use it, at least in programming, it's not going to it's not really going to stick.
41:02 You're not going to internalize it.
41:03 Yeah.
41:05 Were you surprised at how popular your post on Reddit became?
41:09 Oh, absolutely.
41:10 Absolutely.
41:11 I was so surprised.
41:12 I really just put it up there after, I don't know, maybe I spent a week on it and then I thought, oh, this is just so much fun.
41:19 Maybe it's also fun for others to learn about the features by using magic.
41:23 And then so many people liked it so much.
41:27 It was a great, great experience.
41:30 Yeah.
41:30 That must have felt really good to see so many people enjoying it.
41:33 And it also motivates you to go on and keep working on it.
41:36 I'm sure you're like, well, now I have to do this.
41:39 Yes.
41:39 Do you think it made you a better developer going through this process?
41:43 Yeah, I think so.
41:44 So, for example, it introduced me to many advanced concepts.
41:48 And I think most of them I didn't even know before or I never fully understood them.
41:53 And now with working in this AI residency, I could apply quite a few of them already.
41:59 For example, I used abstract base classes, which I never heard of before.
42:03 Yeah, definitely.
42:04 It made me a better developer.
42:05 Yeah.
42:06 But there's still a long way to go, I guess.
42:07 There's always a long way to go.
42:09 It's like an infinite path.
42:11 But I think you do get to really dig into some of these things that you maybe use, but you don't really worry too much about.
42:21 Like, I put a little at symbol, then something goes here, and then it works differently.
42:25 But you don't really think about the decorators and the funk tools and just all the layers.
42:30 Yeah.
42:30 But when you've got to write about it and the purpose is to study that, then it's different.
42:34 Yeah.
42:35 All right.
42:37 Well, let's talk a little bit about where you are working now and where you're going.
42:42 So you're a big fan of machine learning, I can tell.
42:45 You talked about how you actually changed your career, basically, because of machine learning, which is really great.
42:51 So you have another cool GitHub project called Machine Learning Basics.
42:57 Do you want to tell people about that?
42:58 Yeah.
42:59 So in general, I really like working on projects that benefit many people or at least have the potential to benefit many people.
43:06 So I started this machine learning repository when I was preparing for interviews.
43:13 And when preparing for interviews and machine learning, you usually have to know about the basic machine learning algorithms,
43:20 like K-Means, which is a clustering algorithm, or linear regression, logistic regression, and so on.
43:26 But you really have to know how they work.
43:29 So it won't work if you just use scikit-learn and then the implementation of them.
43:36 I call this function.
43:37 I give it these numbers and then magic.
43:39 Yeah.
43:40 But that's what many people do, actually.
43:42 Yeah.
43:42 I'm sure.
43:43 Yeah.
43:43 Yeah.
43:44 And it's very useful.
43:45 It can be very useful.
43:46 But it's also really nice to just understand what's going on.
43:50 So that was also a project I started just for me when I was preparing.
43:54 And I created Jupyter Notebooks with first all the theoretical, most important theoretical basics about the algorithms with formulas and so on,
44:05 and have everything in one consistent notation.
44:08 And then I implemented them without using any of these scikit-learn methods and so on, but just Python and NumPy.
44:15 And yeah, when I was applying to these different residency programs and other things, at some point I thought, oh, well, other people are applying too to these programs, so they can probably use that.
44:27 And it became also way more popular than I ever expected.
44:31 Yeah.
44:32 I'm looking at the repository, and it has 2,000, almost 2,600 GitHub stars, 400 forks.
44:38 I mean, this is really, really cool.
44:40 And I think, one, I think it's a fantastic way to learn.
44:44 Two, I think, I don't know, I'll ask you, like, how were people's impressions when they said, well, what do you know about this?
44:51 Did you share, like, your GitHub account name with them and stuff like that when you applied to jobs?
44:57 Yes, that's, like, you usually do that.
45:00 I think when I applied, I didn't even have that.
45:04 It wasn't even public.
45:05 So at that point, it didn't help me much.
45:08 Right now, it would probably help a lot.
45:10 It probably would, yeah.
45:11 But it was really just to teach myself how these algorithms worked.
45:15 And only at that point, I really realized, do I really know how linear regression works?
45:20 Do I really know how k-means works, like, the underlying structure?
45:25 It was really, really good to take a detailed look at the algorithms again.
45:30 Yeah, I'm sure.
45:30 I think, you know, there's so many machine learning libraries that you can use.
45:35 But like you said, if you don't know the foundations, you know, you put numbers in, you get numbers out, and you kind of just have to trust them.
45:41 You can't reason about whether, does this make sense?
45:44 Is this working right?
45:44 So I think this is really great.
45:47 And I'm sure a lot of people out there will be happy to hear about it, be able to use it.
45:51 Hopefully, yes.
45:52 Yeah.
45:52 You seem to have a real knack for creating things that become quickly popular.
45:56 Yeah, yeah.
45:59 It seems like that.
46:00 Yeah, it's nice.
46:01 It's nice.
46:01 All right.
46:02 So maybe we could talk a little bit about the project that you're working on, at least not necessarily the project.
46:07 It might be not public or anything, but just the general area of machine learning and healthcare.
46:14 Yeah.
46:14 So that's basically my main focus or what I want to focus on, namely apply machine learning algorithms to healthcare problems.
46:20 Since I think there is, yeah, most healthcare applications just promise so many and huge improvements for so many people.
46:28 There is already, I think, a lot of algorithms on detecting cancer, for example, from images.
46:34 Yeah.
46:34 That is quite popular.
46:35 Yeah, there have been some amazing research projects or research challenges, I guess, around looking at various scans or mammogram type things and automatically detecting cancer.
46:48 And those machine learning algorithms are getting as good or better than doctors, right?
46:53 Yes.
46:53 And with healthcare, the thing is that you have tons of data lying around in the hospitals.
46:59 It's just amazing how much data they collect without ever using it.
47:03 It's just lying there.
47:05 And with machine learning, you can take advantage of it and create great things.
47:11 I think there's a lot of possible applications there.
47:14 Yeah, absolutely.
47:15 I definitely think there are.
47:17 I think the challenge with healthcare is people are so protective of the privacy, understandably.
47:23 I wonder if there'll be, you know, there's big healthcare organizations.
47:27 And within those organizations, they're allowed to share the information with, say, their doctors, the different doctors and specialists.
47:34 I wonder if there'll be these healthcare organizations who create machine learning algorithms based on only their own data.
47:41 And it becomes like an advantage of that organization at some point in the future.
47:46 I'm not sure that's a good thing, but I wonder if that's something that will happen because of the privacy.
47:51 Yeah.
47:51 What do you think?
47:52 I agree.
47:53 Yeah, that might really happen.
47:54 It's very good that healthcare data is so heavily protected.
47:57 But a lot of times people also don't realize how much good you could do with using the data if you have proper rules how to use it.
48:08 Right.
48:08 If we could all live 10 years longer or the last 10 years much more healthy, maybe we wouldn't want as much privacy.
48:16 We might make that trade off.
48:17 I mean, we'd trade our privacy to Facebook for, you know, a little like, right?
48:21 Maybe we could live better.
48:23 We could make better trade offs.
48:24 I don't know.
48:24 So your master's thesis was in this area, right?
48:28 Yeah.
48:28 So I really liked working on my master's thesis.
48:31 It was a project together with the German University Hospital and their radiological department.
48:37 And they said, well, we have tons of radiological reports lying around here.
48:41 So these reports are whenever a radiologist looks at an image, he has to, in Germany, create a report and write down, I see this, I see that.
48:50 This has changed from last time.
48:52 And so on and so on.
48:54 But he or she doesn't have to write the report.
48:57 But there has to be another radiologist that checks the report.
49:01 And this just takes massive amounts of time, which could be used in way more useful ways.
49:07 So they said that they would like to have some kind of auto-completion for the doctors so that when they write the reports, it would basically complete the sentence or at least make suggestions to speed up the whole process.
49:21 But of course, it was German data.
49:24 And I think for English, there's already a lot of stuff there.
49:29 But in general, the medical language is very complex.
49:34 So there are a lot of terms for some types of cancers.
49:38 You have five names that all mean the same thing.
49:40 Then you have all the synonyms.
49:43 Sometimes you can write something with a K, sometimes with a C.
49:46 And it can be really complicated.
49:49 So I worked on a recurrent neural network for processing these reports and then really using it in the hospital.
49:56 And right now we are at the stage.
49:58 It takes quite a while for them to really incorporate it in their system and try it out, evaluate it, so on.
50:04 But hopefully then it can be used at some point and really be used by the doctors there to save time.
50:11 I think that's a really meaningful project.
50:14 That sounds super cool.
50:15 And it's way more fun to work on projects like that where you can see the end application.
50:20 Oh, I'm sure it is.
50:21 Yeah.
50:22 One of the really sad things is to work on a project and then see nobody uses it.
50:25 Right.
50:26 Yeah.
50:26 That doesn't feel good.
50:28 I can certainly see as a programmer how much autocomplete helps, right?
50:32 Like I know as I'm typing, if it just, you know, you type a few characters and it, you know, completes the next 10, it's super helpful.
50:39 And I don't know if it happens for you, but at least in the States, the Gmail has started autocompleting sentences in the Gmail editor.
50:49 Oh, that is interesting.
50:50 No, I've never used it.
50:51 Yeah.
50:51 So it actually studies your email chain and then it will propose, you know, maybe the next five or six words in a sentence.
51:00 So I'll be like, I'm excited to have, and it'll say you on the podcast.
51:04 I'm like, whoa, you know, and then you just hit tab and it autocompletes it and off it goes.
51:12 So I think these ideas are starting to make their way into normal life, right?
51:18 Outside of programming and super structured words.
51:21 So I think it would have a huge value.
51:24 Although the danger is if Gmail gets it slightly wrong, whatever, right?
51:29 You made a silly mistake.
51:30 We're all used to autocorrect on our phone, messing up stuff.
51:32 But if it says that for a cancer diagnosis, then that is a whole different type of problem, right?
51:38 So the stakes are very high.
51:39 Yes, absolutely.
51:40 Yes.
51:41 You would definitely still have the check, I guess, from a different radiologist.
51:45 Yeah, but just the creation of it much, much more quickly, I think is really powerful.
51:49 So when you think of the tons of reports they create every day, absolutely.
51:53 Yeah, you think, you know, a lot of times they're being doctors, but their day-to-day stuff is actually to sit down and write reports, not to go see patients or work with people, right?
52:03 It's their bog down.
52:04 I have some friends and neighbors who are doctors and they just talk about the reports and the bureaucracy.
52:10 And just it's really frustrating to them.
52:12 Absolutely.
52:13 Yeah.
52:13 Okay.
52:14 So I think, yeah, this just sounds super cool.
52:17 What else are you interested in studying in machine learning?
52:19 I think there are way too many things to be interested in.
52:21 There's so much going on.
52:22 It's early days, right?
52:23 It's, you know, the last five years, it feels like machine learning has gone from this science fiction to science, right?
52:31 Like it really has come into a thing, right?
52:33 Yeah.
52:34 It became quite popular.
52:35 So I really like what we talked about earlier so that you combine cognitive science and machine learning and that you spend more time on that and maybe try to become, learn more about the human brain and use its power to create new machine learning algorithms.
52:52 I think that's a very, very interesting field.
52:55 Yeah, absolutely.
52:55 I think we're just at the beginning and I don't really know where it goes, but it's going to be very interesting.
53:02 What happens to jobs?
53:04 What happens to society?
53:05 What becomes possible?
53:06 What becomes scary?
53:08 And so on.
53:09 Yeah.
53:09 I guess one thing just in the scary space that I saw recently is apparently China, some either group or the government, I don't remember which, has come up with a way to identify people by their way they walk.
53:20 Oh, that is scary.
53:22 Instead of facial recognition, just their gait, the way they walk.
53:25 Wow.
53:25 I thought, whoa, that is something, right?
53:29 Yeah.
53:30 So, yeah, pretty, pretty crazy.
53:32 Yeah.
53:33 I also heard about recently about also that was a company in China that tracked their employees the entire day through cameras and they read your facial expressions.
53:43 So they would know your mood all the time when you went to the bathroom, when you were at your desk.
53:48 And then they have this big database of where they save all the information about all the people all the time.
53:55 And yeah, when I read the article, I was like, oh, I never want to live in China.
54:00 This is just so scary.
54:01 There's some amazing stuff in China, but that sounds so scary for sure.
54:06 I would not want to work at that place at all.
54:09 Interesting.
54:11 So I guess, you know, maybe that brings us to sort of my last few questions here is what do you think the big promises of machine learning and AI are?
54:19 And what do you think the big challenges or dangers are?
54:21 I think the big promises are that you can make life better for so many people.
54:27 Like healthcare is just one of the applications where it can hugely improve our daily life.
54:32 Dangerous and challenges.
54:34 Like dangerous, I see so many dangers since you can never stop people.
54:38 There will always be people who want to use AI to do bad things.
54:44 And since there is such a lot of such big number of projects at the moment going on and governments have different ideas and different ways of treating people, there will also be bad things.
54:57 Especially when you look at general AI.
54:59 When you, I think that could be a whole podcast.
55:03 Yes, it could.
55:04 Yeah, there's just so much to, you can be scared about there.
55:09 So maybe define that for folks.
55:10 Like there's the focused AIs like Alexa or the thing that can say cancer or not cancer by looking at a picture.
55:18 But what's general AI?
55:20 Yeah, so there's this difference between general and specific AI, just as you just said.
55:24 So specific AI means that your artificial intelligence is good at doing one thing, like predicting sentences or speech recognition.
55:33 But it has just one thing.
55:35 But we as humans, we have more general AI.
55:38 We can dance, we can talk, we can like find faces in a crowd and so on.
55:44 And the idea of general AI is to have more like a human level AI that has all these different kinds of intelligence.
55:52 So social intelligence, but also that it can perform lots of different tasks equally well.
55:59 Do you think that will happen?
56:00 Do you think somebody will come up with it?
56:01 You think so?
56:02 I think definitely at some point it will happen because there are too many people who want it to happen.
56:07 And you can't stop people from researching and working on it.
56:11 And even if there are people who want to restrict it, there will always be labs who just, I think that's just human nature.
56:19 Yeah.
56:20 It has to be solved globally or at least addressed globally, right?
56:24 Like no one government.
56:25 It's not like the EU can say, well, we're not doing it.
56:27 Well, okay.
56:28 You know, maybe Uruguay is going to become the next place that does, you know, creates it, right?
56:33 Because they're not subject to the rules and they see it as an advantage.
56:35 I have no idea about Uruguay.
56:37 But, you know, just if it's not dealt with on a global level, like it can't even be addressed.
56:42 But then you have even bad actors amongst places that agree, right?
56:46 Yeah.
56:46 Yeah.
56:47 It's so important that this issue is, becomes more, like people become more aware of how present it is and how important it is to talk about it.
56:57 And to really understand what is going on and what might happen in the future.
57:02 So we can start a global discussion on how we want to handle these things.
57:06 Do you think politicians should discuss these things?
57:09 Do you think they should be part of like prime minister political debates and things like that?
57:13 I think they should be a part of it.
57:15 Yes.
57:15 But I definitely think that you should talk to the experts most of the time and that they should at least have equal rights in talking about it and making decisions.
57:28 So it must really be, I guess, representative of all kinds of people.
57:33 But the experts are those that really understand what can be done and what is currently being worked on.
57:40 Yeah.
57:41 So, yeah, I feel like, you know, at least I can speak from the U.S. perspective.
57:44 I feel like there's a lot of pushback against immigration or outsourcing or other stuff.
57:50 But I think the reality is a lot of it is the AI and the robots are changing people's jobs and careers much more than any of the other effects that people are arguing and screaming and yelling about, you know?
58:01 So many people don't realize that, I guess, how much influence AI will have on their jobs.
58:06 And they just stick to what they're doing right now.
58:09 And they think, oh, yeah, I can use my smartphone.
58:12 It's so cool to have Siri and my phone and so on.
58:15 But they don't think about the long-term changes that will come.
58:20 Yeah.
58:20 It's going to be very interesting in all sorts of ways in the next 10, 20 years.
58:24 I agree.
58:25 Yeah.
58:25 Yeah.
58:25 Interesting.
58:26 Yeah.
58:27 I think there's great potential for very much good.
58:29 And I think there's also a potential for lots of disruption.
58:32 So it's going to be a mixed bag, but it's going to be interesting to watch it play out for sure.
58:37 I absolutely agree.
58:37 And Python and Scikit-learn will be at the foundation somewhere, I'm sure.
58:40 Yeah.
58:42 Cool.
58:43 All right.
58:44 Well, this is a super interesting project.
58:47 And thanks for sharing your journey with us.
58:49 It was my pleasure.
58:50 Yeah.
58:50 So before you get out of here, though, I got the two questions, final questions for you.
58:55 When you're writing your Python code, what editor do you use?
58:58 I use Vim.
58:59 Vim.
58:59 Right on.
59:00 Yeah.
59:00 My fiance convinced me to start using it about two years ago.
59:05 And I think I can't switch to anything else anymore.
59:07 Once you learn something, yeah, it's just tough.
59:10 Do you also use Jupyter notebooks?
59:12 Yes.
59:13 Yes, I do use them.
59:14 But I get really annoyed with not having all the keyboard shortcuts.
59:18 I know.
59:19 So yeah, I usually use them for like most of the time.
59:23 Yeah, that's cool.
59:23 And then notable PyPI packages.
59:26 What ones do you think people should learn about?
59:28 Yeah.
59:29 So one I think many people know about already, but it was so useful for me at the point when
59:34 I started programming was IPDB.
59:36 So the IPython debugger.
59:37 It made life so much easier for me.
59:40 So that I think it's a great package.
59:42 And then I heard about Black on the podcast a few months ago.
59:46 I think it was the podcast on coverage, wasn't it?
59:49 Oh, yes, I think it was.
59:50 Yeah.
59:50 Ned Batchelder.
59:51 Yeah.
59:51 Yeah.
59:51 It's a Python code formatter.
59:53 And I tried it a few times and it looks really, really good.
59:56 So I will definitely spend more time on learning about Black.
59:59 Yeah.
01:00:00 Black is cool.
01:00:00 There's been linters that will tell you how you formatted your code wrong, but Black goes
01:00:05 farther and fixes it for you, which is really nice.
01:00:08 I really like that.
01:00:09 Yeah, that's cool.
01:00:10 All right.
01:00:11 So people are excited about having this magical universe where they can try out their 100 days
01:00:17 of code and get better at Python and stuff.
01:00:18 What do you say for them?
01:00:20 Like what resources you have?
01:00:21 How should they get started?
01:00:22 I think the most important thing is just to find a topic that is interesting for yourself
01:00:26 and that really motivates you to sit down every day and that you make it fun for yourself.
01:00:32 And that will make it way easier.
01:00:34 Yeah.
01:00:34 I think fun is a super key part.
01:00:36 And I'll link to your blog posts and to your GitHub repository and all that.
01:00:40 Yeah, please.
01:00:40 Yeah.
01:00:41 Yeah, definitely.
01:00:41 All right.
01:00:42 Annalena, thank you so much for being on the show.
01:00:44 It was really interesting and fun to chat with you.
01:00:47 You too.
01:00:48 Thank you.
01:00:48 Bye.
01:00:49 Bye.
01:00:49 This has been another episode of Talk Python to Me.
01:00:53 Our guest on this episode was Annalena Popkas, and it's been brought to you by Coder.com
01:00:58 and Talk Python Training.
01:00:59 Coder.com brings full Visual Studio Code and cloud computing to every device.
01:01:05 Create your free Coder.com account and start collaborating on code today.
01:01:09 Visit talkpython.fm/coder to create your free account.
01:01:13 Want to level up your Python?
01:01:15 If you're just getting started, try my Python jumpstart by building 10 apps or our brand new
01:01:20 100 days of code in Python.
01:01:22 And if you're interested in more than one course, be sure to check out the everything bundle.
01:01:26 It's like a subscription that never expires.
01:01:29 Be sure to subscribe to the show.
01:01:30 Open your favorite podcatcher and search for Python.
01:01:32 We should be right at the top.
01:01:34 You can also find the iTunes feed at /itunes, Google Play feed at /play, and
01:01:39 direct RSS feed at /rss on talkpython.fm.
01:01:43 This is your host, Michael Kennedy.
01:01:45 Thanks so much for listening.
01:01:46 I really appreciate it.
01:01:48 Now get out there and write some Python code.
01:01:49 I'll see you next time.
01:02:10 Thank you.