I've been in your position more times than I care to count. I hate it. If I was an employee and my own boss, I'd fire myself several times over for procrastination and laziness. Unfortunately, it's simply not possible to fire yourself!!! So, uh... the unpleasant truth is that you're going to have to fucking deal with it. By "deal with it", I mean you need to take a long moment to sit back and think introspectively about why you are procrastinating and come up with some solutions/strategies for overcoming them. Firing people is the easy way out, but its not the ideal solution to becoming productive. I mean, think about it: You've got a talented person who can't get any work done because they're being blocked. That's a self-management problem which requires some clever people problem solving. It would be a shame to throw all that talent away. So, I hope you come to the same realization I've come to: quitting or firing is not the solution.
So, since quitting or being fired is not an option, you have to figure out how to get around your block. What triggers your procrastination? How are you managing your project?
Here are a few things I've learned about myself through introspective insight on projects:
1. I lack the self discipline to start on things I find unpleasant. Instead of writing code, I have a tendency to play games because that's more entertaining. If I play games for too many days without making progress, I start to feel guilty and bad about myself. When I buckle down and write a lot of great code, I end up feeling even better and more accomplished about myself at the end of the day. So, the "net pleasure" from working hard vs. playing favors working hard, believe it or not. It may or may not be the same for you, but this realization makes it much easier for me to justify working instead of playing.
2. If I have a big project which is nebulous in scope/size and is difficult, I get confused and don't know where to begin. It's hard to get started!!! One thing I do know though is that once I do get started, I get into the groove and am unstoppable. So, my goal every day is to get started and into the groove as fast as possible. One strategy which works for me is to think of that "groove" as a freeway. When you are in a car and you want to get on the freeway, you have on ramps and off ramps. These are places designated for getting up to the appropriate speed or slowing down. You certainly don't go zero to sixty in three seconds. You need time to get up to speed, merge into traffic, and get into the flow. With respect to programming and code, you also need to design yourself on ramps and off ramps. You do this by creating small, simple tasks which you can easily dive into the next day. The purposeful planning of your next days task gives you a bit of direction on where to begin and something to look forward to. The next day, you wake up fresh and think to yourself, "man, I've been thinking about how I want to rotate my camera and I've got some really interesting ideas I want to try out. Let's try out my first one!" and you hop right to it. After I solve the simple problem, I am sitting on the laurels of victory and am eager to carry my success onto the next problem, whatever it is. Before I realize it, it's time to end the day. But, before I end the day, I quickly plan out what I want to do the next day and am honestly, quite excited to continue working.
3. Burn out is a bitch!!! You may be an unwitting victim of it. I was working 12 hour days, 7 days a week for 18 months. It was terrible and I burned out after about 12 months. I do not recommend it to anyone. What I do recommend is a much more SANE work schedule. Let me argue for this by considering the merits of working long vs. working less hours. First, let's recognize that the amount of work which gets done in an hour is not a constant. Let's pretend for a moment that it is, and in 1 hour, you measure your progress to be 50 units. So, if you work for 8 hours, then will you produce 8 * 50 units (400 units)? Or, you work for 12 hours and produce 12 * 50 units (600). No! The first hour, you may produce 40 units, get up to 60 units, then it slowly starts to taper off to about 20-30 units around 8 hours. If you continue working for another 4 hours, you may net yourself an extra 40 units (diminishing returns, and all that..). The next day, you come back and resume working. However, your previous days work exhaustion spills over into your current day! If yesterday you were able to produce 600 units by working for 12 hours, today you'll only be able to achieve 550 units! This continues on and on, day after day, with each days subsequent exhaustion piling up onto the next day. Eventually, you'll be working 12 hours and only producing 50 units, if even that!! What do you think that does to someones morale, when they look back on their last 12 hours and realize they were only able to produce 50 units at best? They lose motivation and steam, and whatever project they were working on becomes one hell of an impossible mountain to surmount. Now, let's do something a bit more sane and only work for 8 hours a day, 5 days a week (40 hours/week). The amount of exhaustion build up is much less, so the subsequent days productivity isn't impacted as much. Granted, we won't produce 600 units in a day as we would with a 12 hour day, but that won't matter much since we're on a sustainable work schedule, working a sustainable pace. On day one, we may produce 400 units. By day 5, we may be doing 350 units. But then we get a 2 day weekend where we can stop working and completely recharge. The following monday, we're back to averaging 400 units. We can sustain this work schedule and level of productivity for a very long time! So, one of the worst things you can do for your project is over-working yourself to burn out! If your employer is forcing perpetual crunch time on you, it is time to bring it up as a serious issue impacting the project which needs to be rectified immediately, or its time to find a new employer. You'll need to take a break to recuperate from your previous employer before seeking new employment, which costs you time and money!!! So, in short: Don't overwork yourself into burn out! One of the many symptoms is procrastination!
4. Change up your scenery! We're human beings. Our minds crave novelty. If you've been working on the same thing for a long time and feel your interest dwindling, it may be helpful to change your venue. If you're in an office cubicle, take a few days and work from a local coffee shop. If you've been in the same coffee shop too long, try a park or accomodating cafe. Try to find a meet up of some sort (look for a local Beer && Code event, or start your own!). The problems you're working on may be the same, but the new venues can reinvigorate your excitement for your work.
5. Find people who are genuinely interested in what you're working on and share it with them! Again, we're social creatures and the act of sharing something we're passionate about is a great motivator for working hard on it! If you're working on a game and you share it with other people, it's also a great way to get feedback on what you're working on! Is the game concept fun? Is it playable? Is it enjoyable? Is there a show stopping bug? Whatever it is, strive to deliver solutions, not excuses! If whatever you're working on is not interesting to absolutely anyone, then it's time to re-evaluate why you're working on it. I mean, hey -- we're building software which is used by other people. Unused software, regardless of its merit, is useless!!! If nobody is genuinely interested in your software project, you've got a bigger project management problem to worry about than just the construction of it.
6. Take some time to actually eliminate distractions. You've got a finite amount of time in a day which you can divide up in any way you choose. How are you spending it? If you are intending to create software for 8 hours today, but you find yourself compulsively reading the news, refreshing reddit, checking your email or facebook status updates every 10-15 minutes, you've got a distraction problem!!! Here's the deal: Nothing is so important that it can't wait to the end of the day. Do you really need to know right now that your facebook friend just ordered a latte they were dissatisfied with? Do you really need to check your email or messages so frequently? etc etc. In truth, it's all bullshit to distract you from doing what you set out to do. It's a trap of instant gratification, like rats pressing a button to get a food pellet. Break the cycle and opt out of it, it's not serving you productive gains. I wrote a small app in C# to record what exactly I'm spending my time on and it exports it to a plain text file. At the end of the day, I can see exactly how much time I wasted and figure out how much is and isn't allowable. By getting hard figures, I can actively manage it. Coincidentally, even the act of intentionally stopping the clock to waste time is enough of a deterrent to actually not fall into a time sink. Realistically, some distractions are much harder to eliminate than others (such as having to use the bathroom due to too much coffee).
7. Every few days, honestly ask yourself, "How am I doing? What should I be proud of? What can I do better?". If you make continuous improvement a personal habit and you see gains, it becomes inspiring to continue even further!
8. Sleep and exercise (I'm a delinquent here). I don't sleep in the most optimal sleep pattern. I tend to stay up till 4am and wake up past noon. My girlfriend comes home after 5pm and wants to spend time with me, so I have to interrupt my work halfway throughout the day (right choice, imho) and resume after she goes to sleep. I certainly need to fix my sleep patterns. In terms of exercise, I went out and bought a pull up bar and hung it over my door ($35 at Target). Initially I didn't have much for upper body strength and could only do about 3-5 half pull ups. But, every time I get up and walk out my door, I try to bust out as many as I can do (within reason). I just hit an all time record of 14 dead hang pull ups the other day and I've put on a noticeable amount of muscle on my arms, back and chest. I don't do more than 15 minutes of exercise a day and I feel fantastic. If I get stuck on a hard programming problem, I can take a short break and bust out some pull ups and push ups. Get that blood flowing! There's this crazy idea ... the mind and body are connected! If your body is weak, it affects your mind, and vice versa! I find that my fierce determination to max out my pull ups also carries over into a fierce determination to smash whatever programming problem is plaguing me. I WILL do it, no matter what it takes, even if I have to do everything manually (which works, btw!).
9. If nothing else works, quit fucking around and just do it! Get it out of the way. First comes work, then comes play. Don't get the two backwards.
10. I'm not you and you're not me. What works for some doesn't work for others. The key is to intentionally sit down and figure out what's happening and why, and then try to come up with ideas to try out (even randomly if you're really stuck), and then EXECUTE THOSE IDEAS!!! (ideas don't count if they're not executed!)