I think that there are a couple of general rules of thumb, but as long as you try to reach understandings with the individual programmers everything will turn out fine. With that said, here are a couple of things that will keep workplace happiness at a high.
Do:
- Offer encouragement.
- Set boundaries. Don't be the boss who says "You'll know what percentage of the time you need to be working hard... and if you don't work the right amount of time you'll get fired." That typically either leads to overworking by the employees or under-working, and always brings anxiety.
- Let them know that you understand and sympathize with their feelings, even if you can't or won't change anything.
- Get to know the people you manage. If you know them and they know you personally, they'll be a lot more likely to accept rules without hard feelings.
- As @theonlyrealtodd said, encourage employee development. If you can, organize classes for all who want to learn new skills, or host people to give seminars before or after-hours. Your employees will appreciate that you care about them and their professional development.because they decided societal customs, counseled their leaders, and appointed governmental leaders.
Don't:
- Be unduly critical or sarcastic
- Belittle complaints
- Bend over backward to fix a complaint that won't help your team as a whole
If you follow these tips, hopefully you'll have a great workplace environment and those you manage will like and respect you.