Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I just wrote an amazing amount of code (for me) yesterday. I'm a new developer and my brain is fried. According to Code Complete 2.0, this isn't just me. How can I get my brain back in gear so I can get some good work done today?

share|improve this question
12  
take a break and walk around a bit – ratchet freak Jul 12 '12 at 15:08
2  
I'd hesitate to call this a syndrome. There's a big difference between your brain being tired from yesterday versus being exasperated and losing faith in the idea that you can write decent code in an uphill work environment! – RonU Jul 12 '12 at 15:25
1  
@ThorbjørnRavnAndersen Burnout is nothing like writer's block. Writer's block is an inability to produce work. Burnout is an extreme psychological condition that affects work as well as physical and mental health, with a worst-case conditions of depression and physical ailments... – Thomas Owens Jul 12 '12 at 15:59
2  
@ThomasOwens I think the point is that "I'm a new developer and my brain is fried" is not burnout. Fried brain goes away with a good nap, a little exercise, a meal, or any other diversion. – Caleb Jul 12 '12 at 16:29
4  
Find some unanswered Stack Exchange questions that you can contribute to -- on a different subject than programming! – kmote Jul 12 '12 at 17:13
show 5 more comments

8 Answers

up vote 24 down vote accepted

It is a very usual thing when we are excited and committed to finish tasks at one-shot!

short answer: Be Realistic in planning your daily work load!

Train yourself to get better in estimating daily work whenever possible. Keeping good productivity phase is more important than over-delivering and being burnt-out.

However, if it happens then you need to take control of the situation!

Some rules of thumb might be:

  • stop looking at monitor or searching when feeling exhausted or stuck
  • stand up, go and take a walk, get some fresh air.
  • go fishing (1/2 hour would be fine), seriously. Colleague of mine used to do that when stressed out !
  • stop thinking about the problem. however, your brain will still look for solution behind the scene (aka, multi-threading is kicked off)
  • After a break you should be feeling much better and more fresh to continue

In most cases, this short break will help to re-focus your thoughts and better understand what is the issue and how to deal with it.

There are very good long posts on tips and tricks as well: A Programmer’s Greatest Enemy

Another related post on SE - When stuck, how quickly should one resort to Stack Overflow?

share|improve this answer

Excercise is great for overcoming mental problems. I would reccomend biking for a half-hour or more to get the blood flowing and to stimulate your brain with some new scenery. It can sometimes be difficult to start exercising, but I promise you that you will not regret it once you are finished.

Avoid stimulants like coffee and energy drinks. I can tell you from experience that they will give you more energy, and then your brain will use that energy to be even more anxious and twitchy about how hard it is to get any work done.

share|improve this answer
+1 for the exercise part. If you are into running, and can do so safely, I find that listening to audiobooks (unrelated to programming!) helps keep the boredom to a minimum, and your mind from wandering back to work related issues. Audiobooks work better than music for me, because music doesn't occupy my mind as much, and just tends to make me (try to) run too fast. – Daniel B Jul 13 '12 at 6:18
I can indeed agree to the exercise part. I have regularly used running as a means to clear my head after particularly mentally challenging days, and it works wonders. After a short (5km) run, my head is clear, and the troubles of the day are left behind. – Pete Aug 15 '12 at 6:54

I've got news for you: you're not a machine.

There's no magic trick to "get back in gear yada yada";
you overperformed, now you'll underperform, for a while.

Good chances are it will be twice as much as the time you spent overperforming.

So... was your performance good enough to justify all the subsequent recovering?

Or you'll better find a more sustainable, rhythmic, way of working?

If it was worth, welcome to workaholicism: you'll pull out incredible feats all of your life, and brag about them, (glossing over the "recovering" parts that followed) until one of your internal organs decides otherwise.

I strongly suggest the other road, though.

share|improve this answer

One side of our work is the amount of code, this is easy to measure, and feels great when it is huge, and it even works... The other side is the structure of the code, and the amount of code we have not written, because we created a good structure, proper segmentation.

When writing a lot of code, we create answers to our questions, which is fine and very important: it has to work first, before overthinking the problem. But after this period we have a bunch of code, that is very likely partly good and partly bad:

  • there are some bugs to find (this is easier)
  • and some structural damages, carries our misconceptions, things to take apart and put together in another way.

After coding there is a meditative phase, step back, relax, look around - and let your brain just wonder around the current answers. Try to "talk" in the current language you have just created (your components, and their interfaces), put them into broader context, think about their development in the future. There will be questions arising, problems with the current answers and codes, that you'd better rethink, correct, refactor before going on. Okay, the previous huge amount of code may collapse to its fractions along the way, but it does not feel any less better.

The real aim is a tiny clear diamond doing the job of a bucket of coal... ;-)

At least this is how it works for me, and I am quite used to this "bipolar" and uncontrollable behavior of my brain. After such "why am I sooo slow??" periods I regularly identify errors in my current approach that would make any further coding a failure and garbage to be thrown out. I tend to admit that my brain knows more about this whole stuff than my conscious, willful mind.

share|improve this answer
Great answer, thanks! I'm stealing that quote and putting it on my quote wall. – SomeKittens Jul 13 '12 at 12:42
@SomeKittens - welcome... if it helps you remember the rest of the text when you feel your brain fried next time ;-) – Lorand Kedves Jul 13 '12 at 20:10

You know ...

Mens sana in corpore sano

Take care of yourself. Don't push too hard. You will work better if your brain doesn't have to worry about your health and feels relaxed that you have everything under control ;).

share|improve this answer
+1 for Latin. We should use Latin more... Just 'cause it's cool! – Sardathrion Jul 13 '12 at 7:49
@Sardathrion Quidquid latine dictum sit altum viditur. – Kaz Dragon Jul 13 '12 at 14:32
@KazDragon: tru dat. ^_~ – Sardathrion Jul 13 '12 at 14:33
@KazDragon: do you mean "videtur"? – Giorgio Aug 15 '12 at 10:06

Perhaps this will help you: Log out, before your burnout

share|improve this answer

Short answer? Do something else for a while!

Human minds are only capable of concentrating on tasks for limited periods of time. After that, boredom and fatigue set in and your productivity falls off the cliff. If you find this happening to you, then that's the time to go make a cup of coffee, check out today's XKCD, or get caught up on your email or some other job you've been putting off because it wasn't high priority.

A related problem is that of burnout, where you've been working on something for so long that you've lost the ability to care about it anymore. I'd describe fried-brain as the acute version and burnout as the chronic version. Again, the answer is to do something else for a while, the difference being that the something else is something you may need to do for a few days-weeks rather than a few minutes-hours. Going on holiday is the typical cure for burnout.

share|improve this answer

You've got to take care of yourself. My first boss used to march me through town 3 or 4 times per day whether I liked it or not. You will find that some of your most productive thinking is done exercising or just sitting outside the office talking things over.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.