WEBVTT

00:00:00.001 --> 00:00:04.400
The key to making anything a habit, including learning a program, is to make it fun.

00:00:04.400 --> 00:00:09.160
That's exactly what Annalena Pupkes did with her 100 Days of Code Challenge.

00:00:09.160 --> 00:00:13.880
She created a magical universe where Python-derived creatures and castles live.

00:00:13.880 --> 00:00:18.640
Join us on this episode as we explore some of the Python concepts she encountered on her journey,

00:00:18.640 --> 00:00:24.480
as well as how she made her way to Microsoft Research in the UK, where she's doing an AI residency.

00:00:24.800 --> 00:00:30.220
This is Talk Python To Me, episode 186, recorded November 13th, 2018.

00:00:30.220 --> 00:00:50.080
Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.

00:00:50.080 --> 00:00:52.020
This is your host, Michael Kennedy.

00:00:52.020 --> 00:00:54.160
Follow me on Twitter, where I'm @mkennedy.

00:00:54.420 --> 00:01:00.380
Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.

00:01:00.380 --> 00:01:06.420
This episode is brought to you by Coder.com and us at Talk Python Training.

00:01:06.420 --> 00:01:09.180
Annalena, welcome to Talk Python.

00:01:09.180 --> 00:01:10.640
Hi. Nice to meet you.

00:01:10.640 --> 00:01:12.820
Nice to meet you, as well. It's so great to have you here.

00:01:12.820 --> 00:01:15.700
And I'm really looking forward to our topics.

00:01:15.700 --> 00:01:19.520
We're going to talk about your 100 Days of Code project and its interesting angle.

00:01:19.860 --> 00:01:25.680
And then a little bit about what you're doing with machine learning as well, because I think that's super interesting.

00:01:25.680 --> 00:01:29.360
But before we get to the stories, let's start with yours.

00:01:29.360 --> 00:01:30.600
How did you get into programming in Python?

00:01:30.600 --> 00:01:33.660
So I got into programming way too late, in my opinion.

00:01:33.660 --> 00:01:38.960
So I was studying cognitive science in my undergraduate degree in order to become a neuroscientist.

00:01:39.080 --> 00:01:43.940
And at the very end of the program, I attended an intro to machine learning lecture.

00:01:43.940 --> 00:01:56.340
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.

00:01:56.840 --> 00:02:02.580
So I looked for a computer science graduate program that would allow me to focus on machine learning.

00:02:02.580 --> 00:02:05.200
And of course, I had to start programming.

00:02:05.200 --> 00:02:08.720
So I looked for a suitable programming language.

00:02:08.720 --> 00:02:12.500
And when I tried out Python, I knew that it was the perfect choice.

00:02:12.500 --> 00:02:17.660
So I really liked that it was so easy to get started with, that it has such a nice syntax.

00:02:17.660 --> 00:02:20.760
And it's, yeah, it's just so readable.

00:02:21.120 --> 00:02:26.820
Yeah, it's, I think it's very approachable for beginners because it doesn't have all those symbols that look super scary, right?

00:02:26.820 --> 00:02:30.280
You're like star, star, you know, void, star, star.

00:02:30.280 --> 00:02:32.420
You're like, whoa, what is this crazy stuff, right?

00:02:32.420 --> 00:02:33.840
I agree.

00:02:33.840 --> 00:02:34.140
Yeah.

00:02:34.140 --> 00:02:34.600
Yeah.

00:02:34.600 --> 00:02:37.540
And since then, I've been working with Python almost all the time.

00:02:37.540 --> 00:02:38.920
So it's really nice.

00:02:38.920 --> 00:02:39.940
Yeah, that's great.

00:02:39.940 --> 00:02:46.440
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?

00:02:46.440 --> 00:02:50.440
I mean, it's exactly where most of the action is these days, right?

00:02:50.620 --> 00:02:51.980
What other languages were you considering?

00:02:51.980 --> 00:02:53.260
Oh, that's a good question.

00:02:53.260 --> 00:02:54.300
I don't even remember.

00:02:54.300 --> 00:02:56.320
My brain is like a thief sometimes.

00:02:56.320 --> 00:02:58.480
So I'm sorry for that.

00:02:58.480 --> 00:03:06.840
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.

00:03:06.840 --> 00:03:12.520
But Python is just like a general purpose programming language.

00:03:12.520 --> 00:03:15.020
And I just liked it a lot.

00:03:15.020 --> 00:03:16.820
So I decided to stick with it.

00:03:16.820 --> 00:03:18.940
Yeah, I think that's a really great choice.

00:03:19.540 --> 00:03:22.660
So you were studying cognitive science previously.

00:03:22.820 --> 00:03:26.100
And then you decided to just jump into programming.

00:03:26.100 --> 00:03:28.020
How hard was that transition?

00:03:28.020 --> 00:03:29.480
Really hard?

00:03:29.480 --> 00:03:30.620
Was it scary?

00:03:30.620 --> 00:03:39.780
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.

00:03:40.040 --> 00:03:45.360
I would think of a computer science graduate degree.

00:03:45.360 --> 00:03:46.160
Yes, exactly.

00:03:46.160 --> 00:03:53.380
So I was lucky that I found a graduate program that you could do without a corresponding undergraduate degree.

00:03:53.520 --> 00:03:57.940
But in the beginning, I had to do so many things at my classes.

00:03:57.940 --> 00:04:04.580
And I had all the assignments that required coding, but I had to study the coding part at the same time.

00:04:04.580 --> 00:04:15.680
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.

00:04:15.680 --> 00:04:16.780
But it was hard.

00:04:16.780 --> 00:04:18.680
But it was definitely worth it.

00:04:18.680 --> 00:04:21.560
So it was the perfect decision for me.

00:04:21.560 --> 00:04:22.940
I'm really happy right now.

00:04:23.120 --> 00:04:23.740
Oh, that's awesome.

00:04:23.740 --> 00:04:29.200
Yeah, and you're doing such cool stuff, which we'll get to in detail later.

00:04:29.200 --> 00:04:32.460
But I think it's really admirable that you were able to do that.

00:04:32.460 --> 00:04:36.320
Like you saw what you wanted and you just took a turn.

00:04:36.320 --> 00:04:46.040
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.

00:04:46.040 --> 00:04:52.640
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.

00:04:53.020 --> 00:04:53.500
Exactly.

00:04:53.500 --> 00:05:00.260
It can be quite scary, especially when you spend quite a few years on learning about all the other stuff.

00:05:00.260 --> 00:05:07.240
So how much does the cognitive science, neuroscience stuff still factor into what you're doing?

00:05:07.240 --> 00:05:16.760
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?

00:05:16.760 --> 00:05:20.820
Or do we even know whether there is an equivalent thing in the brain?

00:05:21.220 --> 00:05:33.540
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.

00:05:34.340 --> 00:05:40.580
So, yeah, many machine learning algorithms are actually based on the brain, for example, like neural networks.

00:05:40.580 --> 00:05:41.080
Right.

00:05:41.080 --> 00:05:42.900
At least the original ones.

00:05:42.900 --> 00:05:43.280
Yeah.

00:05:43.280 --> 00:05:44.880
They've gone a long way since then, right?

00:05:44.880 --> 00:05:47.340
You've got deep learning models and all that.

00:05:47.460 --> 00:05:48.940
But it is very similar.

00:05:48.940 --> 00:05:58.520
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.

00:05:59.020 --> 00:06:01.580
And it was just such a cool place to be there.

00:06:01.580 --> 00:06:05.180
A bunch of cognitive science PhDs and a couple of programmers.

00:06:05.180 --> 00:06:09.700
And we were just building fun software to explore and test some of these ideas.

00:06:09.700 --> 00:06:17.540
And I think cognitive science doesn't get enough credit in terms of how much programming and technology happens there.

00:06:17.540 --> 00:06:17.980
Yeah.

00:06:17.980 --> 00:06:18.960
Yeah.

00:06:19.020 --> 00:06:22.140
It's a very, very fascinating subject.

00:06:22.140 --> 00:06:23.480
Yeah, it definitely is.

00:06:23.480 --> 00:06:25.740
So, I remember good times there as well.

00:06:25.740 --> 00:06:26.440
Okay.

00:06:26.440 --> 00:06:30.620
So, speaking of machine learning and neural networks, what are you doing today?

00:06:30.620 --> 00:06:34.060
So, I'm currently at Microsoft Research in Cambridge in the UK.

00:06:34.060 --> 00:06:37.220
And I'm an artificial intelligence resident.

00:06:37.220 --> 00:06:39.960
So, that's like an educational program.

00:06:39.960 --> 00:06:41.600
We're about 20 people.

00:06:41.780 --> 00:06:49.100
And the overall goal of the program, I would say, is to teach us all the necessary skills to become great research engineers.

00:06:49.100 --> 00:06:55.080
So, I work on a project that is based on applying Bayesian learning to healthcare data.

00:06:55.080 --> 00:07:01.520
But, of course, there are lots of projects within Microsoft here in Cambridge that work on lots of different stuff.

00:07:01.520 --> 00:07:10.920
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.

00:07:10.920 --> 00:07:12.540
That sounds so interesting.

00:07:12.540 --> 00:07:22.740
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.

00:07:22.740 --> 00:07:26.020
So, this lab here in Cambridge is really a research lab.

00:07:26.020 --> 00:07:31.300
Microsoft does a lot of work on customer projects and so on and products, of course.

00:07:31.300 --> 00:07:43.680
But this research lab here is about 200, 250 people, of which I think 150 are really working for Microsoft Research in Cambridge.

00:07:43.680 --> 00:07:46.500
They're always temporary people, interns, and so on.

00:07:47.560 --> 00:07:59.320
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.

00:07:59.320 --> 00:08:00.800
But that's just a guess.

00:08:00.800 --> 00:08:02.580
I would have to ask about the number.

00:08:02.580 --> 00:08:03.820
And that's just Cambridge, right?

00:08:03.820 --> 00:08:04.320
Yes.

00:08:04.320 --> 00:08:05.360
Yeah, that's just Cambridge.

00:08:05.360 --> 00:08:15.460
So, I think I saw a presentation somewhere where they were saying Microsoft has more PhD researchers than Stanford or something insane like that.

00:08:15.460 --> 00:08:16.360
You know, it's just like –

00:08:16.360 --> 00:08:16.420
Yeah.

00:08:16.420 --> 00:08:17.360
It's really –

00:08:17.360 --> 00:08:18.140
Yeah, they are huge.

00:08:18.140 --> 00:08:19.080
It's really huge.

00:08:19.080 --> 00:08:20.460
And so, there's a lot of stuff going on.

00:08:20.520 --> 00:08:25.540
I'm sure that's a super exciting place to work and AI as well as a big research area.

00:08:25.540 --> 00:08:30.700
I didn't know that Microsoft was doing so much research in AI before I started the program.

00:08:30.700 --> 00:08:36.760
So, I was surprised, too, that they were so active and had so many interesting projects going on.

00:08:36.760 --> 00:08:37.040
Yeah.

00:08:37.040 --> 00:08:45.300
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?

00:08:45.300 --> 00:08:46.400
No.

00:08:46.400 --> 00:08:48.020
Not at all.

