Part 1 On reading code better
1 Decoding your confusion while coding
1.1 Different kinds of confusion in code
Confusion type 1: Lack of knowledge
Confusion type 2: Lack of information
Confusion type 3: Lack of processing power
1.2 Different cognitive processes that affect coding
Working memory and programming
1.3 Cognitive processes in collaboration
A brief dissection of how the cognitive processes interacted
Cognitive processes regarding programming tasks
What just happened in your brain?
Reexamining your second attempt at reproducing code
Why is reading unfamiliar code hard?
2.2 Overcoming size limits in your memory
Expert programmers can remember code better than beginners
2.3 You see more code than you can read
It’s not what you remember; it’s the way you remember it
3 How to learn programming syntax quickly
3.1 Tips for remembering syntax
Disruptions play havoc with your workflow
3.2 How to learn syntax quickly with flashcards
Expanding the set of flashcards
Thinning the set of flashcards
3.4 How to remember syntax longer
Two forms of remembering information
Just seeing information is not enough
Remembering information strengthens memories
Strengthen memories by actively thinking
4.1 Why it’s hard to understand complex code
What’s the difference between working memory and STM?
Types of cognitive load as they relate to programming
4.2 Techniques to reduce cognitive load
Replacing unfamiliar language constructs
Code synonyms are great additions to a flashcard deck
4.3 Memory aids to use when your working memory is overloaded
Combining dependency graphs and state tables
Part 2 On thinking about code
5 Reaching a deeper understanding of code
5.1 Roles of variables framework
Different variables do different things
Eleven roles to cover almost all variables
5.3 Gaining a deeper knowledge of programs
Text knowledge vs. plan knowledge
Different stages of program understanding
5.4 Reading text is similar to reading code
What happens in the brain when we read code?
If you can learn French, you can learn Python
5.5 Text comprehension strategies applied to code
Determining the importance of different lines of code
Inferring the meaning of variable names
6 Getting better at solving programming problems
6.1 Using models to think about code
6.2 Mental models
Examining mental models in detail
How to use mental models efficiently when thinking about code
Different levels of notional machines
6.4 Notional machines and language
Expanding sets of notional machines
Different notional machines can create conflicting mental models
6.5 Notional machines and schemata
Are notional machines semantics?
7 Misconceptions: Bugs in thinking
7.1 Why learning a second programming language is easier than learning the first one
How to increase the chances of benefiting from existing programming knowledge
Already knowing something: Curse or blessing?
7.2 Misconceptions: Bugs in thinking
Debugging misconceptions with conceptual change
Misconceptions about programming languages
Preventing misconceptions while learning a new programming language
Diagnosing misconceptions in a new codebase
Part 3 On writing better code
8 How to get better at naming things
Different perspectives on naming
Initial naming practices have a lasting impact
8.2 Cognitive aspects of naming
Formatting names supports your STM
Variable names can contain different types of information to help you understand them
When to evaluate the quality of names
8.3 What types of names are easier to understand?
To abbreviate or not to abbreviate?
8.4 The influence of names on bugs
Code with bad names has more bugs
8.5 How to choose better names
Feitelson’s three-step model for better variable names
9 Avoiding bad code and cognitive load: Two frameworks
9.1 Why code with code smells creates a lot of cognitive load
How code smells harm cognition
9.2 The influence of bad names on cognitive load
Linguistic antipatterns and cognitive load
Why linguistic antipatterns cause confusion
10 Getting better at solving complex problems
10.2 What is the role of the LTM when you solve programming problems?
Is problem solving a cognitive process on its own?
How to teach your LTM to solve problems
Two types of memories that play a role in problem solving
10.3 Automatization: Creating implicit memories
Why automatization will make you program quicker
10.4 Learning from code and its explanation
A new type of cognitive load: Germane load
Using worked examples in your working life
Part 4 On collaborating on code
11.1 Different activities while programming
Programming tasks require a warm-up
What happens after an interruption?
How to better prepare for interruptions
When to interrupt a programmer
12 Designing and improving larger systems
12.1 Examining the properties of codebases
Using CDCB to improve your codebase
Design maneuvers and their trade-offs
12.2 Dimensions and activities
Impact of dimensions on different activities
Optimizing your codebase for expected activities
13 How to onboard new developers
13.1 Issues in the onboarding process
13.2 Differences between experts and novices
Beginners’ behavior in more depth
Difference between seeing concepts concretely and abstractly
13.3 Activities for a better onboarding process
Limit tasks to one programming activity