I have worked with several developers who are very "hot and cold" in terms of their motivation. Sometimes they will slack off for weeks on a project and make zero progress, and other times they go overboard by pulling caffeine-fueled all-nighters and producing brilliant code. (Usually these binges are motivated by deadlines.)
That would be fine, except that I really want to keep these developers around and happy for the long term, and I am worried that they will burn out. I really want to instill a culture of long-term sustainability and life/work balance, and not just burn through Mountain-Dew-swilling, 20-something programmers and spit them out, as I've seen happen at many shops which are in a constant state of deadline-driven chaos. I also want to dial down the wild swings and keep things on more of an even, steady keel for the sake of project management.
What can I do to motivate these developers to be more even-keeled with their output? Are there ways that I can motivate them without terrorizing them with deadlines?
Or, should I just let them establish whatever work habits they want, erratic-as-hell as they may be?
EDIT: To clarify, these are all remote developers. I do keep in contact with them via email, but I can't exactly just stop by their cubicles to have a chat.
If it was a local team I would say it is due to boring work. Great developers take motivation out of building great software. Maintenance periods, too much bug fixing, doing the same thing for too long are examples of things that will make their productivity go down.
In a remote team, you can take all of that in consideration, plus the fact that they might be surfing, playing golf, working for someone else or simply spending more time learning in order to build a better solution.
You can't seat next to them, but you can give them a Skype call in a regular basis. You will be surprised on the motivation you will drive if you talk to the person and let he know you, as part of the team, is counting on him for a particular taks.
Increase the frequency of communication, make sure you are not giving them too much that they can't focus and emphasize that they can be honest if requirements aren't clear, so they don't wast time guessing and loosing focus.
TL-DR: Watch Office Space and see if any of it looks familiar.
I used to be like that sometimes when I did contracting and it was usually a lack of motivation/leadership. I'd spend some weeks not really doing anything, then sometimes I'd do a month's work in an afternoon.
Looking back, I can see that would have made things difficult, but to be fair my overall productivity was still way more than anyone else on the team, so managers liked me. I remember one system that had 25 developers and was over a year late, so the board sponsors brought me and one other guy in, and we completed the system from scratch in a month to save the day, and more importantly save the executives jobs.
My advice would be to select parts of your project that are not on the critical path, but are large important areas, which add a lot of value. For example, if your main team are working on finishing phase one, give them large parts of phase two to work on, or some complementary project that adds a lot of value to the main system.
In this way, they are motivated by a large, interesting thing to work on, and you get full value from their hyper-productivity, with a built-in limit on downside if things don't pan out.
Give them more even deadlines. As a coder myself, I used to tend to code and code and code and then I couldn't find any motivation to code for a few days because I was feeling so burnt out. Then I took a job that introduced to me to Pivotal Tracker. Now, when I code, I create a list of all of the things that need to be done, and give myself deadlines for each one so that I don't do what most programmers do and overload everything at once.
That being said, don't be afraid to utilize the fact that programmers tend to take deadlines seriously. I'm not sure what it is about them, but even if we know there isn't a whole lot of seriousness behind the deadline, we tend to crunch and get things done.
On the contrary, be sure that you're not instantiating those coding terraces yourself by setting one huge deadline once a month, which causes your dev team to freak out and frantically try to finish a task.
Bottom line, programming needs to be balanced. It's far too easy to fall into a zombie like state and code the entire night away. As far as what you may help them with, that's all you can do. I have other tools I use for myself to make sure I shower and shave on a regular basis, but they have to set those reminders themselves, otherwise, they'll never follow them.