After reading this book, you will have learned how to read unfamiliar code, how to learn a new programming language quickly, and how to design a codebase in such a way that it is easy for others to read and understand.
By understanding how your brain processes code, you will get better at various programming tasks such as reading code and onboarding newcomers. The MEAP that you are reading now results from my exploration into cognition as it relates to programming.
Soon I realized I needed to learn more about learning to be a more effective programmer, teacher, and mentor. It was not knowing how people process code that made it hard for me to explain my code to others because I could not understand their confusion about code. I quickly gave up and decided to rewrite the code myself would be more comfortable. For example, I often encountered code that confused me, and lacked techniques to understand code.
When I started my career, I also lacked an understanding of cognition for a long time, which hampered my ability to be a productive programmer in many ways. While the brain plays a significant role in programming, I have found that most programmers do not understand how the brain processes code. When you read code, solve a problem, or write code, your brain is working all the time. This book has been written to help programmers get better at their jobs by exploring and applying cognitive science. Welcome Thank you for purchasing the MEAP for The Programmer’s Brain: What every programmer needs to know about cognition. What every programmer needs to know about cognition Version 3Ĭopyright 2020 Manning Publications For more information on this and other Manning titles go to MEAP Edition Manning Early Access Program
Chapter 1: Decoding your confusion while codingġ.2 Different cognitive processes that affect codingġ.3.1 Cognitive processes in other programming-related tasksĢ.1.3 A second attempt at remembering JavaĢ.1.4 Reexamining your second attempt at reproducing codeĢ.3 Remembering more code by using long-term memoryĢ.3.1 Experts’ memories differ from beginners’Ģ.3.3 Expert programmers can remember code better than beginnersĢ.5 It ain’t what you remember, it’s the way you remember itĬhapter 3: How to learn programming syntax more quicklyģ.3.1 Two forms of remembering informationģ.3.2 Just seeing information is not enoughģ.3.3 Remembering information strengthens memoriesģ.4 Strengthen memories by actively thinkingģ.4.3 Using elaboration to learn new programming conceptsĤ.1.1 What’s the difference between working memory and short-term memory?Ĥ.2 What happens in the working memory when you read code?Ĥ.2.1 Intrinsic cognitive load when reading codeĤ.3 Refactoring code to reduce cognitive loadĤ.3.2 Replacing unfamiliar language constructsĤ.3.3 You want to consider cognitive load when writing code, tooĤ.5.1 Combining state tables and dependency graphsĬhapter 5: Reaching a deeper understanding of codeĥ.1.1 Different variables do different thingsĥ.1.2 Eleven roles to cover almost all variablesĥ.1.5 Practical tips for working with roles of variablesĥ.2 Gaining a deeper knowledge of programsĥ.2.1 Text knowledge versus plan knowledgeĥ.2.2 Different stages of program understandingĥ.2.3 Applying the stages for deep understanding to codeĥ.3 Reading text is similar to reading codeĥ.3.1 What happens in the brain when we read code?ĥ.3.3 Evidence from fMRI about what code does in the brainĥ.3.4 If you can learn French, you can learn Python!ĥ.4 Text comprehension strategies applied to codeĥ.4.3 Determining the importance of different lines of codeĥ.4.4 Inferring the meaning of variable names