This chapter covers
- Analyzing why reading code quickly is hard even for an experienced developer
- Dissecting how the brain splits up new information into recognizable parts
- Discovering how LTM and STM work together when analyzing information like words or code
- Examining the role of iconic memory when processing code
- Explaining how remembering code can be used as a tool for (self) diagnosis of coding level
- Practicing writing code that is easier for others to read
Chapter 1 introduced three cognitive processes that play a role when programming and reading code. The first cognitive process we covered was LTM, which you can think of as a hard drive that stores memories and facts. The second cognitive process was STM, which is like random-access memory, storing information that comes into the brain for a short time. Finally, there’s the working memory, which acts a bit like a processor and processes information from LTM and STM to perform thinking.
The focus of this chapter is on reading code. Reading code is a larger part of a programmer’s working life than you might realize. Research indicates that almost 60% of programmers’ time is spent understanding rather than writing code.1 Thus, improving how quickly you can read code, without losing accuracy, can help you improve your programming skills substantially.