Always, always be pleasant, professional, and courteous. Yes, even to the idiots who gave you the 2:00 PM drive-bys on Friday afternoons. Yes, even to the marketing people who yanked your chain for as long as you were in the gig. You might detest them, but the only smart professional move is to nod, smile, thank them, and leave.
I say this as a former Senior IT Administrator who changed his career and is now a freelance 3D Artist. Contract work is my life. That means that my work isn't the only thing that speaks to my clients, it's how I carry myself. Talent and technical skill doesn't mean a damned thing if clients find me unpleasant. Result? I'm polite, pleasant, and professional. I don't care how annoying my client might be, I'm always upbeat, and thankful to be bringing in pay from them. Even on the occasions when a contracts end early, usually because I've beat my deadlines, all I say is "Well, it was a great experience. If you ever need this kind of help again, please feel free to drop me a line."
Am I annoyed when I finish early? Sure. But that's part of the game. I just have to roll with it.
Oh, and for the record, I've only had one client not bring me back for new project work. I did great work for them, but I chalk it up to the "You-can't-please-everyone" bin and move on.
Of course, there was this one company I worked for back in 2000. I was hired to lead a UNIX Team. It was a nightmare. One of my two techs was having a flagrant affair with the QA manager, my CIO was verbally abusive, and our developers were clueless and nasty. It was easily the worst workplace of my career...and I'm ex-military.
I tried everything professional to solve the situation. Nothing worked. When I realized that it was never going to get better, I grabbed the first lifeline out of there.
In this case, and this case only, I wrote a blunt good-bye email. It read, essentially "Working with this firm was both professionally unproductive professionally personally repellent. Do not contact me again. Don't ask for a reference from me, ever, and I'll return the favor."
I left and I didn't look back.
Two years later I ran into the team I used to manage. They were at a "We-just-got-fired" luncheon. They'd been merged with another company, and had been told that -- guess what? -- they were all out of work.
I couldn't help but empathize with these folks. The challenge of actually having to produce something in a workforce was something I knew from personal experience that they weren't ready for at all. So I chatted with them for a bit, asking how they were, and generally being pleasant.
I shouldn't have. Within a few minutes they'd all asked if I'd mind writing them a recommendation.
I told them "No." The conversation pretty much stopped at that point. With that, I took y leave and walked away. I never saw any of them ever again.
Years later, I realize how lucky I was that my behavior to them didn't bite me in the butt. Any one of them could have ended up in a position at a firm where I worked. In that one case, though, I felt justified.