I am working a "professional" software developer for about 9 months now and I realized that I have troubles coding on a 8 to 5 job when there is nothing else but coding to do (no testing, no meeting). I just get to tired doing that and cannot output 8hours of work.

Generally my company is fine with my output and my coworker (10+ years of experience) told me that he also struggles coding all day. On the other hand I fell like I owe it to my company to work as hard as possible on the code.

But I feel like this 8 hour work model does not work well on coding. I could go to a factory and fix computers there for 8 hours. If I do some testing on real hardware and machines or help the production to get some systems to the customers I can work 8 hours.

But 8 hours of coding I cannot sustain.

But most other developer seem to be able to do it.

Furthermore I am comparing my situation to a chess tournaments. I know for a fact that (almost) everybody who plays a regular tournament, where he plays 2 (classical) games a day is way weaker and more tired on day 3. Of course the stress levels are usually higher than at work, but the mental effort should be the same.

What are your experiences with that and how do you deal with it? Edit: Are there any statistical observations on this topic? Has this problem be adressed by literature?

How to work on the span I can output code?

  • As is this is extrmeley opinion based, as you ask for people opinons so likely to be voted to close. Are you looking for help on how to resolve something specifically?
    – Aida Paul
    Oct 2, 2023 at 12:40
  • 1
    Then my quesiton would be: did you raise this with your manager? People are different, I can go on 14h code binges, others work 4h days, so that's why gathering opinioons is just not going to be productive, at least by the standard for this forum. But for example "how to resolve the problem of me feeling like performing unadeuqately as I just cannot code for 8h straight" is very answerable, as we can point in the direction of solution.
    – Aida Paul
    Oct 2, 2023 at 12:45
  • 1
    Why would you think so, especially as he is happy with the performance? I had devs bring that issue to me, never ended so drastically, but obviously that's my relation with devs dependand, I don't know your manager. But the fact that you are afraid to raise ANYTHING with them is worrying.
    – Aida Paul
    Oct 2, 2023 at 12:57
  • 1
    @Nobody Gonna start smoking then :)
    – Niclas
    Oct 2, 2023 at 13:07
  • 4
    Oh gosh, I wish I could have 8 hours to code without any meetings :) Oct 2, 2023 at 14:11

2 Answers 2


Why do you consider this a "problem"? Hours coding is not a meaningful measurement. Productivity (including quality) is.

I can and do sometimes code for more than 8 hours straight when I'm in "flow state". At other times I can produce the same results by doing something else for 8 hours while the ideas gel and then brain-dump the same amount of high quality correct-first-time code into the keyboard in a sustained typing burst. Neither means that's how you should do it.

Find what works for you and do that. If your manager is pleased with your productivity, and you are, how you get there shouldn't matter.

And if they, or you, aren't pleased with your output, working longer is not necessarily the right answer. Working smarter may be -- preparing better, testing better, learning new coding idioms, improving your typing skills, a whole host of things depending on exactly where your individual bottlenecks are.

  • 1
    Sub-conscious problem is a thing that I've been doing since undergrad studies. I would feel like I'm hitting a wall for hours, go to bed, and then solve it in 5 minutes the next day. Just the other day I had to figure out how to deal with some weird data parsing issues exactly the same way... work on it for 8 hours with no progress, went home, spent time with family, and then fixed it in 10 minutes the next day.
    – Nelson
    Oct 3, 2023 at 6:43
  • 1
    I once ran into a problem and about 4am in the morning I woke up and a colleague told me exactly how to solve it :-)
    – gnasher729
    Oct 10, 2023 at 16:20

I will answer with my own experience here.

I agree with you and have the same feeling. To answer one of the comments:

People are different, I can go on 14h code binges, others work 4h days

I can also code X (read 8+ hours), if I am motivated, really in to it and can do what I want. But at work I have tasks that I can't choose and can't make decisions on and don't have all my heart in the product. So the situation is really different. And still there are days at work where it is no problem to work 10 hours, but the majority of days after 5-6 hours fatigue (mental and/or physical) is really a problem.

For my part I reduced my time to 90% and am available/at work for those hours, even though I'm not 100% productive/coding all that time. In the afternoon my quality and efficiency take a real big hit as well, in the next morning I can do the same thing in 30 mins, that took me 2h+ the afternoon before...

Companies can choose to have more efficient workers or have attendance be the most important factor.

Not the answer you're looking for? Browse other questions tagged .