r/AskProgramming • u/[deleted] • Oct 07 '20
Careers Does anyone else with a programming job just feel mentally exhausted just working a few hours?
Especially when I’m stuck on something, I lose so much motivation and want to quit working and think I should just start delivering for Amazon or something. It’s so hard to get myself to keep going... and idk how to fix this.
I just started working about 6 months ago, and everyday I start off strong but lack so much motivation when I hit a wall. What can I do to keep me more motivated? Anyone else in the same boat as me?
Edit: Just took a bunch of your guy's advice! Took a break, looked through the thread, went out for a run, and then changed my task. Was able to get through the newer task, felt a lot better and more motivated. Thanks for all the advice!
21
Oct 07 '20
Yeah. Programmers only work like, 2 hours a day. Actual problem solving abstract thinking isn't a thing that happens 8 hours a day on command as much as the suits want you to think.
10
Oct 07 '20
I'm glad I'm not the only one then, I feel bad if I should be working 8 hours be realistically I'm coding for maybe 2-3 hours
7
u/flagbearer223 Oct 07 '20
Nope. The 40 hour work week was not created with computer programming in mind. Why 8 hours? Why not 7? Or 10? It's an arbitrary number. As long as you're pulling your weight on your team, they won't care if you are taking 8 hours to do it or 4 hours. Just do your work to the best of your ability and don't feel pressure to push yourself beyond that. Burnout is a very real thing, and a dev that takes care of themself is going to be more productive over the course of a year than one that gets burnt out in 6 months.
The best work I've done in my entire career was during the summer of this pandemic, when I was starting work at 7, ending at 3, and working anywhere between 2 & 10 hours (depending on how I was feeling and what I was working on. Average of around 3 - 4 total hours).
3
u/Fuzzietomato Oct 08 '20
Unless you work at a place that tracks your hours like an agency, then you work 4 hours + meetings and a little finessing if the timesheets
2
Oct 07 '20
So you are saying that most of the work a programmer does, is trying to find a solution to a problem, and not actually solving the problem? I am a student and have been wondering about this for a while. When I write code, most of the time is used thinking about possible solutions. I thought that programmers worked much more than this. This is reassuring to me.
5
Oct 07 '20
We're knowledge workers. Most of my best problem solving comes far away from a computer just sitting around thinking.
13
Oct 07 '20
It's pretty common.
https://www.joelonsoftware.com/2002/01/06/fire-and-motion/
"Sometimes I just can’t get anything done.
Sure, I come into the office, putter around, check my email every ten seconds, read the web, even do a few brainless tasks like paying the American Express bill. But getting back into the flow of writing code just doesn’t happen.
These bouts of unproductiveness usually last for a day or two. But there have been times in my career as a developer when I went for weeks at a time without being able to get anything done. As they say, I’m not in flow. I’m not in the zone. I’m not anywhere."
"What drives me crazy is that ever since my first job I’ve realized that as a developer, I usually average about two or three hours a day of productive coding."
This is from Joel Spolsky who is by all accounts a successful software engineer. I relate with that article a lot, and I've heard similar things from some of the most brilliant programmers I know.
It's not just programming, every job where you do creative mental work is hard. In grad school (in environmental sciences, not software), my thesis advisor, who was widely considered the most productive faculty member in my department, told me that excluding busywork like e-mail etc. he did about 4 hours of real work per day.
There's probably *some* people who can consistently hammer out 8 hours of code a day, but I think they are not the norm.
1
Oct 07 '20
I'm really glad I'm not the only one. Problem is, my job consists of me actually getting tasks done. I work as a contractor, and given a max amount of hours for each task. After time take that much time to do it, I don't paid. So it makes me feel worse when not being productive
1
u/smackson Oct 08 '20
Yeah, that is a serious problem with the way your pay-vs-time is set up.
Ideally, a hired programmer is given tasks to do, and also given a lot of say in how long the tasks take. Experienced managers can try to estimate the time required but it should be possible for you to push back even at the end, and say "well, it didn't take a day, it took four".
And it's like a dance, where mangers get their expectations adjusted, and may eventually glean that one of their programmers is slower (and work with that programmer on improvements), while programmers learn to estimate better.
That's why salaried jobs are a better fit in my opinion. It's really in the everyone's interests to have "knowledge workers on the job, over an extended period" as opposed to "this product needs to be made in x hundred hours".
In a contract situation, if the specific things take longer and you literally work without pay, that is abuse.
However, even salaried jobs with looser time constraints (where you can switch tasks without writing down exactly how many minutes your brain is focused on which things) can become abusive. Like I said, it's a dance, and you get to take breaks and they get to have solutions you thought of in the shower in your "off" hours... Sometimes you have relaxed weeks, sometimes you work a weekend, but if you find yourself working many weekends on that base salary, something is broken.
8
Oct 07 '20
Why do you think you lose motivation?
Personally, I enjoy problem solving and creativity, and the main reason for losing interest for me is if my creativity is restricted.
5
Oct 07 '20
I do really enjoy the problem solving and thinking it through, but some times it gets really rough. I get really frustrated I’ve stuck on it for a long while and I lose that motivation
4
Oct 07 '20
In that case going for a walk and temporarily taking your mind away from computer is exactly what you need. When you open yourself up, sometimes the solution will just come to you. When you return to your desk, you will come with a different mind. A tip for the walk: don't distract yourself with phones and such during your walk - just try to be present in the moment and enjoy it.
2
1
u/my_name_is_pizza Oct 07 '20
Yup, agree 100%. Since the pandemic and working from home full time I'm actually more productive because I can do this whenever I need and not feel weird about being away from my desk.
10
u/bakedsnowman Oct 07 '20
I think a lot of people in the programming space share that passion, but patching a piece of shit legacy application can only allow for so much creativity. You're mostly just fixing the "creativity" of the engineers that came before you.
3
u/K000PA Oct 08 '20
I don’t program professionally yet as I’m still in school but I definitely experience this mental exhaustion which I have had seem to last days after solving a problem I find really difficult.
Interestingly, in school I do a lot of maths problems that I would rank in similar difficulty to my programs but don’t experience the same level of mental exhaustion from these. It seems this is a unique thing to programming although I still find it enjoyable and highly rewarding.
3
Oct 08 '20
I agree with you! Was an EE major, and the mental exhaustion was definitely different. But that feeling of figuring it out when coding is so rewarding
34
u/williamf03 Oct 07 '20
I'm a veteran programmer and I have spent the better past of the last 10 years of may career fighting exhaustion and fatigue. Mental fatigue is no joke, your mind is like every other part of your body you need to work it to get strong, but it only gets stronger during rest periods.
Make sure you're resting well. Good sleep is important, but also make sure your not spending all day programming and then coming home to play computer games and or focus on your computer in your down time. You to let your mind take a break.
Another thing that's super important to help focus your mind and build endurance for your thoughts. Physical excersise. go to the gym a few times a week and you notice a huge improvement in your cognitive ability and your ability to focus on work for long periods of time
7
Oct 07 '20
Agree with this so much. The combo of focusing on my sleep schedule and picking up running has made me a better programmer.
3
u/williamf03 Oct 07 '20
At the start of the whole covid lockdown all the gyms shutdown. I was working from home, no excersise, only my computer for both entertainment and work. Started eating junk and drinking more beer. I didn't even notice how much stupider that made me. But I became sluggish and apathetic. I couldn't focus on a task for more than a hour at a stretch. I felt "normal" just things were hard. I felt like there was always an external excuse to my problems.
Gyms opened back up and within one week it was like I gain back 20 iq points. My motivation came back, work became easy again. It was such a sharp and noticible change. It was so obvious that I was slipping into a depression without exercise.
13
u/EvilGambit Oct 07 '20
No joke. For me it eithers works Pomodoro style or 8 hour straight no breaks.
But that's prob cuz I have ADHD so Idk how that would work for a regular person.
In any case I only get tired if the work is boring. Or I am doing 10/11 hours trying to meet a deadline.
3
u/_0tonin_ Oct 08 '20
How long are your Pomodoro intervals? I also have ADHD and Pomodoro didn't really work for me.
4
u/EvilGambit Oct 08 '20
10 minutes. It's a lot but it worked for me. Also try to use an app it makes using the technique a lot easier. But again it's an alternative. The best strategy is to take away all distractions and dive deep into the work. That's how the ADHD brain works. All-In + consequences or no works (at least useful work) gets done. For instance I don't watch or do anything 30 minutes before i start my work so I don't get stimulated by something else. I know everybody is different but that's the gist of it.
6
Oct 07 '20
Sometimes. Especially right now. I've spent the entire day troubleshooting, and not just one thing. I have to keep switching back to Reddit (or something else) every hour or so to give my brain a break. It actually helps.
6
u/lead_alloy_astray Oct 08 '20
I’m usually burned out by lunch unless there is something really stimulating about what I’m working on.
5
Oct 07 '20
Same thing happened to me, and honestly, I just asked for help from one of my senior coworkers, he helped me work through a block I had for weeks and my motivation came back full swing.
2
u/my_name_is_pizza Oct 07 '20
Also, it's way better for everyone on the team if you to ask a colleague to talk through a problem with you than to spin your wheels for days.
4
u/toepicksaremyfriend Oct 07 '20
Yep, totally normal. My brain hits a point where it just feels fuzzy and doesn’t want to deal with heavy amounts of code. I try to avoid getting to that point by taking breaks - answer the deluge of emails, switch to a different coding task, whatever.
4
u/my_name_is_pizza Oct 07 '20
answer the deluge of emails, switch to a different coding task, whatever.
Those don't sound like breaks.
4
u/CunningFatalist Oct 08 '20
Other people already posted what you can do about it (exercise, drink a lot of water, sleep, have none-computer hobbies). I would like to add to this list. If you are wearing glasses, like me, getting some with a filter for blue light can really make a difference. Ask your optician about it.
3
3
Oct 08 '20
Same here. You are definitely not alone. I'm happy to have come across this post because I typically wonder this myself. I just started work as a full-time swe and I've encountered this many times. Being stuck on something is the worst.
3
0
u/bakedsnowman Oct 07 '20
Pro Tip: Adderall and Caffeine.
3
u/Icanteven______ Oct 07 '20
It leads to burnout though. My startup was basically built on adderall but my mind was fried afterwards for like 2 years.
1
2
2
u/TerminatedProccess Oct 08 '20
Get lots of sleep, exercise, eat a low to medium carb diet, be well hydrated.. My experience is that when you never exercise, wake up frequently at night and can't go back to sleep, eatc heavy meals with poor nutrition.. well the brain can't keep up.. it does matter..
Edit.. also look at other factors.. are you diabetic? Pre diabetic? Eyes having issues?
1
u/kepper Oct 08 '20
I've found pomodoro tools to be of great help. My favourite is a plugin called Block and Focus, which I use mostly to block reddit for 20 minutes at a time, then unblock it for 5 minutes.
Most of the time when the 20 minutes is done, i'm into what i'm doing and just keep working. If I'm tired, reddit is unblocked and its time for a break!
The structure is helpful.
1
u/jffryteo Oct 08 '20
I’m glad i’m not the only one, graduating next year and i’m on a internship, beating myself whenever i get stuck and can’t move on. Hang in there frans
1
1
Oct 08 '20
No, and is because each hour of work I take 10 minutes to rest, read a little, go for water or for a walk.
1
u/hamburglin Oct 24 '20
Sounds like your not using your brain as efficiently as you could. Buy a whiteboard asap and draw out the more complex problems instead of trying to fit it into our hunan's limited working memory/cache. Use disk space more.
41
u/JacobFarms Oct 07 '20
Taking breaks throughout the day is your friend