HomeVideos

The Programmer's Brain by Dr Felienne Hermans - Book Review/Recommendation

Now Playing

The Programmer's Brain by Dr Felienne Hermans - Book Review/Recommendation

Transcript

236 segments

0:00

Hello everyone.

0:01

So, people have asked me recently about

0:03

book recommendations

0:05

for how to get better in their career

0:07

and and so on and so forth. One of the

0:08

books that I recently listened to as an

0:11

audio book is called The Programmer's

0:14

Brain.

0:15

Uh this book is written by Dr. Felienne

0:18

Hermans. I think I'm pronouncing that

0:20

correctly. And so, this video is kind of

0:22

my review for that book. I found it

0:25

genuinely useful and interesting.

0:28

If I had to boil the book down to its

0:31

essence, or at least what I think what I

0:35

learned and extracted from the book,

0:39

it would be an awareness that tasks like

0:44

software engineering are difficult

0:47

because of the limitations of the human

0:50

brain.

0:51

And understanding those limitations can

0:54

allow you to approach

0:56

problems

0:58

in a way that takes responsibility for

1:01

those limitations, rather than running

1:04

into a brick wall and not really knowing

1:06

why there is a brick wall. I'm sure some

1:09

of you have had a day where you stare at

1:12

a 20-line pull request and you keep

1:16

staring for 2 hours. You've forgotten

1:19

how everything works and you're starting

1:21

to feel like maybe you might be stupid.

1:25

The early part of the book talks about

1:28

different types of memory,

1:31

and not computer memory, uh the memory

1:33

in your brain.

1:35

And it draws analogies between the

1:38

memory that you have in your brain and

1:39

the memory that you might have uh in a

1:42

computer. So, you've got your long-term

1:45

memory, your short-term memory, and your

1:47

working memory. And you can think of

1:49

long-term memory as your hard drive.

1:51

You can think of your short-term memory

1:53

as

1:55

the cache in the processor, in the CPU.

1:58

And you can think of your working memory

2:00

as RAM.

2:02

Once you understand that you have these

2:04

different kinds of memory in yourself,

2:07

then the game becomes how do I manage my

2:12

working memory so that it's not

2:13

overloaded?

2:15

How do I respect the limitations of my

2:18

short-term memory and write my code in a

2:21

way that it doesn't get overloaded? And

2:24

for long-term memory, how can I take

2:26

more information and knowledge from my

2:30

short-term memory and place it into my

2:32

long-term memory so that I can do things

2:35

automatically. This is the kind of thing

2:37

that makes learning new frameworks or

2:41

data structures or algorithms something

2:44

that's either difficult or easy. When I

2:46

say easy, we're talking relative.

2:49

These tasks are still

2:51

challenging, but it's a lot more

2:53

challenging if you try to tackle a task

2:58

or learn something

2:59

and you can't remember it because you've

3:02

mismanaged your short-term memory and

3:05

your long-term memory, and you have

3:08

overloaded your working memory, and you

3:10

can't think through the problem anymore,

3:13

and you can't remember it anymore. For

3:15

me, that was the most useful learning

3:17

out of the book. Some of the other

3:18

things that the book goes into is this

3:21

idea of deliberate practice of reading

3:24

code, which

3:26

not a lot of people do.

3:29

It breaks down the activities that we do

3:32

during coding like the transcription of

3:34

code, reading code, comprehending code,

3:38

searching code,

3:41

and uh there's another one called

3:43

incrementing code. So, if you already

3:46

know what you're doing, then you can

3:48

transcribe code quite easily, and this

3:51

is actually a task that's very good for

3:53

LLMs. If you know exactly what you are

3:56

about to construct, you just tell it

3:58

what to construct and off it goes and

4:01

you don't have to do any typing.

4:02

Fantastic. Another thing that LLMs are

4:05

quite good at is

4:06

uh code searching. Obviously, I think

4:09

that's their greatest strength,

4:10

actually.

4:11

And part of reading code faster is not

4:14

only making sure that you do deliberate

4:17

practice to read code

4:20

every now and then,

4:21

but also to be consciously aware of how

4:26

concepts are chunked together. So, when

4:30

you're looking at a function and its

4:31

name is something like process and it

4:35

has 50 lines, you can't chunk that

4:38

function. You have to read the function

4:40

body to understand what it does.

4:42

But if you give that function a a good

4:44

name

4:45

and it does what it says it does,

4:48

then you can

4:49

effectively chunk that piece of code

4:52

into one small thing, which means that

4:55

your short-term memory can hold more.

4:58

Whereas, if you had to read over the

5:00

function body and you had to remember

5:03

there's a variable called user on line

