I got told some horrible statistic once that the average burnout rate for a coder in the games industry is 6 years. I have been doing this for approximately 11 years now so either I have incredibly thick skin or so clinically insane that the burnout causes just don't affect me. My wife would opt for the clinically insane option.
I think the secret is down to my hobbies. Before I became a coder in the games industry my hobby was making games and demos. I started out on the Commodore 64/ZX Spectrum, through to the Amiga and eventually onto PC's.
Even though I make games during the day I still make sure that I make my own games during the night - or any free time I can get. It may seem like an extension of work but to me it's a release of pent up stress energy.
What better way to get over the frustration that you feel when your boss or lead coder orders you to do something that in your bones you know is the most idiotic thing you have ever encountered? Do what they want on their project and then do it the right way in your own projects. Works for me. You can follow my latest project here.
It's something akin to new love working on your own projects - you can't wait to finish work and put some care and attention into the game and when I am having a particularly stressful time on the day job I can just unwind by focusing all my attention to my game. By doing that I start again on the day job refreshed and ready to deal with the issues that we all encounter.
It doesn't have to just be about stress relief there are other benefits to making games in your spare time. For the most part coders are creative people and while they are working on a game project for a company the most their creativity gets a chance is in the problem domain they are currently tackling - sometimes not even that if they are bug fixing.
So to get around that make a game you want to make in your spare time. It also serves as exercises to increase your experience in coding because when you make a game you touch all areas of game development not just the specialist area you may be relegated to in your day job.
Making games in your spare time also benefits the games industry. You only have to take a look at some of the great original games out there that blossomed out of home projects. Examples are World of Goo and Dyson. Even Uplink, Introversion's first game was Chris Delay's home project. Who knows, your game could be the next indie hit.
Having said all that a lot of companies have issues with developers creating games in their spare time. I am very fortunate that Introversion are very tolerant of my hobbies and indeed encourage it to a certain degree. So, if you do decide to copy what I do then first check out what your company policy is.