Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

How do I stop getting so brain-fried from coding?

This question isn't about coding per se, but more about how to stay mentally fit in order to code. I love programming, but after a few hours I begin to get mentally exhausted. My brain starts turning to mush and I start getting easily frazzled. This happens especially when I am working on a challenging project. When it happens, I wonder to myself how I could ever do this as a full-time job if I can't even do it for four hours without becoming brain-fried. Is this common? Does it get better with more practice and experience? Aside from the mental exhaustion that follows I really love coding and figuring out how to make something work, so I know I have the passion to push through. But this still makes me wonder if coding as a career is for me or not. I would love to be able to have a whole eight hours of coding time to get a lot accomplished, but it just seems my mental stamina begins to significantly decline around 3-4 hours in. Any advice or experiences anyone would like to share would be very appreciated.

2 Answers

leon wheddon
leon wheddon
3,280 Points

Hi Michael

I think you've answered your own question without realising it! You say you enjoy it and have a passion for what you're learning & if you're seeing results them it must be sinking in! I'm working full time and trying to fit in an hour in the evenings & hammering it on weekends, for me it's about making sure i do SOMETHING everyday, even if it's just one video. it's perfectly normal to get tire after a few hours, I'll take a break for an hour then come back, maybe watch a show or wash the dishes even, But coming back and wanting to come back are key imo. I don't imagine any developer sits at their desk for 8 hours just doing work, so there's no reason to feel you have to either.

Thanks for your comment Leon. Good points.

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Michael Cook ! I agree wholeheartedly with leon wheddon ! This may sound really silly, but the best way to learn something new is to learn something else that's new. There's the idea of "mental agility". Go out and look at some of the research out there on mental agility and how to improve it. What you'll find is a lot of information on how when we learn something and make new habits, we are actually creating entirely new neural pathways. You are rewiring your brain constantly around new information. And a lot of that... is done when we sleep :smiley:

Lots of people use a "Pomodoro" timer/technique and take frequent breaks. This is known to promote mental agility and help you learn and reform those neural pathways. It's not surprising at all that you feel sluggish the longer you sit. Your brain needs a little space to work on things in the background while you do other things. Now, I may sound like a crazy woman but I have the vast majority of my "Ah HA!" moments or moments when I think "Hey! Wonder what would happen if I tried it this way?" when Iยดm doing something mind-numbingly boring like folding the laundry or doing dishes. There's a reason why I have two lists on my refrigerator. One is for grocery shopping, and the other is for "Ah HA" moments.

I wrote this blog article for Treehouse and you might find it an interesting read. Also, check out this particularly inspiring episode of the Treehouse show and know that you are far from being alone! :smiley:

Hope this helps! :sparkles: