Kay lives here

working with the web

Missing in action: code mojo

The past few days have been very frustrating. The symptoms:

  • my house is spotless, all laundry is done
  • inboxes – both physical and virtual – are cleared
  • tasks for the next three months are neatly scheduled
  • feed reader is cleared of unread and flagged items
  • physical and virtual desktops are clean and organised

But no matter what I do, I can’t seem to concentrate on code for long enough to actually do anything. Things that should be easy are not. Things I thought were obvious seem fraught with difficulty. Complication lurks in every conditional.

This has happened before. I don’t think my zen-like state of Getting Things Done is the cause of my lack of code focus – I think it’s a symptom. In the absence of any real work, I’m seeking refuge in structured procrastination.

I’m sure I’m not the only one that experiences this. So, what do you do when your coding brain goes on holiday? How to do you get your code mojo back?

7 Comments

  1. Summary : Small baby steps.

    Do something small, the first step to something bigger. Jus t go back to the coding 101 principles. How do we start something. look for the next step, and do it.

    It is a problem. I’ve faced it many a time, especially if the work in mundane and boring, I will put it off and put it off.

    How to fix it… this works for me..

    I find he right environment helps, energetic music, removing all the distractions (email, forums, twitter, feeds, phone) and just fooling yourself into the first step.

    Then as you finish that first step and the next try and give yourself micro goals like:

    1) finish the task faster
    2) try a different way of doing it, a different method or direction
    3) Try use software / tools that is new to you.
    4) Attempt to integrate something new (that you have just picked up) into the code.

    May work for you.

  2. I often try to admit to myself when I don’t have the mojo. If I don’t HAVE to get something done, then I will play the guitar or go for a walk. Night time walks are my favorite.

    It seems that your body might be trying to tell you something and your mind doesn’t want to listen.

    Unless Clients are whipping you, take a few moments to be unproductive. You will, oddly enough, be more productive for it.

  3. I know the cause Spring Fever.
    http://www.answers.com/topic/spring-fever

    Last year I remember it well, I just could not sit at my desk, I found my self doing other stuff, ah.. other than work. I found my self dreaming about going to a baseball game. (I don’t even like Baseball)

    After a few hours I forced myself to get back to work. And just as Gary suggested, start small. Find the desert (the fun part you have been looking forward to doing) part of the project and do it first. Then once you get your code mojo back, go for the rest.

    A short walk during lunch may also help.

    OR

    Just go back to bed for a few more months and all will be well. :-)

  4. I’m in a bit of a slump myself right now. I have 3 projects in the hopper and all are stalled for various reasons. I’ve found that during slow times it’s best to take full advantage of them. Close the laptop, put down the nerdy books and go do something else.

  5. I agree with the above. Ditch the PC, go and do something physical like play squash or perhaps even something that will make both you and Dave… happy, then get a good night or days sleep (whichever way it works for you).

    Doing the above will give you some much-needed rest, but also gives your subconscious a chance to background-process the problems you are having. I believe that I do about 70% of my best work without ‘actively’ thinking about it.

    Good luck!

  6. you’re amongst company. Even the famous Joel Spolsky has been there.

    from http://www.joelonsoftware.com/articles/fog0000000339.html

    “Once you get into flow it’s not too hard to keep going. Many of my days go like this: (1) get into work (2) check email, read the web, etc. (3) decide that I might as well have lunch before getting to work (4) get back from lunch (5) check email, read the web, etc. (6) finally decide that I’ve got to get started (7) check email, read the web, etc. (8) decide again that I really have to get started (9) launch the damn editor and (10) write code nonstop until I don’t realize that it’s already 7:30 pm.”

    “Somewhere between step 8 and step 9 there seems to be a bug, because I can’t always make it across that chasm.”

  7. Pingback: How to get back in the zone | kay lives here