Best ways to fight fatigue when coding?
1–10 of 20 posts
Re: Best ways to fight fatigue when coding?
#2When you feel better, come back to it--you aren't any worse for doing so!
Re: Best ways to fight fatigue when coding?
#3If you feel like taking a break, just take a break. :) When you feel better, come back to it--you aren't any worse for doing so!
Re: Best ways to fight fatigue when coding?
#4Re: Best ways to fight fatigue when coding?
#5If you feel like taking a break, just take a break. :) When you feel better, come back to it--you aren't any worse for doing so!
But the deadlines! I am sleeping so little, got too much caffeine in my system, dunno, thanks for the advice though, will try to take a nap and see some posts in 9gag
Re: Best ways to fight fatigue when coding?
#6Hammock Driven Development https://www.youtube.com/watch?v=f84n5oFoZBc
Re: Best ways to fight fatigue when coding?
#7You can code 12 hours a day, but compare the code in your first 4 hours to your last 4 and see what I mean.
Just stop coding. Do other stuff.
I find that I can extend that quality window by spreading it out more. Don't do 4 hours in a block. Do an hour, or 1.5 hours and break for 30mins. Clear the head again. Then go back, you can do this more - leading to > 4 hours of quality code
Re: Best ways to fight fatigue when coding?
#8Second, get plenty of quality sleep, that means no caffeine/alcohol for 6-8 hours before bed, and allowing yourself at least 8 hours of uninterrupted sleep.
Third, when working, get up and walk around once an hour, for at least five minutes. Have a healthy snack, do some push-ups, walk around the block, anything but sit.
Fourth, exercise! Do something that makes you sweat for at least 30 minutes a day. This one is a must, no excuses.
Fifth, stretch. This can be done during your five minute breaks. If you do nothing else in this list, do wrist flexor and extensor stretches (look them up). Otherwise, your coding career can get cut short (speaking from personal experience). Stretching takes 2-3 minutes and can make a world of difference; do them every time you're feeling stale. It's not possible to stretch too often.
Next, eat right. Keep your diet light, skip the soda and chips; eat fruits, nuts and veggies, drink water. You're already sitting on your ass all day, don't make it worse by fueling yourself with garbage.
Finally, have some hobbies that don't require a screen. Go hiking or biking. Play a sport. Learn an instrument. Bird watch. Build a tree-house. Catalog all of the different bugs in your yard. Whatever, just get away from screens.
All of this is obvious and a no-brainer, right? Well, look at the people who have been in a field for 20-30 years, the ones who stick to the above are easy to spot; they're the fit, happy, healthy people. The others are easy to spot too, because they look like hell. Get into these habits before you need to, you'll be saving your future-self a lot of trouble.
Hope that helps. Time for my workout...
Re: Best ways to fight fatigue when coding?
#9- it forces me to focus only on code when I'm coding, since 9gag/Reddit/Facebook aren't available, and
- it forces me to get up and walk around and do physical things when I'm taking a break from coding
I find I am less fatigued and about as efficient, even if it means building a queue of Googleable bugs/questions that I return to when I'm back on the internet.
Re: Best ways to fight fatigue when coding?
#10If you feel like taking a break, just take a break. :) When you feel better, come back to it--you aren't any worse for doing so!
But the deadlines! I am sleeping so little, got too much caffeine in my system, dunno, thanks for the advice though, will try to take a nap and see some posts in 9gag
If you aren't getting enough sleep, that is the reason you're fatigued. Prioritize fixing your sleep over everything else because without a well-rested brain, it is impossible to consistently write good software. Without writing good software, you can't hit your deadlines.
Seriously, your brain is a part of your body. Take care of both of them. This isn't just some feel-good advice. Taking care of yourself is actually necessary for solving difficult problems.
Also, make sure you understand the abstractions you are working with. Not doing so means you go around in circles. Make sure you have a clear "Definition of Done" for what you are building. Not doing so means you're going to go back-and-forth with your client/employer/TA and waste a lot of effort. Make sure you write automated tests as you write your code. Not doing so means that when you write a bug you could spend hours trying to chase it down.
Don't treat necessities as if they were luxuries.