🧠 💻 The Programmer's Brain: 3 types of confusion when you're learning a new tech
Tags: programming, tutorial, discuss, productivity
Published: 2021-12-29 18:58:13

Hi everyone!, 

Been a while since I posted on here. Want to share a great resource/book that I've been reading. The book is called **The Programmer's Brain** and it can be found here [here]( https://www.manning.com/books/the-programmers-brain)
**highly recommended**. If you have a background in **neuroscience**, you will enjoy it a lot! The author **Felienne Hermans**  does a great job of explaining the cognitive processes involved in learning to code and what happens in your brain as you actively code. 

I made a small video explaining more [here](https://youtu.be/ohMAwevxeZc)

I'm huge into **learning, meta-learning so** just sharing some of my notes from this book as well!

### Types of confusion

 When learning try to recognize the type of confusion you're facing. Knowing what type of confusion you are facing can help you to overcome it. Confusion can be classified into 3 types

### Confusion #1: Lack of knowledge

This is caused by alack of domain knowledge in your LTM/Long term memory. So you're a complete newbie and are encountering a concept for the first time and have no idea what `var`, `int` or` function` mean.


### Confusion #2: Lack of information

This is caused due to lack of information while solving/reading over a problem, for example about a certain method. So you know what methods are and how to use them but you might be lacking information on a certain method appropriate a code snippet for example` toString()`. Code nowadays uses packages, modules etc therefore, confusion due to lack of information is common. And this type of confusion is associated with your STM/Short term memory which can only store about 2-6 items at one time.

### Confusion #3:Lack of processing power

This is caused by an issue in your working memory. Working memory is used in the execution of cognitive tasks such as coding/programming. It holds new information in your current attention so that the brain can work with it. The working memory will try and connect this with other information stored in your LTM/Long term memory.

### LTM: Long Term Memory

1. First cognitive process that you rely on when coding 
2. Holds facts and info for a long time 
3. For example knowledge about what a variable is or what a certain keyword means is stored here 

### STM: Short Term Memory

1. Second cognitive process that you rely on when coding 
2. It holds information briefly as it comes into your brain this is the memory that is first activated when you read code 
3. For example someone telling you their phone number is held briefly in your STM and unless you actively memorize it and put it into your LTM the information is forgotten because the STM has a very limited size and can only hold. 2-6 things 
4. For example public static void main (int n) here your STM holds the fact that n refers to an integer and you continue working 
5. The STM holds info like what the name of a certain method is or a variable name 
6. LTM and STM work together 

### Working memory

1. Third cognitive process that you use when coding 
2. This is where the actual thinking happens 
3. So this is where you come up with solutions, thoughts and ideas 
4. When you’re reading code you’re trying to figure out what’s happening and you’re mentally trying to execute the code this is called tracing 
5. Tracing is the mental compiling and execution of code
6. For example when writing some code you might be figuring out how to filter names of customers starting with the letter “a” or deciding an index is too low  

### The 3 types of memories interact with each other and work together

 All 3 cognitive processes are involved when you are thinking or doing any task. So if you read that a variable name or parameter is `i `your brain searches it’s LTM for knowledge,  and if you don’t know what it means, then your working memory will try and figure it out. If you know what it means you will store this letter `i` in your STM while you work through the code