Some of the things that have worked for me:
- Decouple analysis from coding. There are some things that should NOT be done in front of a terminal. Get a pencil and paper and go somewhere else. By the time you’re done, you’ll have plenty of stuff to code. (I have found that the main reason I get stuck is because I have not spent the requisite time “away” from the terminal laying things out. I’m always in too much of a hurry to “get back to work” before I’m ready.)
- Get a customer. They’ll give you something specific to work on. If it’s maintenance, all the more reason to get to just dig in and get to work.
- Ask yourself the question, “How am I making this too hard?” If you listen to yourself long enough, you’ll probably get a good answer and a fresh approach.
- Reduce scope. Remove outlying cases. Solve only for the most probable case. Get that working perfectly. The process of doing this will probably shed a lot of light on how to set up structure that will also handle the outlyers.
- Back up your current version and the go wild on it with some crazy approach. Knowing you have a good backup frees you up all the more. At the end of the day, if you have something cool, keep it. If not, just restore your backup and throw away today’s work. You may have wasted the code, but you didn’t waste your time. You probably got the juices flowing again.
- Backup your current version and forget about it. Wipe the slate clean and start over completely. You won’t have to worry about satisfying all the overhead you’ve already created. After a day or two, keep either the original version, the new version, or more likely, you’ll have a new project: combining the best of both. In any case, you’ll be busy working again.
- Set the project aside and work on something easy and fun that no one needs and provides little value to anyone. The byproduct is that suddenly, you’ll discover you’re working and enjoying it. The next thing you know, you’ll “want” to go back to the more difficult project.
- If you’re stuck on something, post your dilemma on-line. Read the responses. You may get a different approach that you can play with. And even if you don’t, you won’t feel so alone. That may help.