00:08:48.020 --> 00:08:51.200
I never thought about myself getting into computer science.

00:08:51.200 --> 00:08:54.280
That was really so far from what I had planned.

00:08:54.280 --> 00:08:55.000
Yeah.

00:08:55.000 --> 00:08:59.200
I think it's really cool, though, that you were able to find your path into it.

00:08:59.200 --> 00:08:59.880
Yeah.

00:08:59.880 --> 00:09:00.060
Okay.

00:09:00.060 --> 00:09:03.240
So, let's talk a little bit about this 100 Days project.

00:09:03.240 --> 00:09:08.140
I think – you know, I first saw about it because people were talking about it on Reddit.

00:09:08.140 --> 00:09:13.600
And it was just so – you know, it was such a unique take on it, and people were so excited about it.

00:09:13.600 --> 00:09:19.400
So, it started out as 100 Days of Code with a Harry Potter theme.

00:09:19.400 --> 00:09:22.360
But it turned out you had to cancel the Harry Potter part, right?

00:09:22.360 --> 00:09:22.920
Yes.

00:09:22.920 --> 00:09:36.900
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.

00:09:36.980 --> 00:09:40.960
So, now you have a Harry Potter-inspired 100 Days of Code project.

00:09:40.960 --> 00:09:41.600
Exactly.

00:09:41.600 --> 00:09:42.200
Yes.

00:09:42.200 --> 00:09:47.500
So, I came up with my own little magical universe, which was actually quite a lot of fun, too.

00:09:47.500 --> 00:09:48.220
I bet it was.

00:09:48.220 --> 00:09:49.700
Instead of just copying what they got, right?

00:09:49.700 --> 00:09:50.320
You're like, forget it.

00:09:50.320 --> 00:09:51.900
I'm going to make my own space.

00:09:51.900 --> 00:09:55.340
You could spend time on researching names and what they mean.

00:09:55.340 --> 00:09:58.420
And, yeah, there's so much stuff on the internet.

00:09:58.420 --> 00:09:59.760
It's amazing.

00:09:59.760 --> 00:10:00.300
Yeah.

00:10:00.300 --> 00:10:00.980
That's great.

00:10:01.260 --> 00:10:03.520
So, let's start with 100 Days of Code.

00:10:03.520 --> 00:10:05.140
Just what is it?

00:10:05.140 --> 00:10:06.620
I know some people know it.

00:10:06.620 --> 00:10:16.700
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.

00:10:16.700 --> 00:10:19.660
But maybe they don't know the real history and details.

00:10:19.660 --> 00:10:20.380
Tell us about it.

00:10:20.380 --> 00:10:24.100
I think you might be the expert on the real history behind it.

00:10:24.100 --> 00:10:27.440
But I heard on it on your podcast for the first time.

00:10:27.440 --> 00:10:37.760
So, that you basically spent 100 days each day on learning about new coding stuff and really spent every day.

00:10:37.760 --> 00:10:40.360
I think the original one was 30 minutes coding.

00:10:40.360 --> 00:10:42.440
I adapted it to 15 to fit my needs.

00:10:42.440 --> 00:10:43.120
Yeah.

00:10:43.340 --> 00:10:48.700
And, yeah, and then really spent the time, those 100 days, to learn a lot of new cool stuff.

00:10:48.700 --> 00:10:50.900
I think it's such a cool idea.

00:10:50.900 --> 00:10:54.140
Just, you know, you're going to spend some time every day.

00:10:54.140 --> 00:11:05.800
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.

00:11:05.800 --> 00:11:07.560
We think we can do a bunch and not really.

00:11:07.560 --> 00:11:12.640
But we really underestimate what we can do in the long term in three months or six months in a year.

00:11:12.840 --> 00:11:14.560
You can make way more progress.

00:11:14.560 --> 00:11:25.420
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.

00:11:25.420 --> 00:11:27.560
And by the end, you're like, wow, look what I did.

00:11:27.560 --> 00:11:28.060
Yeah.

00:11:28.060 --> 00:11:30.920
Yeah, the habit building is a big part of it.

00:11:30.920 --> 00:11:38.540
Yeah, and you also said when you first started writing about it that there was this sort of no more procrastination thing going on Reddit.

00:11:38.540 --> 00:11:39.820
What's the story of that?

00:11:39.820 --> 00:11:40.500
Yeah.

00:11:40.680 --> 00:11:43.060
So, actually, I had two things that I combined.

00:11:43.060 --> 00:11:49.520
I found this awesome post called The X Effect on the subreddit that is called Get Disciplined.

00:11:49.520 --> 00:11:53.140
And it's basically about how you can create a new habit.

00:11:53.540 --> 00:12:00.340
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.

00:12:00.340 --> 00:12:10.920
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.

00:12:10.920 --> 00:12:12.400
Not a light one.

00:12:12.400 --> 00:12:15.420
A big fat one that makes it really obvious like you've done it right.

00:12:15.420 --> 00:12:16.160
So it feels good.

00:12:16.160 --> 00:12:16.500
Yeah.

00:12:16.500 --> 00:12:21.160
And it's quite a lot of fun to visually track your progress.

00:12:21.160 --> 00:12:22.720
Yeah, I'm sure it is.

00:12:22.720 --> 00:12:23.700
It sounds great.

00:12:23.700 --> 00:12:26.980
So I'll link to the Get Disciplined post on Reddit.

00:12:26.980 --> 00:12:30.120
And I didn't know about that subreddit, although I'm interested in it now.

00:12:30.120 --> 00:12:30.740
That's cool.

00:12:30.740 --> 00:12:33.100
Yeah, you can find a lot of interesting stuff on it.

00:12:33.100 --> 00:12:34.240
Yeah, I bet you can.

00:12:34.540 --> 00:12:40.500
Where were you in your journey into programming and machine learning when you started the 100 Days of Code?

00:12:40.500 --> 00:12:45.620
I just started an internship at Bosch, the Center of Artificial Intelligence.

00:12:45.620 --> 00:12:52.460
So I was about, so I had applied a few machine learning algorithms already to data sets and so on.

00:12:52.460 --> 00:12:57.800
But I had not spent so much time really on Python and all its advanced features.

00:12:57.800 --> 00:13:01.620
I looked at Dan Bader's book a little bit.

00:13:01.620 --> 00:13:04.120
I don't remember the name at the moment, but it's a pretty good.

00:13:04.120 --> 00:13:04.280
Python tricks.

00:13:04.980 --> 00:13:05.640
Yes, exactly.

00:13:05.640 --> 00:13:07.380
I can definitely recommend it.

00:13:07.380 --> 00:13:12.360
But yeah, I wanted to spend a bit more time on Python and all the advanced features.

00:13:12.360 --> 00:13:20.100
Since I think that with Python, at some point you get to a stage where you feel comfortable and you can write code.

00:13:20.100 --> 00:13:24.260
But you miss out on all the great features that Python has to offer.

00:13:24.260 --> 00:13:28.780
So I wanted to bridge that gap somewhat.

00:13:28.780 --> 00:13:29.640
Yeah, that's cool.

00:13:29.640 --> 00:13:33.800
I think that's one of the challenges of Python actually is many people learn,

00:13:33.860 --> 00:13:36.080
just enough to solve their problem.

00:13:36.080 --> 00:13:41.740
And because it's so simple, you can kind of just learn a little bit and live in that space.

00:13:41.740 --> 00:13:45.920
But you're not really taking full advantage of everything that's possible, right?

00:13:45.920 --> 00:13:46.480
I agree.

00:13:46.480 --> 00:13:47.440
It was the same for me.

00:13:47.540 --> 00:13:47.780
Yeah.

00:13:48.020 --> 00:13:54.260
This portion of talk by Python to me is brought to you by Coder.com.

00:13:54.260 --> 00:13:57.900
Coder.com has really nailed the idea of developer tools in the cloud.

00:13:57.900 --> 00:14:01.560
Have you heard about how amazing Visual Studio Code is lately?

00:14:01.560 --> 00:14:05.920
How would you like to have VS Code in the cloud on powerful infrastructure?

00:14:05.920 --> 00:14:16.180
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.

00:14:16.380 --> 00:14:30.580
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.

00:14:30.600 --> 00:14:34.640
One annoying thing about cloud-based dev tools is you don't control the platform.

00:14:34.640 --> 00:14:37.020
You can't install or configure anything.

00:14:37.020 --> 00:14:45.200
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.

00:14:45.200 --> 00:14:49.320
On top of that, you have fast time for when you have serious computing to do.

00:14:49.320 --> 00:14:53.800
You'll get access to 96 CPU cores to crunch that Python code fast.

00:14:53.800 --> 00:14:59.940
Finally, we know that Google Docs has made online collaboration enjoyable and an important part of many people's daily work.

00:14:59.940 --> 00:15:03.660
Coder.com brings this type of collaboration to your software projects.

00:15:03.660 --> 00:15:07.280
That makes them perfect for interviews, teaching, and teamwork.

00:15:07.280 --> 00:15:11.840
After just a couple of minutes of using Coder.com, you'll forget that you're even using a browser.

00:15:11.840 --> 00:15:17.400
It's the Visual Studio Code experience you love, just with way more power and available everywhere.

00:15:17.400 --> 00:15:21.140
Visit talkpython.fm/coder to get started for free.

00:15:21.140 --> 00:15:28.160
So let's talk about some of the things you covered in your 100 days of code that were...

00:15:28.160 --> 00:15:32.520
You had a different world you created called Castle Kilmer.

00:15:32.520 --> 00:15:33.400
Is that right?

00:15:33.400 --> 00:15:34.020
Yes.

00:15:34.020 --> 00:15:35.100
Yeah, exactly.

00:15:35.100 --> 00:15:38.740
Because Hogwarts wasn't an option.

00:15:38.740 --> 00:15:40.140
So Castle Kilmer.

00:15:40.140 --> 00:15:42.000
And let's talk about some of the things you created there.

00:15:42.000 --> 00:15:49.620
So your 100 days of code didn't cover 100 days of the Castle Kilmer characters.

00:15:49.620 --> 00:15:51.100
It was sort of half-half, right?

00:15:51.100 --> 00:15:51.680
Yes.

00:15:51.680 --> 00:16:01.000
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.

00:16:01.000 --> 00:16:04.400
Not to keep working on it just because it was there.

00:16:04.460 --> 00:16:08.980
I really wanted to have blog posts of high quality and interesting things.

00:16:08.980 --> 00:16:17.680
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.

00:16:17.680 --> 00:16:20.140
So I basically split it in half.

00:16:20.140 --> 00:16:21.200
Yeah, that makes sense.

00:16:21.200 --> 00:16:26.960
Sometimes it's hard to cram some feature into a program that just doesn't make sense.

00:16:26.960 --> 00:16:27.620
Yes.

00:16:27.620 --> 00:16:28.220
Yes.

00:16:28.220 --> 00:16:30.560
So all of your code is on GitHub.

00:16:30.560 --> 00:16:31.980
And I'll link to that, right?

00:16:31.980 --> 00:16:33.460
And you also...

00:16:33.460 --> 00:16:34.960
Did you blog every day on this?

00:16:34.960 --> 00:16:35.340
No.

00:16:35.400 --> 00:16:38.480
I created one blog post for each big concept.

00:16:38.480 --> 00:16:42.000
So for example, I spent several days on abstract base classes.

00:16:42.000 --> 00:16:48.800
But of course, I created one blog post about abstract base classes and not several ones for each day.

00:16:48.800 --> 00:16:55.120
But each big concept or each big thing has its own blog post with details and the examples.

00:16:55.120 --> 00:16:58.980
And then there's also the full version of the code for each day.

00:16:58.980 --> 00:16:59.320
Yeah.

00:16:59.320 --> 00:16:59.840
Okay.

00:16:59.840 --> 00:17:00.180
Yeah.

00:17:00.180 --> 00:17:00.560
Very cool.

00:17:00.560 --> 00:17:01.300
All right.

00:17:01.300 --> 00:17:05.140
So let's go through a couple of items that are pretty interesting that you covered.

00:17:05.140 --> 00:17:09.040
that were in the Castle Kilmer world.

00:17:09.040 --> 00:17:13.420
So you started out with object-oriented programming as one of them.

00:17:13.420 --> 00:17:15.120
Why were you thinking about that?

00:17:15.120 --> 00:17:16.960
I had used classes before.

00:17:16.960 --> 00:17:21.000
And what I wasn't so used to using object-oriented programming.

00:17:21.000 --> 00:17:28.700
So I really wanted to take advantage of this project and turn it into one that was based on object-oriented programming.

00:17:28.700 --> 00:17:33.880
So I started looking at the very basics again, which I really liked.

00:17:34.060 --> 00:17:36.020
It turned out to be a great choice in the end.

00:17:36.020 --> 00:17:36.820
Yeah.

00:17:36.820 --> 00:17:39.140
Just looked at what is object-oriented programming.

00:17:39.140 --> 00:17:42.020
How does it work in Python that you have classes?

00:17:42.020 --> 00:17:44.300
And what are classes?

00:17:44.300 --> 00:17:48.160
Namely, that they act as like blueprints for creating objects.

00:17:48.400 --> 00:17:57.660
And that these classes then define how objects are structured, what attributes they have, what kind of behavior, so what methods, what functionality.

00:17:57.660 --> 00:18:07.140
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.

00:18:07.720 --> 00:18:12.120
And I created the first class called Castle Kilmer member.

00:18:12.120 --> 00:18:15.080
And then I went on to inheritance.

00:18:15.080 --> 00:18:15.540
All right.

00:18:15.540 --> 00:18:17.420
So what are some of the ones that you covered in inheritance?

00:18:17.420 --> 00:18:18.900
Like, so you have this member.

00:18:18.900 --> 00:18:23.500
This is like anything that can be a human in this world or a character in this world, right?

00:18:23.640 --> 00:18:23.800
Yeah.

00:18:23.800 --> 00:18:26.800
It can be any character, like any member of the class.

00:18:26.800 --> 00:18:34.560
Of course, within the school, you have the students, you have the professors, you have the ghosts, you have lots of other people.

00:18:34.560 --> 00:18:37.100
And I wanted to have different classes for them.

00:18:37.260 --> 00:18:39.180
So I created one for the pupils.

00:18:39.180 --> 00:18:45.660
I created one for the professors and extended the universe over the course of the next days.

00:18:45.660 --> 00:18:45.920
Yeah.

00:18:45.920 --> 00:18:46.180
Nice.

00:18:46.180 --> 00:18:47.000
You even have a ghost.

00:18:47.000 --> 00:18:47.860
I like it.

00:18:47.860 --> 00:18:48.400
Yes.

00:18:48.400 --> 00:18:49.320
Yeah, I do.

00:18:49.320 --> 00:18:50.340
Of course.

00:18:50.340 --> 00:18:50.600
Yeah.

00:18:50.600 --> 00:18:51.280
Of course.

00:18:51.280 --> 00:18:51.980
You got to, right?

00:18:51.980 --> 00:19:02.240
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.

00:19:02.240 --> 00:19:13.560
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.

00:19:13.560 --> 00:19:18.620
And it really does make it pretty approachable to learn objects and classes and inheritance, I think.

00:19:18.620 --> 00:19:21.340
Yeah, that's why I went for this magical universe.

00:19:21.340 --> 00:19:25.620
I really wanted to have something that makes it fun for me to sit down every day.

00:19:25.620 --> 00:19:28.620
And originally the project wasn't even attended to be public.

00:19:29.500 --> 00:19:36.980
So I really started it for myself and to have a theme that spans through the entire thing and makes everyday fun.

00:19:36.980 --> 00:19:39.300
And it really was a lot of fun for me.

00:19:39.300 --> 00:19:40.240
Yeah, I'm sure it was.

00:19:40.240 --> 00:19:41.720
It looks really interesting.

00:19:41.720 --> 00:19:46.880
And I still remember back to some of the programs that I first wrote when I was learning programming.

00:19:46.880 --> 00:19:55.060
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?

00:19:55.060 --> 00:19:55.540
Yeah.

00:19:55.540 --> 00:19:56.320
Yeah, for sure.

00:19:56.320 --> 00:19:57.120
Okay.

00:19:57.120 --> 00:20:06.680
So another concept that you covered, which I think is still quite confusing to many folks, is different types of methods on classes.

00:20:06.680 --> 00:20:09.000
So functions on classes are called methods.

00:20:09.000 --> 00:20:12.800
And then you have instance methods, class methods, static methods.

00:20:12.800 --> 00:20:16.480
And then we'll even see some more variations, right?

00:20:16.480 --> 00:20:21.420
So maybe tell people your take on that and maybe what they are.

00:20:21.420 --> 00:20:21.760
Yeah.

00:20:21.760 --> 00:20:27.560
So I started out using instance methods most of the time, which I think everyone is using most of the time.

00:20:27.560 --> 00:20:28.120
Yeah, I agree.

00:20:28.120 --> 00:20:32.640
And they have this self parameter, at least the self parameter as an input.

00:20:32.640 --> 00:20:43.340
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.

00:20:43.340 --> 00:20:53.080
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.

00:20:53.260 --> 00:21:00.740
So these instance methods are quite powerful because they can modify both the object state and the class state.

00:21:00.740 --> 00:21:06.960
And I had my example was that the Castle Kilmear members were able to say something.

00:21:06.960 --> 00:21:11.680
So they had a say function and then a certain object.

00:21:11.680 --> 00:21:14.400
So a certain member was able to say a few words.

00:21:14.400 --> 00:21:16.720
And they'd have to use some of their properties, right?

00:21:16.720 --> 00:21:19.680
Like their name or other thing or what type they are, right?

00:21:19.680 --> 00:21:23.080
The professor, whatever says such and such, right?

00:21:23.780 --> 00:21:24.080
Yes.

00:21:24.080 --> 00:21:25.140
Yeah, and that's pretty standard.

00:21:25.140 --> 00:21:27.220
And then you get into class and static methods.

00:21:27.220 --> 00:21:32.800
And I think the existence of either a class method or a static method makes a lot of sense.

00:21:32.800 --> 00:21:36.500
But the existence of both is like, wait, why are there two of these?

00:21:36.500 --> 00:21:38.200
Why are there two ways to do this?

00:21:38.200 --> 00:21:39.280
Yes, that was also what I thought.

00:21:39.280 --> 00:21:41.620
Right now, I really like class methods.

00:21:41.620 --> 00:21:44.820
And I even used a few static methods now at work.

00:21:45.340 --> 00:21:52.240
And they can be very useful, especially if you want to communicate your intentions when you write your code.

00:21:52.240 --> 00:21:54.040
And it makes it much more readable.

00:21:54.040 --> 00:21:57.560
But only, of course, if the other people also know about class methods.

00:21:57.560 --> 00:21:58.060
Right.

00:21:58.160 --> 00:22:04.280
What I used class methods for a lot was to create alternative constructors for a class.

00:22:04.280 --> 00:22:07.120
Yeah, to really create different members of the universe.

00:22:07.120 --> 00:22:17.660
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.

00:22:17.660 --> 00:22:25.540
So a class method is restricted in some sense that it can only modify class state, but not the object state.

00:22:25.540 --> 00:22:33.220
So what I had as class methods for, for example, their use as alternative constructors.

00:22:33.220 --> 00:22:41.780
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.

00:22:41.780 --> 00:22:43.260
Yeah, I think that's a great use of it.

00:22:43.340 --> 00:22:48.840
And, you know, we don't talk about design patterns and stuff like that in Python as often as other languages.

00:22:48.840 --> 00:22:55.120
But it's kind of a factory pattern or something like that where you don't have to know how to create the thing.

00:22:55.120 --> 00:22:57.320
You just say, hey, type, make one of yourself.

00:22:57.320 --> 00:22:59.220
And it can put all the pieces together.

00:22:59.220 --> 00:23:00.060
I think that's cool.

00:23:00.060 --> 00:23:00.720
Yes, I like that a lot.

00:23:00.720 --> 00:23:02.100
Yeah, I do too.

00:23:02.100 --> 00:23:07.560
And honestly, with the static methods and class methods, I know the difference.

00:23:07.560 --> 00:23:11.320
I know the class method has the type available so it can work with it.

00:23:11.320 --> 00:23:12.680
And the static one doesn't.

00:23:12.820 --> 00:23:20.520
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.

00:23:20.520 --> 00:23:22.100
The static method doesn't necessarily.

00:23:22.100 --> 00:23:28.000
But beyond that, I honestly don't really know when I would use static over class.

00:23:28.000 --> 00:23:32.020
I guess if I don't feel like dealing with a class parameter, I'd use static.

00:23:32.020 --> 00:23:34.760
But I don't have a great recommendation either there.

00:23:35.700 --> 00:23:38.880
Static methods are a little weird, I guess.

00:23:38.880 --> 00:23:41.420
But I don't remember the use case now.

00:23:41.420 --> 00:23:44.400
I had at work for static methods.

00:23:44.900 --> 00:23:49.480
But I came across a use case and I was like, wow, I can use a static method.

00:23:49.480 --> 00:23:50.280
I know what it's for.

00:23:50.280 --> 00:23:51.860
It really makes sense to use it.

00:23:51.860 --> 00:23:52.800
Yeah.

00:23:52.980 --> 00:24:02.880
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.

00:24:02.880 --> 00:24:07.880
So either having a class or a static method is nice just for the grouping together.

00:24:07.880 --> 00:24:09.800
It's like all on this thing.

00:24:09.800 --> 00:24:10.540
Right.

00:24:10.620 --> 00:24:15.000
So if you import the class, you don't have to also import the functions, for example, to work with it.

00:24:15.000 --> 00:24:16.420
It's a little more obvious, I think.

00:24:16.420 --> 00:24:16.760
Yeah.

00:24:16.760 --> 00:24:24.060
It's good to communicate that it really somewhat is related to the class, even if it's independent in a sense.

00:24:24.060 --> 00:24:24.380
Yeah.

00:24:24.380 --> 00:24:35.100
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?

00:24:35.100 --> 00:24:35.720
Yes.

00:24:35.980 --> 00:24:42.160
Of course, I wanted to get a nice representation of my pupils and my professors and so on.

00:24:42.160 --> 00:24:52.880
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.

00:24:52.880 --> 00:24:56.320
I looked into the adunder methods you have for that.

