Wednesday, September 14, 2005

Programmer's Block

Sometimes I've heard this type of thing called 'Programmer's block' - like writer's block. Things getting in the way and avoiding starting (or usually restarting) a project can be a real problem.

I never really have any difficulties coming up with ideas and I think this is the typical view of writer's block. Another definition of writer's block is " A usually temporary psychological inability to begin or continue work on a piece of writing." It's the continuing that's the problem after there has been a natural gap in the work. I'm not sure if it's temporary or permanent in my case. There are always lots of other things to do - especially for home projects.

Projects in teams - like office projects - tend to have a certain momentum because as one person hits a low, other team members are in their stride. This coupled with the fact that people are interested in the project day-to-day means that it's easier to avoid the something-better-to-do feeling and force yourself to start work.

I do enjoy programming. Once I've got the editor running and I'm actually coding then I can code for hours.

I know it's going to be a long process - therefore sometimes I do little jobs (not programming) first (in order to clear them off my 'to-do' list) and never get started. An old boss of mine used to want us to get little jobs finished first before starting on big jobs. This meant we never started on big jobs. What should have have done is started on important jobs first (i.e. ones that made the company the most return on investment) and ignored the small unimportant jobs.

As I've said, with personal projects it can difficult to get time for with other pretty good things competing for my time: in my case my lovely wife and my beautiful daughter. There are some less impressive time sinks: things that need doing around the house, shopping (food, clothes, presents (it's always at least one person's birthday)), etc.

Another problem: tiredness. Perhaps because I do a full time job (part programming, part design, part meetings, part management) it means I'm usually pretty whacked. Once mundane but essential things are out the way (cook tea, change baby x 4, eat tea, bath and put baby to bed), it's late and I'm after something with low mental effort that entertaining.

On Saturdays tiredness and the fact I've been in the office all week usually means I need to go out. Since we usually haven't had a chance to go out for general things this usually leads to shopping.

Once in a while we also need to go out on Saturday evening to get some socialising done - to make sure we don't turn into totally antisocial people. Play a few games, drink a few beers etc. Of all other other distractions here (excluding the actual essential things like playing with your daughter, giving some attention to your wife and eating food) this I feel is essential.

Additionally, some sections of the code are non-trivial and require some considerable concentration for extended periods of time. Obviously I try to make all sections simple in the design stage - but sometimes it's difficult to avoid difficult modules. These can easily become blocks in the work until a big amount of continuous time exists. This is dangerous for getting started. It would be great if all coding tasks were small.

A friend of mine has, I believe, two interesting tricks. Firstly, he leaves an easy bug fix or a little feature enhancement which can get you into the editor and coding. Once you are there it's not difficult to carry on. Secondly he avoids spurious tasks (like invitations to do non-specific meetings) which means he maximises the time he has to program. This is good in that any little distraction or excuse can be used to avoid programming.

The Internet (or rather the web), even more than the TV, is an almost infinite universe of distractions. I say more than the TV because, apart from Sci-Fi, there are few programs that interest me. They are all targeted at non-geeks and generally poorly written with simple but silly stories (IMHO, YMMV). The web, however, has places like,,,, etc, etc. Additionally it has re-runs of TV programs like the sky-at-night with links to a whole host of Astronomy sites. Way too many. Dangerous stuff indeed.

All too often I'll be reading the comments posted in reply to a article. This is a massive way to waste hours.

Additionally someone - on a blog or web site - will post a really interesting programming/ design/ software engineering article. Now it might be related to what I do, or things I'm thinking about. But usually it won't, in reality, effect my programming. Once I've read that article I have a horrible habit of wanting to read everything to do with it - links off that site, other articles by the same author, searches off Google, what Wikipedia has to say. If I read an article at 8pm that will be my night over!

Leaving a specific project for a while (over a week, for instance) usually means it goes off the boil. This means it's even more difficult to start up, remember where you are and actually do something on it.

Even blogging itself can get in the way. But the reason this is a coding blog is to talk about what I'm doing or things that are bugging me. I'm hoping this will have a beneficial effect. But we will see.


Post a Comment

<< Home

Newer›  ‹Older