This section was taken from Robert L Read's How to be a Programmer: A Short, Comprehensive, and Personal Summary (direct link to the specific section.)
How to Stay MotivatedIt is a wonderful and surprising fact that programmers are highly motivated by the desire to create artifacts that are beautiful, useful, or nifty. This desire is not unique to programmers nor universal but it is so strong and common among programmers that it separates them from others in other roles
This has practical and important consequences. If programmers are asked to do something that is not beautiful, useful, or nifty, they will have low morale. There's a lot of money to be made doing ugly, stupid, and boring stuff; but in the end, fun will make the most money for the company
Obviously, there are entire industries organized around motivational techniques some of which apply here. The things that are specific to programming that I can identify are:
Finally, if possible, measure the impact of your work in terms of something that will be personally motivating. For example, when fixing bugs, counting the number of bugs that I have fixed is not at all motivational to me, because it is independent of the number that may still exist, and is also affects the total value I'm adding to my company's customers in only the smallest possible way. Relating each bug to a happy customer, however, is personally motivating to me.
- Use the best language for the job.
- Look for opportunities to apply new techniques, languages, and technologies.
- Try to either learn or teach something, however small, in each project.
This has proven useful for me and I hope that it is useful for you too. Please check out the full page as indicated above.