00:24:56.320 --> 00:24:58.420
And there are actually two ones.

00:24:58.420 --> 00:25:01.140
That was also interesting for me to realize.

00:25:01.140 --> 00:25:04.000
I had never implemented them myself.

00:25:04.480 --> 00:25:07.200
And I only learned then that they have different purposes.

00:25:07.200 --> 00:25:13.160
So one should rather function as a debugging aid for developers.

00:25:13.160 --> 00:25:16.460
So the output should be as unambiguous as possible.

00:25:16.460 --> 00:25:24.400
But then there's also the other one where the output should really be readable so that you as a human can read it.

00:25:24.400 --> 00:25:24.780
Right.

00:25:24.920 --> 00:25:28.900
So the repper is the more developer debugging side of things.

00:25:28.900 --> 00:25:29.120
Yes.

00:25:29.120 --> 00:25:33.200
And the stir is sort of the print curly bracket.

00:25:33.200 --> 00:25:34.460
What goes in there.

00:25:34.460 --> 00:25:34.820
Yeah.

00:25:34.820 --> 00:25:35.780
Yeah.

00:25:35.780 --> 00:25:36.060
Yeah.

00:25:36.060 --> 00:25:36.440
Exactly.

00:25:36.440 --> 00:25:38.340
I think it's definitely interesting.

00:25:38.440 --> 00:25:48.100
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.

00:25:48.100 --> 00:25:52.080
Go and write a specialized repper for your classes.

00:25:52.240 --> 00:26:01.120
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.

00:26:01.120 --> 00:26:02.540
It's like, oh, here's the description.

00:26:02.540 --> 00:26:04.460
And it can really be helpful.

00:26:04.460 --> 00:26:06.120
And it doesn't take that much time.

00:26:06.120 --> 00:26:06.860
No.

00:26:06.860 --> 00:26:07.940
So, yeah, I agree.

00:26:07.940 --> 00:26:08.760
It's really useful.

00:26:08.760 --> 00:26:09.500
Yeah.

00:26:09.500 --> 00:26:09.880
I agree.

00:26:09.880 --> 00:26:15.000
And with data classes right now, you even get that implemented for you, right?

00:26:15.000 --> 00:26:15.280
Yeah.

00:26:15.280 --> 00:26:16.580
I think you do with data classes.

00:26:16.580 --> 00:26:17.060
That's right.

00:26:17.060 --> 00:26:17.440
Yeah.

00:26:17.440 --> 00:26:17.980
3.7.

00:26:17.980 --> 00:26:18.740
Very nice.

00:26:18.740 --> 00:26:23.560
Data classes are really sort of simplify a lot of the stuff that we're talking about.

00:26:23.560 --> 00:26:23.800
Yeah, yeah, yeah.

00:26:23.800 --> 00:26:24.880
Yeah.

00:26:24.880 --> 00:26:25.600
I like them.

00:26:25.600 --> 00:26:28.460
Another one that takes a while for people to get.

00:26:28.460 --> 00:26:36.640
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.

00:26:36.640 --> 00:26:38.480
The decorators, right?

00:26:38.480 --> 00:26:40.380
Those can be kind of mind-blowing, right?

00:26:40.380 --> 00:26:41.440
Yeah, absolutely.

00:26:41.440 --> 00:26:45.000
So, it was a big challenge to wrap my head around how they work.

00:26:45.000 --> 00:26:48.340
And I think I understood how they work now.

00:26:48.340 --> 00:26:50.900
But, yeah, don't test me on it.

00:26:50.900 --> 00:26:52.580
No test.

00:26:52.580 --> 00:26:54.780
But looking at your project, it looks pretty nice.

00:26:54.780 --> 00:27:04.240
So, in your world, in your Castle Killmere world, you could have characters that say things and then you create a whisper decorator.

00:27:04.240 --> 00:27:08.280
And if you put the whisper decorator onto that, it'll make it say it more quietly, right?

00:27:08.280 --> 00:27:09.340
Yes, exactly.

00:27:09.340 --> 00:27:12.720
Since, of course, there are also the mean people in my universe.

00:27:12.720 --> 00:27:14.080
They are called the Dark Army.

00:27:14.080 --> 00:27:17.020
And they have the leader, which is Lord Odin.

00:27:17.420 --> 00:27:25.040
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.

00:27:25.040 --> 00:27:26.540
But they would only be whispering.

00:27:26.540 --> 00:27:33.880
So, I had my application for creating a decorator that turns this saying function into a whispering function.

00:27:34.420 --> 00:27:43.480
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.

00:27:43.480 --> 00:27:46.980
They don't really permanently change the function itself.

00:27:46.980 --> 00:27:47.480
Right.

00:27:47.480 --> 00:27:49.480
And you've got to put the decorator on.

00:27:49.480 --> 00:27:56.620
And if you don't, it's not like somehow importing it is going to sort of patch and rewrite all the functions.

00:27:56.620 --> 00:27:56.920
Yeah.

00:27:56.920 --> 00:27:57.700
Yes.

00:27:57.940 --> 00:27:58.160
Yeah.

00:27:58.160 --> 00:28:03.820
So, with decorators, you've got this sort of, you take a function and its job is to take another function.

00:28:03.820 --> 00:28:11.280
And then it can add behavior before, after, and then, you know, hopefully at some point call that function.

00:28:11.280 --> 00:28:17.540
And all of that takes a little bit of interesting juggling with like star args, star star KW args.

00:28:17.540 --> 00:28:21.880
And I think that's probably why decorators are challenging because you've got to learn the decorators.

00:28:21.880 --> 00:28:25.700
You've got to learn like some of the closure data capture stuff in there.

00:28:25.800 --> 00:28:32.020
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.

00:28:32.020 --> 00:28:33.860
So, that's all a little bit crazy.

00:28:33.860 --> 00:28:37.120
But you also talked about not losing the metadata.

00:28:37.120 --> 00:28:44.780
So, if, you know, there's either a crash or you want to ask what is this function that I'm calling, right?

00:28:44.780 --> 00:28:52.960
A regular sort of unsophisticated decorator would say the function is the decorator function, not the internal wrapped function, right?

00:28:52.960 --> 00:28:54.940
So, you also had some work on that.

00:28:55.060 --> 00:28:55.180
Yeah.

00:28:55.180 --> 00:29:07.860
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.

00:29:08.400 --> 00:29:13.200
So, when you want to look at the doc string, you don't actually get the doc string off your function anymore.

00:29:13.200 --> 00:29:13.580
Right.

00:29:13.580 --> 00:29:14.360
Which is not so nice.

00:29:14.360 --> 00:29:16.200
You get help on the decorator or something, right?

00:29:16.200 --> 00:29:16.520
Yeah.

00:29:16.520 --> 00:29:17.020
Yeah.

00:29:17.020 --> 00:29:19.280
Which is usually not so useful.

00:29:19.280 --> 00:29:23.520
So, of course, that's also what I learned during the 100 days of code.

00:29:23.520 --> 00:29:26.120
There are packages for almost anything.

00:29:26.620 --> 00:29:32.100
I'm not sure whether there are many things left that haven't been solved or at least there were attempts to solve it.

00:29:32.100 --> 00:29:32.760
Yeah.

00:29:32.760 --> 00:29:34.460
So, there's the functools module.

00:29:34.680 --> 00:29:41.620
And then there is the functools.wrap wrapper that you can apply to the wrapper function.

00:29:41.620 --> 00:29:43.320
That sounds confusing now.

00:29:43.320 --> 00:29:46.200
But that carries over the name and the doc string.

00:29:46.200 --> 00:29:47.620
It's very easy to use.

00:29:47.840 --> 00:29:56.580
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.

00:29:56.580 --> 00:29:56.900
Yeah.

00:29:56.900 --> 00:30:00.920
That's a really nice touch and, you know, makes it sort of a proper decorator for sure.

00:30:00.920 --> 00:30:06.520
This portion of Talk Python To Me is brought to you by us.

00:30:06.520 --> 00:30:10.760
Have you heard that Python is not good for concurrent programming problems?

00:30:10.760 --> 00:30:16.360
Whoever told you that is living in the past because it's prime time for Python's asynchronous features.

00:30:16.920 --> 00:30:26.040
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.

00:30:26.040 --> 00:30:31.160
That's why we created a course for anyone who wants to learn all of Python's async capabilities.

00:30:31.160 --> 00:30:33.600
Async techniques and examples in Python.

00:30:33.600 --> 00:30:39.480
Just visit talkpython.fm/async and watch the intro video to see if this course is for you.

00:30:39.480 --> 00:30:41.960
It's only $49 and you own it forever.

00:30:41.960 --> 00:30:43.000
No subscriptions.

00:30:43.000 --> 00:30:45.720
And there are discounts for teams as well.

00:30:46.000 --> 00:30:55.800
You talked earlier about data classes and how there are these sort of simple little containers, but they implement things like the wrapper function.

00:30:55.800 --> 00:31:00.900
The thing that predates data classes really was named tuples, right?

00:31:00.900 --> 00:31:01.400
Yeah.

00:31:01.400 --> 00:31:03.960
So you spent some time on that as well.

00:31:03.960 --> 00:31:06.500
And I'm a big fan of named tuples because...

00:31:06.500 --> 00:31:07.240
Me too, yes.

00:31:07.240 --> 00:31:09.240
They're so much nicer than...

00:31:09.240 --> 00:31:11.740
What is the third thing in this tuple?

00:31:11.740 --> 00:31:13.460
Is that the right one?

00:31:13.460 --> 00:31:17.040
You know, the string representation is not that helpful, right?

00:31:17.040 --> 00:31:24.880
And also you get confused so easily with like usual normal tuples with assigning the fields with the order.

00:31:24.880 --> 00:31:27.480
When you have more fields, it gets so confusing.

00:31:27.480 --> 00:31:29.000
Yeah, it definitely does.

00:31:29.540 --> 00:31:34.940
So maybe tell us how named tuples appeared in Castle Kilmere.

00:31:34.940 --> 00:31:35.460
Kilmere.

00:31:35.460 --> 00:31:36.020
Yeah.

00:31:36.020 --> 00:31:39.340
So I talked about these dark army members before.

00:31:40.480 --> 00:31:44.060
And of course, once you switch to the dark side, there's no way back.

00:31:44.060 --> 00:31:49.540
Either you get killed by the leader or you just stick with it.

00:31:49.540 --> 00:31:55.840
So that was perfect since tuples are immutable and named tuples are basically an extension of tuples.

00:31:56.360 --> 00:32:08.680
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.

00:32:08.680 --> 00:32:09.500
That's really cool.

00:32:09.500 --> 00:32:10.140
I love it.

00:32:10.140 --> 00:32:10.600
I love it.

00:32:10.600 --> 00:32:12.220
That's a really creative use of it.

00:32:12.220 --> 00:32:16.080
Interpretation of the immutability of named tuples.

00:32:16.080 --> 00:32:21.160
Another area that you covered was abstract base classes.

00:32:21.160 --> 00:32:23.640
And I feel like that's a pretty advanced topic as well.

00:32:24.100 --> 00:32:27.420
What did you find to use abstract base classes for in your universe?

00:32:27.420 --> 00:32:30.580
So, of course, I found a great thing again, namely spells.

