How do you manage programming burnout?
I do mean manage, not avoid. From years of programming, I know that I only have three to four hours of sustainable programming per day in me, but the last three days I chose to program nine hour days because. I was rebuilding a core data structure, and I knew that I would need an hour per session to get that piece of code into my head. Now I'm paying for it. Last night my dreams were bizarre, and today I may as well not bother coding at all. Tomorrow I might or might not, depending on how well I sleep.
So, in the interest of bringing this out of silence, how many hours a day can you program sustainably? How common are the folks who can program much more than three or four hours sustainably (from stories about Greenblatt among others, they seem to exist)? How do you manage your good hours?
10 comments
[ 4.7 ms ] story [ 35.2 ms ] threadThe thing is though that I have a habit of distracting myself fairly often by going on here to read articles, Reddit, etc, I'd say I normally wouldn't go more than half an hour without some forced distraction, often times even more often that that. I think doing something like this can help to keep you mentally fresh, at least it seems to work for me
The end result? I can sustain a solid hours 8+ hours a day of real engineering for 5-6 days a week without running too serious a risk of the burnout you describe whereas before I would be lucky to manage 3-4.
If you haven't slept soundly and regularly over a period of 5+ days I'd concentrate on that before worrying about anything else.
I came to this realization myself a few years ago and it was quite an epiphany. I realized that nearly all my bouts of nonproductive could be traced back to poor sleep habits.
I think sleep should be treated as methodically and rigorously as any form of exercise. When you sleep, how well you sleep, when you wake up, what you eat/drink before you sleep, etc, etc.
When I'm doing good on sleep I manage to program productively for around 6-10 hours a day and it's generally invigorating rather than draining.
It seems to be a bit of a badge to pull all nighters, but I can safely say that 80% of the time I spent in that stretch had no impact on my code at all. I would make stupid mistakes, and introduces more bugs trying to fix those mistakes.
There comes a time when you realize that a lack of sleep not only reduces productivity, it can actually hurt your existing code base.
Mental fatigue is not just a function of effort. It's also a function of monotony.