Earlier quoted context omitted.
Even as a man negotiating can have preprocussions, I've had my access to sales data revoked (turns out the CEO doesn't like it when you put dev milestones next to sales increases), been accused of blackmail (turns out the CEO doesn't like it when they offer you a vacation and you ask for a raise), accused of lowering employee moral (thanks for turning down my request for a raise, I decided to become a team player and…
I run a startup, so I'm on the other side of the fence, but to me it sounds like you've encountered repercussions because of your attitude. As a founder, I love when people ask questions, do their legal diligence, specify their compensation requirements up front so no one's time is wasted, ask about market challenges, and yes, even negotiate for a fair compensation if I haven't been paying attention and it turns out…
And I don't know about you, but I do know a gal who CAN "program her way out of a for loop" — I've seen her do it, such females actually exist — and if you're a decent listener, they may do you the favor of telling you about the extra crap they face due to men's kooky gender ideologies.
Anyway that said, I agree you can hack somewhat better pay out of a manager by handling them properly. Much of their professional world is social, so they are extra-sensitive to social cues. And software developers at this moment have far stronger bargaining positions than many other workers.
Among the advice that helped me (but YMMV):
* Reading _Getting to Yes_. There are alternatives to domination and passivity.
* Asking more than their highest range — if they negotiate me down, I did something right.
* Building my bargaining position by: increasing my relevant knowledge/ability, being a good presenter and listener/talker, overkilling the technical puzzles which you can do at home, and being able to walk away from a given deal.
AI prof Patrick Winston has helpful tips on giving presentations: (http://www.youtube.com/view_play_list?p=9F536001A3C605FC)
* Note that the initial hiring decision is when the market transaction is made. If you get it right, having brought your forces to bear on it, it's out of the way. (David Graber's _Debt: The First 5000 Years_ has some interesting words on this phenomenon.)
Of course, the goal depends on whether you're negotiating with a wealthy firm, a cash-strapped startup, or a social justice organization.