00:32:30.580 --> 00:32:35.180
That was also something I learned that there are actually many different kinds of spells.

00:32:35.180 --> 00:32:40.700
You have a curse, you have a jinx, you have a hex, you have a charm, a transfiguration, and so on and so on.

00:32:40.700 --> 00:32:43.440
But all of them are, of course, spells.

00:32:43.440 --> 00:32:50.480
And abstract base classes are very useful when you have classes that all belong to one base class.

00:32:51.060 --> 00:32:56.080
And all of these subclasses should implement certain methods from the base class.

00:32:56.080 --> 00:33:00.140
But you don't want to be able to instantiate this base class itself.

00:33:00.140 --> 00:33:06.480
So for the spell, each spell should have a name and then an incantation and a certain effect.

00:33:06.480 --> 00:33:13.660
And I also added a defining features, for example, that a curse should make people suffer or it should harm people.

00:33:13.900 --> 00:33:16.940
Yeah, it sounds mean, but that's what curses are for, right?

00:33:16.940 --> 00:33:17.520
That's right.

00:33:17.520 --> 00:33:19.420
It's a tough world.

00:33:19.420 --> 00:33:20.520
Yeah.

00:33:20.520 --> 00:33:23.500
So I had the abstract base class for a spell.

00:33:24.020 --> 00:33:34.640
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.

00:33:34.640 --> 00:33:41.700
Then I had all these different subclasses like curse, transfiguration, and so on.

00:33:41.700 --> 00:33:42.140
Yeah.

00:33:42.140 --> 00:33:51.880
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?

00:33:51.880 --> 00:33:58.560
There's no normal way to say it has to do its own version of cast and its own version of defining features.

00:33:58.560 --> 00:34:01.800
But if you make it an abstract base class, you can say those abstract methods.

00:34:01.800 --> 00:34:05.640
It makes sure that you implement them or you just can't use the charm, right?

00:34:05.640 --> 00:34:07.560
So that's a really nice way to make that work.

00:34:07.560 --> 00:34:07.760
Yeah.

00:34:08.620 --> 00:34:08.820
Yeah.

00:34:08.820 --> 00:34:09.340
Yeah.

00:34:09.340 --> 00:34:09.820
I agree.

00:34:09.820 --> 00:34:10.380
Absolutely.

00:34:10.380 --> 00:34:10.800
Yeah.

00:34:10.800 --> 00:34:14.220
That's something I don't see that often in Python, but I do like it.

00:34:14.220 --> 00:34:14.720
It's very cool.

00:34:14.720 --> 00:34:19.000
And then you've got to test your universe once you build it, right?

00:34:19.000 --> 00:34:19.620
Yes.

00:34:19.620 --> 00:34:23.480
So that was quite nice since I hadn't spent a lot of time on testing.

00:34:23.480 --> 00:34:25.520
Although that's so important.

00:34:25.520 --> 00:34:37.220
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,

00:34:37.480 --> 00:34:44.960
well, how can this function be broken by a user or what kind of silly inputs could you put in there?

00:34:44.960 --> 00:34:46.000
Yeah.

00:34:46.000 --> 00:34:48.840
It's all the bad inputs and things you don't check for.

00:34:48.840 --> 00:34:52.100
It's easy to put in the right number or the right value and go, oh, that worked.

00:34:52.100 --> 00:34:53.740
But it's everything else, right?

00:34:53.740 --> 00:34:56.540
And once you created the test, you can always rerun them.

00:34:56.540 --> 00:35:05.000
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.

00:35:05.000 --> 00:35:05.400
Yeah.

00:35:05.400 --> 00:35:06.320
I think it's great.

00:35:06.320 --> 00:35:11.060
It's probably a little extra challenging in your day job compared to Castle Kilmer.

00:35:11.060 --> 00:35:11.980
Yeah.

00:35:11.980 --> 00:35:16.320
Because machine learning seems kind of hard to understand.

00:35:16.320 --> 00:35:17.380
It's a little opaque.

00:35:17.380 --> 00:35:21.000
And it's just hard to think about, I think.

00:35:21.000 --> 00:35:22.420
Do you find it to be challenging?

00:35:22.420 --> 00:35:23.260
Yeah, absolutely.

00:35:23.680 --> 00:35:34.320
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.

00:35:34.880 --> 00:35:40.440
And right now, I know all the basics of pytest, and I can make sure that I use the more advanced features.

00:35:40.440 --> 00:35:43.720
And yeah, pytest is just so powerful.

00:35:43.720 --> 00:35:45.980
I didn't really realize that before.

00:35:45.980 --> 00:35:48.240
You can do so many things with it.

00:35:48.240 --> 00:35:49.020
Yeah, it's amazing.

00:35:49.020 --> 00:35:50.320
Yeah, it really is amazing.

00:35:50.320 --> 00:35:50.940
It's great.

00:35:50.940 --> 00:35:56.460
And I think there's a good lesson here in the learn the one thing at a time, right?

00:35:56.460 --> 00:36:00.860
Learn testing in a simple space where you understand the other stuff, the stuff you're testing.

00:36:00.860 --> 00:36:04.320
And then you can apply it to things that are more challenging like machine learning.

00:36:04.320 --> 00:36:04.540
Yeah, absolutely.

00:36:05.180 --> 00:36:05.680
Yeah, cool.

00:36:05.680 --> 00:36:11.420
And it was also nice to look at like how to write proper test functions.

00:36:11.420 --> 00:36:13.360
I think that's also a big part of it.

00:36:13.360 --> 00:36:17.960
Yeah, I think a lot of times people don't put enough attention to writing proper test functions,

00:36:17.960 --> 00:36:25.140
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.

00:36:25.140 --> 00:36:25.500
Yes.

00:36:25.500 --> 00:36:30.400
And then the testing gets hard, and then you stop doing it, and then you have bugs, and it's not good.

00:36:30.400 --> 00:36:31.420
Yeah.

00:36:32.460 --> 00:36:36.940
So that pretty much covers the magical universe side of things.

00:36:36.940 --> 00:36:40.400
But there's a few other areas maybe worth just touching on really quick.

00:36:40.540 --> 00:36:47.340
One is if Dunder name equals Dunder main, right?

00:36:47.340 --> 00:36:49.720
That's always confusing, isn't it?

00:36:49.720 --> 00:36:50.080
Yeah.

00:36:50.080 --> 00:37:01.460
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.

00:37:01.460 --> 00:37:01.720
Yeah.

00:37:01.960 --> 00:37:02.220
Yeah, yeah.

00:37:02.220 --> 00:37:02.360
Yeah.

00:37:02.360 --> 00:37:08.520
And when I started looking at it, I was first so confused, but then I broke it down into individual steps.

00:37:08.520 --> 00:37:12.620
And right now, when I see it, I really know what is happening, and that is nice.

00:37:12.620 --> 00:37:12.940
Yeah.

00:37:13.000 --> 00:37:23.660
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.

00:37:23.660 --> 00:37:25.260
I'm like, oh, wait, there's a Dunder name?

00:37:25.260 --> 00:37:26.220
Where does that come from?

00:37:26.220 --> 00:37:26.900
Yeah.

00:37:26.900 --> 00:37:34.100
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.

00:37:34.360 --> 00:37:40.860
Yeah, you usually don't know about them if you never, like, took a look at the different things.

00:37:40.860 --> 00:37:42.040
Yeah, it's pretty cool.

00:37:42.040 --> 00:37:45.920
So, it's not super hard once you learn, right?

00:37:45.920 --> 00:37:52.900
Like, if you run the program directly and you print out Dunder name, you'll see main, you know, Dunder main.

00:37:52.900 --> 00:37:56.060
But if you import it, you'll see whatever the name of the module was, right?

00:37:56.060 --> 00:37:59.720
And you can kind of work your way through, and it's not super confusing.

00:37:59.720 --> 00:38:02.700
It's just when you first see it, you don't know where it comes from, right?

00:38:02.840 --> 00:38:10.340
Yeah, and it looks, for me, it looked quite scary with all these Dunders and the, yeah, I was really confused.

00:38:10.340 --> 00:38:10.780
What is all this?

00:38:10.780 --> 00:38:12.680
Why are these symbols back in my Python?

00:38:12.680 --> 00:38:13.560
What's going on?

00:38:13.560 --> 00:38:15.840
Yeah, yeah, for sure.

00:38:15.840 --> 00:38:16.880
I don't know.

00:38:16.880 --> 00:38:26.040
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.

00:38:26.040 --> 00:38:32.520
Like, C has its main and C# has a main, a static void main sort of thing.

00:38:33.480 --> 00:38:34.120
I don't know.

00:38:34.120 --> 00:38:36.360
Maybe it's worth adding something like that to Python.

00:38:36.360 --> 00:38:38.520
Because once you learn it, it's fine.

00:38:38.520 --> 00:38:44.140
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.

00:38:44.140 --> 00:38:44.720
I agree.

00:38:44.720 --> 00:38:45.100
Yeah.

00:38:45.100 --> 00:38:45.920
Yeah.

00:38:45.920 --> 00:38:51.540
It's used a lot of times, even in the beginning, without knowing what it's actually doing.

00:38:51.540 --> 00:38:51.920
Yeah.

00:38:51.920 --> 00:38:52.160
Right.

00:38:52.220 --> 00:38:52.580
Exactly.

00:38:52.580 --> 00:38:53.620
Yeah.

00:38:53.620 --> 00:39:00.960
I think probably the two big confusing starting points are this Thunder name thing and then virtual environments.

00:39:00.960 --> 00:39:01.320
Right.

00:39:01.320 --> 00:39:05.960
Both of those can get you right away when you're not really ready to think about them.

00:39:05.960 --> 00:39:06.140
Yeah.

00:39:06.140 --> 00:39:06.780
Absolutely.

00:39:07.020 --> 00:39:07.160
Yeah.

00:39:07.160 --> 00:39:10.040
And I guess also maybe just underscores, right?

00:39:10.040 --> 00:39:13.780
You talked a bit about how underscores are serving so many purposes.

00:39:13.780 --> 00:39:14.620
Yeah.

00:39:14.620 --> 00:39:16.520
That was also a really nice thing.

00:39:16.520 --> 00:39:18.740
I really liked spending time on it.

00:39:19.100 --> 00:39:27.480
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.

00:39:27.480 --> 00:39:33.100
For example, I came across code once of a colleague that I think he was programming in C before.

00:39:33.100 --> 00:39:41.320
And he named all the magic, his methods with Dunder name and another double underscore.

00:39:41.320 --> 00:39:44.060
And I was like, you shouldn't do that in Python.

00:39:44.060 --> 00:39:46.920
Like, that has a special meaning.

00:39:46.920 --> 00:39:47.820
That's not good.

00:39:48.320 --> 00:39:54.040
And he had just no idea about it since he never looked at the different underscore patterns, which can be.

00:39:54.040 --> 00:39:54.500
Yeah.

00:39:54.500 --> 00:39:56.000
They are just different sometimes.

00:39:56.000 --> 00:39:56.400
Yeah.

00:39:56.400 --> 00:39:56.840
Yeah.

00:39:56.840 --> 00:40:02.000
There's you have at least five listed here and there maybe are even more.

