As software developers, we live in a world of uncertainty and flux.
Do you need to build a new web app?
Well, maybe using Django makes some sense since you've been doing that for a long time.
There is Flask, but it's more mix and match being a micro framework.
But you've also heard that async and await are game changers,
and FastAPI might be the right choice there.
Whatever it is you're building, there's constant pressure to stay on top of a moving target.
Learning is not something you do in school and then get a job as a developer.
No, it's a constant and critical part of your career.
That's why we all need to be good, very good at it.
Matt Harrison is back on Talk Python.
Talk to us about some tips, tricks, and even science about learning as software developers.
This is Talk Python to Me, episode 293, recorded October 19th, 2020.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy.
Follow me on Twitter where I'm @mkennedy.
And keep up with the show and listen to past episodes at talkpython.fm.
And follow the show on Twitter via at Talk Python.
This episode is sponsored by Brilliant.org and Linode.
Please check out what they're offering during their segments.
It really helps support the show.
Matt, welcome back to Talk Python to Me.
Thanks.
Thanks for having me on.
It's always great to have you on.
It's fun.
We're doing a lot of things together.
We were in the Humble Bundle together and done the book together and various things.
So nice to have you on the show as a return guest as well.
You were on before talking about Pythonic career advice.
Yeah.
It seems like not that long ago, right?
That's episode 111.
But that was May 2017.
I mean, that might as well be 100 years, right?
That was when people would go outside.
They would be around each other.
All that crazy stuff.
Yeah, that's a whole different decade.
And everything's changed since then.
It has.
But learning and basically the fact that software development means you're constantly learning.
I think that's only more true.
Yeah.
And I think people, especially for career development, I think people are in today's
society, you've got to do something to sort of level yourself up and stand apart from everyone
else if you want to sort of stick out.
Yeah.
I think there's these different layers in the software development career stack, right?
It's easy to kind of get stuck doing the same thing, not really progressing.
And the way that technology is moving is if you're not constantly sort of taking even
just little steps to keep your skills fresh, to learn the new things, it's almost like you're
falling behind.
Yeah.
I mean, even, I mean, the joke among JavaScript is like if you're using something that's six
months old, you're stale.
But I think there's a lot of that even going on in the Python world.
There's a lot of changes coming up in the Python world.
But even like web frameworks, right?
You have like FastAPI.
Yeah.
And a lot of development that previously was done with tools like Django and Flask are not
being done with those tools.
It's kind of stepwise, right?
It's like a discrete function.
It's not as continuous, I guess, and not linear anyway.
You kind of go along.
Okay.
Doing Django, doing Django.
Wait a minute.
Like Python 3 is now fully embraced.
And now you're doing this other funky API thing.
And you've kind of got to go in these steps.
So I don't know that it's necessarily constant learning.
But viewed from a zoomed out perspective, it looks like that.
The skill of being able to take something and understand it quickly and adapt it or at least
see where it fits into your problem domain is a very useful skill to have.
Absolutely.
And you're right.
Everything is changing pretty rapidly in Python right now.
And I think that's one of these step functions, right?
The last year or two, people really have fully embraced the fact like, okay, we actually are
past Python 2, right?
We were supposed to have the big goodbye Python 2.
Thanks.
And see you later at PyCon this year.
And right.
It's officially deprecated and unsupported.
And it's a big deal.
Yeah.
And I'm even seeing stuff where it's like Python 3.6 is not supported anymore on some of these
platforms and on some of the tools.
Yes.
Yeah.
I've seen 3.7 and plus required, which is that's pretty insane.
And it's only going to get faster because recently they switched from an 18 month release
cycle to a 12 month release cycle.
So that's a 50% increase in, you know, frequency of those types of things.
Yeah.
Yeah, absolutely.
Now, before we move on, for new guests, I asked them how they got into programming.
But for return guests, I usually ask them, you know, what have you been up to lately?
What are you doing these days?
Yeah.
So I run a company called Medicine Inc.
That does corporate training and consulting.
And I've spent a lot of time recently doing a bunch of virtual training.
And sort of similar to you, I mean, my content traditionally has been going into large companies
and helping their developers level up.
And I've repeatedly got requests for sort of one-off individuals.
And so I'm building up a library of courses and been working on stuff that I can satisfy
the desires of the one-off person rather than, you know, here's a group of 20, 50, 100, 200
people who need to level up.
Yeah, that's really cool.
And we've lived similar lives in a lot of different ways.
We'll talk about those, I think, through this whole show.
The corporate training side is really interesting.
It's, I actually, folks who don't know, I did that for like 10 years, traveled around
all over the world teaching classes.
And it was really fun.
I really enjoyed those experiences.
And I think those actually reflect a lot on this topic that we're going to talk about here.
You know, learning how to learn for developers is you're dropped into these different situations
with different teams.
One week, it might be, I'm working with stockbrokers in New Jersey.
The next week, I'm working with a startup in Silicon Valley or Sydney or something.
And just, you've got to quickly turn around what's relevant and what you kind of know to
teach them in context.
Yeah.
And when the whole COVID stuff came out, my, previous to that, like my year was like scheduled
out, like traveling here and there, going to Dubai, traveling all over the US.
And then everything sort of hit a wall.
And I wanted to double down on that.
I'm like, okay, for the next year or so, I don't think I'm going to be doing much traveling
and teaching from that point of view.
And so I wanted to double down on the virtual training, but not only from like equipment,
like investing in computer and webcam and mic, but also investing in understanding how people
learn and what can maximize sort of the throughput of the teaching and help people be able to grasp
it, but apply it and make sure that it's effective learning, not just taking reading slides per se.
Yeah. I mean, that's at the heart of all the various things you mentioned, right?
The in-person corporate training, the virtual Zoom style training, the individual courses,
the online async courses like we have at Talk Python and that you've gotten your own library.
You also, it's also worth mentioning that you have a course over at Talk Python training
that is nice as well about Python 3 and some of the cool features there as well.
Yeah. Yeah. And I think there's a, I think you'd appreciate this too. I mean,
you've obviously lived it, but there's something to be said for live in person,
like just being able to like sit a group down and move them through something.
And from my experience, it's hard to beat that sort of live face-to-face there in front of you and you
can see what's going on. And this whole virtual having people might have a camera, they might not
have bandwidth to have the camera on. It really causes you to change how you teach or, you know,
wonder, am I just talking to myself in this room here? Right. Or...
Absolutely.
What's going on?
Well, there's a weird, I think there's a weird psychology around learning. And I think
the virtual stuff is a little bit, I think it's the most tricky, I guess. On one hand,
you have these cool events where you get together, everybody on the team is in one place and you
commit to spending like four days together, eight hours a day, and everyone's paying attention.
They're working together. They're working the exercises during the breaks, sort of next to each
other alongside each other. And there's a certain kind of focus and energy on that. And I think with
the online courses, people can decide like, I'm going to go and focus on this online course. I'm
going to spend an hour a day for a week and a half. I'm going to have this new skill. And they can do
that pretty well as well. But the virtual stuff, I feel like a lot of people don't, even necessarily
the attendees, but their coworkers and stuff, don't give it the same separation. They're like, well,
he's just in this online class, but hey, just send him a quick message and just distract them this way
or distract her in that way. Or, you know, it's like, ah, it's really hard to get people to focus.
And some of the things that we're going to talk about are all about those types of things, right?
Yeah. Yeah. There, I think with work from home, seeing being the standard operating procedure these
days and constant being on Slack 24 seven, people aren't used to a lot of these things. And
there's constant interruptions and focus. And so it can be a challenge learning. I think
your point of, for the individual sort of setting aside a goal to learn, they can do that, but getting
a group together and having them move at a constant pace or somewhat constant pace towards a goal when
they've got different distractions and things impacting them, it can be a challenge.
Yeah, absolutely.
All right. Well, let's talk about learning. And I guess it's probably worth mentioning this stuff
all applies to developers, but much of your presentation. And have we mentioned that this
is a course, I know you talked about focusing on it, but the reason I reached out to you is that
you announced that you created a course specifically on learning and around like mostly technical type
stuff. I imagine it's what you had in mind when you were bringing up the points you were talking
about, but yeah, tell people real quickly about the course and we'll talk about some of the takeaways.
Sure. Yeah. So like I said, when the whole COVID stuff came up, I doubled down on learning. And as I
mentioned previously, I've been making my own courses. And so I thought, why not just do a meta course
on learning that is applicable to almost everyone? I think it's applicable to everyone. And talk about
some of how your brain works, what's actually going on there, and then some tricks and tips
to maximize your learning and some skills to be able to, I guess you could say trick yourself, but
enable yourself to be more creative, work harder and be a better learner.
Yeah. It's cool. It's a neat topic. And I wouldn't necessarily use the word trick,
although I know exactly what you mean. I think it's more like understand the way that learning
works for people, understand the way the brain works and then go with the grain instead of
do something that's counter to the natural way it might work.
Yeah. Yeah. I guess hack is more the proper term that people would use these days.
Yeah, I guess so. All right. So let's start at the storage layer.
Okay.
Yeah. Memory.
Yeah. Yeah. And I think the whole story revolves around your brain and how your brain works,
right? And so there's, I think there's two main things to look at from your brain. And one is
your short-term memory and then your long-term memory. And your short-term there's, I'm sure many
of the listeners have heard, a fellow named Miller in the 50s released a paper called five plus or minus
two is the magic number. And so most people can't keep track of more than five plus or minus two.
So between three and seven things at a time. And you sort of see this play out at least in like two
factor authentication, right? And many apps are factor authentication. And they ask you, they're like,
we were going to send you a text and we're going to give you six digits, right? And I don't have any
problem remembering six digits for the amount of time that takes me to look at my phone or the text
message and then come back to the app and enter those six digits. Like I can do that just fine.
But if they asked you to say 12 digits or 14 digits, it's sort of game over, right? It's like,
okay, I can't really do that. And so being able to recognize that our brains can only hold a limited
amount in it at a time. This is like your working memory or your RAM makes you realize a few things.
I think one of those things is that multitasking, anything that you're trying to multitask is going
to take away from the ability of your brain to work on one task deeply because it's got to reserve some
of its capabilities to hold.
Right. You've only got so many slots, like low level slots to put stuff into. And if a few of them
are full of other stuff. Yeah. I like your analogy about the two factor auth. But as you were talking
over, I was thinking, I never remember the six numbers. I have no problem with two factor auth.
I remember two sets of three numbers and I don't know why that is. But anyway, I'm like, okay,
these three and these three. And then I just remember them really well. I don't know why it's so bizarre.
That's interesting. And that might go into this notion of chunking. So the idea there is that,
again, if you only have so much capacity and maybe you're five plus or minus three, Michael.
Yeah. Well, and I mean, I don't mean like I have to go back and look again. Like I remember them as
two, three digit numbers. I don't remember it as a single six. So it's just bizarre.
No, but this does relate to that idea of chunking. The idea there is if you're overloading your brain
with so much stuff coming in, one thing that you can do is try and combine things together,
right? So instead of six individual numbers, you're basically remembering 200 digit numbers,
like 207 and 365. Yeah. Right. And so exactly. That is a trick or a hack or a technique that you can use
to work more information into your brain. And then if you sort of build from a low level up,
you attack one little idea at a time and then you tie it into another idea. Those two ideas can become
a single chunk. And so your brain isn't worried about two ideas at that point. It's only worried
about one idea. And so this allows you as you master a subject to be able to take a very complex subject,
but treat it as a single chunk in your mind that in your mind has all these connections with that.
And then maybe apply that mastery to something else or take that experience and sort of unwrap it onto
something else into perhaps something very novel. Yeah.
And I think this is really, really important for developers who have a lot of experience and can
take, here's my old experience. I might not be using the same toolkits. I might not be using the same
technology now, but hopefully I can apply what I've learned to this new domain or new problem set.
You know what comes to mind? I know we're talking about low level short-term memory,
so it's not exactly the same thing, but this idea of chunking and knowledge. One of the things that
comes to mind really clearly for me here is design patterns in the sort of loose sense, right? Like
if you study like software patterns and stuff, you can, instead of thinking of all the details
of what that pattern might do, it's positives, it's negatives. You can just think of it as the one
little block that you have to put in your mind, right? Like a singleton, you could say,
well, I'm thinking of that. We use this idea. We have one variable, but there's only one and it's
shared everywhere and that'll make it a little harder for testing, but it'll also make it easier
for other parts to act like that's complicated, but singleton got it. Yeah. What's next?
If you have a common vernacular and a common description of these things, you know,
this is the visitor pattern or the singleton pattern, right? And again, it takes some learning to sort
of break that apart. But once you've digested that, yeah, then you have a single concept,
the singleton, right? That you can just talk about and it makes it very easy.
And then if you're trying to solve a problem, it is one, it takes up a smaller bit of your
short-term memory to, I would imagine like that's a piece of the puzzle that you can just hold in your
head.
Yeah, exactly. Yeah. Very good example.
This portion of Talk Python to Me is brought to you by Brilliant.org. Brilliant has digestible
courses in topics from the basics of scientific thinking all the way up to high-end science like
quantum computing. And while quantum computing may sound complicated, Brilliant makes complex learning
uncomplicated and fun. It's super easy to get started and they've got so many science and math
courses to choose from. I recently used Brilliant to get into rocket science for an upcoming episode
and it was a blast. The interactive courses are presented in a clean and accessible way and you
could go from knowing nothing about a topic to having a deep understanding. Put your spare time
to good use and hugely improve your critical thinking skills. Go to talkpython.fm/brilliant and sign
up for free. The first 200 people that use that link get 20% off the premium subscription. That's
talkpython.fm/brilliant or just click the link in the show notes.
Okay, so that's like the L2 cache or something. What about the disk?
Yeah, so then we have the long-term memory and there are a couple different facets of that that
I think are relevant to our audience. One is the capacity. How much information can you hold?
Another is actually accessing it. So, and this is very similar to like your disk drive or whatnot,
but the part that may be not so familiar or similar to the disk drive is the fact that this
long-term memory is mutable, which is a little bit different. And again, scientists aren't 100%
clear on this, but they know that there's basically a network of information that's stored in your brain.
And what the science is telling us is that the more you access something, the stronger that memory
becomes, but also the memory can change. And there are various examples of memories changing over time.
So that's pretty unnerving to be honest, right? I mean, I'm not debating whether it's true, but
you feel like your memories are, they're fact, right?
Yeah. Yeah. You think that, but every time like you share a memory, you're going to recall some part of
it. You might embellish a little bit more of it. And as you keep sharing that, like the embellished
part becomes more real to you. And at some point it is the memory. Yeah. Some interesting things like
the capacity of memory of our brains is actually pretty big. I think one report I read said that we
can store 3 million TV shows in our brain. Right. And so that seems very, very large. Right. But I mean,
so it seems like there's more than enough capacity. So what's going on there? Why can't I always recall
these other aspects? Why can't I recall all 3 million shows? Right. I mean, I've, I've already
watched the office once. Why do I have to watch it again? Yeah. And the issue there is another aspect
of our brain in that we forget things. So we have the capacity, but there's this retrieval mechanism
and that allows us to access things, but it also prevents us from accessing things. Or if we have
these memories stored in that, it sort of weakens the connections there such that we don't remember
it. And that's actually a good thing in that if you had to keep all of these two factor numbers that
you've ever entered into your apps in your brain, and they're always, you know, 568, 2027, right?
That would be a little bit crazy. And so the notion that we can forget things is actually
a good thing. Yeah. Or even if you somehow had to remember the equivalent of every frame of what
your eyes have seen as you sample the world, that would be insane, right? Yeah. Yeah.
What would you even do with it? It would almost all look the same and so on. And it might drive you
crazy if you had your mind completely equally full of all of these ideas all at the same time,
you just couldn't focus on anything. Yeah. And there's a physiological aspect to that as well,
is that your brain uses energy, right? To do its work for the brain. And so the evolutionary response
is for your brain to be lazy and to not consume that amount of energy. And so rather than constantly
thinking about things and having things at the forefront of your mind, it's going to be a little
bit more relaxed and not bring those to you. So forgetting is actually good. And that brings us
to something that probably a lot of your listeners are aware of, which is that memory decay curve. So
generally what happens is that after you learn something, you remember it for the first day or so.
And then after the first day or so, if you haven't done anything with it, it sort of just
kind of goes away very quickly. So there's a quick drop off and then it sort of slides into sort of
levels out. But this is good for two factor stuff. It's not so good for our tests that we're going to
have in a month or so. If we learned the information today and then it just goes away.
Yeah, absolutely. So what are some of the things we can do to help improve long-term memory or even
short-term memory? So short-term, like we mentioned, the ability to chunk ideas together
into coherent, bigger chunks is good. So that gives us the common vernacular. Like you said,
a great example of that is design patterns. Long-term memory, like there are various tricks that you'll
hear of. And one of those is the memory palace, right? And so if I want to, what would be an example?
An example might be like, I wanted to remember your name, Michael, right? And if I'm at
a conference or some, you know, for some reason I'm on a Zoom and your name's not there and I want to
remember your name, then I can use something like a memory palace. And it turns out that different parts
of our brain are, remember different aspects. And so you might've had an experience where you heard a
song and the song brought back a bunch of memories, right? Put you in a place where, oh yeah,
remember when I did that? And it was all connected to the song.
Yeah. You can feel the sun. You can see whatever you was there. Yeah. It's incredible how that works.
Yeah. And so your brain stores like verbal information in one place. It stores visuals and
sounds and smells. Even smells can bring back ideas. And so one thing that you can do is you can,
again, this is sort of a hack, but this is memory idea of a memory palace and that your brain
is very good at remembering visual things, maybe not so much verbal things. Like maybe it's hard to
remember Michael. So how do I remember Michael? And so an example of using this memory palace is
saying, okay, let's say I'm going to think of my room or my house, and I'm going to sort of put
things that I want to remember in my house. So I want to remember Michael. Michael starts with M.
And so I'm going to think of Michael in the master bedroom. And then what else could be in the master
bedroom? Well, maybe what reminds me of Michael? Well, I'm a child of the eighties. So Knight Rider
reminds me of Michael. So maybe I remember the black car, right? With the red swoosh going back and
forth. And maybe I like embellish it a lot. Right. So I think of like rubber burning out or something,
or like making the sounds that Kit made. And I try and tile this. And then I like put you in the car,
right? And I say, here's Michael. He's driving Kit in the master bedroom. And so now instead of,
I think, what was his name? I think of, oh, we're in the master bedroom. He's driving the car.
It's Kit. It's Michael. Yeah, Michael. Yeah. And this is actually the technique that like the master,
there's competitions where people memorize a deck of cards in some amount of time. And so if you want
to have better retrieval, this is one way to do that is this memory palace.
Well, I think that's super interesting. I love that example as well. That was cool.
I think sort of highlight something for me that at least personally has been really important is if I
can connect a story with information, it's so much more powerful and memorable. Yeah. Right. And even
like the podcast itself, it's sort of like my desire to have that exist. Yeah. For the Python world,
right? It's like, it's not just that I want to learn the API of FastAPI or I want to learn how
requests works. No, I want to hear how Kenneth writes, create requests and why did he do it? And what was
his motivation? And what is he like seeing it like just the stories around that just make it stick.
Yeah. Or why does Sebastian do this and not that for FastAPI? And then it's those stories just make
remembering things, especially technical things, just so much more real to me. Yeah. Even math and
chemistry and so on. And you've probably experienced that a lot going to conferences or whatnot, where
people would come up to you and like, they feel like you, they know you were like, oh, I remember that
story that you told such and such. Yeah. It just, there's something about a story and our brains being
able to capture all of this associations with that rather than just information. And so this goes both ways.
goes into that idea of the memory palace. Right. I think it's an external memory palace. You're not
constructing it, but it's kind of there. It's made for you. It's made for you in the story. Yeah. Yeah.
Yeah. And so that's sort of the introduction to the brain that we've got short-term memory. We've got
long-term memory. Our brain forgets things as we bring things back. We enhance those. And you can do
things like if I'm in a different location, if I'm studying in a different location than I learned,
my brain is going to now associate this new location with the information and that strengthens
the information as well. So very, very interesting.
Do you try to go when you're learning, especially when you're learning something or you're researching
or working on something, do you try to work in different locations, you know, sans COVID, right?
Like forget that you can't go anywhere, but imagine like for me, I go to coffee shops and libraries
and parks and just to try to mix up the environment a little bit.
Yeah. And so I've seen both takes on this. One is having a dedicated environment. That's like
no distractions. When I'm in this environment, that's my work environment. But also the research
tells us that if you can mix up the environment, the mixing up is actually good because those different
environmental factors, it strengthen the memory or the idea in your brain.
Yeah. Let's talk about distractions for a little bit. Okay.
It's probably a good idea to have like Instagram, Twitter, Facebook, all those things, like every
website I've visited popping up notifications all the time. Yeah.
Outlook is really good as well to have a pop-up for every email.
Yeah. I mean, one thing that is not good for work and a lot of what we do or a lot of knowledge work
is pretty intensive. And I think a lot of people are drawn to software because it requires them to be
creative and be able to create things sort of on their own. I mean, I think that's one of the things
that drew me initially is that you're basically given like, here's a whiteboard, you can do whatever
you want with it, right? The idea of creativity, but constantly being pinged with Slack or notifications
or social media, these things, I mean, these are engineered and they're engineered knowing how we
work to interrupt us and to get us addicted to them. Right. But that constant interruption is actually
very detrimental to our learning.
Yeah. I think a lot of deep technical work, not just programming, but especially programming is we have
to construct the thing that we're trying to invent. We're trying to create the software or algorithm or whatever.
We've got to build it in our mind and hold it in our mind and then like get it out into software or into
some kind of theory or something. And so it's only for a while existing in the mind. And if it gets shaken
out of your conscious for a moment, right, you've got to put it back in. And if it doesn't, if you forget some of it
or it kind of falls apart, theoretically, it's bad.
Yeah. The idea that people can multitask is sort of a lie. And anyone who's claiming that, I don't know what
they're trying to sell you, but they're just, people just aren't as productive when they're trying to
multitask.
Yeah. I mean, I guess it depends on what you're, if you're multitasking, making flipping hamburgers and
making the fries, like probably you can do that just fine. Right. But if you're trying to multitask,
optimizing an algorithm with like chatting on Twitter is probably not the best.
Yeah. Yeah. I mean, on that, maybe we could talk a little bit about what I've have listed as sort of
the four parts of creativity or work and sort of jump into that topic a little bit.
Yeah, absolutely. Let's do, let me though, ask you, what do you do for your, just before we move on,
what do you do for your like notifications and like your phone? Is there anything that you do to make it
less of an interruption for you?
Yeah. So I basically turned off all notifications except for email on my phone. I probably should turn
off email, but I also try when I'm working on something and I want to be focused on something,
I'll put my phone in a different location. Right. So it's not even there to distract me. And,
or I mean, and it might just be putting it behind me, putting it on a desk on the side,
just so it's not in my side. I'm like, I look at my phone, I'm like, Oh, I need to check it. Right.
I mean, there's sort of a response mechanism there.
Yeah. Yeah. It needs my attention. It's someone to me.
Yeah. Yeah. For me, I turn off basically all desktop notifications. Like I have no
social media pop-up. I have zero email pop-ups.
Yeah.
Only pop-ups on my computer, I believe are around calendars because I need those like in 10 minutes,
you got to do this. I don't care if it interrupts you, you got a meeting. But other than that,
like I've turned them all off. I should be better with my phone, honestly, that you've got a good
example there, but on the computer, it's like, yeah. Or if Slack, I realized a lot of people do
work through Slack, but like I don't install the Slack app. If I need to use Slack, then sort of
have a certain time when I can check into Slack. I think a lot of people's work environments are sort
of stifling them as far as their work in that we always want you to be available. And I think that's
not a good thing in that once, and I think most people realize this is, is if you're working on
something hard, it takes time to get into that. Like you said, and if you have this idea in your
mind and now you finally are working on it and then all of a sudden, bam, Slack comes in or whatever
notification pops up and like, oh, I need to deal with that because we've been conditioned that anytime
something comes up on Slack or whatever notification, that's the highest priority. When in fact, it's not the
highest priority and it's actually slowing us down and making us less productive to have those
notifications there.
Yeah. I feel like systems like Slack or Teams or whatever, I really dislike them. I mean, I think
they're neat for communities. I don't know why people think they're amazing for work because
there are just so many micro interruptions constantly. And then the fact, like if somebody sends me an email,
okay, I've got my email is a mess. And if anyone out there is waiting for a response for me, I've been
working on it. I'm sorry. But at least it stays in my inbox. Like Slack is a little bit like Twitter
that the stuff flies by. And if I don't get on it, I'm going to miss it. So it's like Twitter that you
can't ignore. Yeah.
To me. And it's just, it's sort of brings together a lot of these. I know it's great that you can just
jump on and quickly get something from somebody, but what have you done to that somebody by trying
to quickly just get that response, right? It feels like we're just going to bring everyone down in sort
of their, their deep work so that we can have faster response time, which it depends on what kind of work
you're doing, but I don't know that that's a good trade-off.
Yeah. So, I mean, to put it into like computer terms, like constantly context switching, right?
If you never are able to work on it, you're just constantly context switching,
not the scheduler you want on your computer.
Yeah, exactly.
This portion of Talk Python To Me is sponsored by Linode. Simplify your infrastructure and cut
your cloud bills in half with Linode's Linux virtual machines. Develop, deploy, and scale your
modern applications faster and easier. Whether you're developing a personal project or managing
large workloads, you deserve simple, affordable, and accessible cloud computing solutions.
As listeners of Talk Python To Me, you'll get a $100 free credit. You can find all the details at
talkpython.fm/Linode. Linode has data centers around the world with the same simple
and consistent pricing, regardless of location. Just choose the data center that's nearest to your
users. You'll also receive 24, 7, 365 human support with no tiers or handoffs, regardless of your plan
size. You can choose shared and dedicated compute instances, or you can use your $100 in credit on
S3 compatible object storage, managed Kubernetes clusters, and more. If it runs on Linux,
it runs on Linode. Visit talkpython.fm/Linode or click the link in your show notes,
then click that create free account button to get started.
All right, so I derailed your four parts of creativity, but I didn't want to get off this
distractions because this is like a huge deal, I think.
Yeah, it is a huge deal. And I think a lot of companies in the name of culture and have done a
disservice and that it actually impacts them the wrong way.
Yeah. I want to be clear. I think there's a place for those types of things. I think it makes sense
to say, let's set this up. So when we were ready, we could come and be part of this like group or this
community and we can contribute to it. And it creates this need. But I don't know that should
be the primary way to just constantly ping everybody all the time. Like that just seems
super detrimental. So not that it's purely bad. I just think it's like a use for the wrong thing a lot
of times. Yeah. And so to be fair, like my take on it would be like, if you had email and you're like
saying, I'm going to limit email and we're going to check email sometime in the morning and sometime
in the afternoon. Right. And then you can expect that you will get an email response, you know,
for something important that day, but it's not necessarily going to be 10 minutes after you ask.
Right. And some companies just have that same culture of, I need a response right away,
but it's just on email. Right. Which actually is worse. So I don't know. I guess it's,
there should really just be some time for deep work while we're on this before we move on.
How do you feel about Slack? Not Slack, the app, which we were just talking about, but Slack as in like,
I need to make sure that there's 10% of my time where I'm not required to be absolutely generating
closing Jira tickets or working on this thing during the sprint. But like 10% of my time where
if I find this to be interesting or I need to try two ways of doing things, you know,
like that kind of Slack.
Yeah. And like I said, the brain, when it's working, when it's working hard, it, it requires energy.
Right. And so there's only a limited amount of quote, deep work that we can do in a day.
And so the Slack is actually good. And there is an effect, and this is actually part of this creativity
or learning process, which is called the incubation effect. Yeah.
And so a lot of times you'll work on something and you'll get to an impasse. And a lot of people,
at least I've seen when they get to an impasse, that's like, okay, now it's time to double down.
I just got to keep working on it.
All right. Now I'm really going to bang my head against this problem.
Yeah. Yeah. I'm going to show how smart I am and I'm going to do that. And your brain has a great way
of like making connections and rearranging your thoughts when you allow it. And so there's this
effect called the Zygernick effect. Zygernick. I'm probably pronouncing that wrong, but the study
came out that a waitress could remember orders better if the orders were not complete. But as soon as the
orders were complete, they forgot them. And so if you want to sort of apply this technique, you can in
that as soon as you get to an impasse, rather than powering through it, stop and let your brain relax,
go on a walk. I mean, my experience has been a lot of times I've woken up at like in the middle of the
night or in the morning and I'm like, oh, I know what that bug is. Right. Yeah. And yeah, your brain
has that ability. It's the, I solved it in the shower sort of thing. Yeah. Yeah, exactly. And so you can
power through it, right. And stay up all night and try and power through it. Or you can go on a walk or go to
sleep. Another common thing. And as much as we talk about, like, don't interrupt people, but rubber
ducking is a similar thing where if you can, and rubber ducking for those who don't know it, there's
a book called pragmatic programmers that suggests you have a rubber duck sitting at your desk. And then
when you get to a problem or an impasse, what you do is you pick up the duck and you literally talk to
the duck and you explain what's going on. And because you're using a different part of your brain, like you're
vocalizing it and you're explaining it actually makes these different connections in your brain. And a lot of
times, if you haven't heard of rubber ducking, but you've probably heard of like going over to a colleague and
explaining to them your issue. And then like in the middle of explaining them, you're like, oh, never mind. I figured it
out. Right. Yeah, exactly. So these are all examples of what you would say slack or the literature calls
incubation, where literally giving yourself that ability to have breaks is super useful. And if you
look at a bunch of studies about super creative people, a lot of them, they go on a walk in the
forest every day. Right. Or yeah, yeah, they're productive. Like Einstein talked about that quite
a bit, I think. Yeah. But they also have downtime. Yep. I saw on Twitter, someone posted a message,
somebody learning to code system like, I know I've been told or I heard that I'm supposed to take a
break when I'm learning to code. So what schedule should I set myself on? Do I take a break every 30
minutes, every 45 minutes? And to me, I thought that was really interesting. I didn't know this person.
So I really feel like getting involved because my inbox already needs a lot of responses. I don't
need to start more threads. But to me, it feels like it's a completely the wrong trigger. Like time
shouldn't be the trigger. It should be, I'm going to sit here, I'm going to work. And if you're just,
you really like suppose you're studying object or new program and you're making connections and it's
working well, like just keep going. Yeah. Right. If like you're just really on fire, just keep going.
But all this, you know, if you're stuck and it's super frustrating, you can't make, then you take the
breaks. I mean, put aside whether you should take a break from typing for RSI issues.
But for learning issues, it feels to me like more like this incubation should be the thing that tells
you to take a break, not the every 27 minutes I'm on a schedule to walk for three.
Yeah. And some of that might be like Pomodoro. Yeah.
The notion of the Pomodoro, which I think is great for people who have like, I just need to do this and
I know I'm going to get distracted. So I'm going to set a timer and work on it for 25 minutes. Right.
Yeah. I've a lot of times used a different biological technique and that I would have a large cup of
water and just drink it. And then when nature called, I'm like, okay, it's time for a break. Right.
Yeah, exactly. That's pretty good.
But I agree with you. Like the notion that like, I need to take a break every 30 minutes or 40 minutes,
you're reading too much into like the optimal standing desk sitting split there. Right. I mean,
I think if you're having deep work and you feel like you're in a flow and time just going by,
like I wouldn't interrupt that just for the sake of like interrupting it. Right.
Exactly. You know, some of the absolute best times I've learned stuff and this could be programming or
it could be just studying chemistry or math or whatever it was I was doing is that time where
you're, you're focused on something and you're working on it. You're like, how is it dark? Like,
yeah. And why am I so hungry all of a sudden? Like, you know, you just got into it and you were just
consumed in, in that world. And then something broke you out of it. Right. Like it's that deep flow
sort of feeling and that's magical. So to me, it seems like that seems if that's going, don't mess
with that. Don't interrupt that. I mean, if it's going well, don't interrupt that. But to come up
with arbitrary, you have to do this and you have to take breaks at every 26 minutes and 15 seconds
seems like they're missing something. Yeah. Yeah. I'm not only, you can only express so much in a tweet,
but that's, that was what I, I've been accused of not having a nuanced tweet myself, but it's a tweet.
I'm sorry. That's how it looks. So, let's talk about some, some things that people can do
for like when they're studying and they're learning something new, some of the techniques and tips for
making stuff stick. Sure. Yeah. One that the research was pointing me at, which I wish I would
have known earlier, at least when I was in college was the notion of a bunch of studies have been done
that show that if you actually read or take a quiz or a test before you've even done any studying
of it, the person who does that is going to learn better than the person who doesn't do that.
And basically it's the notion that your brain can make these spots and sort of say, okay,
I'm going to be learning about whatever subject object oriented programming. And so I'm just going
to sort of have some buckets that are ready when this knowledge sort of drops in and it will make
the connections for them. So it's sort of like seeding, seeding your brain with information.
Yeah. It seems to me like that is sort of goes along with the reticular activating system where
that weird phenomena where like, if you are shopping for a new car and you decide I want
this kind of car, all of a sudden that car is everywhere. Yeah. Or we just got a puppy and now
all of a sudden like, you notice all the dogs, dogs. I just like notice all I'm like, Oh, there's a dog
park over. Look at that. And look at this dog. And look at those dogs are friendly. Like I mean,
I didn't hate dogs. I didn't like focus all over that. And it seems like the quiz is like, Hey,
these are the things we need your mind that lays our focus in on if it happens to find it in the
world. Yeah. Yeah. So that's one that I think is very applicable to students. I'm trying to figure
out how to like in my courses, I can do sort of quizzes beforehand for people who are independently
studying. I'd be curious as to how people can apply that. Another, probably the most powerful tip
is this notion of spaced repetition. And remember that there's that forgetting curve where basically
after two days, we've forgotten 80% of what we learned. So if you can review your material within
the one to two day timeframe, you can basically go back up to understanding the material. But what
happens with the curve is that the forgetting curve slows down. So now you're not going to forget it all
in two days. You might forget it in like four or five days, or maybe a little bit longer than that.
And so if you can revisit that material, you can keep it in your brain. And basically every time
you're accessing it in your brain, it's making stronger connections. So it's easier for your
brain to retrieve that. But also like we sort of hinted at before, if you can mix it up, whereas
you're studying it in a different place, or maybe in one of the studies I said, even said like, you should
have music going on and you should change the music and having that background is just going to tie a
different sensory portion of your brain to the information. So this is probably the most powerful
thing that students or people who want to retain information can do. And there's various tools like
Anki to basically do this for you. Or if you look at like Duolingo, those sorts of apps are basically...
Yeah, they've got a little schedule, they ping you, it's time to do your practice of this,
your basic verbs in whatever in French or whatever you're learning.
Yeah, so that's something that I think a lot of people can do one sort of, I guess, power tip on top
of that, rather than just rereading your notes, like if you've done it, something that's better than
reading your notes is rewriting your notes, or quizzing yourself on the information. And so you can
re-read and that's sort of the minimum thing to help you. But if you can quiz yourself, quizzing is
forcing you to, instead of just like putting it in the brain, it's forcing you to extract what you have
in there. Again, strengthening those connections in your brain. Rewriting them is, again, pulling
information out and then putting it back in. And it might be put in slightly differently if you rewrite or
force yourself to do these sorts of activities too.
And what do you think about taking notes as a non-student? I mean, suppose I want to learn,
say, FastAPI, and I'm going through the tutorials and I'm doing stuff.
Yeah.
It's not something that I really do a lot. I do it during conferences and talks and stuff like that.
But if I'm sort of just full, or even during like an online course, but if it's just full free
form, I'm like, oh, I'm on the website just learning how this thing's working.
Yeah.
It's not something I do. Should I?
That's a good point. So, I mean, a lot of my training is around data science and machine
learning type stuff. And I tell a lot of people, I'm like, for example, the Pandas API. The Pandas API
is super powerful. It's also super huge and can be super confusing. And it violates our Miller's
seven or plus or minus two number all over the place.
Yeah, it definitely does.
And so I tell people, okay, don't memorize it, because I think it's basically humanly impossible
to do that, even with chunking. But also don't use the website to go look it up. If you could,
so Jupyter has a great ability to pull up the documentation. Pandas documentation is actually
really good. And so rather than disrupting your flow, if you can master being able to access the
documentation in your environment, be that PyCharm or Jupyter or VS Code or whatever you're using,
you're not going to interrupt your flow as much. You're going to be a lot more productive and you're
not going to have the temptation to like, oh, I might as well check Twitter while I'm at a different web
browser. Right.
Right.
But I do think if you're just learning something new, like say you wanted to learn about like deep
learning or something and you go off and read a book on deep learning. And if you didn't take any notes
and you never typed in any code, it's going to follow that forgetting curve. And you're going to
two days later, you're going to forget most of what you read a week later. I mean, it's basically like,
eh, you read it, but it's all gone.
Yeah. Yeah. I find those, that kind of step back learning is great for the big picture.
And if I want to know what could you possibly do with say TensorFlow or what was the basic science
around say the Higgs boson, but you couldn't do a line of science by that kind of reading. Right.
So I guess it also depends on your goal, right?
Yeah. And there are the ability to make connections, right? Where if you are, you know,
a lot of data scientists are experts in their domain. And so they might be whatever, an oil and
gas expert, but then they read about deep learning and then they can do this, what's called interleaving
where, okay, they're learning about something new, but they're applying it to their area of expertise.
Like, oh yeah, I can use this to do this right now. And so.
Right. Right. I see where I would use this, like that sort of aha moment. Yeah.
Yeah. So that could be very useful, right? For picking up something new and discoveries,
right? I mean, a lot of sort of the advancements in society come from people who aren't in like the
automotive industry, right? I mean, you sort of look at like Elon Musk is not a car person per se,
right? But can push things from, I think from being an outsider and having more of a tech background
is adapting things and can have huge impacts that way. And so if you're an expert in something else,
cross pollinating those ideas with new ideas can be super powerful.
Yeah. I definitely agree on that. One more study tip, Rick, I guess I like to throw out there
that I think both of our kids have experienced is like, there's different, you mentioned songs before,
right? And one of the things that blows my mind constantly is how well you can remember lyrics and
those stories that are communicated through song. Like I can hear a song from the eighties or nineties.
I could hear like three notes. It got to the song that it starts like this, right? I can't do that for
any book I've ever read or any lecture I've ever attended. Not even close. Right. Yeah. And probably the
most insanely interesting one is the Hamilton, Hamilton, the musical, which is like an hour and
a half musical, but it's done as a rap about the founding fathers of America, which it's got a lot
of detail. Like, you know, it's got huge detail. It also has a moat. I don't know about you, but like,
for me, it's very emotional and I'm not like a rap person at all, but I'm like, I get chills,
like listening to certain songs. I'm like, so there's your brain is able to capture that. I'm
like, Oh, when I watched Hamilton, not only did I learn all this information, but I also felt this
way. I felt sadness or I felt happiness or pride or like all of these different feelings that go into
making that. And like, to your point, like you hear three notes and you're like, you know, like
five paragraphs of lyrics or whatever from that. It's so crazy. It's so crazy. And so Hamilton's
interesting. It's not that super applicable. I really love the musical, but I think it's incredibly
well done. But the reason I brought it up is when my daughter was studying biology, like the mitochondria
or cell cycles or so, I went into her room and she was like watching this rap. I can't find it again.
I found an example. It's not the same one, but they're like these teachers who are doing like
not terrible rap songs about like these technical subjects like biology and other stuff. And you know,
if someone's out there trying to learn, I would, I would give that a shot. Like it seems so effective.
So weirdly effective.
Maybe, maybe you should partner with Lin-Manuel on a Python course.
Yeah. Does, is that rap style or what's the story? I don't know.
Lin-Manuel Miranda, the guy who wrote Hamilton.
Oh yeah. Okay. Yeah. Well then we definitely should partner with him on a rap course. Like
if we could do it as a Broadway musical, think how popular Python would be.
I know. Yeah. That is super interesting. Could you encapsulate whatever course,
the new features of Python three into a rap? I bet you could.
You could, if you were skilled in both programming and I should partner with Smix,
right? Maybe he could do it.
Yeah.
He's the developers, developers, developers song. All right. Well, I think that's just
another interesting thing. It's not super practical because like there has to exist one of these like
songs about a topic, which is not that common, but.
Yeah. Yeah. I mean, if you can find a song, similarly, my kids, they love this song about
the elements of the periodic table and they know the elements of the periodic table because there's
a YouTube song that goes over it. I find it pretty annoying, but if you can leverage things
like that, that's awesome. Yeah. Yeah. That's super awesome. All right. Want to put a bow on it?
You got some takeaways for us here? Yeah. So the, I guess main idea is, is understand how your brain
works and the pros and cons to that and then leverage those things. So if you can get that big picture,
if you can get a final exam beforehand or for work, you need to make a new system that does this and this,
your brain's going to be percolating on that idea. And then you just need to sort of fill in
the gaps where you can there using different parts of your brain. We've talked about that,
like with music, but also if you have issues, rubber ducking them, telling them to someone else,
those can be super useful space repetition, super powerful for remembering things. I mean,
I'm a big one of just taking care of your body, going on walks, not trying to always be at a hundred
percent all the time. And again, the science is proving that this incubation effect is super powerful
and allows us, our brain is probably more powerful than we think can do things sort of behind the
scenes without us forcing it to do things. Yeah. I agree with that one as well. Yeah. Yeah. So
I think one more that I haven't really, we didn't really get into, but the course talks about that is
the idea of interleaving and switching things up. So if you're just doing math and you're always doing
addition, everything's going to look like an addition problem, but if you can mix it up,
you know, when to use addition, you know, when to use subtraction, maybe applied to programming.
I would say that I see a lot is a lot of people that I teach in Python. They're like, okay,
why did you write a function there? Why didn't you put that in a class? Right.
And people who come to Python from Java or C# are always thinking terms of classes everywhere.
Right. Yeah. And Python's a multi-paradomatic language. You can write it in a imperative
style. You can write it in an object oriented style. You can even do functional programming with Python.
And so if you don't know about those different styles of programming, you only know about object
oriented program. You're always going to be looking to make classes, which Python can do,
right. But it might not be the most effective way to do it.
So mixing things up, learning, being able to be cross pollinated, that can be useful as well.
Super cool. Well, this is really interesting and hopefully it helps some folks learn all the new
things that we have to keep learning continuously as software developers. I mean, you made the joke
about JavaScript and I think that's actually like a legitimate criticism, but in the broader scale,
we have to keep learning, right? If you don't like learning, this is just not the place to be.
So being better at that is certainly a good skill to have.
Yeah. Yeah. And as a teacher, I feel it's my duty to be able to help people learn and maximize on those
as well. So I think it goes both ways.
Yeah. So you want to give away a copy of your course?
Yeah. Yeah. Let's give away a copy of my course.
Yeah. So I'll pick, I'll just, if people are on the mailing list for the podcast, which is just being a
friend of the show. So they go to talkpython.fm/friends. They go there. As long as they're on that
mailing list, I'm going to randomly pick one like the week after the show drops and I'll send it up.
And then I'll do one more on my store, which is mattharrison.podia.com. I'll do a coupon for 20%
off anything in the store. So we'll leave that coupon for a week after this goes live. So use the
code talkpython20, all uppercase, talkpython20 and you'll get 20% off anything in the store.
Yeah. I'll link to that in the show notes in the podcast player.
Cool.
All right. Last question. I know you've written one or two books or 15 or 20 or whatever it is now.
Like, are you working on any new books that you're willing to mention?
Um, what books? I, I, I am.
You've been refreshing some of them. I saw you talk about like your Python notebook or something like
that. Yeah. Yeah. So Python 3.9 came out. And so I did do a tiny Python 3.9 notebook.
Um, so that's actually on Amazon right now, if you want a physical version, but there's a
version of that in GitHub if you want. So I point that to a lot of my students. It's just a reference
for the syntax of Python 3.9. So yeah, that's most recent. I mean, I've got plans for some other one,
but nothing concrete right now.
Yeah. I'm sure like me, you've got a thousand projects on a list that you want to get to.
Yeah. Too much time, too much distractions.
Yeah, absolutely. All right. Before you get out of here, I'm going to ask you the
two questions again, favorite editor. If you're going to write some code these days.
Yeah. I mean, I'm still using Emacs and I live in Emacs most days. So.
All right, cool. Notable PyPI package that you've run across lately.
One that I'm really wanting to look into that I haven't really used in anger or disgust,
but I'm very interested in it is streamlet.
Yeah.
Which is for basically making dashboards in Python very easy. So a lot of the people in my classes
are doing analysis and Jupyter is one way to share that analysis, but having a dashboard that's a little
bit more dumbed down per se or not requiring people to execute cells can be super powerful. So I'm really
interested to check out streamlet.
Yeah. I had Adrian from streamlet on the show a while ago and it looks just super cool.
Yeah.
So another one sort of in that realm I'll throw out there for people that you,
I think would be relevant for you, Matt, is the language server protocol integration for
Jupyter Lamp, which gives you like better autocomplete, jump to definition, automatic code
completion, rename refactor stuff, all that to Jupyter notebooks. That's a pretty neat one.
That sounds cool as well. Yeah. I know that Emacs has some LSP integrations as well. So I think it's
cool that Microsoft and others are volunteer working on that and sharing that with others.
Yeah, absolutely. All right. Well, it's been great to have you here and congrats on the new course. I
think it's going to help people get a little bit more out of the time to put it into new subjects,
which is every day, all day as developers.
Yeah. Yeah. Check out the course if you're interested. And if you have feedback or I'd love
to hear other people's ideas and techniques and tools that they use as well. So cool. All right.
Well, nice chat with you as always. See you later.
See you, Mike. Thanks.
Bye.
This has been another episode of Talk Python to Me. Our guest in this episode was Matt Harrison,
and it's been brought to you by Brilliant.org and Linode. Brilliant.org encourages you to level
up your analytical skills and knowledge. Visit talkpython.fm/brilliant and get Brilliant
Premium to learn something new every day. Simplify your infrastructure and cut your cloud bills in half
with Linode's Linux virtual machines. Develop, deploy, and scale your modern applications faster
and easier. Visit talkpython.fm/Linode and click the create free account button to get started.
Want to level up your Python? If you're just getting started, try my Python jumpstart by building 10 apps
course. Or if you're looking for something more advanced, check out our new async course that digs
into all the different types of async programming you can do in Python. And of course, if you're
interested in more than one of these, be sure to check out our everything bundle. It's like a
subscription that never expires. Be sure to subscribe to the show. Open your favorite podcatcher and search
for Python. We should be right at the top. You can also find the iTunes feed at /itunes,
the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
This is your host, Michael Kennedy. Thanks so much for listening. I really appreciate it.
Now get out there and write some Python code.
we'll see you next time