“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

  1. Active Recall: When you think of a question, don’t go directly to the manual. Take a guess and then look at the research.
  2. 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)
  3. Persevere: Segmentation shouldn’t mean giving up. You need to keep working and practicing.
  4. Be Curious: Be open to new ideas, solutions and methods of thinking.

General Approach to Debugging

Follow scientific method:

  1. Develop a general theory of the problem
  2. Ask questions leading to a hypothesis
  3. Form a hypothesis
  4. Gather the test data against the hypothesis
  5. 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.