Paper debugging

Paper debugging is a tool I really like using. It's arguably the most low-tech approach - yet, it is surprisingly effective.

Take a pen and paper, or a whiteboard. Write up key variables and start to execute the code in your head. Write down how those variables change, one after the other. If you get stuck, ask someone else to follow things with you, to make sure you’re executing the code correctly, in your head.

This approach is especially powerful when you have access to a debugger. First, do paper debugging. Then, run the debugger and check if you ran the program correctly in your head. This approach not only helps you with debugging: it deepens your understanding of the code, and improves your critical thinking.

One of the most efficient ways I’ve found to help someone debug their code is doing paper debugging with them. I usually bring a pen and paper to their desk and ask them, “can explain to me what happens with the code and what might be going wrong, by drawing it down? Using boxes and arrows, in a way I can understand?” This simple technique forces people to take a step back from the details they are focusing on, and has them organize the big picture in their head - and on the paper.

In the worst case, the problem is still there, but now I also understand what the problem is, and where things go wrong. In many cases, however, midway to explanation, the person debugging has the “aha!” moment and finds the problem themselves.

When was the last time you used paper (or whiteboard) debugging?


Featured Pragmatic Engineer Jobs

  1. Founding Engineer at Belfry. $140-180K + equity. New York City.
  2. Growth Engineer at Causal. Remote (Global)
  3. Founding Front End Software Enginee at Cradle. €75-160K + equity. Amsterdam, Delft, Zurich
  4. Senior Product Engineer at PartnerSlate. $100-180K + equity. Remote (Global)
  5. Site Reliability Engineer at Clarisights. €80-140K + equity. Remote (EU)
  6. Senior Software Engineer at Clarisights. €80-140K + equity. Remote (EU)
  7. Software Engineer - Product at loveholidays. £64-108K. London.
  8. Founding Engineer - Backend at Faliam. $150-200K + equity. US locations & Remote (US, Canada)
  9. Full-Stack Software Developer at Cutr. €70-120K + equity. Amsterdam, Remote (EU)
  10. Founding Backend Engineer at Flagright. €75-100K + equity. Berlin
  11. Founding Engineer at Mentava. $100-250K + equity. Remote (Global)
  12. Senior / Staff Software Engineer at Mainfold. Boston, MA
  13. Full-Stack Engineer at Bounce. €40-90K + equity. Lisbon, Remote (EU)
  14. Senior Software Engineer at Shogun. Remote (Canada, Global)
  15. Senior Backend Engineer at Gigs. €90-120K. London, Berlin, Remote (EU)
  16. Senior Frontend Engineer at Gigs. €70-110K. London, Berlin, Remote (EU)
  17. Engineering Manager, SRE and DevOps at Clipboard Health. Remote (Global).
  18. Backend Engineer at Paytient. $115-165K. Remote (US)
  19. Platform Engineer at Roar Studios. Remote (US).
  20. Head of Product Engineering at NearSt. £100-115K + equity. London.
  21. Software Engineer at CareerPlug. $130-155K. Remote (US, Canada).
  22. Full Stack Software Engineer at OpenTable. London.
  23. Senior Software Engineer at TwinWave Security. $150-200K. Remote (US).
  24. Principal Engineer at Clipboard Health. Remote (Global).
  25. Senior Java Engineer at Guestline. €60-84K. Remote (EU).
  26. Software Engineer - Backend at Bitrise. $100-240K + equity. Remote (US).
  27. Senior Software Engineer at Gruntwork. $170-203K. Remote (US, Canada, Global).
The above jobs score at least 10/12 on The Pragmatic Engineer Test. Browse more senior engineer and engineering leadership roles with great engineering cultures, or add your own on The Pragmatic Engineer Job board.