Debug Better: Take a break
2026-07-01 | By Nathan Jones
The lyrics to a popular Broadway song don’t just describe one wife’s entreaties to her husband, but also a powerful debugging tactic!

Take a Break - Hamilton (Original Cast 2016 - Live)
If you’re stuck on a difficult problem with an elusive solution, don’t forget to take a break. Step away from the desk to take a short walk around your building, to grab a bite of food, to squeeze in some brief exercise, heck, even to just use the restroom or refill your water bottle. Taking a short break is more than just restful, though; it can actually help you solve your intractable problem faster based on how our brains work. In “Peak Performance”, authors Brad Stulberg and Steve Magness share the work of German psychiatrist Hans Berger, who first observed what is now known as the “default mode network” of the brain.

See, your brain doesn’t just stop working on a task when you focus your attention elsewhere. Provided the new thing isn’t super mentally taxing, your brain switches to a “default mode” in which it processes memories, consolidates learning, and is at its most creative. Have you ever struggled to remember something, only to have it “pop into your head” while you were washing the dishes? Would you agree to having had some of your best, most insightful, most creative thoughts while on a walk or in the shower? That is the power of the default mode network. Taking a break from your debugging session lets you have thoughts like, “Oh wait! I haven’t tried this yet”, “Ah, there’s an easier solution; I don’t even need to be solving this problem”, or “Wait, maybe that’s why I’m seeing those error messages!”
Lin Manuel-Miranda, creator of Hamilton, put it excellently when he said, “A good idea doesn’t come when you’re doing a million things. The good idea comes in the moment of rest. It comes in the shower. It comes when you’re doodling or playing trains with your son. It’s when your mind is on the other side of things.”
The next time you find yourself struggling with a problem that seems to have no easy solution, take a break!

