spotifyovercastrssapple-podcasts

How We Learn

We look at the techniques that helped us learn Elm and that help us continue to learn new techniques today.
December 6, 2021
#45

Ideas for Effective Learning

  • Have a playground to try out ideas
  • Try a new tool or technique with a familiar problem or exercise
  • Small scale exercises and real world projects
  • Small scale exercises are helpful for quickly developing a skill
  • Feedback loops
  • Tiny steps shorten the feedback loop
  • Use code katas like bowling, tennis, roman numeral katas
  • Analogous to empirical scientific method (hypothesis, test, analyze)
  • Call your shot
  • Don't forget to analyze test results after
  • Listen to smart people, but come to your own conclusions
  • Try two alternate ways of doing something out for yourself
  • Failure is part of learning
  • Follow your curiosity
  • Look at the source for projects you depend on or come across
  • Growth Mindset vs. Fixed Mindset
  • You have to make knowledge your own (synthesis) - connect it to what you know
  • Just in time vs. just in case learning - focus on what you need or seems important now
  • Flexbox Froggy game
  • Demystify things (for example custom type constructors vs type alias constructors)
  • Mind mapping
  • Elm Radio Opaque Types episode
  • Zettlekasten second brain
  • How to Take Smart Notes book
  • Make declarative statements in second brain system
  • Dillon's use the platform note from his digital garden
  • Digital gardening
  • Learn in public movement
  • Richard Feldman's talk Scaling Elm Apps
  • Richard experimenting with dream writer in a component architect
  • Make It Stick book (and some notes summarizing key ideas)
  • Elm Radio API Design Lessons episode
  • Let your background processing do some work for you
  • Dan Pink's book When
  • Early bird vs night owl thinking
  • Jeroen's blog

Transcript

