LOL, well one night I brought the team over to my house, lit a big fire (I have a huge backyard), burned some steaks (no diet restrictions in that group), and we threw hatchets at an oak tree...

That's not really it, but it just goes to show what I'm willing to do.

I really pushed them to achieve more than they believed they could. I had several of the guys say they've never worked harder on a project but also never been more proud of what they built. I've heard this many times over the years.

The key is to not just crack the whip. That's so demoralizing. Soldiers are human, you can't get people to do what you want if you're constantly pressing on them. It's no different for programmers. You have to play cheerleader, you have to tell them you believe they can do just a little bit more than they think they can, you have to watch the body language and know when the team is beat. You have to employ your unit in accordance with it's capabilities. Never set them up for a failure. You have to make sure they get fed first, they get rest first. You have to insure that they can explain to others how important or meaningful this thing they are doing is. Shareholder value is a disgusting insult, what innate human need do they have that creating this thing will fill? Strike there. Most programmers just want to make a difference in someones life, make something people will use. I arranged for a team to spend time at a package sorting facility on an airfield in the freezing rain so they could feel the pain and frustration of the people using outdated technology. I arranged for another team to spend time with a group of stressed out next-to-tears "release of medical records team" that had mail come in by the truck load. Inspire the team that what they are going to do actually changes lives, then hold them to a high standard (just outside of what they believe is possible) and lead the charge by working harder than any of them. You have to run interference for them, catch 100% of the bullshit. I once inadvertently let a developer listen in on a call while a customer screamed at me and insulted the team (not present), I stood up for them and made the client apologize. The developer saw how incredulous I was, and was amazed at how much shit I took for them. He told the others and it went a long way to build trust. Trust is a big one, in the military I learned about moral authority. It basically means, if you are ALWAYS doing the "right thing" the good moral honest thing by the group when you ask them to do something hard or painful they will do it because they know you aren't asking out of self protection they know you've done everything to protect them from what you are about to ask them to do. How many times have you had a boss that would lay down his career to protect you from having to do something stupid and painful? So yes, I've been fired plenty, I've also been the guy they send in after everything is shot to hell as well. I love being a snake eater.

I can't say it's always worked out perfect or that I've always been the model leader. I've grown quite a bit over the years and learned from my mistakes. The principles I learned in combat arms do absolutely translate though.

My motto is, get the team to the top of the hill without anyone getting killed. It's a metaphor for doing hard things without it turning into a death march.

I could write so much more. Hopefully I've answered your question.