views:

307

answers:

7

I recently went through a period of frustration, "churning" as I tried to set up my environment to work effectively on a task. By the time I broke through and started to make actual progress, I felt tired and kind of angry. (I'll admit: in this case, it took me several days of banging my head and ultimately starting from scratch to finally get around the problems.)

This experience made me wonder: When a roadblock happens to other programmers, how long do they churn before finally becoming productive and beginning what feels like actual work?

+1  A: 

I actually spent about two days getting around this problem, before I was able to start writing useful code. I imagine a day or two is pretty common, depending on the severity of the roadblock.

eplawless
+3  A: 

It's just like writing a test - if you get stuck on one question, leave it and move on. A lot of times, switching gears will give you the perspective you need to come back to a problem, perhaps with new knowledge or a different approach.

Try breaking your problem into smaller, more manageable chunks. Make a check list, and prioritize.

That being said, programmers do get writer's block. Or coders block. Whatever you want to call it.

Charlie Salts
+1  A: 

I usually stop the churn when I reach half an hour of banging my head against the wall (mostly googling). I stop and ask my teammates (if working in a team). I have found that this helps when you are dealing with project managers in larger teams. I use this technique when the project I'm in is highly visible. This avoids you getting labeled a slacker unfairly. A lot of managers don't like it when they find out that you are spending a lot of time on one problem. You also have to be careful, in that you have to exhaust all your avenues before you talk to somebody else. Yes, I know office politics. :p

This is a bit different when I'm working on my own personal projects. I normally take about one hour before I take a break. I have found that if I put the problem aside, I can find a different way of tackling it when I get back to it later.

hectorsosajr
+2  A: 

If someone gets stuck on a problem, and everyone does, I encourage programmers to ask someone around them if they have seen the problem before. Sometimes they have, but more often not. With two heads together they can usually solve the problem quickly. A lot of churn, I think is from trying to solve the problem but not seeing it from all the possible angles. So asking for help will get their head out of the hole.

DavGarcia
+1  A: 

Lately I've noticed that I'm "churning" more than usual, and whilst there is no way to get around it aside from completing the source you'll find that you have energy to waste. I do either of the following:

  1. Exercise. A very important exercise for me as I had surgery a while ago and need to keep moving.
  2. Read a technical book. I've literally got a 5 foot pile of books that I plan to read by the end of the year and writer's block (or loading times in Football Manager 2009) give me the perfect amount of time to get through a chapter or two, except with Modern Operating Systems (Tanenbaum) as the chapters are gigantic.

Once you're done you'll either feel refreshed and ready to tackle the problem again or relieved of the stress and ready to wind down.

EnderMB
A: 

I get the most frustrated when I have to wait for my code to update from/checkout from/merge with/check into the repository. I can't really write any new code while this is going on, so I usually just stare at my screen for what seems like forever (but not long enough to start something else).

drhorrible
+1  A: 

Depends entirely on the scope and nature of the project and problem.

When I first set up my own web-server (on an old G4 PowerMac), I expected quite a bit of churn before I got to work on the site. I beat my head against installing an unsupported version of the OS for 5 days,and setting up mongrel /w apache load balancing for 8 days. When I get stuck on a problem at work, though, I usually check the usual documentation locations, check anywhere I'll likely get referred to (rtfm!), and then go ask someone. This usually takes about 30-45 minutes, depending on the problem.

Honestly, as frustrating as churning is, I tend to learn the most from it. If you bang your head against the wall long enough, you will find two things: 1) the hole in the wall you're looking for, and 2) every other nook and cranny in that wall. For example, when I was trying to set up my apache to work with multiple mongrel instances, I learned a fair bit about apache configuration and virtual hosts, simply because I spent so long looking for a relatively straightforward answer.