Coder's block
Writers block is well known and documented. It's something that I experienced first hand whilst writing Beginning Merb, and it's not easy to overcome. I read on wikipedia that a neurologist reckons it's the creative parts of the brain being disturbed that causes writers block.
Coding is creative. Whilst writing code may not be as glamorous as publishing a book the two are closely related; creativity is needed to solve problems. As a coder it is safe to assume that at some point in time you might 'hit the wall' and develop coder's block.
What can be done to overcome coder's block?
If you look at some of the advice for writers block, it revolves around changing your mental state.
- Take a break, relax
- Just write
- Break it down
So how do these tips relate to coding?
Take a break, relax
This is fairly self explanatory, drop what you're doing and do something that you find relaxing for a while. Take a stroll around the block, get the blood circulating again. It might even help to have a quick nap, a soft reboot.
Just write
Get back into the flow. Pick up a side project and code on that for half an hour or so. Better yet create a branch and work on an easier feature. If you're not writing tests, now is as good a time as any, write a few tests for the code you're stuck on.
Break it down
It could be that you're just attempting to accomplish too much at once and don't know where to start. Take a step back, break the features down further until you have a chunk of code that can be implemented easily. It can help to have another pair of eyes while breaking your problem down, as they might be able to spot an other approach.
Make sure your problem is well defined, having a vague specification can lead to blocks.
Update: problem definition from alex_young
Hopefully after a while you'll be able to overcome the block and get back into it. I would be very interested to hear how others deal with coder's block, have any tips of your own?
Posted 8 months ago

5 Comments