When I was learning to code C, I would often spend all night trying to chase down a bug, then finally go to bed in frustration at 5 am. After a few hours of sleep, I'd look at the code again, and immediately see the problem. I would feel so stupid for missing it before. Surrender works. Or maybe debugging all night doesn't work...