I am a programmer and work 8-hour workdays. I have found it nearly impossible to sit and be concentrated on my work for the whole 8 hours - I do things like hang on Stack Exchange, go for a walk, eat something, read something unrelated to work, etc. I notice others do this as well.
What percentage of the time is it acceptable to do these kinds of things? I define acceptable as fulfilling the requirement to generate quality work in reasonable time. Does resting often improve the quality of work, or does it decrease it because of the interruptions?