“Work effective hours, not necessarily long hours…”
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.