Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I find I solve the trickiest problems in one of three places: Walking my dog, taking a shower, and laying in bed trying to fall asleep. I find that stepping away from the keyboard, and my programming environment entirely, allows me to let go of all the basic assumptions I hadn't even realized I'd been making.


At one of my old jobs, some of the other employees jokingly referred to me as "the master of the arcane."

Any time they had a problem they couldn't figure out, they'd come to me and ask me to help with it.

My trick was to listen to their problem and then go take a walk. Our office was in a nice area with plenty of sidewalks. So, I'd get the details of the problem and then go take a walk for about a half hour while I thought about the issue.

After the walk I was able to sit down and my computer and implement whatever weird thing it was.

These days I do work from home (freelance) so I find myself pacing around my house while trying to figure out something odd. I think I've worn a groove in the grass at this point.

It really does do wonders for the brain.


This is often repeated by a lot of people, but I think it might be affected by a bias. Perhaps we notice more when we solve problems away from the keyboard because we are not supposed to be working then. Perhaps we selectively label those the trickiest even though we solve many more problems staring at the monitor trying really hard.


There is certainly some confirmation bias going on in these reports, but I must say I sometimes find walking away from the problem for a short while (looking at something else, taking a relaxed lunch instead of eating at desk, just nipping out for a few minutes of fresh air, or just chatting to a colleague about something related or otherwise) can work wonders.

Sometimes a relevant idea will just come to me while I'm away (I carry a pencil and bit of paper for such occurrences, as it is very annoying to get back to my desk and forget the beneficial train of thought!), sometimes I'll hit the problem from a slightly different angle when I get back and find success that way.

I think mainly the difference is usually stress. Forcing your mind to think about a particular problem can drive you into a mental rut in which you think the same things over and over and get nowhere, getting more irritated at your lack of getting anywhere as time goes on which creates more stress and makes matters worse. At times like that inspiration is less likely to strike (or be recognised when it does). Having time to ponder a problem, consciously or otherwise, can be very fruitful.

This fits in quite nicely with the idea that the sleep pattern we've evolved is as much about rearranging what we've learnt and experienced while awake as it is about anything else (like the brain's DBA taking time to run DBCC REINDEX on everything so our thinking is more efficient the next day). It also tallies with the fact that some of the most successful people I know are generally more relaxed (and not just because they are more comfortable due to earlier success) than myself!


This. Circa 2002, I debugged a mutli-threaded Java server, by taking a hard copy of source and walking through it on paper.

A developer sitting in another office had written it; I was roped in at the moment the nasty bug was discovered, basically to have a look from a fresh set of eyes. It had to be shipped in a couple of days time.

The neat thing about writing code on paper is the amazing gain in clarity. Of course, like all approaches, it has to be taken with a grain of salt.

It seems to me that the necessity of scrolling on a Laptop screen somehow creates additional cognitive overhead, especially when we want to rapidly jump across sections of code. Perhaps, it forces us being physically away from the machine to reflect more deeply on the problem.


Same here... Just a week ago, I spent the whole night looking at code trying to find out how some mysterious data loss had occurred. Needless to say, I had been to bed half an hour before it hit me what had happened. I instantly got up and fetched my laptop to confirm that was indeed the case.

I think you are right, about letting go of all assumptions, and that helps you find the edge cases.


I'm the exact same way.....I've solved quite a few pesky problems with my code in the shower at the start of my day.

I've found that when I'm in bed trying to fall asleep is when I do a lot of brainstorming for my ideas rather than problem solving


I'm the same way, and I know a lot of people like this. Many times I've been working on a project with friends and we'll get stuck on something and we'll joke that someone is going to have to go take a shower, so we can get past the hurdle.

Also, I may have, on one or two occasions, written code on the tile walls with tub crayons.... after all, you get a brilliant idea, you don't want to lose it in the time it takes to dry of.

I'd say that in addition to letting go of assumptions, it's just as much about breaking patterns.

I often find that once I start trying to fix a problem, my brain gets stuck in that way of fixing it and if that doesn't work, it then becomes a matter of fixing the fix, etc. It all just kind of builds up. If I'm standing in the shower with hot water pouring over my head, I can free my mind of whatever I was concentrating on and then new ideas emerge.


I agree and yes I do sometimes bill my shower time. That's where the best work gets done after all

But I think it's much deeper than that. It's the basic truth that creativity emerges from a still mind. First you spend hours obsessing in front of the screen seemingly achieving nothing. Later you seemingly do nothing and solve the hardest problems.

It's an excellent practice to take breaks where you do nothing. Pretend to be a smoker and step out for a smoking break every hour or so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: