I agree with some opinions here. I am in software too and over the years it seems to be quite common for star developers to get another offer, tell the boss that they are leaving, and then get a counter-offer during the ‘please stay’ plea from the boss. However, for the non-star employees the discussion was usually ‘Congratulations, let’s set your last day’.
Personally I have never been comfortable with the counter-offer technique as either an employee or a manager. As an employee, I’ve always felt that if you feel you deserve a raise, you should make your case to your boss and give them a chance to set things right. Obviously, if they don’t agree that you deserve it, then you look for another job and don’t look back.
As a manager, I’ve felt that once an employee goes through the heartbreaking process of building the gumption to look, writing the resume, and then interviewing, then their heart isn’t there anymore. It would be a matter of time before the glow of a counter-offer wears off and they realize they are still unhappy at the same job. Most of the developers I know really, really don’t want to look for another job; it takes a lot to get them motivated to start.
And as everyone else said, don’t bluff – you may have a manager that is a naive as I am. When I first started managing, I had a lot of developers that were really down on everything: the company, the product, the pay, each other, everything. One day one of my key developers told me he had a couple of offers and that he was resigning. I liked the guy and was bummed that he was leaving, but I knew from my own experience that when it is time to leave, it is time to leave. So, I told him that I was sorry he was leaving, was there anything I could do?, congratuations, and good luck. Months later I find out from someone else in my group that he didn’t really want to leave; he had been hoping I would give him a counter-offer and he wouldn’t have to move. It hadn’t occured to me that someone I (thought I) knew well would play that angle.
So my advice would be: if you feel good about the new job and don’t have misgivings, then just take it and don’t look back. However, if you really want to stay at your current company, simply ask your boss for a raise and provide a compelling case why you deserve one. In other words, from the company’s perspective, why you are worth more money. If they don’t agree or try to delay it until the next month, next quarter, or next review period then just give notice. The good side being it will make the exit interview really easy.