Ive switched every few years for the last 8 or 9 years. Im on my 4th main job, though I did some consulting in between. Each time I moved it wasnt because I was unhappy but because something else came up - Ive always been careful to choose the place I work at. Meaning, when you interview, its a two-way process: theyre not JUST going after you, but you need to decide if you like them.
I helped start the company Im at now and I love it. Ive worked with most everyone for at least 3 years now, some almost 6 years. Were all really good guys, love programming, etc. etc. Since I love the work and the pay is good I wouldnt even consider switching.
On the other hand, there could be a number of reasons for someone to switch. Switching can often mean higher pay, especially in your first few years programming. You learn the most during this time and your current employer may not be willing to boost your pay accordingly. But if youre really happy, it may not matter as much - Id rather enjoy what I was doing and make a few grand less than work with people or on projects that I didnt like.
If you switch TOO often, it looks bad on your resume. Unless youre a consultant, many employers dont want to see you switching every six months or a year. It takes at least 3 months to get settled in at a company and theyll spend the next 6 months or so making up the money they spent training you and getting you settled before they start making money off of you. If you leave too soon, it will hurt them.
Then again, you may be at a company that you like and working with people that you like and even making good money, but the work itself isnt that satisfying. Maybe youre just supporting an old app and not doing any "fun" or "new" programming. If youre aching to advance, your only chance might be to switch, even if you dont want to. My first job was like that - doing VB3 programming on a large application (100+ forms, each hitting the Windows limits for the number of controls per form, etc. etc.). It was GREAT experience at learning VB, Windows, DataBases, etc. etc. I loved the guys I worked with, I got to go to conferences for free, training was free, good salary and bonuses and lots of raises (about 6% every six months - I advanced quickly). But in the end, after about 2.5 years I was just getting bored. The work was too easy and my boss didnt want to find any new contracts or hire any new people. I felt *really* bad when I left since I didnt have any bad feelings. But I knew if I stayed, Id be doing VB3 for another 5 or 10 years just supporting that app. Making a move worked out great for me, but it might not be right for everyone.
Anyway, thats my long ramble for the night
-nerseus