5:07

13 and then that user is passed into a a

5:12

for loop and then we're checking the

5:14

properties of that user, blah blah blah

5:15

blah.

5:16

This is a lot for your your your mind to

5:19

hold one time. Whereas, if you just have

5:22

the function is called enumerate user

5:26

pictures or picture links or something

5:28

like whatever. It doesn't have to be

5:30

anything in particular.

5:33

It tells you what it's doing, so that

5:35

you don't have to hold things in your

5:37

brain. You just have to hold that

5:38

function name and that's it. That might

5:40

seem like something that's sort of

5:41

contrived, but when you're trying to

5:43

debug many things uh uh like a trace a

5:46

path through a code base and trying to

5:48

debug.

5:49

It's the kind of thing where it gives

5:51

you a small amount of cognitive capacity

5:53

back so that you can actually debug that

5:55

problem without getting super

5:57

overloaded. Uh anyhow, I went to the

6:00

website of the author and I found this

6:02

kind of graphic

6:04

um that's about the book and sort of

6:06

summarizes it.

6:07

But, I would highly recommend buying

6:09

this book. I I prefer physical copies.

6:13

Um

6:14

but I actually have just the audiobook.

6:16

When I listened to the audio audiobook,

6:18

it took me probably 10 listens.

6:22

I used to listen to it while driving in

6:23

my car, but after a certain amount of

6:26

time I started to absorb uh that

6:28

information. I think reading would

6:30

probably be better.

6:32

But, you can head to the author's

6:35

website, um see this graphic, see what

6:37

it's about. So, yeah, in summary, why

6:40

should you buy this book? For me

6:42

personally, it was one of the more

6:44

engaging books in my career, maybe

6:46

because it was an audiobook, I'm not

6:47

sure, but

6:49

I recommended this book to some of my

6:50

colleagues as well and they found it

6:52

quite interesting. Um it basically

6:54

gave me a good understanding of how my

6:57

brain works, but also an understanding

6:59

of how other people's brains work in the

7:03

exact same way so that when I'm writing

7:05

code or making some kind of a system, I

7:09

have to understand that when people are

7:10

exposed to this new code base or new

7:14

system, that they don't have all of the

7:18

pieces in their long-term memory,

7:20

whereas as someone who built it,

7:24

I was able to develop a mental model as

7:27

time went on

7:29

and slowly store that into my long-term

7:32

memory. So, I have this

7:34

advantage and perhaps curse of knowledge

7:37

where it appears like everything is

7:39

really super easy,

7:41

but for the person who just joined my

7:43

team, everything is really hard and

7:45

really complicated. So, it's about

7:47

respecting that human limitation

7:49

and and thinking about how can I shape

7:53

things so that they play nice with this

7:58

new developers

8:00

working memory and short-term memory.

8:02

How can I structure my code base in a

8:03

way where they can easily search and

8:07

[snorts] hold individual pieces like

8:10

functions and modules in their

8:12

short-term memory and to slowly allow

8:15

them to build up that long-term memory

8:18

of the system. So, that when they go and

8:21

need to add a feature or debug

8:22

something,

8:24

they're not

8:25

completely overloaded uh because once

8:28

your working memory fills up, you

8:29

basically have this experience where you

8:32

just cannot think anymore. It's like it

8:34

just it's impossible and it makes you

8:37

feel stupid, but you're not stupid. You

8:40

just you're trying to solve something

8:43

with limited capacity and as humans,

8:46

that's

8:47

that's what we have to deal with.

8:49

So, that is why I would recommend that

8:51

book because I believe it's going to

8:53

give you that understanding of yourself

8:56

and that's also going to help you and

8:58

your colleagues. So, if you want to buy

9:00

that book, I've placed

9:02

an Amazon link in the description. That

9:06

is an affiliate link where I will get

9:07

paid a 2% commission.

9:10

Uh just so that you're aware,

9:12

but I am genuinely recommending that

9:14

book

9:15

uh because it's helped me and I found it

9:17

interesting.

9:19

Anyhow,

9:20

that is my review.

9:22

I'll be doing another one on uh another

9:26

book which is actually called A

9:29

Philosophy of Software Design.

9:33

I'll upload that uh shortly.

9:36

Thanks. See you.

Interactive Summary

This video is a review of the book 'The Programmer's Brain' by Dr. Felienne Hermans. The speaker highlights the book's core lesson: software engineering is difficult due to human cognitive limitations, specifically regarding memory. By understanding the roles of long-term, short-term, and working memory, developers can better manage their cognitive load, improve code readability through effective chunking and naming, and write code that is more accessible to others.

Suggested questions

3 ready-made prompts