Sometimes coding issues come up and you really need to think about something different in order to refocus.
How do you forget about a current coding problem?
Sometimes coding issues come up and you really need to think about something different in order to refocus.
How do you forget about a current coding problem?
I like to go home and kick a ball with my son. In order to do this, you will need to have children first. Also I only got 3 hours sleep last night because he kept waking me up so all in all it's a bit of a wash on the relaxation side of things.
Physical activity helps. As does reading (usually a food mag so I can think about what to do for dinner).
In the end it doesn't matter, because whatever I think about eventually leads me back to my problem. If I don't solve it, I never forget, and I just keep going back to it. Everything else becomes a blur, and until I have clarity my entire existence revolves around the problem. I know. Sad.
Rock-climbing.
It's hard to think of anything outside the here and now when you're hanging by your fingernails up a wall.
I actually go for a long walk listening to some podcasts on other technology and development subjects.
Working on a personal project at home. Usually when I'm working out the issues in my own applications I find the solutions for the ones at work and vice versa.
Fresh air, sunshine, and walking if possible. At the bare minimum, listening to music.
i get to my everyday activities and suddenly solutions pops out itself even when i don't think (and probably especially when) about my coding problem at all
inject some Team Fortress 2 directly into your brain. Its a huge stress reliever in general, as are most video games.
Take a nap or sleep! Give some time to your brain to sort it out subconsciously :)
I find running and hiding under a blanket until the problem fixes its self to be somewhat ineffective. ;)
Doing some household chores, breaking for food (and building giant sandwiches), anything which takes you out of where the computer is can be though!
Besides a good night's sleep, which has already been suggested, I take an extra long shower in the morning, and the problem inevitably creeps back into my head. Without pen and paper, or the code right in front of me, I don't get caught up in the details and language, and can usually work out the proper logic in my head like one should in the first place, but sometimes doesn't because they're pressed for time or stressed out.
I don't know what helps me forget about it, but driving on the freeway/highway helps me me to think about it without really thinking about it (if that makes sense).
Running helps me a lot. The bigger the problem is, the longer I will have to run.