2 Speed reading for code
This chapter covers
- Understanding why reading code quickly is hard, even if you are an experienced developer
- Dissecting how the brain splits up new information into recognizable parts
- Understanding how long-term and short-term memory work together when analyzing information like words or code
- Comprehending the role of iconic memory when processing code
- Demonstrating how remembering code can be used as a tool for (self) diagnosis of coding level
- Learning how to write 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 long-term memory, which you can think of like a hard drive that stores memories and facts. The second cognitive process is short-term memory, 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 long-term and short-term memory 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 code, rather than writing code.[1] Thus, improving how quickly you can read code, without losing accuracy, can help you improve your programming skills substantially.