I alternate my work days:<p>On even days I ask "What can I do today that advances my work as much as possible?" and work long hours with little breaks and no frivolous web browsing, etc.<p>On odd days I ask "What seems like the most interesting and anxiety reducing things I can do?" and allow any music and frivolous web browsing I want.<p>Some of the benefits I find with this approach are (1) it weens you off of habitual web browsing, so even when you allow web browsing it's moderate and (2) I find even on my "off" days I end up usually being productive, though at a lower stress level, since luckily much of my work is genuinely interesting.
In a conversation with another developer, we debated a development that could be "a project" of some form. We disagreed on one thing, though: My conclusion was "might be interesting, but I'm not sure if this would be useful to others" while the other concluded "this is pointless, would be a waste of time to even start".<p>This post rang very true in that light. It's all very nice to only do deeply logical and important things, but it drains the brain dry because you arrive in a headspace where you are incapable of surprising yourself. Sure, you make a lot of progress - but only on existing, known problems. Those solutions you build are often useless once you get a new set of problems or the entire domain shifts and your very concept of what a problem is, in itself, is shaken. And, of course, sometimes you need to develop solutions to problems that aren't even seen as problems in the first place.<p>Usually, I do my best work whenever I act on a hunch, compelled by curiosity.<p>Screw all the tricks about how to get yourself "into the flow" and the whining about productivity. If you need motivation, do something that is interesting. Usually, it's so incredibly compelling that your brain doesn't even work in the "motivated vs. not motivated" dichotomy anymore.<p>And finally: If you need to do something that is not interesting, work hard on finding a part of it that is, first. That might be your entrance to finding it interesting again (or at least you get that part solved).<p>If you can't find anything like that, try redefining your entire approach (like "I should try to write code that in turn writes my program" or "I am now forced to code this in LOLscript"). It might end up seeming as just technological wanking (the usual "engineer takes 12 hours to program software that solves a problem he could have done by hand in 3"), but, heck, I'd rather do that than bore myself out of my mind.
I think this advice is correct, but if I follow it I'm going to have a hard time ever getting the most important thing done. Why would I want to work on that, when I can work on the most interested thing instead? :-)<p>I guess at some point one needs some discipline... but that's not very fun.