00:40:02.000 --> 00:40:02.180
Yeah.

00:40:02.180 --> 00:40:04.140
There's a lot of different uses for the underscore.

00:40:04.140 --> 00:40:09.280
So Python is a language without too many symbols, but they love the underscore for sure.

00:40:09.280 --> 00:40:10.300
They do.

00:40:10.300 --> 00:40:11.040
Absolutely.

00:40:11.040 --> 00:40:13.540
That's definitely one that shows up.

00:40:13.540 --> 00:40:14.500
All right.

00:40:14.580 --> 00:40:22.400
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.

00:40:22.400 --> 00:40:25.180
So what are your main takeaways from this whole experience?

00:40:25.520 --> 00:40:37.180
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.

00:40:37.180 --> 00:40:42.080
And it's really, really, really useful if you directly apply what you learn.

00:40:42.580 --> 00:40:51.900
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.

00:40:51.900 --> 00:40:55.000
So that is a really important thing.

00:40:55.000 --> 00:40:55.380
Yeah.

00:40:55.380 --> 00:41:02.600
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.

00:41:02.600 --> 00:41:03.980
You're not going to internalize it.

00:41:03.980 --> 00:41:04.160
Yeah.

00:41:05.240 --> 00:41:09.740
Were you surprised at how popular your post on Reddit became?

00:41:09.740 --> 00:41:10.360
Oh, absolutely.

00:41:10.360 --> 00:41:11.460
Absolutely.

00:41:11.460 --> 00:41:12.780
I was so surprised.

00:41:12.780 --> 00:41:19.740
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.

00:41:19.740 --> 00:41:23.920
Maybe it's also fun for others to learn about the features by using magic.

00:41:23.920 --> 00:41:27.340
And then so many people liked it so much.

00:41:27.340 --> 00:41:30.460
It was a great, great experience.

00:41:30.460 --> 00:41:30.980
Yeah.

00:41:30.980 --> 00:41:33.340
That must have felt really good to see so many people enjoying it.

00:41:33.340 --> 00:41:36.780
And it also motivates you to go on and keep working on it.

00:41:36.780 --> 00:41:39.240
I'm sure you're like, well, now I have to do this.

00:41:39.240 --> 00:41:39.860
Yes.

00:41:39.860 --> 00:41:43.600
Do you think it made you a better developer going through this process?

00:41:43.600 --> 00:41:44.780
Yeah, I think so.

00:41:44.780 --> 00:41:48.020
So, for example, it introduced me to many advanced concepts.

00:41:48.020 --> 00:41:53.500
And I think most of them I didn't even know before or I never fully understood them.

00:41:53.500 --> 00:41:59.600
And now with working in this AI residency, I could apply quite a few of them already.

00:41:59.600 --> 00:42:03.400
For example, I used abstract base classes, which I never heard of before.

00:42:03.400 --> 00:42:04.540
Yeah, definitely.

00:42:04.540 --> 00:42:05.800
It made me a better developer.

00:42:05.800 --> 00:42:06.280
Yeah.

00:42:06.280 --> 00:42:07.960
But there's still a long way to go, I guess.

00:42:07.960 --> 00:42:09.520
There's always a long way to go.

00:42:09.520 --> 00:42:11.680
It's like an infinite path.

00:42:11.920 --> 00:42:21.920
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.

00:42:21.920 --> 00:42:25.140
Like, I put a little at symbol, then something goes here, and then it works differently.

00:42:25.140 --> 00:42:30.440
But you don't really think about the decorators and the funk tools and just all the layers.

00:42:30.440 --> 00:42:30.700
Yeah.

00:42:30.800 --> 00:42:34.880
But when you've got to write about it and the purpose is to study that, then it's different.

00:42:34.880 --> 00:42:35.100
Yeah.

00:42:35.100 --> 00:42:37.700
All right.

00:42:37.700 --> 00:42:42.400
Well, let's talk a little bit about where you are working now and where you're going.

00:42:42.400 --> 00:42:45.380
So you're a big fan of machine learning, I can tell.

00:42:45.380 --> 00:42:50.720
You talked about how you actually changed your career, basically, because of machine learning, which is really great.

00:42:51.440 --> 00:42:57.420
So you have another cool GitHub project called Machine Learning Basics.

00:42:57.420 --> 00:42:58.980
Do you want to tell people about that?

00:42:58.980 --> 00:42:59.320
Yeah.

00:42:59.320 --> 00:43:06.920
So in general, I really like working on projects that benefit many people or at least have the potential to benefit many people.

00:43:06.920 --> 00:43:13.720
So I started this machine learning repository when I was preparing for interviews.

00:43:13.720 --> 00:43:20.460
And when preparing for interviews and machine learning, you usually have to know about the basic machine learning algorithms,

00:43:20.460 --> 00:43:26.680
like K-Means, which is a clustering algorithm, or linear regression, logistic regression, and so on.

00:43:26.680 --> 00:43:29.080
But you really have to know how they work.

00:43:29.080 --> 00:43:36.560
So it won't work if you just use scikit-learn and then the implementation of them.

00:43:36.560 --> 00:43:37.960
I call this function.

00:43:37.960 --> 00:43:39.760
I give it these numbers and then magic.

00:43:39.760 --> 00:43:40.680
Yeah.

00:43:40.680 --> 00:43:42.200
But that's what many people do, actually.

00:43:42.200 --> 00:43:42.440
Yeah.

00:43:42.440 --> 00:43:43.240
I'm sure.

00:43:43.240 --> 00:43:43.520
Yeah.

00:43:43.520 --> 00:43:44.140
Yeah.

00:43:44.140 --> 00:43:45.740
And it's very useful.

00:43:45.740 --> 00:43:46.760
It can be very useful.

00:43:46.760 --> 00:43:50.080
But it's also really nice to just understand what's going on.

00:43:50.420 --> 00:43:54.720
So that was also a project I started just for me when I was preparing.

00:43:54.720 --> 00:44:05.540
And I created Jupyter Notebooks with first all the theoretical, most important theoretical basics about the algorithms with formulas and so on,

00:44:05.540 --> 00:44:08.440
and have everything in one consistent notation.

00:44:08.900 --> 00:44:15.040
And then I implemented them without using any of these scikit-learn methods and so on, but just Python and NumPy.

00:44:15.740 --> 00:44:27.020
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.

00:44:27.020 --> 00:44:31.640
And it became also way more popular than I ever expected.

00:44:31.940 --> 00:44:32.100
Yeah.

00:44:32.100 --> 00:44:38.220
I'm looking at the repository, and it has 2,000, almost 2,600 GitHub stars, 400 forks.

00:44:38.220 --> 00:44:40.800
I mean, this is really, really cool.

00:44:40.800 --> 00:44:44.260
And I think, one, I think it's a fantastic way to learn.

00:44:44.260 --> 00:44:51.800
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?

00:44:51.840 --> 00:44:57.800
Did you share, like, your GitHub account name with them and stuff like that when you applied to jobs?

00:44:57.800 --> 00:45:00.940
Yes, that's, like, you usually do that.

00:45:00.940 --> 00:45:04.140
I think when I applied, I didn't even have that.

00:45:04.140 --> 00:45:05.720
It wasn't even public.

00:45:05.720 --> 00:45:08.660
So at that point, it didn't help me much.

00:45:08.660 --> 00:45:10.380
Right now, it would probably help a lot.

00:45:10.380 --> 00:45:11.780
It probably would, yeah.

00:45:11.780 --> 00:45:15.640
But it was really just to teach myself how these algorithms worked.

00:45:15.640 --> 00:45:20.920
And only at that point, I really realized, do I really know how linear regression works?

00:45:20.920 --> 00:45:25.800
Do I really know how k-means works, like, the underlying structure?

00:45:25.800 --> 00:45:30.080
It was really, really good to take a detailed look at the algorithms again.

00:45:30.080 --> 00:45:30.920
Yeah, I'm sure.

00:45:30.920 --> 00:45:35.800
I think, you know, there's so many machine learning libraries that you can use.

00:45:35.800 --> 00:45:41.280
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.

00:45:41.280 --> 00:45:44.020
You can't reason about whether, does this make sense?

00:45:44.020 --> 00:45:44.960
Is this working right?

00:45:44.960 --> 00:45:47.200
So I think this is really great.

00:45:47.200 --> 00:45:51.360
And I'm sure a lot of people out there will be happy to hear about it, be able to use it.

00:45:51.360 --> 00:45:52.200
Hopefully, yes.

00:45:52.200 --> 00:45:52.580
Yeah.

00:45:52.580 --> 00:45:56.960
You seem to have a real knack for creating things that become quickly popular.

00:45:56.960 --> 00:45:59.360
Yeah, yeah.

00:45:59.360 --> 00:46:00.340
It seems like that.

00:46:00.340 --> 00:46:01.160
Yeah, it's nice.

00:46:01.160 --> 00:46:01.720
It's nice.

00:46:01.720 --> 00:46:02.780
All right.

00:46:02.780 --> 00:46:07.760
So maybe we could talk a little bit about the project that you're working on, at least not necessarily the project.

00:46:07.760 --> 00:46:13.620
It might be not public or anything, but just the general area of machine learning and healthcare.

00:46:14.000 --> 00:46:14.120
Yeah.

00:46:14.240 --> 00:46:20.800
So that's basically my main focus or what I want to focus on, namely apply machine learning algorithms to healthcare problems.

00:46:20.800 --> 00:46:28.800
Since I think there is, yeah, most healthcare applications just promise so many and huge improvements for so many people.

00:46:28.800 --> 00:46:34.080
There is already, I think, a lot of algorithms on detecting cancer, for example, from images.

00:46:34.080 --> 00:46:34.460
Yeah.

00:46:34.460 --> 00:46:35.540
That is quite popular.

00:46:35.740 --> 00:46:48.460
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.

00:46:48.460 --> 00:46:53.380
And those machine learning algorithms are getting as good or better than doctors, right?

00:46:53.500 --> 00:46:53.880
Yes.

00:46:53.880 --> 00:46:59.180
And with healthcare, the thing is that you have tons of data lying around in the hospitals.

00:46:59.180 --> 00:47:03.440
It's just amazing how much data they collect without ever using it.

00:47:03.440 --> 00:47:05.060
It's just lying there.

00:47:05.060 --> 00:47:11.420
And with machine learning, you can take advantage of it and create great things.

00:47:11.940 --> 00:47:14.400
I think there's a lot of possible applications there.

00:47:14.400 --> 00:47:15.260
Yeah, absolutely.

00:47:15.260 --> 00:47:17.020
I definitely think there are.

00:47:17.020 --> 00:47:23.260
I think the challenge with healthcare is people are so protective of the privacy, understandably.

00:47:23.820 --> 00:47:27.420
I wonder if there'll be, you know, there's big healthcare organizations.

00:47:27.420 --> 00:47:34.320
And within those organizations, they're allowed to share the information with, say, their doctors, the different doctors and specialists.

00:47:34.320 --> 00:47:41.540
I wonder if there'll be these healthcare organizations who create machine learning algorithms based on only their own data.

00:47:41.540 --> 00:47:46.580
And it becomes like an advantage of that organization at some point in the future.

00:47:46.580 --> 00:47:51.100
I'm not sure that's a good thing, but I wonder if that's something that will happen because of the privacy.

00:47:51.100 --> 00:47:51.840
Yeah.

00:47:51.840 --> 00:47:52.200
What do you think?

00:47:52.200 --> 00:47:52.740
I agree.

00:47:53.160 --> 00:47:54.220
Yeah, that might really happen.

00:47:54.220 --> 00:47:57.500
It's very good that healthcare data is so heavily protected.

00:47:57.500 --> 00:48:08.660
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.

00:48:08.660 --> 00:48:08.920
Right.

00:48:08.920 --> 00:48:16.120
If we could all live 10 years longer or the last 10 years much more healthy, maybe we wouldn't want as much privacy.

00:48:16.120 --> 00:48:17.360
We might make that trade off.

00:48:17.360 --> 00:48:21.260
I mean, we'd trade our privacy to Facebook for, you know, a little like, right?

00:48:21.260 --> 00:48:23.040
Maybe we could live better.

00:48:23.120 --> 00:48:24.520
We could make better trade offs.

00:48:24.520 --> 00:48:24.940
I don't know.

00:48:24.940 --> 00:48:28.640
So your master's thesis was in this area, right?

00:48:28.640 --> 00:48:28.960
Yeah.

00:48:28.960 --> 00:48:31.400
So I really liked working on my master's thesis.

00:48:31.400 --> 00:48:36.940
It was a project together with the German University Hospital and their radiological department.

00:48:37.180 --> 00:48:41.560
And they said, well, we have tons of radiological reports lying around here.

00:48:41.560 --> 00:48:50.600
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.

00:48:50.660 --> 00:48:52.660
This has changed from last time.

00:48:52.660 --> 00:48:54.220
And so on and so on.

00:48:54.220 --> 00:48:57.000
But he or she doesn't have to write the report.

00:48:57.000 --> 00:49:00.960
But there has to be another radiologist that checks the report.

00:49:01.500 --> 00:49:07.900
And this just takes massive amounts of time, which could be used in way more useful ways.

00:49:07.900 --> 00:49:21.460
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.

00:49:21.460 --> 00:49:24.300
But of course, it was German data.

00:49:24.300 --> 00:49:29.880
And I think for English, there's already a lot of stuff there.

00:49:29.880 --> 00:49:34.280
But in general, the medical language is very complex.

00:49:34.280 --> 00:49:38.180
So there are a lot of terms for some types of cancers.

00:49:38.180 --> 00:49:40.520
You have five names that all mean the same thing.

00:49:40.520 --> 00:49:43.300
Then you have all the synonyms.

00:49:43.300 --> 00:49:46.980
Sometimes you can write something with a K, sometimes with a C.

00:49:46.980 --> 00:49:49.640
And it can be really complicated.

00:49:49.640 --> 00:49:56.720
So I worked on a recurrent neural network for processing these reports and then really using it in the hospital.

00:49:56.720 --> 00:49:58.880
And right now we are at the stage.

00:49:58.880 --> 00:50:04.500
It takes quite a while for them to really incorporate it in their system and try it out, evaluate it, so on.

00:50:04.500 --> 00:50:11.480
But hopefully then it can be used at some point and really be used by the doctors there to save time.

00:50:11.480 --> 00:50:14.040
I think that's a really meaningful project.

00:50:14.040 --> 00:50:15.300
That sounds super cool.

00:50:15.300 --> 00:50:20.160
And it's way more fun to work on projects like that where you can see the end application.

00:50:20.160 --> 00:50:21.300
Oh, I'm sure it is.

00:50:21.300 --> 00:50:22.100
Yeah.

00:50:22.100 --> 00:50:25.820
One of the really sad things is to work on a project and then see nobody uses it.

00:50:25.820 --> 00:50:26.340
Right.

00:50:26.340 --> 00:50:26.900
Yeah.

00:50:26.900 --> 00:50:27.780
That doesn't feel good.

00:50:28.380 --> 00:50:32.160
I can certainly see as a programmer how much autocomplete helps, right?

00:50:32.160 --> 00:50:39.460
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.

00:50:39.660 --> 00:50:49.600
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.

00:50:49.600 --> 00:50:50.840
Oh, that is interesting.

00:50:50.840 --> 00:50:51.700
No, I've never used it.

00:50:51.700 --> 00:50:51.880
Yeah.

00:50:51.880 --> 00:51:00.200
So it actually studies your email chain and then it will propose, you know, maybe the next five or six words in a sentence.

00:51:00.400 --> 00:51:04.660
So I'll be like, I'm excited to have, and it'll say you on the podcast.

00:51:04.660 --> 00:51:12.160
I'm like, whoa, you know, and then you just hit tab and it autocompletes it and off it goes.

00:51:12.700 --> 00:51:18.800
So I think these ideas are starting to make their way into normal life, right?

00:51:18.800 --> 00:51:21.400
Outside of programming and super structured words.

00:51:21.400 --> 00:51:24.240
So I think it would have a huge value.

00:51:24.240 --> 00:51:29.120
Although the danger is if Gmail gets it slightly wrong, whatever, right?

00:51:29.120 --> 00:51:30.560
You made a silly mistake.

00:51:30.560 --> 00:51:32.940
We're all used to autocorrect on our phone, messing up stuff.

00:51:32.940 --> 00:51:38.660
But if it says that for a cancer diagnosis, then that is a whole different type of problem, right?

00:51:38.660 --> 00:51:39.840
So the stakes are very high.

00:51:39.840 --> 00:51:40.780
Yes, absolutely.

00:51:40.780 --> 00:51:41.200
Yes.

00:51:41.340 --> 00:51:45.120
You would definitely still have the check, I guess, from a different radiologist.

00:51:45.120 --> 00:51:49.200
Yeah, but just the creation of it much, much more quickly, I think is really powerful.

00:51:49.200 --> 00:51:53.660
So when you think of the tons of reports they create every day, absolutely.

00:51:53.660 --> 00:52:03.540
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?

00:52:03.540 --> 00:52:04.920
It's their bog down.

00:52:04.920 --> 00:52:10.340
I have some friends and neighbors who are doctors and they just talk about the reports and the bureaucracy.

00:52:10.340 --> 00:52:12.660
And just it's really frustrating to them.

00:52:12.660 --> 00:52:13.180
Absolutely.

00:52:13.180 --> 00:52:13.620
Yeah.

00:52:13.620 --> 00:52:14.080
Okay.

00:52:14.080 --> 00:52:17.040
So I think, yeah, this just sounds super cool.

00:52:17.040 --> 00:52:19.160
What else are you interested in studying in machine learning?

00:52:19.160 --> 00:52:21.800
I think there are way too many things to be interested in.

00:52:21.800 --> 00:52:22.940
There's so much going on.

00:52:22.940 --> 00:52:23.500
It's early days, right?

00:52:23.500 --> 00:52:31.420
It's, you know, the last five years, it feels like machine learning has gone from this science fiction to science, right?

00:52:31.420 --> 00:52:33.400
Like it really has come into a thing, right?

00:52:33.400 --> 00:52:34.100
Yeah.

00:52:34.100 --> 00:52:35.680
It became quite popular.

00:52:35.680 --> 00:52:52.240
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.

00:52:52.240 --> 00:52:55.080
I think that's a very, very interesting field.

00:52:55.080 --> 00:52:55.940
Yeah, absolutely.

00:52:55.940 --> 00:53:01.740
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.

00:53:02.340 --> 00:53:04.440
What happens to jobs?

00:53:04.440 --> 00:53:05.580
What happens to society?

00:53:05.580 --> 00:53:06.680
What becomes possible?

00:53:06.680 --> 00:53:08.120
What becomes scary?

00:53:08.120 --> 00:53:09.280
And so on.

00:53:09.280 --> 00:53:09.540
Yeah.

00:53:09.540 --> 00:53:20.860
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.

00:53:20.860 --> 00:53:22.040
Oh, that is scary.

00:53:22.040 --> 00:53:25.460
Instead of facial recognition, just their gait, the way they walk.

00:53:25.460 --> 00:53:25.900
Wow.

00:53:25.900 --> 00:53:29.500
I thought, whoa, that is something, right?

00:53:29.500 --> 00:53:30.280
Yeah.

00:53:30.320 --> 00:53:32.860
So, yeah, pretty, pretty crazy.

00:53:32.860 --> 00:53:33.180
Yeah.

00:53:33.180 --> 00:53:43.300
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.

00:53:43.300 --> 00:53:48.520
So they would know your mood all the time when you went to the bathroom, when you were at your desk.

00:53:48.520 --> 00:53:55.160
And then they have this big database of where they save all the information about all the people all the time.

00:53:55.160 --> 00:53:59.980
And yeah, when I read the article, I was like, oh, I never want to live in China.

00:54:00.200 --> 00:54:01.920
This is just so scary.

00:54:01.920 --> 00:54:06.700
There's some amazing stuff in China, but that sounds so scary for sure.

00:54:06.700 --> 00:54:09.740
I would not want to work at that place at all.

00:54:09.740 --> 00:54:11.140
Interesting.

00:54:11.140 --> 00:54:19.780
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?

00:54:19.780 --> 00:54:21.900
And what do you think the big challenges or dangers are?

00:54:21.900 --> 00:54:27.180
I think the big promises are that you can make life better for so many people.

00:54:27.180 --> 00:54:32.880
Like healthcare is just one of the applications where it can hugely improve our daily life.

00:54:32.880 --> 00:54:34.580
Dangerous and challenges.

00:54:34.580 --> 00:54:38.700
Like dangerous, I see so many dangers since you can never stop people.

00:54:38.700 --> 00:54:44.240
There will always be people who want to use AI to do bad things.

00:54:44.240 --> 00:54:57.260
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.

00:54:57.260 --> 00:54:59.440
Especially when you look at general AI.

00:54:59.440 --> 00:55:03.480
When you, I think that could be a whole podcast.

00:55:03.480 --> 00:55:04.920
Yes, it could.

00:55:04.920 --> 00:55:09.460
Yeah, there's just so much to, you can be scared about there.

00:55:09.460 --> 00:55:10.980
So maybe define that for folks.

00:55:10.980 --> 00:55:18.320
Like there's the focused AIs like Alexa or the thing that can say cancer or not cancer by looking at a picture.

00:55:18.320 --> 00:55:20.060
But what's general AI?

00:55:20.060 --> 00:55:24.620
Yeah, so there's this difference between general and specific AI, just as you just said.

00:55:24.620 --> 00:55:33.560
So specific AI means that your artificial intelligence is good at doing one thing, like predicting sentences or speech recognition.

00:55:33.560 --> 00:55:35.460
But it has just one thing.

00:55:35.460 --> 00:55:38.320
But we as humans, we have more general AI.

00:55:38.320 --> 00:55:44.100
We can dance, we can talk, we can like find faces in a crowd and so on.

00:55:44.100 --> 00:55:52.940
And the idea of general AI is to have more like a human level AI that has all these different kinds of intelligence.

00:55:52.940 --> 00:55:59.440
So social intelligence, but also that it can perform lots of different tasks equally well.

00:55:59.440 --> 00:56:00.280
Do you think that will happen?

