Hello guys, I am a junior software developer and something I am struggling with is staying focused all day. On paper my workday is about 1 hour of meetings, then 7 hours coding. However I have found that I struggle greatly to stay productive for that long. If I try, then after 2-3 hours of thinking I am mentally exhausted and my productivity drops dramatically for the rest of the day. I have found I end up accomplishing more by working for 2-3 hours, then just taking like a 2-3 hour break (often a nap) then working for another 2-3 hours afterwards. This often leaves me having "worked" for only ~6 hours in a "8" hour day, but I consistently accomplish more using this method and feel much happier.
When I used to go to the office it wasn't so bad as there was a lot more little distractions and time loss like talking with coworkers or walking around the building. But at home there is nothing but you and a computer for hours on end.
Other developers working from home, what are your thoughts on this? Does this sound familiar, or are you really able to be useful and productive for that long each day?