Interesting. I've been thinking about this recently and, yes, while I can sit in front of a computer screen for eight hours, I reckon I'm only productive for six hours. So I try and work in three 2-hour bursts.
It's worth saying that my situation's slightly different in that I work for a tech company, but I'm not a coder.