00:56:00.280 --> 00:56:01.960
Do you think somebody will come up with it?

00:56:01.960 --> 00:56:02.520
You think so?

00:56:02.520 --> 00:56:07.980
I think definitely at some point it will happen because there are too many people who want it to happen.

00:56:07.980 --> 00:56:11.740
And you can't stop people from researching and working on it.

00:56:11.740 --> 00:56:19.260
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.

00:56:19.260 --> 00:56:19.760
Yeah.

00:56:20.040 --> 00:56:24.120
It has to be solved globally or at least addressed globally, right?

00:56:24.120 --> 00:56:25.200
Like no one government.

00:56:25.200 --> 00:56:27.680
It's not like the EU can say, well, we're not doing it.

00:56:27.680 --> 00:56:28.360
Well, okay.

00:56:28.360 --> 00:56:33.360
You know, maybe Uruguay is going to become the next place that does, you know, creates it, right?

00:56:33.360 --> 00:56:35.800
Because they're not subject to the rules and they see it as an advantage.

00:56:35.800 --> 00:56:37.100
I have no idea about Uruguay.

00:56:37.100 --> 00:56:42.220
But, you know, just if it's not dealt with on a global level, like it can't even be addressed.

00:56:42.220 --> 00:56:46.120
But then you have even bad actors amongst places that agree, right?

00:56:46.220 --> 00:56:46.340
Yeah.

00:56:46.340 --> 00:56:47.000
Yeah.

00:56:47.000 --> 00:56:57.860
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.

00:56:57.860 --> 00:57:02.480
And to really understand what is going on and what might happen in the future.

00:57:02.480 --> 00:57:06.520
So we can start a global discussion on how we want to handle these things.

00:57:06.520 --> 00:57:09.520
Do you think politicians should discuss these things?

00:57:09.520 --> 00:57:13.240
Do you think they should be part of like prime minister political debates and things like that?

00:57:13.240 --> 00:57:15.040
I think they should be a part of it.

00:57:15.040 --> 00:57:15.460
Yes.

00:57:15.460 --> 00:57:28.120
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.

00:57:28.120 --> 00:57:33.040
So it must really be, I guess, representative of all kinds of people.

00:57:33.680 --> 00:57:40.920
But the experts are those that really understand what can be done and what is currently being worked on.

00:57:40.920 --> 00:57:41.420
Yeah.

00:57:41.420 --> 00:57:44.940
So, yeah, I feel like, you know, at least I can speak from the U.S. perspective.

00:57:44.940 --> 00:57:50.200
I feel like there's a lot of pushback against immigration or outsourcing or other stuff.

00:57:50.200 --> 00:58:01.120
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?

00:58:01.120 --> 00:58:06.200
So many people don't realize that, I guess, how much influence AI will have on their jobs.

00:58:06.200 --> 00:58:09.740
And they just stick to what they're doing right now.

00:58:09.740 --> 00:58:12.480
And they think, oh, yeah, I can use my smartphone.

00:58:12.480 --> 00:58:15.720
It's so cool to have Siri and my phone and so on.

00:58:15.720 --> 00:58:20.020
But they don't think about the long-term changes that will come.

00:58:20.020 --> 00:58:20.260
Yeah.

00:58:20.360 --> 00:58:24.700
It's going to be very interesting in all sorts of ways in the next 10, 20 years.

00:58:24.700 --> 00:58:25.260
I agree.

00:58:25.260 --> 00:58:25.580
Yeah.

00:58:25.580 --> 00:58:25.900
Yeah.

00:58:25.900 --> 00:58:26.780
Interesting.

00:58:26.780 --> 00:58:27.240
Yeah.

00:58:27.240 --> 00:58:29.800
I think there's great potential for very much good.

00:58:29.800 --> 00:58:32.200
And I think there's also a potential for lots of disruption.

00:58:32.200 --> 00:58:37.040
So it's going to be a mixed bag, but it's going to be interesting to watch it play out for sure.

00:58:37.040 --> 00:58:37.920
I absolutely agree.

00:58:37.920 --> 00:58:40.920
And Python and scikit-learn will be at the foundation somewhere, I'm sure.

00:58:40.920 --> 00:58:42.420
Yeah.

00:58:42.420 --> 00:58:43.720
Cool.

00:58:43.720 --> 00:58:44.100
All right.

00:58:44.100 --> 00:58:47.220
Well, this is a super interesting project.

00:58:47.220 --> 00:58:49.540
And thanks for sharing your journey with us.

00:58:49.780 --> 00:58:50.460
It was my pleasure.

00:58:50.460 --> 00:58:50.860
Yeah.

00:58:50.860 --> 00:58:55.160
So before you get out of here, though, I got the two questions, final questions for you.

00:58:55.160 --> 00:58:58.780
When you're writing your Python code, what editor do you use?

00:58:58.780 --> 00:58:59.620
I use Vim.

00:58:59.620 --> 00:58:59.900
Vim.

00:58:59.900 --> 00:59:00.420
Right on.

00:59:00.420 --> 00:59:00.900
Yeah.

00:59:00.900 --> 00:59:05.080
My fiance convinced me to start using it about two years ago.

00:59:05.080 --> 00:59:07.980
And I think I can't switch to anything else anymore.

00:59:07.980 --> 00:59:10.820
Once you learn something, yeah, it's just tough.

00:59:10.820 --> 00:59:12.680
Do you also use Jupyter notebooks?

00:59:12.680 --> 00:59:13.360
Yes.

00:59:13.360 --> 00:59:14.740
Yes, I do use them.

00:59:14.740 --> 00:59:18.320
But I get really annoyed with not having all the keyboard shortcuts.

00:59:18.320 --> 00:59:18.940
I know.

00:59:19.200 --> 00:59:23.360
So yeah, I usually use them for like most of the time.

00:59:23.360 --> 00:59:23.920
Yeah, that's cool.

00:59:23.920 --> 00:59:26.460
And then notable PyPI packages.

00:59:26.460 --> 00:59:28.680
What ones do you think people should learn about?

00:59:28.680 --> 00:59:29.100
Yeah.

00:59:29.100 --> 00:59:34.120
So one I think many people know about already, but it was so useful for me at the point when

00:59:34.120 --> 00:59:36.040
I started programming was IPDB.

00:59:36.040 --> 00:59:37.500
So the IPython debugger.

00:59:37.840 --> 00:59:40.220
It made life so much easier for me.

00:59:40.220 --> 00:59:42.620
So that I think it's a great package.

00:59:42.760 --> 00:59:46.620
And then I heard about Black on the podcast a few months ago.

00:59:46.620 --> 00:59:49.100
I think it was the podcast on coverage, wasn't it?

00:59:49.100 --> 00:59:50.100
Oh, yes, I think it was.

00:59:50.100 --> 00:59:50.300
Yeah.

00:59:50.300 --> 00:59:51.420
Ned Batchelder.

00:59:51.420 --> 00:59:51.660
Yeah.

00:59:51.660 --> 00:59:51.840
Yeah.

00:59:51.840 --> 00:59:53.100
It's a Python code formatter.

00:59:53.100 --> 00:59:56.640
And I tried it a few times and it looks really, really good.

00:59:56.640 --> 00:59:59.980
So I will definitely spend more time on learning about Black.

00:59:59.980 --> 01:00:00.260
Yeah.

01:00:00.260 --> 01:00:00.940
Black is cool.

01:00:00.940 --> 01:00:05.920
There's been linters that will tell you how you formatted your code wrong, but Black goes

01:00:05.920 --> 01:00:08.100
farther and fixes it for you, which is really nice.

01:00:08.760 --> 01:00:09.880
I really like that.

01:00:09.880 --> 01:00:10.640
Yeah, that's cool.

01:00:10.640 --> 01:00:11.640
All right.

01:00:11.640 --> 01:00:17.040
So people are excited about having this magical universe where they can try out their 100 days

01:00:17.040 --> 01:00:18.900
of code and get better at Python and stuff.

01:00:18.900 --> 01:00:20.160
What do you say for them?

01:00:20.160 --> 01:00:21.620
Like what resources you have?

01:00:21.620 --> 01:00:22.500
How should they get started?

01:00:22.500 --> 01:00:26.880
I think the most important thing is just to find a topic that is interesting for yourself

01:00:26.880 --> 01:00:32.180
and that really motivates you to sit down every day and that you make it fun for yourself.

01:00:32.180 --> 01:00:34.580
And that will make it way easier.

01:00:34.580 --> 01:00:34.980
Yeah.

01:00:34.980 --> 01:00:36.800
I think fun is a super key part.

01:00:36.800 --> 01:00:40.180
And I'll link to your blog posts and to your GitHub repository and all that.

01:00:40.180 --> 01:00:40.740
Yeah, please.

01:00:40.740 --> 01:00:41.160
Yeah.

01:00:41.160 --> 01:00:41.820
Yeah, definitely.

01:00:41.820 --> 01:00:42.680
All right.

01:00:42.680 --> 01:00:44.820
Annalena, thank you so much for being on the show.

01:00:44.820 --> 01:00:47.420
It was really interesting and fun to chat with you.

01:00:47.420 --> 01:00:48.080
You too.

01:00:48.080 --> 01:00:48.680
Thank you.

01:00:48.680 --> 01:00:49.000
Bye.

01:00:49.000 --> 01:00:49.460
Bye.

01:00:49.460 --> 01:00:53.200
This has been another episode of Talk Python To Me.

01:00:53.200 --> 01:00:58.500
Our guest on this episode was Annalena Popkas, and it's been brought to you by Coder.com

01:00:58.500 --> 01:00:59.720
and Talk Python Training.

01:00:59.720 --> 01:01:05.240
Coder.com brings full Visual Studio Code and cloud computing to every device.

01:01:05.520 --> 01:01:09.700
Create your free Coder.com account and start collaborating on code today.

01:01:09.700 --> 01:01:13.520
Visit talkpython.fm/coder to create your free account.

01:01:13.520 --> 01:01:15.460
Want to level up your Python?

01:01:15.460 --> 01:01:20.620
If you're just getting started, try my Python jumpstart by building 10 apps or our brand new

01:01:20.620 --> 01:01:22.480
100 days of code in Python.

01:01:22.480 --> 01:01:26.240
And if you're interested in more than one course, be sure to check out the everything bundle.

01:01:26.240 --> 01:01:28.540
It's like a subscription that never expires.

01:01:29.020 --> 01:01:30.720
Be sure to subscribe to the show.

01:01:30.720 --> 01:01:32.920
Open your favorite podcatcher and search for Python.

01:01:32.920 --> 01:01:34.160
We should be right at the top.

01:01:34.160 --> 01:01:39.960
You can also find the iTunes feed at /itunes, Google Play feed at /play, and

01:01:39.960 --> 01:01:43.480
direct RSS feed at /rss on talkpython.fm.

01:01:43.480 --> 01:01:45.360
This is your host, Michael Kennedy.

01:01:45.360 --> 01:01:46.720
Thanks so much for listening.

01:01:46.720 --> 01:01:47.780
I really appreciate it.

01:01:48.080 --> 01:01:49.740
Now get out there and write some Python code.

01:01:49.740 --> 01:02:10.340
I'll see you next time.

01:02:10.340 --> 01:02:40.320
Thank you.

