The best trick I have ever figured out for doing this is to separate all activities into "in front on my computer" and "away from my computer". If you are working ineffectively in either mode, switch modes. If you are still working ineffectively, consider a break.
I often sit in front of my computer, writing code, refactoring, or testing and realize that I'm getting nowhere. Then I conclude that the reason I'm not making progress is because I'm not quite sure what to do.
Determining what to do is an activity that I have found much more effective away from the computer. So I log off, grab pencil and paper and go somewhere else, anywhere else. As soon as I have something I'm sure I want to code, then (and only then) do I return to the computer.
This works both ways. If I'm away from my computer, but feel I'm not creative enough, then I just decide to write something, anything, and go write it. Sometimes just getting the smallest things done opens the doors to getting bigger things done.
If you don't feel like working - go and do something you feel like doing. You'll be a lot more effective when you feel like working again.
Just having the span of 5 minutes to not think about work enables me to attack the problem with renewed vigor. Ultimately I get more done, and I'm happier for it!
"I've been working 12 hour days pretty consistently"
That's not an approach for avoiding burnout.
It's also not a bad idea after lunch. It's 4pm here and I just got done doing some pushups. Looking forward to doing some more before I leave.
He absolutely nails it when he says:
The best way to stop burnout is to avoid it entirely through balanced behavior and thinking.
It's definitely important for an employee to pace himself appropriately but it's also equally important for milestones from on high (whether they be one week or 2 months out (any non-vague deadline planned for longer than 2-3 months is bound to be ripe with failure)) to be both realistic and challenging. Not 24 hour death march challenging, challenging that you have to plan your time appropriately and, when working, you work efficiently.
In my experience the major driver of burnout is bad planning. I also think this is a large part of why our type prefer startups. Because startups do very little planning compared to BigCos, it's mostly up to the employees to manage their time effectively. Of course, the pressure is there to do as much as you can but it's tempered by not having completely arbitrary nonnegotiable deadlines that you absolutely have to come through on. (The deadlines you do have to come through on in startups are usually not arbitrary which makes a world of difference when trying to meet them.) When planning is out of sync with provided value it burns people out.
Also, make sure you have a way to give yourself credit at the end of the day for all the work you've done. Often it feels like you've achieved nothing, but if you look at the list of checked off items on your TODO list, or your list of code checkins it'll give you a healthy sense of accomplishment.