“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?” - Kernighan and Plauger, The Elements of Programming Style
While reading the extremely interesting The Debugging Mindset, I learned a lot of interesting points. While the article is mainly focused on getting better at debugging, a lot of it applies to learning in general.
2 Self-Theories
According to Dweck, a researcher in the field of motivation, individuals are either entity theorists or incremental theorists. This is a spectrum and can vary for people depending on the fields.
In short, entity theorists views intelligence or skills as talent while incremental theorists believe that they can learn by working hard at the limits of their skills.
This is important in not only debugging but almost every field of life. If you keep pushing yourself further by following incremental mindset, you will learn a lot. In fact, research has proven that underachieving students with malleable mindset can be better performers than high-achieving students with entity theory.
How to learn
- Active Recall: When you think of a question, don’t go directly to the manual. Take a guess and then look at the research.
- Segmented Study: Take breaks, switch tasks. Don’t spend whole nights chasing a single bug (my opinion: don’t spend nights in the office at all)
- Persevere: Segmentation shouldn’t mean giving up. You need to keep working and practicing.
- Be Curious: Be open to new ideas, solutions and methods of thinking.
General Approach to Debugging
Follow scientific method:
- Develop a general theory of the problem
- Ask questions leading to a hypothesis
- Form a hypothesis
- Gather the test data against the hypothesis
- Repeat
Forming hypothesis is very hard, don’t just rely on intuition while doing it!
If you like this summary, go and read the full article. For more summaries, articles and fun tidbits, follow me on Twitter.