I still believe the most efficient answer to productivity is not working and lots of resting, never do I reach higher productivity than after being idle for a while.
Probably every programmer have experienced the case of "Banged head against issue entire day, after sleeping and waking up the problem was simple". Sometimes, a nap or a walk or doing something else can trigger that same thing, but you skip the whole "banged head against issue entire day" if you do it immediately :)