When I program, I tend to hack things out rather than follow some set plan. The reason is because I’m not very good at writing plans yet. If I try to make a plan, I end up questioning everything and never get anything started, let alone completed. It’s known as analysis paralysis. Basically, you become so afraid of doing something wrong that you end up not doing anything at all.
So I hack. In this way, I’ll have something to work with. Maybe when I started I was clueless about the problem domain, but every moment I spend taking actions means I learn just a little bit more about what I am doing. Some planning can be good, of course, but if I don’t know what I am doing, there is only so much I can plan. Hacking is like chipping away at a stone.
Of course, hacking only gets me so far. By definition, hacking means I am blindly working, and so I can expect to hit a wall or two. Sometimes hacking allows me to make a lot of progress quickly. Other times, I can’t seem to figure out how to do what I think I need to do. It’s at those points when I start to doubt my abilities. I begin to think “I might not be able to do this.” Eventually it can become “I can’t do this.”
So how do you deal with “I can’t”? I realize that such thoughts are due to doubt. It’s kind of funny since the point of hacking, for me, was to avoid not knowing what to do. So to have more productive thoughts, I change “I can’t” into “How can I?”
“How” is much better because it forces you to think. Whenever I start to question if I can do a task, I always ask myself, “Well, how would you do the task?” It puts you into an entirely different level of creative thinking, and I’ve found that being creative is always motivating.
For example, I was working on a project recently, and I hit one of those walls. I couldn’t figure out how to design some classes to get the kind of behavior I wanted. Up to that point, the code was flowing, and then…nothing. So I started to ask “How can I do this?” And I started getting detailed. What is it I am trying to do exactly? I know the basic idea, but how do I get from here to there?
I suppose you could say that this is the kind of thing I should have done in the first place. If I knew I would have had such a problem, I probably could have prepared for it. Since I didn’t, I think what I’m doing will help me gain the experience I need. Eventually I’ll be able to anticipate all manner of problems, but for now I’ll have to hit those walls before scaling them. The important thing is that I don’t hit that wall and decide that I’m permanently stuck.
Edit: It seems that Steve Pavlina’s article for today also covered this topic, but in a more general sense. Check out How to Squash Negative Thought Patterns for a good way to change “I Can’t” into “How?”