[00:00:00]
Hello Jeroen. Hello Dillon. And what are we talking about today? Today we're going to
[00:00:06]
talk about learning. Ooh yeah, I love this topic. So we recently talked with Richard Feldman
[00:00:13]
about learning Elm, or teaching Elm actually, and now we're going to talk about learning.
[00:00:19]
Other side, yes. So, all right Jeroen, I've got a question for you. How did you learn
[00:00:28]
to make impossible states impossible? Do you recall that experience? I'm guessing it was
[00:00:34]
earlier in your Elm career? Yeah, definitely earlier. First of all, it was Richard Feldman
[00:00:39]
who taught me that in his talk. Yes, introduced the concept, gave it a name, which is very
[00:00:45]
powerful. Coining a term is very powerful for learning. But I did not know it before,
[00:00:50]
that's for sure. I didn't, it wasn't on my radar either before that talk. So it wasn't
[00:00:55]
even something that I was trying to do. But I was not even doing Elm at the time. So when
[00:01:01]
was the talk again? 2017? 2016. 2016. Okay. So 2016. So I did not watch it in 2016, I
[00:01:10]
think. I watched it later on. But how did I learn it? I guess I was just trying to reenact
[00:01:17]
whatever Richard was saying in his talk, and thinking about it, and then put it into practice
[00:01:23]
in some of my projects, like thinking about what can go wrong in some particular model,
[00:01:31]
and then trying to make that impossible. I'm not sure what more I can tell you. Yeah, I
[00:01:36]
think, well, that's pretty similar to my experience. So I think conference talks are such a powerful
[00:01:43]
learning tool. But similar to your experience you just shared, in my experience, I think
[00:01:51]
that conference talks are only as useful as you're applying them to your own context.
[00:01:59]
So that's part of the equation. So I remember when I was learning Elm, I think I started
[00:02:05]
learning Elm around 2017. So there are a lot of great conference talks out. And I think
[00:02:13]
I started learning Elm around when the ElmConf 2017 talks started coming out. So I had this
[00:02:19]
fresh batch of new great talks coming out. But I went back and watched all these talks.
[00:02:25]
And I was building my first real beyond hello world Elm project. I actually chose to create
[00:02:31]
a project in order to become better at Elm. And the project was Mobster, which is this
[00:02:39]
pair mob programming timer tool that I built. It's an electron application. And I built
[00:02:46]
it because I wanted a fun side project that I could use to explore some Elm techniques.
[00:02:52]
So the first thing I went and did when I learned about make impossible states impossible was,
[00:02:58]
oh, what can I do to my Mobster code base to apply this? And so I think that that's
[00:03:04]
such an important part of the learning process is to have a playground to go apply some ideas.
[00:03:12]
You can read all the books you want. You can watch an online course. You can watch a conference
[00:03:18]
talk. Those things are very important. And without those things, you wouldn't know the
[00:03:23]
concept of make impossible states impossible. And you wouldn't have all these great ideas
[00:03:28]
about the steps of test driven development and things like that. Perhaps you learned
[00:03:32]
some things from a podcast, hopefully. But that's an important step. But then you have
[00:03:37]
to put the fuel in the tank, but then you have to drive the car. And you have to apply
[00:03:43]
the learning somehow.
[00:03:44]
I know that a lot of people, when they try to learn a new language, they redo projects
[00:03:51]
that they know or that they have written before, but in a new language. So you're familiar
[00:03:57]
with JavaScript. You want to learn Elm. Do the same project in Elm. So you won't get
[00:04:04]
stuck by the same issues. You don't have to restyle everything. You don't have to think
[00:04:09]
about database interactivity interaction. I mean, so you don't have to deal with all
[00:04:16]
the problems that are not language specific. Right. So you only the only thing that is
[00:04:22]
different is the language. So whatever you will learn is language specific.
[00:04:27]
Yes, you can learn on one dimension because the dimension of solving that particular type
[00:04:34]
of problem and getting data from some back end and all those types of things you've done
[00:04:41]
before and you're familiar with. Yeah, I've used that technique a lot actually. I really
[00:04:47]
like creating focused exercises to apply learning. I think these are two different interesting
[00:04:53]
contexts for learning, which I think are both important. There's the small scale exercise
[00:04:58]
and the real world project. And I think they both play a role. I think that small scale
[00:05:05]
exercises are very good for developing a skill. So one of the most important things about
[00:05:11]
learning is the feedback loop. So, you know, what does that mean for learning? It means
[00:05:16]
that you have a way to tell is the technique you're working, is the technique you're applying
[00:05:23]
effective? Do you like it? Do you like how it looks? Is it solving the problem you expected
[00:05:28]
it to? Is it breaking your code? Is it introducing a bug? If you don't know those things, you're
[00:05:34]
not really learning. If you just start trying to do make impossible states impossible and
[00:05:39]
you're applying it in a context where you don't really know if it's solving the problem
[00:05:45]
you think it's solving, you're not very familiar with the types, it's a little bit over your
[00:05:49]
head the area you're experimenting with, you're not really learning. So you need that feedback
[00:05:56]
loop. And having very small scale exercises and problems can be good for getting that
[00:06:04]
very tight feedback loop. So I think creating a focused exercise for learning the specific
[00:06:09]
thing you're trying to do might be like, I'm going to make a to do list application. I'm
[00:06:14]
going to create this storefront with the UI and I'm going to try that with Elm UI and
[00:06:21]
with Elm CSS.
[00:06:22]
I remember that Richard in his Elm in Action book. So from start to finish of the book,
[00:06:28]
you write an Elm application, but you do it so in chunks. So you do a pretty short exercise
[00:06:35]
in each chapter. So same idea, I think.
[00:06:39]
Right. Yeah. Having a focused exercise with a clear goal is so useful. And I mean, as
[00:06:45]
we talk about often also breaking it down into tiny steps and tiny commits, that's another
[00:06:50]
thing that increases the feedback loop. You know, if you're taking big steps, changing
[00:06:55]
a lot of things at once, then it's hard to evaluate the technique you're applying.
[00:07:01]
Yeah. Like what I have, what I've just done. Yeah. I did too many things.
[00:07:06]
You did too many things. And if you're doing, if you're trying to learn, make impossible
[00:07:11]
states impossible, that philosophy, and then you are also fixing a bug somewhere and changing
[00:07:16]
something in the UI and like you're diluting that learning. So doing too many things at
[00:07:23]
once doing too big of steps, all these things that lengthen the feedback loop, they're diluting
[00:07:28]
learning. So I think that's a really core point that just keep in mind when, when you're
[00:07:34]
learning, are you giving yourself a nice feedback loop? One of my favorite things to do when
[00:07:39]
I'm learning a new technique or a new language is to do a test driven development exercise,
[00:07:46]
you know?
[00:07:47]
What kind of thing do you then do?
[00:07:49]
You know, the bowling kata where you're doing bowling or like tennis kata where you're doing
[00:07:54]
a tennis scoring system or Roman numerals kata. Kata is that, you know, I've done hundreds
[00:08:00]
of times, but applying it, let you know, as you were saying earlier with applying a familiar
[00:08:06]
problem with a new concept or technique. So that's, that's one of my favorite techniques.
[00:08:13]
If I'm just pull out a test room and development exercise. And that is one of the best feedback
[00:08:18]
loops you can imagine because you have a very simple exercise. You can experiment, you have
[00:08:24]
tests to tell you if your experiment is safe or not.
[00:08:27]
You also learn how to do right tests in that language.
[00:08:30]
You also learn how to write tests, which is very important as well. Yes, exactly.
[00:08:34]
Which may dilute the learning a bit, but it's in its own step, I guess.
[00:08:40]
If you're trying to do too many things at once and test driven development is unfamiliar,
[00:08:45]
then it may be too much. Then maybe you should do some test driven development exercises
[00:08:50]
in a familiar language. Yeah, absolutely. Absolutely. But whatever you're doing, I think
[00:08:55]
if you just keep in mind, are you, are you setting effective feedback loops for yourself?
[00:09:01]
I think that's, that's essential. Another thing I've noticed, I used to run a learn
[00:09:07]
to code meetup in my hometown here and and we'd get a lot of, you know, people who were
[00:09:14]
self taught or bootcamp graduates, that sort of thing, which was great. And I saw a lot
[00:09:20]
of, you know, a lot, a lot of those people ending up very successfully having programming
[00:09:26]
careers and, you know, being just as good of a contributor to the team as somebody with
[00:09:32]
a university degree, right? But the thing that I noticed that people who didn't go the
[00:09:39]
university route struggled with the most was I think that the university programs can drill
[00:09:46]
into you doing these exercises and sort of you're learning a specific technique. You're
[00:09:53]
learning how to write a linked list. You're learning how to do memory management. You're,
[00:09:58]
you know, learning these techniques and you say, hmm, what's going to happen if I do this?
[00:10:03]
What's you know, what happens if I have a memory leak? And then you see what happens
[00:10:09]
if you do, you see what happens if you don't. There's this scientific method. There's this
[00:10:14]
like empirical approach where you sort of are doing a tailored exercise where you have
[00:10:20]
a hypothesis, you create an experiment to test that hypothesis, and then you evaluate
[00:10:28]
that hypothesis. And then you learn that you're wrong. And actually learning that you're wrong
[00:10:34]
is just as important as learning that you're right. If you only learn that you're right,
[00:10:38]
then you're missing out on all these things you could learn. Yeah. It's almost better
[00:10:42]
to be wrong, but you need to be right sometimes. Otherwise you're never learning. Well, if
[00:10:47]
you're always wrong, I guess you could always just flip it and say, yeah, you always know
[00:10:51]
how to be right. It's just not what you initially think. Should I write a let or a const? I
[00:10:59]
should write a let. Okay. Let's do a const. There you go. There you go. Yeah. So I think
[00:11:05]
that scientific approach is it's sort of built into the curriculum in a lot of, you know,
[00:11:12]
university programs, whereas people going through boot camps or self learning, often
[00:11:16]
it's more just, you know, going through boilerplate for a rails application or react application
[00:11:23]
and trying to figure out, trying to find the needle in the haystack that gets things working.
[00:11:29]
And it's not as much like these focused exercises. So sometimes they don't learn those skills
[00:11:35]
of like, what do I expect to happen? How would I know if what I expect to happen happened
[00:11:41]
or not? And then importantly, doing the final step of evaluating the results, what actually
[00:11:49]
happened. So, so I think that like calling your shot. So let's take the example of making
[00:11:54]
impossible states impossible. You know, what do I expect to happen? Well, I expect this
[00:12:00]
particular state to not be possible. How would I know? Well, if I try doing this thing, I
[00:12:07]
constructing this thing and it doesn't have at least one of these items, then that should
[00:12:14]
be invalid. I should get a compiler error. And then you try that, right? And it seems
[00:12:19]
very basic, but I think just setting it up that way is so important. So, so a lot of
[00:12:24]
these, you know, self taught and bootcamp students, I would sort of give them that advice
[00:12:29]
to, to slow down when you're learning something, instead of just trying a bunch of things,
[00:12:35]
slow down for a second and, and say, what do I, what do I expect to happen here? How
[00:12:41]
would I know if what I expect to happen has happened or not set up some mechanism to evaluate
[00:12:47]
the success of the experiment and then actually do that afterwards. I think that's one reason
[00:12:54]
why TD might be very good for learning, as you said before, because every time you, you
[00:13:00]
save where you start running your tests, you kind of call the shots. Okay. I think this
[00:13:05]
test is going to pass and that it's not going to break one of the other ones. And you get
[00:13:09]
very rapid feedback telling you that no, you messed it up and things didn't go as you expected.
[00:13:18]
And maybe here's why, or you need to figure that out. Right. Then in any case, you're
[00:13:23]
learning something.
[00:13:24]
I totally agree. And, and in addition to, you know, giving you feedback to evaluate
[00:13:30]
whether your experiment was successful or not, you know, TD has this sort of set of
[00:13:35]
ideas for breaking the work into smaller pieces, like doing the simplest thing that could possibly
[00:13:40]
work, which means you're not doing a hundred things at once. You're doing one thing at
[00:13:45]
a time. And so you're better set up to evaluate your experiments.
[00:13:50]
Sure. I guess when you're learning, you don't know how to cut things as small as you could
[00:13:56]
be, but yeah, definitely.
[00:13:58]
Yes. Right. It is, it is difficult, but also just, um, yeah, I mean, applying one technique
[00:14:04]
at once is really valuable. And like, I, something that I have found myself doing a lot from,
[00:14:10]
from the time I was learning Elm to now is having a technique I want to experiment with,
[00:14:16]
you know, Phantom builder technique. Wow. How would, how would that work? And would
[00:14:22]
that work nicely in application code or just in package code or, you know, I think it's
[00:14:30]
so good to be curious about those things.
[00:14:32]
Yeah.
[00:14:33]
And even if someone smart tells you that something is a good idea, you're in, you're a smart
[00:14:38]
guy, but I think that we should come to our own conclusions. None the less.
[00:14:44]
Yeah. This is something I keep telling people, and I've mentioned this on podcast before
[00:14:49]
when some people argue whether they should, or are still undecided whether they should
[00:14:54]
try pattern a or pattern B to do something like, Hey, should this be a maybe, or should
[00:14:59]
this be a new custom type?
[00:15:01]
Right.
[00:15:02]
I just tell them, try out one of the ways, the one that you feel most comfortable with.
[00:15:07]
And then if it works out, great. If it doesn't work out, you will know soon enough. If you
[00:15:13]
are, keep curious and keep wondering about it, keep reflecting. And then when you find
[00:15:20]
finally feel the pain, then you know that you've, it wasn't the right choice.
[00:15:25]
Yes. And that's a win.
[00:15:27]
And that's a win. And thankfully with Elm at least, it's easy to backtrack. So Elm is
[00:15:33]
a great language to, to try out things, be curious and then fail.
[00:15:40]
Yes.
[00:15:41]
But then we factor and get it right.
[00:15:43]
Yes.
[00:15:44]
Or writer.
[00:15:45]
Ooh.
[00:15:46]
Because you might not find the right solution right away either.
[00:15:48]
That's a good t shirt. Be curious and then fail, then refactor and get it right or writer.
[00:15:54]
Boom. T shirt.
[00:15:55]
Yeah. Do you want me to get it longer or?
[00:15:58]
Yeah. It might be a, it may be a tall vertical.
[00:16:01]
Right. It's also in the back. But I mean, being curious is part of the scientific method,
[00:16:09]
right?
[00:16:10]
Yes.
[00:16:11]
And if you're wondering about the effects of something or the causes of some of something,
[00:16:16]
then you're not really going to figure out new things or learn a lot.
[00:16:22]
Yes. And you can't bypass failure. So, you know, you should, you should celebrate the
[00:16:28]
failure because it means you're learning. Like if you, you know, like really, if, if
[00:16:32]
you're like, why can't everything just be maybe in my model? Why not? Well, great. Like
[00:16:38]
don't let somebody tell you that having too many maybes in your model is a code smell.
[00:16:43]
If you're like, why, why couldn't I just have everything be a maybe what's wrong with that?
[00:16:48]
And then I'll just do maybe with default a bunch of places, try it, try it. Maybe try
[00:16:53]
it in a side project. Maybe try it in a place where it's low stakes to fail, you know, don't
[00:16:59]
go change the production code base to have everything suddenly have a maybe everywhere
[00:17:04]
and make your coworkers unhappy, but try it in a, in a safe place.
[00:17:09]
Yeah. And reflect on it at some point.
[00:17:13]
Exactly. Exactly. That, that's, that's the other thing is like people forget the last
[00:17:17]
step of the scientific method. They forget to evaluate the results. So don't, don't skip
[00:17:22]
that step. That is a very important step. I think, you know, another, another thing,
[00:17:28]
are you familiar with this term growth mindset?
[00:17:30]
A tiny bit, but let's let's imagine I don't.
[00:17:33]
I'm very fond of, of this concept. It's something by Carol Dweck, psychology researcher. She's
[00:17:40]
written a lot on this. And so the idea is that growth mindset is it's the attitude that,
[00:17:49]
that you have something to learn from being challenged and putting yourself in a position
[00:17:55]
where you might fail, that that's a positive thing that you can battle test your skills.
[00:18:02]
And that might involve failure. And that's a good thing because it means you're grown.
[00:18:06]
Fixed mindset is the idea that, wait a minute, I don't want to put my failure out there because
[00:18:11]
then people will see that I'm a failure. And it's basically the idea that, you know, putting
[00:18:17]
myself out there and failing means that I'm incompetent, not that I'm growing. So it's
[00:18:22]
the idea that your, your abilities are sort of fixed. I'm good at math or I'm bad at math
[00:18:27]
rather than, so basically like saying, saying I'm good at math, the idea would be don't
[00:18:33]
do that and don't encourage other people to do that and don't use language that implies
[00:18:39]
that. So instead of saying like, wow, look how smart you are, you got an A on the math
[00:18:43]
test. You say like, wow, look how, how your hard work paid off on this test. You focus
[00:18:49]
on the reward of, of challenging yourself because it's the idea that your abilities
[00:18:56]
and intelligence are not fixed things. They're things that can grow over time by going through
[00:19:02]
challenges and learning. So I think that's really essential to, to all these things we're
[00:19:06]
talking about because again, like if you're, if you're viewing putting too many maybes
[00:19:13]
in your model as a sign that, oh, maybe I'm just not good at Elm. Maybe I'm just not good
[00:19:18]
at data modeling. Well, then you're, you're limiting yourself because you're not allowing
[00:19:22]
yourself to experiment and fail. Like, and if you think that quote unquote smart people
[00:19:27]
are smart because they never went through those failures, it's just not the reality.
[00:19:31]
Like people who seem smart are smart because they try those things and fail. They say,
[00:19:36]
why can't they, why can't I put maybes everywhere? And then they try it. That's what makes them
[00:19:41]
smart is they, they went through those failures. So don't limit yourself.
[00:19:45]
Maybe they also got a good teacher, but you're going to find one as well.
[00:19:49]
Yes, that's also true. Yeah. And you know, another thing that's been coming up in, in
[00:19:55]
all the stuff we've been talking about here is I think things need to be hands on. You
[00:20:00]
can hear a conference talk, you can hear a podcast episode, you can hear some interesting
[00:20:05]
idea, but like if you hear Yaron give some brilliant summary of the Phantom builder and,
[00:20:12]
and you follow everything he's saying, that doesn't mean you've actually learned the Phantom
[00:20:16]
builder technique.
[00:20:17]
Because I'm a bad teacher.
[00:20:20]
Right. Exactly. Cause you're a bad teacher.
[00:20:24]
This should also be a t shirt.
[00:20:25]
Yeah. You're in a bad teacher t shirt. Yeah. We're going to have to make a lot of t shirts
[00:20:31]
here. Yeah. So these, uh, like you, you need to take learning into your own hands, no matter
[00:20:38]
how brilliant an explanation is the way that our brain consumes information is it's just
[00:20:45]
that it's, it's not about consuming information. It's about engaging with information and making
[00:20:49]
it your own knowledge. Isn't something that you get from someone. It's something that
[00:20:55]
you build up yourself with someone's help. So someone can guide you through, but you
[00:21:01]
always have to make learning your own. You have to internalize it. You have to connect
[00:21:05]
it to what, you know, to your mental models, your way of understanding things. And there's
[00:21:09]
just no, there's no way to directly transfer knowledge. And so if you think that you can
[00:21:15]
just read a book or watch a conference talk and just matrix style, I know Kung Fu it.
[00:21:22]
So unfortunately not how it works. You don't just install this knowledge in your brain.
[00:21:26]
You have to, you have to engage with it. You have to, um, you have to like test it out
[00:21:32]
and be skeptical of it and say like, you know, is this a technique is the Phantom builder
[00:21:38]
technique like, doesn't it have these problems? Like if you don't ask yourself, wouldn't it
[00:21:44]
have problems in these situations? Even if it doesn't, if you don't ask that question,
[00:21:48]
do you really understand it?
[00:21:50]
Yeah. There's some topics where you don't have to interact with it directly to, to,
[00:21:57]
to grasp it. Uh, but you're not going to learn it unless you apply it actively. But I'm,
[00:22:03]
I imagine that there are some topics where you just, just knowing about it and the, and
[00:22:08]
keeping it in the back of your mind will help you cross pollinate it with other topics and
[00:22:14]
then give you a brilliant idea at some point. But imagine it's much easier if you make it
[00:22:20]
it's an active practice.
[00:22:21]
Right. Yeah. There's certainly value to just knowing that something exists as an idea,
[00:22:28]
even if you don't apply it. So knowing that Phantom types is a thing and having some sense
[00:22:33]
that, Oh, it can help you, you know, enforce certain things about types without actually
[00:22:40]
changing the underlying data that it contains. If you have that concept somewhere in the
[00:22:44]
back of your head, maybe you don't know exactly what it means or how it applies. Maybe when
[00:22:48]
you run into a problem around that, then you can apply it. Yeah. So there's value to that.
[00:22:53]
And then you just delay the practice in a way.
[00:22:57]
Yes, yes. Right. And, and I think to a certain extent, that's one of the roles of things
[00:23:03]
like conferences, many conference talks, you know, they're not tutorials. They're not going
[00:23:08]
to, they're not going to help you master a topic, but they let you know that it exists
[00:23:14]
so you can explore it further on your own.
[00:23:15]
Yeah. I think you mentioned that you view them as motivational inspirational, which
[00:23:22]
I think is a pretty good way to view them.
[00:23:25]
Yeah. And there's value to that. And if you, if you watch a conference, like I think it's
[00:23:29]
worth stating just because you need to apply things to learn them, test them for yourself,
[00:23:37]
experiment all these, all these things. It doesn't mean you need to do that for everything.
[00:23:41]
No, no, no.
[00:23:42]
And in fact, I think you should do them for things that seem important at the time because,
[00:23:48]
you know, Richard was talking a lot about motivation for, for teaching Elm. Well, he
[00:23:53]
was talking about motivation because he was saying for somebody to learn something, it's
[00:23:57]
important to have motivation that that thing is meaningful. So this is, this is essential.
[00:24:05]
Like don't just learn. I think don't learn things just because learn things because they're
[00:24:10]
interesting and meaningful to you and focus your efforts on that. And if some, something
[00:24:15]
can always become interesting and meaningful in the future. Don't feel like you just, Oh,
[00:24:20]
I have to learn SQL. I have to learn database stuff. I have to learn fun. I have to learn
[00:24:26]
this CSS technique. If it seems important and interesting, then learn about it. If it
[00:24:33]
doesn't, then there's always going to be some relevant problem, some relevant technique
[00:24:38]
at the time. Focus on that.
[00:24:41]
So if you find a practical use of a technique or a concept, then learn it. Otherwise just
[00:24:48]
go with your curiosity, right?
[00:24:50]
Yeah, absolutely. Absolutely. I think a lot about like just, just in time versus just
[00:24:57]
in case learning. And actually this is a problem that I personally have with a lot of university
[00:25:03]
programs and school curriculums is that they often are learning you. They're, they're learning
[00:25:10]
you. They're often teaching you a lot of things just in case you need them. Oh yeah. And another
[00:25:17]
problem often with, with school curriculums is that they don't focus enough on project
[00:25:21]
based learning. So they're not giving you opportunities to apply the techniques. So
[00:25:27]
you're just doing sort of exercises out of context. You know, if, if a train is traveling
[00:25:32]
this speed and another train is traveling this speed, how long will it take for them
[00:25:36]
to hit each other? And it's like, all right, well, but you should apply that to a meaningful
[00:25:41]
problem when you need it. And so,
[00:25:43]
But what if I'm working at a real company, real way company?
[00:25:46]
Then that's important knowledge. Then you should, then you should learn that really
[00:25:50]
fast.
[00:25:51]
I wish that my school curriculum taught me that.
[00:25:55]
I think, I think you would. Yes, absolutely. Yeah. I would hope that would be a requirement
[00:26:01]
beforehand. So yeah, no, but I think pressuring ourselves to learn things just because I should
[00:26:09]
know that, you know, once, once you're working as a developer, I think you can, there's plenty
[00:26:15]
of stuff to learn constantly. So you may as well prioritize the things that are immediately
[00:26:21]
relevant and applicable. And those are things that naturally have motivation. So you're
[00:26:25]
going to learn them better because you have a reason to care about them. So they're going
[00:26:29]
to stick better and you have a place to apply them and experiment with them. So you're going
[00:26:35]
to be able to actually fully synthesize that knowledge.
[00:26:38]
So what about things that feel hard? For instance, I have a lot of problems with learning CSS.
[00:26:44]
Yes. What do you, what would you recommend me as to how to learn it? Because on a case
[00:26:52]
by case basis, I can learn, Oh, here I need flex here. I need CSS grid and here I need
[00:26:58]
absolute position. And I can learn that in isolation. I'm going to forget it. I'm going
[00:27:04]
to learn it again, but at some point it's going to stick, but I still need to learn
[00:27:08]
plenty of things around it that I don't need right now. And that I don't feel motivated
[00:27:13]
to learn about.
[00:27:15]
Right. Yeah. I mean,
[00:27:17]
Don't tell me just learn L U I.
[00:27:19]
Yeah. CSS is, CSS is such a, such a challenging one because you really do like, it's hard
[00:27:25]
to pick one topic to learn because things are so interconnected. You know, but I mean,
[00:27:33]
I do, I do, I do notice this sometimes when, you know, when I'm learning something and
[00:27:38]
I'm thinking I'm kind of banging my head against a wall here. Like I need to get a little more
[00:27:44]
systematic about how I'm learning something. And to be honest, you know, things like flex
[00:27:48]
box and grid layout and absolute and things like that in CSS are, are something that I,
[00:27:54]
I could benefit from learning a little more systematically. So sometimes I think we need
[00:27:59]
to step back from the everyday, just trying to figure things out. I mean, this gets back
[00:28:05]
to this empiricism, calling the shot sort of thing. If, if we're sitting there going
[00:28:11]
through these flex box options and just randomly changing things and ho and then we finally
[00:28:16]
get it working, we're like, okay, good. Then take a, take a moment and read, read a thoughtful
[00:28:22]
flex box tutorial that, you know, explains things with a clear mental model. Try to learn
[00:28:29]
a little bit, try to call your shot and say, okay, what set of magical attributes are gonna,
[00:28:36]
gonna give me the expected behavior? Did that actually happen? If it didn't evaluate, why
[00:28:42]
not? And then you can learn instead of constantly making the same mistakes over and over.
[00:28:47]
Yeah. I don't know if you've encountered the games for CSS flex and this grid, like
[00:28:55]
the carrots and the frogs and frogs. I love the frog one. Yes. Those were, those were
[00:29:00]
good because you get feedback really quickly. Exactly. Yeah. Yeah. I totally agree. I'm
[00:29:06]
pretty sure that the amount of knowledge I have about those techniques come from that
[00:29:10]
and yes. One or two blog posts that are very good detailed summaries of those techniques.
[00:29:17]
Yeah, absolutely. Yeah. So, so one of my favorite learning techniques, I don't know, this is
[00:29:23]
just like a concept, very clear concept in my head that I gravitate towards often, which
[00:29:28]
is demystifying things. So if I noticed that something is fuzzy in my head a little bit,
[00:29:35]
for example, I noticed this often with, um, you know, in Elm, people are a little bit
[00:29:40]
fuzzy about custom type constructors and type alias record constructors, you know, so it's
[00:29:46]
like, Oh, people will mix up. There's like the type space and the, and the expression
[00:29:53]
space. Yeah. Value space. I call it value space. That's a good word for it. Yeah. Yeah.
[00:29:58]
Value space and type space type space can live in type signatures and, and type aliases
[00:30:04]
and value space can live in the body of functions. And people will mix up, you know, when you
[00:30:11]
say type user equals user, they'll mix up the thing on the left and the thing on the
[00:30:17]
right. The thing on the left is in type space. The thing on the right is in value space.
[00:30:21]
And um, and so in cases like that, I think it's really important to demystify things.
[00:30:27]
That's, that's the term I, I think of when I'm going through that process myself, I noticed
[00:30:32]
something being a little fuzzy. It feels a little bit magical and break down that magic.
[00:30:37]
So it's not magic because if it feels magical, then what ends up happening is you end up
[00:30:43]
flailing around trying things rather than being able to just sort of, you know, build
[00:30:48]
up a clear model. It prevents you from building up a clear mental model cause you're constantly
[00:30:53]
trying things in a way where you're sort of guessing and there's one little piece. And
[00:30:57]
if you demystified that tiny little thing, you know, in the case of like these custom
[00:31:02]
types where there's a thing on the left and a thing on the right, the variants on the
[00:31:05]
right, the type on the left, it really takes five minutes to demystify that if you do it
[00:31:10]
systematically and, and what does demystifying look like? Like I've got an exercise I sometimes
[00:31:18]
have people do where, you know, you just sort of, you know, play around with that and see
[00:31:23]
what happens and do these experiments with, with things on the left of custom type declarations
[00:31:28]
and things on the right, the variants and just break it down and poke holes in it and
[00:31:32]
see how it works. You take five minutes, you demystify it and then every time you deal
[00:31:37]
with that issue, it's no longer guesswork and, you know, trying to get it to work. You
[00:31:43]
can just demystify it once and then you've got it.
[00:31:46]
Because after demystifying, you have probably, probably a good grasp of what it means. You've
[00:31:52]
learned it.
[00:31:53]
Mm hmm. Yeah. Learn it once and for all with these tiny little things. They're these, they're,
[00:31:58]
they're these small things that, that trip us up. And so I think it's worth noticing
[00:32:03]
when you have that little fuzziness on a small little thing, it can go a long way. Cause
[00:32:08]
if, if a tiny part of it feels confusing and magical, then everything feels confusing and
[00:32:14]
magical. So hone in on that one thing that's confusing.
[00:32:16]
So you have now demystified value type, value space and type space. You've learned it, you
[00:32:22]
understand it, but at some point you forget it.
[00:32:25]
Mm hmm. Mm hmm.
[00:32:26]
What do you do against that?
[00:32:27]
Or how do you relearn it?
[00:32:30]
Ah, good question. Well, I've got, I've got a lot of secret notes here that I've hidden
[00:32:35]
from Jeroen. So he, he read my mind and jumped to one of my bullet points.
[00:32:40]
Yes.
[00:32:41]
Very nice.
[00:32:42]
Or did you anticipate my question?
[00:32:45]
Yes.
[00:32:46]
Then you are much better than I am.
[00:32:49]
No, no. I think, I think you read my mind a little there. So I think note taking is
[00:32:55]
something I'm trying to be more deliberate about recently. I've really invested in my
[00:33:00]
note taking strategy. Do you have a note taking system Jeroen?
[00:33:03]
I do. I have an app or two or three.
[00:33:07]
Mm hmm.
[00:33:08]
Sometimes it's where I write most things that come to mind. Well, I say most things, but
[00:33:14]
not too many things.
[00:33:15]
You have notes on performance, Elm performance, things like that.
[00:33:19]
Yeah. I don't have anything deliberate. Sometimes I watch the conference talks for instance
[00:33:24]
and I try to write down stuff that is written on the, on the slides that I think could be
[00:33:32]
interesting to keep in mind. I, yeah, for instance, for benchmarks, performance, I usually
[00:33:39]
write that in Elm, in the, in the code so that everything is in the same place. So I
[00:33:44]
guess code is in a way a note taking app.
[00:33:48]
It can be. Yeah. I mean, if you apply a particular technique to something or if you have a little
[00:33:52]
repo that you use to experiment with something, you can always go back there. That's a, that's
[00:33:56]
a good point. Yeah. I really like this technique of mind mapping as well, where you have, you
[00:34:03]
know, you start in the center with the core topic of the notes, you know, make impossible
[00:34:10]
states impossible and then it branches out to things and you say, you know, custom types
[00:34:14]
and then custom types branches out to phantom types and et cetera, et cetera. They all kind
[00:34:21]
of have these, the idea is that it allows you to have like free flowing ideas that are
[00:34:27]
just short one or two word summaries rather than long form notes. So it's like quick to
[00:34:33]
take the notes. It's quick to at a glance, see what you've written. I think that's a
[00:34:37]
very effective learning technique and for, for recall as well.
[00:34:40]
Yeah. And I guess that silos the, the concepts as well. So you can learn about custom types
[00:34:48]
in isolation and then learn about type ADC's in isolation, learn about phantom types in
[00:34:53]
isolation. And when you've learned all of those, you know, kung fu, making impossible
[00:34:59]
states impossible. Exactly. Oh, it's a fine line between kung fu and making impossible
[00:35:05]
states impossible. We should just rename making impossible states impossible. It's too long
[00:35:10]
to say as well. How about umfu? Umfu. Yeah. Yeah. I think, um, so you know that your system
[00:35:17]
is working when you know where to look to find something you can't immediately remember.
[00:35:22]
I think there's something to be said for that. There's a very controversial post going around
[00:35:28]
the day that we're recording this. I don't know if you've seen it by DHH37signals. Maybe
[00:35:35]
no. He's basically saying don't be copypasta pirates who are incompetent and celebrating
[00:35:43]
your incompetence by not being able to do anything yourself and having to just search
[00:35:48]
for everything and copy paste it. And come on, don't be a jerk. Don't tell people what
[00:35:55]
to do and how to be. Yeah. And especially when you're just so wrong about it. Come on,
[00:36:01]
like, like copy, copy pasting is okay. Like it happens all the time, but hopefully your
[00:36:08]
learning and your mental models can make it easier over time to find the information you
[00:36:13]
need. You don't need to store it in your brain. You just need to be able to know where to
[00:36:17]
find it and understand the bigger picture of, of when it would be useful. So, you know,
[00:36:24]
like if you forget how to do phantom types, that's okay. But if you know when to look
[00:36:30]
for it and have some sense of when, when it applies, that's what you need. If you, if
[00:36:38]
you sort of forget how you do opaque types, which that's a tricky, tricky thing when you're
[00:36:43]
first kind of learning that concept, you don't have to feel bad for like looking something
[00:36:49]
up or copy pasting something to start with an opaque type. You know, you can, um, you
[00:36:55]
can just start the episode two of Elm Radio again, which you really should. Yes. Cause
[00:36:59]
opaque types are so useful, but however you, however you arrive at that, if you, if your
[00:37:04]
brain knows to go to look for it in that place, that's great. So just being able to navigate
[00:37:10]
things, however you do that, even if it's like searching for the same stack overflow
[00:37:15]
post every time that you need to like, remember whether you should do like a script tag with
[00:37:22]
a defer in it or, you know, or not with defer, or if you should put it in the body at the
[00:37:29]
bottom of the body in the head where you should put it, you don't need to memorize that. You
[00:37:34]
just need to be able to find that information when you need it and know that you have that
[00:37:39]
information that you should find because there's something important you need to do. That's
[00:37:42]
all, that's all you need. Please send me the notes for that one because I don't remember
[00:37:46]
that. But, uh, but if you have something that like, as long as you know, you need to get
[00:37:53]
it. And if you have a system of notes that helps you find that that's great, but notes
[00:37:56]
are not cheating, you know, notes are not cheating. Happy pasting is not cheating. If
[00:38:00]
there's like a useful go to blog post, I actually find that often there'll just be a really
[00:38:06]
good blog post and that becomes my reference for something. And like, I'll go through my
[00:38:12]
like browser search history and find that blog post over and over and that's fine. That
[00:38:17]
works, you know? Yeah. But just taking notes is not enough. You need to practice afterwards.
[00:38:22]
Right. Yeah. Practicing. So increasingly something that I've been developing a lot recently is
[00:38:29]
a system around this sort of second brain ideas that'll custom second brain and the,
[00:38:35]
the idea like there's a, there's a really great book, I think it's called how to take
[00:38:38]
smart notes. Kind of a strange title. It doesn't fully do it justice, but it's about this second
[00:38:44]
brain concept. It's, it's about the guy who kind of created this Zettelkasten system.
[00:38:50]
So it's a very interesting read. And one of the things it talks about is interconnecting
[00:38:57]
notes and concepts and the important of this richness of referencing things. You know,
[00:39:02]
this sort of Rome research has sort of popularized this idea of like back references and notes.
[00:39:09]
Yeah. Okay. So in my own incremental Elm site, I've created a back referencing system.
[00:39:15]
Yeah. So, so kind of like a, you have a Wiki page, you write notes in your Wiki page and
[00:39:21]
then you have sources and citations at the bottom.
[00:39:25]
Yes. Yes. And you, and you interconnect the information richly within, within itself and,
[00:39:32]
and you can create sort of index pages where, you know, you say, here's everything I know
[00:39:38]
about data modeling and Elm. And you link that to make impossible states, impossible
[00:39:43]
phantom types, opaque types, you're in hierarchy of constraints, which we've talked about
[00:39:47]
many times. And so now one difference with like Wikis in this sort of second brain philosophy
[00:39:54]
is that you're well, similar to Wikis, you're trying to create sort of atomic notes that
[00:40:00]
can cross reference each other, but unlike a Wiki, you try more to make declarative statements
[00:40:07]
about things, sort of propositions about your, your beliefs about things. So like, for example,
[00:40:15]
I've got a note on my incremental Elm site called use the platform. And it's about this
[00:40:21]
idea of you know, if you, if you create a form, that's not actually a form tag in HTML,
[00:40:30]
then what happens? Well, you submit it with JavaScript. But what happens if you click
[00:40:35]
enter? Well, maybe nothing, right? But, but a form is supposed to have certain behavior
[00:40:42]
when you hit enter. So you've missed that enter key handling. And now you need to manually
[00:40:47]
go create that with on enter handlers. But also, more importantly, you need to remember
[00:40:52]
what those things are, you need to be aware of what what happens in a screen reader, if
[00:40:57]
it's handling a form element, and then you need to make those things happen manually.
[00:41:02]
So use the platform, because if you just make a form tag in Elm, and then you add a an on
[00:41:11]
enter or an on submit handler, and you use a proper submit button, that's a real submit
[00:41:17]
button in the form, even if you even if you intercept the on submit action and do something
[00:41:24]
in Elm, that's okay, but at least you're using the platform as much as possible. So, you
[00:41:30]
know, but that's this sort of stake in the ground that I'm putting a flag down and saying,
[00:41:34]
here's a here's a claim I'm making. Now that claim might evolve, maybe maybe somebody,
[00:41:40]
as happens on the internet, you put out an idea, and people are going to push back on
[00:41:46]
that claim. But that's great. That strengthens it. Now, I'm not trying to make bombastic,
[00:41:51]
rude, aggressive claims, but I'm trying to make sort of verifiable claims that somebody
[00:41:59]
could in earnest, push back on and and but so that's a difference with a wiki. It's not
[00:42:05]
just like the platform, the entry on the platform or on form tag, it's a sort of statement of
[00:42:12]
a belief or an idea, use the platform. And so it sharpens your ideas on things, and it
[00:42:19]
gives you a place to look. And in the process of writing those posts, I tried to do, you
[00:42:25]
know, more rigorous than casual research into examples of that finding examples of places
[00:42:32]
where using the platform saves you from having to do, you know, several things manually that
[00:42:39]
they come for free when you use the platform. And I try to support it with ideas like, what
[00:42:44]
if a future platform comes along and uses these declarative things, assuming you're
[00:42:50]
using the platform? And what if future features come from using the platform, you have to
[00:42:56]
anticipate those and handle them in the future. So I can sort of like, really develop this
[00:43:02]
idea and it gives me a place to develop over time support my idea. If somebody says, what
[00:43:07]
are your thoughts on on this concept, I can link them to something. And anyway, I've been
[00:43:12]
really enjoying that as a technique for learning and developing ideas.
[00:43:17]
So basically, you're trying to write opinions, not maybe not instead of information, but
[00:43:23]
information plus your opinion on it?
[00:43:26]
Yeah, I would say maybe like claims, just to Yeah, just just to sort of harden a stance,
[00:43:35]
you know, I guess what's the what's the phrase like, for firm beliefs loosely held or something
[00:43:40]
like that? If you just have sort of fuzzy ideas about things, then you're not going
[00:43:47]
to really crystallize your thinking.
[00:43:50]
Yeah. So if you put me if you write claims or opinions or them in your mind in the first
[00:43:56]
place, then you're more likely to remember them. Is that kind of the idea?
[00:44:00]
Yes, you're more likely to remember them. And you might learn by somebody pushing back.
[00:44:06]
And I think it's, again, very important to do it in a respectful way, in a way where
[00:44:11]
you're not being antagonistic to anybody, but just making a claim and, and see it as
[00:44:17]
your current thinking and be open to changing that belief of better information comes along.
[00:44:23]
So then also means that you need to put it to make it public in a way?
[00:44:27]
Yeah, that's increasingly a part of this second brain philosophy, at least this digital gardening
[00:44:32]
philosophy. That's, that's been part of it for me, at least. I don't think it's necessarily
[00:44:37]
a requirement for second brain. But I've been really enjoying, you know, people talk about
[00:44:43]
this sort of learning public movement and digital gardening. And I've, I've enjoyed
[00:44:47]
it. I've enjoyed I've enjoyed having a public place to, to share thoughts and back them.
[00:44:53]
Like sometimes people will ask a question or they'll, you know, say like, why? Why is
[00:44:59]
SEO important? And I can sort of formulate my thoughts and then share a link. And I love
[00:45:04]
that.
[00:45:06]
So do you have a comment section on your, on your notes?
[00:45:09]
I've been thinking about adding one. There are some systems for doing that with like
[00:45:13]
GitHub issues where you can have like a repo for your blog that is just for the issues.
[00:45:19]
And then people can just post a reply on the GitHub issue and it shows up as a comment.
[00:45:24]
I may do that. That would be fun. Yeah. Yeah. If you wanted to, you could reply about Jeroen's
[00:45:31]
hierarchy of constraints and set the record straight if you need to, if I misrepresent
[00:45:36]
it.
[00:45:37]
I mean, you coined the term.
[00:45:40]
I did. But see, that's to my point, coining the term. Now it's like a meaningful concept
[00:45:46]
that
[00:45:47]
That is true. It was a recurring thing. It wasn't even a concept in my mind all that
[00:45:51]
much.
[00:45:52]
But it was something that you brought up often. And so by noticing that, giving it a place
[00:45:58]
to live as a phrase and as a URL, that's, I think that's really powerful.
[00:46:04]
That is true. Or that just made me more opinionated on it being true when it might not be true.
[00:46:14]
But you know what? I think that we have like opinions and beliefs naturally. And if we
[00:46:20]
don't give them some concrete formulation, we don't give them the opportunity to evolve
[00:46:26]
and change. So I don't think it makes us any less opinionated to not like state our ideas
[00:46:32]
and beliefs and claims. I think it just allows us to be more cowardly about them and not
[00:46:38]
really put them to the test.
[00:46:41]
All right. I have a claim.
[00:46:43]
Yes.
[00:46:45]
I would claim that Elm is easier to learn than other languages because it is simpler.
[00:46:52]
It is, it has fewer features and fewer keywords and just less things to learn. Meaning that
[00:47:00]
when you write Elm code, you encounter and therefore practice the same concepts more
[00:47:08]
than in other languages.
[00:47:09]
I like this idea. Yes.
[00:47:11]
It is a claim. It is true.
[00:47:15]
It is true. Proven. Sample of approval. I do like that. I do like this idea that reusing
[00:47:23]
a set of constructs and techniques is very powerful, very powerful stuff. Good sign of
[00:47:30]
an API in general, whether it's a language or a library.
[00:47:33]
I mean, do you know how the with statement works in a JavaScript?
[00:47:38]
I don't even know what a with statement is.
[00:47:40]
I'm just checking whether it's not a thing only Python. No, there is a with statement
[00:47:50]
in JavaScript. Yeah. You never encounter it because JavaScript is too big and people say
[00:47:55]
it's a bad thing anyway.
[00:47:58]
So the with expression, the with statement in JavaScript. Fascinating.
[00:48:03]
Yeah. Don't use it. I don't remember what it does, but I know it's bad.
[00:48:07]
That's so interesting. Yeah. And speaking of, you know, with regard to learning, I think
[00:48:12]
another another useful idea in learning that I try to keep in mind is technical communication.
[00:48:20]
I think it's worth, now again, don't be a jerk. Don't judge people and be rude about
[00:48:26]
this. But I think we can always strive to be more precise with our technical communication.
[00:48:31]
So you mean don't communicate on Twitter?
[00:48:33]
140 characters or 280? Well, perhaps. Perhaps don't venture out
[00:48:40]
there. But I think there can be good discussions there. But for example, one thing that I find
[00:48:46]
myself reaching for that I always have to try to be precise about is statement versus
[00:48:52]
expression. So, you know, an expression being something which has a value and a statement
[00:48:58]
does not have a value. So like I think in Elm, you know, statements include import statements,
[00:49:05]
port declaration statements. Those are things that don't have values. You can't like use
[00:49:10]
them somewhere. But it's not a case statement. And sometimes I have to correct myself. I
[00:49:16]
start to say case statement because I'm used to switch statements in JavaScript and other
[00:49:20]
languages which they are statements in JavaScript and Java. They're not expressions. They don't
[00:49:26]
have values. It's an if statement. It doesn't have a value. You can't say var username equals
[00:49:33]
if but in Elm you can. Well, you can't say var because it's not var. But you get the
[00:49:40]
idea it's an expression that you can use. And anyway, just being precise about that
[00:49:44]
I think has value. I think it keeps, you know, it helps you sharpen your mental models about
[00:49:50]
things, keep things demystified, keep things from being sort of blurry fuzzy things. So
[00:49:55]
I think, you know, try to hold yourself to a high standard of being precise with how
[00:50:02]
you think about things and communicate things.
[00:50:04]
Yeah, but it goes a bit counter to what we discussed with Richard about being precise
[00:50:11]
all the time. Dilute the details. Don't mention all the details at once. Teach them as they
[00:50:18]
need to, to learn them.
[00:50:20]
Right. Well, I guess there's the distinction between accurate and precise where, you know,
[00:50:27]
accurate means that you're not straying from the truth. You're being correct and accurate
[00:50:34]
and precise. It's the precision. So how fine grained is your accuracy? How specific are
[00:50:43]
you being? So I think we should always strive to be accurate.
[00:50:46]
Yeah. Or tell people this is not entirely accurate. I'm simplifying things.
[00:50:52]
Yeah. But ideally we can avoid that, right? Ideally we can find a way to present information
[00:50:59]
that is, you know, where it naturally unfolds in a way that we don't have to give all the
[00:51:04]
details at once, but we don't have to give any incorrect information. But yeah, I mean,
[00:51:10]
I think in subtle ways we can, like, I don't know, saying that something is an expression.
[00:51:15]
I think that's a good thing to be aware of. At least I try to be, you know, aware of that.
[00:51:21]
Yeah.
[00:51:22]
Yeah. So we talked about applying techniques, actively doing exercises, but when you are
[00:51:30]
learning something, do you write small exercises to yourself? Like trick questions for later
[00:51:39]
you, for later Dillon. Like, Hey, what can I do with the custom type? Are you able to
[00:51:45]
do X with custom types? Yes or no? Later Dillon, please reply. Please answer the question.
[00:51:54]
I would tend to do more like code exercises or solving small problems than like writing
[00:52:01]
questions. But yeah, I mean, I'll try to write some notes on things like that. But often
[00:52:08]
like, for me, you know, we're, we're a little unique in this regard. I think you're in probably
[00:52:13]
that our, our side projects have taken on lives of their own, that they've become more
[00:52:19]
than side projects for us a little bit. And not everybody needs to be that, that way with,
[00:52:26]
with how seriously they take their side projects and how much they invest in their side projects
[00:52:30]
were a bit extreme. But, but I do think that there's value to side projects, you know,
[00:52:36]
however, however modest or simple a side project may be. I think that that's a really great
[00:52:42]
place to experiment with ideas. And I know for me that it's been absolutely essential
[00:52:48]
that whenever I have a new concept, you know, I remember my early days of Elm, like watching
[00:52:54]
Richard's Elm Europe keynote one year where he was talking about extensible records and,
[00:53:02]
you know, passing through as little information as possible to try to narrow, you know, narrow
[00:53:08]
types down and narrow where you need to follow data to understand what it depends on and
[00:53:17]
what it, what it can affect by what it returns, if it returns a command or not, if it returns
[00:53:22]
the whole model or just part of the model, things like that, right. He gave a great talk
[00:53:26]
about that. And it really was like a lot of new information. When I first saw that, it
[00:53:32]
was like, wow, I have a lot to process that is very much not part of the way I think about
[00:53:38]
Elm. And I need to really sit with this. In fact, I remember like watching that talk more
[00:53:45]
than once when, when I first saw it, when it first came out, because there was so much
[00:53:50]
information for me to process there, so much new stuff. But I went through the mobster
[00:53:57]
code base and I applied that as many places as I could and probably too much in some cases,
[00:54:04]
like I probably used extensible records a little bit too much because he sort of introduced
[00:54:09]
this idea of narrowing what something depends on and what something can affect, like what
[00:54:15]
fields it can change in a record using extensible records. And perhaps I went a little too far
[00:54:20]
on that, but you know what, like you can't bypass the failure to learn. You need to try
[00:54:24]
things. And so for me, side projects have been really important for that. Just creating
[00:54:31]
like, just going a little bit crazy with a side project. Like I remember Richard talked
[00:54:36]
in one of his talks about using, what's it called? Dreamwriter? His Dreamwriter app.
[00:54:42]
And he was saying that he kind of like, he's like, well, why couldn't you have like these
[00:54:50]
mini architectures nested like components? And he like experimented and basically started
[00:54:58]
hating working on the app after like, he really got it to a point that he loved working on
[00:55:02]
it and making changes there. And then he started to hate it because he did this like big refactoring
[00:55:06]
to componentization. And he like, and he like talked about like having all these bugs at
[00:55:14]
one point in Dreamwriter with like state being mismatched. And then he started, I think he
[00:55:24]
started trying to like derive state rather than duplicating it and passing around. And
[00:55:29]
so, I mean, I think this is really how people explore, figure out new techniques, learn
[00:55:37]
new techniques is you try it, you experiment and having a safe space, like a side project
[00:55:44]
to experiment is very valuable in my experience.
[00:55:48]
Also having a safe state of your side project. Like a good good history. So Richard could
[00:55:57]
have backtracked out of all this. He would be happy and he would be working on Dreamwriter
[00:56:03]
right now. Right. Yep. Sometimes, sometimes our side projects pay the price when, yeah,
[00:56:08]
when we get a little too eager. So another thing I find myself doing a lot is we talked
[00:56:16]
about being curious and I think being curious is huge. When you're curious, go look at the
[00:56:24]
source code, even if you don't understand it, even if it makes no sense to you, just
[00:56:28]
if you ever find yourself one, it's just a little habit that you don't have to fully
[00:56:33]
understand it, but just be a little bit curious and be like, hmm, is that even possible? How
[00:56:38]
does it even do that? Like, how does, you know, like if you see something that looks
[00:56:42]
a little funny, like I remember, I remember figuring out this technique about what I like
[00:56:48]
to call a package opaque types where it's like a type that you can create anywhere within
[00:56:56]
the code for an Elm package, but you can't create that type. That type constructor is
[00:57:01]
not exposed outside of the package. I remember seeing something like in Elm UI, like that
[00:57:06]
it's like type alias element equals element. I'm like, yeah, what the heck is that? You
[00:57:12]
just look at something that looks a little bit weird and follow your curiosity and you
[00:57:16]
know, you don't have to, you're not on the hook to perfectly understand everything about
[00:57:21]
it, but just a little bit, get curious and say, that seems weird. I wonder what it is.
[00:57:27]
Click view source in the package and go to that element module and see type alias element
[00:57:35]
equals where's that defined? Oh, it's follow the import. Oh, it goes to this thing. Oh,
[00:57:40]
it's in this internals dot something module. And oh, it's just a custom type. It's just
[00:57:46]
a custom type, but it's defined in an internals module. Is there something special about internals?
[00:57:52]
Oh, I see. No, the only thing that's special about it is that it's not an exposed module
[00:57:58]
in the Elm dot json for package. You can have exposed modules and the internals package
[00:58:03]
by convention are not exposed. That's all it is, but you can learn new techniques that
[00:58:09]
way. You can, you can learn a lot just by clicking view source.
[00:58:12]
I mean, it's so nice that it, that almost every, yeah, all packages in the Elm community
[00:58:19]
are open source and you can look at the source code that lowers the barrier to learning and
[00:58:27]
you learn so much from, from doing that. I've been recently digging into the compiled code.
[00:58:33]
So learning how compiled code works, the compiled JavaScript from Elm code, I mean, and yeah,
[00:58:42]
some things become demystified. Yeah. Even things like, hmm, I think pattern matching
[00:58:48]
works this way. And if you think you know something, but you're not really sure, then
[00:58:56]
you start assuming things and hypothesis, making hypothesis about things. And they may,
[00:59:03]
they may be wrong. For instance, I was thinking if I do pattern matching this way on lists,
[00:59:11]
then or something else, then the compiled code will be more performance because I ordered
[00:59:17]
this before that, for instance. And that turned out not to be true when I looked at the compiled
[00:59:23]
code. Sometimes the compiler was smart enough to do things in a more performant way, or
[00:59:29]
it didn't do it the way I expected. So yeah, looking at the compound source code or looking
[00:59:36]
at package library code removes those blurry, those fuzzy images that you have in your mind.
[00:59:44]
And when you look at them, you know, you learn and everything becomes clear.
[00:59:50]
Yeah. Yeah. Yeah. I think, you know, you want to think at a high level of abstraction, but
[00:59:56]
it can be really valuable to understand what's under the hood a little bit to just get comfortable
[01:00:03]
peeking under the hood a tiny bit. Yeah. I don't recommend looking at the 10,000, 20,000
[01:00:09]
lines of code of, of compiled code. I should have spent better spend my time.
[01:00:18]
But if you, if you take something away for that mental model, you know, it's, it's super
[01:00:22]
valuable. You know, the second brain stuff has this, I think controversial stance statement
[01:00:31]
claim, if you will, which they wrote in a note. Well, absolutely. Basically the, the,
[01:00:37]
the author of this how to take smart notes book said that he basically wrote the book
[01:00:43]
by just taking his notes and sort of organizing them differently and rewording some things,
[01:00:49]
but he basically just took his notes that he already had and his book was just boom,
[01:00:54]
you know, which the the guy who originally created the Zettelkasten system was known
[01:00:59]
for being like a prolific writer that he was like a sociologist, I believe, and wrote hundreds
[01:01:05]
of books. Even after he passed away, he posthumously published dozens of books, I think, because
[01:01:12]
people just went through his notes and there were all these ideas that they were just able
[01:01:15]
to extract books out of. It's very interesting. So prolific that people are publishing your
[01:01:23]
things afterwards. Isn't that amazing? Yeah. It's fascinating.
[01:01:26]
And so this sort of second brain philosophy has this, I think, sort of bold claim that
[01:01:33]
you, if you're not writing, you're not learning. And I'm not sure if I agree with that yet,
[01:01:41]
but I, it's definitely challenging me in a good way. I think it's good to be challenged
[01:01:45]
a little bit to have your beliefs challenged. So if the listener to this episode has not
[01:01:50]
written everything down, exactly. They haven't learned anything.
[01:01:55]
That's right. Please press replay and start writing things
[01:02:00]
down. That's right. That's right. I mean, we've got
[01:02:03]
to build up our mental models and writing can certainly help with that. To me, that's
[01:02:08]
one technique, but I think it's a powerful sentiment and I think there's definitely value
[01:02:13]
to that concept. And by the way, I should reference that a lot of the ideas on learning
[01:02:22]
this book, Make It Stick has been a really big influence on me. I really enjoyed this
[01:02:26]
book. It's written by like a couple of neuroscientists, just sort of evaluating the literature on
[01:02:33]
what we know about how the brain learns. And so a lot of these concepts come from there.
[01:02:38]
I'll leave like a little link to some notes from that book from the internet. But yeah,
[01:02:45]
there's a lot of good stuff in that book. So maybe like a kind of wrapping up a little
[01:02:50]
bit here, but maybe on a final note, like another thing which we talked about, I think
[01:02:55]
in our API design lessons episode, we don't do all our learning in our conscious brain
[01:03:02]
prefrontal cortex, inner monologue. A lot of learning happens when we sleep in our background
[01:03:08]
processing of our brain. Our brain is doing all these things in the background without
[01:03:13]
us knowing about it. Yeah, especially you ride before sleeping
[01:03:17]
in my case. Yeah. And that's good. And we should optimize
[01:03:23]
for the way our brain works, which is it does a whole bunch of stuff in the background.
[01:03:28]
And we don't have to do everything, but we can tee things up for it. And so these things
[01:03:32]
like writing notes can help it sort of have some things to chew on and process in the
[01:03:37]
background. We can sort of pose questions and let our background processing work on
[01:03:44]
that in the background. Another thing, there's a really nice book by Dan Pink called When.
[01:03:51]
And I had a really nice takeaway from that book that really stuck with me, which is this
[01:03:57]
idea that we have different modalities of thinking that our brain is most natural at
[01:04:04]
in different times of day. So if you're an early bird like myself, then in the mornings,
[01:04:09]
you're going to be more alert and analytical. And in the evenings, you're going to be better
[01:04:13]
able to make connections and think of innovative ideas. So that sounds right. That sounds about
[01:04:21]
right. And if you're a night owl, it's the opposite. Oh, no, that doesn't sound right
[01:04:26]
to me. Interesting. Maybe I should analyze that. But I should do that in the morning.
[01:04:33]
No, in the evening. It's complicated. It's interesting. So he says that the way you tell
[01:04:40]
if you're an early bird or a night owl is basically naturally if there's no work schedule
[01:04:46]
or anything like that to wake you up. Do you tend to wake up, you know, whatever, like
[01:04:52]
before 830 or after 830 or something like that anyway. But the point is like, pay attention
[01:04:58]
to how your brain naturally works and feed it problems that it's suited to solve. So
[01:05:04]
for myself, if I'm thinking about some problem that requires a lot of creative thinking,
[01:05:11]
I'm not going to do a great job of that in the morning. But I am going to be really good
[01:05:15]
at doing research, gathering prior art, thinking about a lot of ideas that will let my more
[01:05:21]
creative thinking kick in later in the evening. So, you know, I try to optimize for that a
[01:05:26]
little bit. Right. Yeah. So I was wondering, because we did an episode about teaching,
[01:05:33]
and now we talked about learning and you mentioned writing notes quite extensively. Do you think
[01:05:40]
that writing notes is a way of teaching yourself or someone else? So do you get the same benefits
[01:05:46]
when you teach someone or multiple people as when you write notes in a good way? I think
[01:05:55]
so. Very much so. Very much so. Actually, one of the things in this book, Make It Stick,
[01:06:00]
is it actually talks about how there's something different in your brain that kicks in when
[01:06:06]
you're learning something in order to teach it or when you're just learning it. So, oh,
[01:06:11]
okay. And this, I mean, partially this goes to the motivation question. Like if you're
[01:06:15]
learning something with a purpose, then your brain finds places to fill in that information
[01:06:21]
because the brain learning is not about transferring knowledge from one box to another box or copying
[01:06:29]
it. Learning is about making connections, making associations. Our brains are association
[01:06:35]
machines and the more things you can connect an idea to in your own mental model that's
[01:06:41]
meaningful to you, the more you understand that thing, the better you've learned it.
[01:06:46]
And so I guess when you try to teach someone, you will do so with your own words, obviously.
[01:06:54]
Yes. And when the teaching doesn't come across, then you try to find a new way to explain
[01:07:03]
things. So you need to find new connections, new metaphors, and that builds a new mental
[01:07:08]
model, I guess. Absolutely. Same benefits. Exactly. Yeah. And it is, you know, Make It
[01:07:15]
Stick talks quite a bit about this difference between following something and understanding
[01:07:23]
something. So we can, I mean, like I think a good analogy is if you're driving in the
[01:07:29]
passenger seat and you're like, okay, we're going, you know, we're turning right at this
[01:07:37]
light and we're, you know, going straight down this road and we go past these buildings,
[01:07:43]
you can follow the path, but would you be able to be put in the car at the starting
[01:07:48]
point and drive that route yourself? Probably not. Whereas if somebody is in the driver's
[01:07:54]
seat and they're following GPS instructions and you say, okay, go drive the road again
[01:08:01]
after without a GPS, they'd be much more likely to be able to do it because they're actually
[01:08:06]
making those choices where you might not pay attention to the fact that they're making
[01:08:11]
a particular turn because you're just following what they're doing. You're not actually evaluating,
[01:08:15]
well, I could have turned left here, I could have gone straight, I could have gone right.
[01:08:18]
It's the same with learning. If you're just like, oh, okay, I'm with you so far, I'm with
[01:08:24]
you so far, I'm with you so far, we have the illusion that we're comprehending what they're
[01:08:28]
saying, but we're actually just following it, but we haven't carved out those deep questions.
[01:08:35]
So then if you go to explain that to somebody else, if you explain phantom or the phantom
[01:08:43]
builder pattern, and then someone says, hey, what is the phantom builder pattern again?
[01:08:48]
And I go to explain it, then I might start explaining it and find myself getting lost
[01:08:51]
and saying, oh, wait a minute, but would you use it in this case or would it be a bad fit
[01:08:57]
for that? And would you be able to model this type of thing or not and getting stuck somewhere?
[01:09:02]
Because even if I followed everything you said, I hadn't taught it, I hadn't made that
[01:09:08]
learning my own. So yeah, teaching is a very powerful way to make learning your own.
[01:09:13]
But if your own was a better teacher, wouldn't know how to explain that.
[01:09:19]
Well, you know, perhaps if you had the opportunity to do some exercises in a workshop, it's limited
[01:09:28]
what you can do just by talking and somebody hearing you talk. It's just, that's not how
[01:09:33]
you get smarter. You got to that's part of it. That can be an important ingredient, but
[01:09:38]
it's not enough on its own. So is there anything on your radar that you are looking to learn
[01:09:43]
next in the Elm world you're in?
[01:09:46]
I tend to try and discover things like ways of improving things or forbidding things in
[01:09:54]
my case usually. And yeah, I guess I'm learning through that. Having a side project does take
[01:10:05]
a lot of time and it's not always teaching you a lot, I think. But when you reach new
[01:10:12]
edges, when I need to work with something that I don't know much, then I learn. But
[01:10:18]
when I'm doing pretty much what I'm already am used to, then I'm not progressing.
[01:10:24]
Right. Sometimes there's just grunt work that you need to do where you're not necessarily
[01:10:28]
learning a new technique. And sometimes you have to be deliberate about applying a new
[01:10:32]
technique and learning it. But I've noticed that, I mean, like your blog posts on your
[01:10:37]
jfmangles.net blog, you're exploring a lot of ideas there. You know, I mean, and you've
[01:10:43]
shared your learnings on this podcast about performance, tail recursion. Now you're looking
[01:10:50]
at like compiler output stuff, looking at code complexity and how to evaluate that in
[01:10:56]
different ways. And I'm sure those things have an impact on how you write code, not
[01:11:01]
just benefiting from having written those Elm review rules, but it changes how you think
[01:11:06]
about complexity in code or performance, things like that.
[01:11:12]
I don't even need my Elm review rules anymore. It's all in my mind.
[01:11:16]
Exactly. Well, that's the thing, isn't it? Yeah.
[01:11:19]
But I want a tool to take care of that. That's why I wrote them.
[01:11:23]
That's the irony. And you know, the more you love Elm, the more you write JavaScript to
[01:11:30]
help you write Elm. Right? That's the other, the curse of loving Elm too much.
[01:11:39]
Or Haskell. Yep. Yeah. The people who write the tools for Elm usually don't write Elm.
[01:11:46]
In my case, I made the lucky bet of trying it, writing it in Elm.
[01:11:51]
That is great. I think in your case as well, mostly.
[01:11:55]
There's both. There's both. Yeah. Yeah. Yeah, absolutely. All right. Well, I guess we've
[01:12:02]
sort of pointed out some books. We can kind of link to some articles about some of the
[01:12:08]
things we've talked about. Growth mindset, make it stick. Second brain. Second brain.
[01:12:14]
Really fascinating stuff. If you find any statements in my incremental Elm notes that
[01:12:21]
you'd like to push back on and be a part of the learning experience for me and be a part
[01:12:25]
of the discussion, I always welcome discussions on those. Love to hear people's thoughts.
[01:12:30]
And if you enjoy Elm Radio, don't forget to share it with a friend and rate us on Apple
[01:12:36]
Podcasts. That helps us a lot. And you're in. Until next time. Until next time.