--Frank Herbert
--Frank Herbert
Of course, the problem wasn't really abandoned -- I was thinking about how to solve it the whole time. But I wasn't writing any code.
Forcing yourself to write isn't necessarily best.
I don't smoke (never have) but I am trying to emulate that; the most effective way to solve a problem is to step out and do nothing for about 5 minutes. Take a walk. Look at the trees. Anything. Then when I come back I have either solved the problem or decided to leave it with a hacked together patch and work on something else; Ill probably still resolve the hack sometime later.
The opposite is to seek out some distraction, click around on facebook or HN or something - you solve nothing but spend lots of time....
Writing is apparently different in this regard.
Programming isn't just about generating more lines of code. It's about understanding the problem you're working on. Sometimes writing code is a good way to understand the problem.