Sure, but the ability to stay focused enough to write high-quality code for hours on end is a talent in and of itself. I know many programmers who I think I am equal to if we both sit down fully rested and program for a few hours, but they can keep churning out good stuff for a long time after I'm tired and checking Hacker News because I lost focus.