The software equivalent of writers block is what I call 'getting stuck'. You have a problem, and for whatever reason you're blocking on how to move forward. Maybe it's especially hard, maybe it's boring, but for whatever reason you end up doing other things instead of what you need to be doing.
This all is a little bit embarrassing to write, since it's a post about how I sometimes end up wasting time and not doing what I know I need to be doing. Lately I've been actively trying to understand and fix this problem, and I've concluded that becoming more aware of the problem is key to solving it. I write now because I expect I'm far from unique in this respect. I hope that others who have similar experiences may find some value in how I'm trying to describe things here.
Recognizing your own tendencies when you get stuck can be really helpful.
It's good to be able to step back and recognize habits, and think intentionally about how you can modify them to help get you back on track as soon as possible.
- I'm in danger of getting stuck when the problem is big. When it's too much to think about, it's easy to drift onto other things and put off the big decisions.
- I get stuck when I have a big task and I get interrupted a lot. It's hard to get in the groove of a big project when something else is coming up every few minutes.
- I get stuck when issues outside of work pull my attention away. This is similar to 'getting interrupted', but is more about other stuff which is on my mind, rather than other people who need my attention.
- The real kicker is that I get stuck when I've already been stuck for a while. Stuck-ness has momentum, and the longer it goes on, the more intractable the problem seems. Believing in the intractability of a problem is a huge motivation-killer.
Recognizing that you have a problem is the sine qua non. You won't get very far until you at least recognize that there's an issue to be dealt with. Just understanding you have a problem is no guarantee you'll be able to easily overcome it, but it's rare to overcome a problem you're not aware you have.
What does it look like?
- I check email and Twitter too often.
- I get a snack I'm not really hungry for.
- I do dumb stuff like brush my teeth in the middle of the day.
- I read Wikipedia pages about completely random events.
I expect this list is familiar to most people, and could easily contain hundreds of other items. Really, the point of this list isn't so much what's on it, but rather what's not on it... the task you should actually be working on.
How do you get unstuck?
Here's the real question. Generally, drifting into stuck-ness happens unconsiously and unintentionally. I never say to myself "hey, this is a tough project, I think I'll blow some time doing nothing." But the truth is, that's exactly what happens when you're stuck, and productivity suffers. This leads to self-inflicted frustration that you're still faced with this big problem which hasn't been dealt with.
I find that since I spend so much of my day doing things purely in my head and on my keyboard, shifting to doing something which is more physical and less mental is a really good way to loosen the blockages. I've had lots of "AH-HA!" moments walking my dog, taking a shower, or doing other things which have no bearing on the actual problem at hand. Don't underestimate the power of these moments, but also keep in mind that "just do it" is often the right decision.
You have to work on knowing yourself, and figuring out which strategy is appropriate to the situation. I tend to take some quick break in my office, then try to "just do it", and then try something more disruptive (like asking for help or taking a walk) if I'm still not getting anywhere.
Over time, it should happen less and less.
If it doesn't, you need to find the patterns in what gets you stuck. Is it always hard to come up with the ideal database schema, or to feel like your test coverage is good enough? Are you uncomfortable with filesystems? Does Oracle seem like a total mystery you'd rather avoid?
If you're constantly facing things you hate, figure out how to get onto different projects. Getting stuck is, I think, both a strong indicator of and a cause of unhappiness. "Just do it" is a great short-term strategy, and a terrible long-term strategy. You should strive for a work environment (and a mental environment) where stuck-ness is the exception not the rule.