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, Front End and API at Causal. $175-225K + equity. Boston.
  2. Senior Software Engineer at Portchain. Coppenhagen or Remote (EU).
  3. Engineering Team Lead at Portchain. Coppenhagen or Remote (EU).
  4. Software Engineer - Infrastructure & SRE at Koyeb. €71-105K + equity. Remote (Global).
  5. Software Engineer - Service Mesh & Networking at Koyeb. €75-105K + equity. Remote (EU).
  6. Security Lead at Conjecture. £85-210K. London.
  7. Senior Software Engineer at Consensus. Boston, MA or Remote (US).
  8. Senior Frontend Engineer at Plain. £75-110K. Remote (Europe / 2 hours within GMT).
  9. Lead iOS Engineer at Polarsteps. Amsterdam or the Netherlands.
  10. Distributed Systems Staff Engineer at Reframe Technologies. Remote (Global).
  11. Senior Software Engineer at Karat Financial. $160-225K. Remote (US time zones).
  12. Senior Backend Engineer - Ruby at Rise Calendar. €80-120K + equity. Remote (Europe). I'm an investor.
  13. Senior DevOps Engineer at Droit. $170-205K. New York.
  14. Senior DevOps Engineer at Droit. London.
  15. Full Stack Engineer at Applied. £45-69K. London or Remote (UK).
  16. Solution Engineer at Pigment. $90-180K. New York or Toronto.
  17. Senior Backend Engineer at Pigment. €60-130K. Paris.
  18. Senior Engineering Manager at Whimsical. $185K + equity. Remote (US, Canada).
  19. Engineering Manager at Bobsled. $170-190K. Remote (US, Europe, South America).

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 and apply to join The Pragmatic Engineer Talent Collective.

Want to get interesting opportunities from vetted tech companies? Sign up to The Pragmatic Engineer Talent Collective and get sent great opportunities - similar to the ones below without any obligation. You can be public or anonymous, and I’ll be curating the list of companies and people.

Are you hiring senior+ engineers or engineering managers? Apply to join The Pragmatic Engineer Talent Collective to contact world-class senior and above engineers and engineering managers/directors. Get vetted drops twice a month, from software engineers - full-stack, backend, mobile, frontend, data, ML - and managers currently working at Big Tech, high-growth startups, and places with strong engineering cultures. Apply here.