Why Does Coding Make Me So Damn Tired?
And what can I do about it?
For many people, the idea of sitting at a computer — maybe even at home, while wearing anything you like — brings to mind images of of unwinding and me-time. But newbies who are just learning how to code may be surprised to find that it is possible to stand up after a session of programming and feel like a pentathlon athlete at the end of training.
What exactly is it that makes us feel so tired? Why is it that sitting down and watching a movie or playing a game, although physically no different than sitting down to code, have such dramatically different effects not just on our minds but on how our bodies feel as well?
One part of the explanation is completely beyond our control: the brain burns up more glucose than any other organ in our body, and since glucose is used to produce energy, intense mental activity will naturally sap our biological batteries. While the chemical processes involved in thinking are unfortunately not sufficient to lose weight (unless you combine them with intense stress, which I would not exactly recommend), they do result in a feeling of exhaustion so pervasive it will tangibly affect our performance in physical tasks too.
Other parts of this problem, however, are very much under our control. Good practices can help us handle the amount of fatigue we feel at the end of the working day, so we still have some juice left to see friends, read a book or play a game.
Let’s look at what the manageable problems are, one at a time, and what good practices there are to take care of each.
Cause #1 Thinking Too Hard (Yes, Really)
There are few jobs that are so preponderantly about thinking hard and thinking well as that of the developer. Said simply, there is very much that your brain has to process: different technologies, the way each of them works and how they interact with each other, problems both concrete and extremely abstract, line by line debugging, visualising projects before they exist and then holding that mental model in your head, logic, research, documentation… the list goes on. All of these things require intense concentration, sustaining the which for extended stretches of time typically leads to mental exhaustion.
There are two things that can be done to counter this. The first is an old mantra of programmers, which I expect you will have heard before: break your problems into smaller parts, and then work on those parts one at a time. This keeps the information that your brain has to juggle at reasonable levels.
The second thing you can do is very simply to give yourself time. Tasks that make you want to bang your head against the wall as a beginner will become simple with experience, solutions to recurring problems will be reusable (or even automated), and while you won’t — nor should — ever reach a point where there is no mental challenge to coding at all, things are going to get easier. Ever heard the saying that “your brain is like a muscle”? It gets stronger with training.
Cause #2 There Is No Downtime
Work in a shop, and there will be times when there are simply no customers coming in, and your mind is allowed to wander. Programming, alas, doesn’t always have this sort of downtime. If you’re working on a hard problem, it doesn’t matter if it’s 9 a.m., 3 p.m., or after midnight — it’s going to feel just as hard at all times of the day, which means that if you spend eight consecutive hours coding, you will experience it as the equivalent of a torrid, totally non-stop shift at a regular job.
Thankfully, this problem is the easiest one to manage. If breaks are not already in your schedule, put them there yourself. Several times a day, you should pause your work and do something else, like going for a walk and enjoying some fresh air.
You can do this spontaneously when you’re beginning to feel tired, but if you find that difficult, get methodical. Create a timetable for your work which includes breaks, and then set alarms or reminders to make sure you actually take them. Usually this is recommended because it is conducive to problem solving — and it is! — but it’s also essential to make sure your brain can regularly refill its tank.
Cause #3 Problems And Stress
‘Choose a job you love’, goes the famous saying, ‘and you’ll never have to work a day in your life’. The trouble with coding is that it is a skill, not a job. As a developer, you could just as easily find yourself working on your childhood dream as you could end up doing drudge work. The reasons you should try and go for the former over the latter are many and obvious, but they are relevant to this particular topic because the nature of your work will inevitably affect how tired you feel at the end of it.
I’ve known many people who learned to code purely out of material interest, as a way to access high paying jobs. If this is what you want to do and you have the resilience and discipline for it, that’s absolutely fine.
But if you’re concerned that the problems you’re working on are leading to excessive stress and exhaustion, you should probably consider changing the type of problems to which you dedicate yourself. This may take time, especially if you have committed yourself to a professional specialisation and realised too late it was not for you, but it can be done and is very much worth doing. If you can bring yourself to code something that you truly love, not only is it not nearly as tiring — it can actually be energizing.
Cause #4 It’s Physical
A common mistake among young developers — one that infallibly leads to regret in later years — is to ignore the long-term effects that programming can have on your body and health. Sitting down for too long can be very bad for your back, typing too much can be awful for your wrists, and staring at a screen all day will be hard on your eyes. Your body will translate all of this pressure as fatigue at first, and in due time, as pain.
If you haven’t taken any steps to counter this, you should start right now, even if you are not yet feeling any symptoms. A standing desk, a mechanical keyboard, and a good chair are all valuable, but at the end of the day the most crucial factor by far is physical form. Go on walks at least once a day, not least to get away from the screen, and/or get some exercise. Research routines that will strengthen your back and core. No amount of fancy equipment will make you feel good if it is your own body that isn’t doing well.
While the above are general guidelines that, I hope, can help some people feel more comfortable during work, it is important to remember that each of us is unique — physically, physiologically, and metabolically. Your energy levels on the job will depend on factors that only you can really know — and in fact you may very well be one of those people who don’t find coding tiring in the slightest (in which case this entire article is off the mark!).
Know yourself, know your body, and find the solutions that work best for you. And if that means disregarding every last thing I have written here, then so be it.